Is there a way to make a skill that does the following:
* replicates a normal attack (so this part is quite easy to do by just copy/pasting the Attack skills)
* but this is the hard part, add +2 Range to the currently equipped weapon
It cannot be a fixed Range value because the equipped weapon could have a Range of 2 or 3 for instance.
So the skill would just do the same as a normal attack but with respectively a Range of 4 or 5.
Does anyone know if this is possible to do this?
EDIT: Also another question:
How can I add the value of variable in this script call?
this.playerMoveTo(X, Y);
So:
this.playerMoveTo(v[1], v[2]);
but in proper syntax?
MV - SRPG Engine MV - Plugins for creating Tactical Battle System
● ARCHIVED · READ-ONLY
-
-
in the SRPG Core help info you have "weapon range" and "skill range"..Is there a way to make a skill that does the following:
* replicates a normal attack (so this part is quite easy to do by just copy/pasting the Attack skills)
* but this is the hard part, add +2 Range to the currently equipped weapon
It cannot be a fixed Range value because the equipped weapon could have a Range of 2 or 3 for instance.
So the skill would just do the same as a normal attack but with respectively a Range of 4 or 5.
Does anyone know if this is possible to do this?
If that doesnt solve your needs you will need some scripting..
(it shouldnt be impossible to do, but i didnt made such a skill ,so i cant give more advice)
i didnt test anything on this request
edit
How can I add the value of variable in this script call?
/(example)
this.playerMoveTo(v[1], v[2]);
JavaScript:this.playerMoveTo($gameVariables.value(1), $gameVariables.value(2));
for more info about basic Scriptcalls, pls read the links which can be found in my Signature spoiler:
(thats what i started with to get into learning JS for rpg mv)
Usefull Scriptcalls Info (Page is not made by me)
alternative Scriptcall List (Page is not made by me) -
The problem is that it always SETS a range.
It doesn't take the current value of a range (eg the weapon range) to add to it.
I would need a skill that dynamically borrows the weapon range and adds 2 to its own range.
Basically the idea is for an archer to have a long shot.
If their bow has range 3, the long shot gives extra 2, allowing the normal hit to reach range 5.
But if the bow has range 4, the long shot should get range 6 (+2) not 5.
This is the part I find very complicated to implement with the tools from SRPG_Core. -
probably its easier to make an extra longshot skill which is only availleble if the requirements are solved..The problem is that it always SETS a range.
It doesn't take the current value of a range (eg the weapon range) to add to it.
I would need a skill that dynamically borrows the weapon range and adds 2 to its own range.
Basically the idea is for an archer to have a long shot.
If their bow has range 3, the long shot gives extra 2, allowing the normal hit to reach range 5.
But if the bow has range 4, the long shot should get range 6 (+2) not 5.
This is the part I find very complicated to implement with the tools from SRPG_Core.
Atleast as far as i know.. and there is a lot of stuff that i dont know myself..
(like i saied other solutions will probably need scripting and read trough all functions in the srpg Core that are related to skill/weapon-range) -
to make an extra longshot skill
I did that, but it's not as subtle, gameplay-wise. Thanks for your replies. -
Anybody know a way to stop items from giving experience?
-
@Diz89 Targets with a final aiTarget score of 0 or less won't be selected as targets. If a skill has no valid targets, it will be treated as unusuable, and the built-in AI will skip over it the same way it would if the skill had been sealed, or was otherwise unusable.
-
Thx @Doktor_Q! I made good progress with this statement.
Now I'm at the next problem for the enemy. I have 2 enemies, one ranger with a bit less atk then a warrior. both of them can only use the Attack Skill 01 from the standard demo. THe only thing I changed ist the aiTarget, which is:
<aiTarget: ((b.def < a.atk) && (b.atk <= (a.def + 3))) ? 100 : 0>
what I wanted: If the def of the target is less then the atk of the user AND if the atk of the target is less then the def stat (plus three), so he might take some damage on purpose. If both is true, then make a score of 100 and Zero otherwise. If Zero they should do nothing I think?
If I do a test run then the ranger, who is first, does what is intended. He walks to a possible target and attacks. The warrior walks to the same target and uses the skill, but I get the following error on the console and a crash:
SyntaxError: Unexpected end of input
at Game_SpawnEvent.Game_CharacterBase.targetScore (SRPG_AIControl.js:665)
at SRPG_AIControl.js:527
at Array.forEach (<anonymous>)
at Scene_Map.srpgAITarget (SRPG_AIControl.js:520)
at Scene_Map.srpgAICommand (SRPG_AIControl.js:414)
at Scene_Map.srpgInvokeEnemyCommand (SRPG_AIControl.js:291)
at Scene_Map.update (SRPG_core.js:5387)
at Scene_Map.update (SRPG_core.js:6823)
at Scene_Map.update (SRPG_UX_Windows.js:106)
at Scene_Map.update (WAY_Achievements.js:849)
EDIT: I also tried different Skills with the same notetags just in case or I deleted the +3 and made the whole formula:
<aiTarget: ((b.def < a.atk) && (b.atk <= a.def)) ? 100 : 0>
still the same error.
Or do I have to still make a wait/guard skill to wait a turn if they have nothing to do?
Did I do something wrong? -
@Diz89Thx @Doktor_Q! I made good progress with this statement.
Now I'm at the next problem for the enemy. I have 2 enemies, one ranger with a bit less atk then a warrior. both of them can only use the Attack Skill 01 from the standard demo. THe only thing I changed ist the aiTarget, which is:
<aiTarget: ((b.def < a.atk) && (b.atk <= (a.def + 3))) ? 100 : 0>
what I wanted: If the def of the target is less then the atk of the user AND if the atk of the target is less then the def stat (plus three), so he might take some damage on purpose. If both is true, then make a score of 100 and Zero otherwise. If Zero they should do nothing I think?
If I do a test run then the ranger, who is first, does what is intended. He walks to a possible target and attacks. The warrior walks to the same target and uses the skill, but I get the following error on the console and a crash:
SyntaxError: Unexpected end of input
at Game_SpawnEvent.Game_CharacterBase.targetScore (SRPG_AIControl.js:665)
at SRPG_AIControl.js:527
at Array.forEach (<anonymous>)
at Scene_Map.srpgAITarget (SRPG_AIControl.js:520)
at Scene_Map.srpgAICommand (SRPG_AIControl.js:414)
at Scene_Map.srpgInvokeEnemyCommand (SRPG_AIControl.js:291)
at Scene_Map.update (SRPG_core.js:5387)
at Scene_Map.update (SRPG_core.js:6823)
at Scene_Map.update (SRPG_UX_Windows.js:106)
at Scene_Map.update (WAY_Achievements.js:849)
EDIT: I also tried different Skills with the same notetags just in case or I deleted the +3 and made the whole formula:
<aiTarget: ((b.def < a.atk) && (b.atk <= a.def)) ? 100 : 0>
still the same error.
Or do I have to still make a wait/guard skill to wait a turn if they have nothing to do?
Did I do something wrong?
i think it is something with the eventspawner even if the error message doesnt show the eventspawner plugin..
probably also with auto acting enemy Unit
at Scene_Map.srpgInvokeEnemyCommand (SRPG_AIControl.js:291)
"Game_SpawnEvent" is only in the eventspawner Plugin ..at Game_SpawnEvent.Game_CharacterBase.targetScore
(non_spawned events are "Game_Event")
"SyntaxError: Unexpected end of input"
I think this means that somehow a part of the code isnt in the correct syntax and stops working at that point..
I had this syntax message when i used code that wasnt setup
correctly
( for example a missing "}" or some code that had other missing parts and couldnt be read correctly from the system.. sry i cant explain it better )
EDIT
=> i guess the AI Plugin only looks for "Game_Event" and doesnt understand "Game_SpawnEvent"..
(this can perhaps need a compatiblety patch .. i dont know for sure,perhaps i am totally wrong with this theory..)
=> also i never had such problem in my demos with spawned enemy units but i used the eventspawner & spawned_enemy_units differently and didnt test the edited eventspawner Plugin yet.. -
I have the feeling, that the targeting happens to fast...not sure, how to describe it better. I also tested a bit more with breakpoints to see the data.
The console log says for the error line
score *= eval(item.meta.aiTarget);
Enemy 1 (Ranger): Acts normal, the formula is inserted in the aiTarget
Enemy 2 (Healer): Acts normal and heals (or wait, if there is no target)
Enemy 3 (Warrior): Acts normal
SO...now while Enemy 3 deals the damage, enemy 4 is calculated. The noteag of is only skill is:
<srpgRange:2>
<srpgMinRange:1>
<doubleAction:false>
<aiTarget: (a.mpRate() >= 0.3) ? 50 : 0>
(so as long as his mpRate is bigger then 30%, he should use his awesome skill)
but in the mentioned line above it says " (a.mpRate() ", the rest is...well...gone :3
The description of the skill is also shown correctly.
So...yeah...if the notetag is cutted, then of course the error is shown as in the " there is something missing for the correct syntax :3
It could be right, what you say @Dopan. Not sure, if a patch is required though XD
Edit: I also gave the skill to enemy 1 or 2 and it works. Just a small Test :3 -
@Diz89I have the feeling, that the targeting happens to fast...not sure, how to describe it better. I also tested a bit more with breakpoints to see the data.
The console log says for the error line
score *= eval(item.meta.aiTarget);
Enemy 1 (Ranger): Acts normal, the formula is inserted in the aiTarget
Enemy 2 (Healer): Acts normal and heals (or wait, if there is no target)
Enemy 3 (Warrior): Acts normal
SO...now while Enemy 3 deals the damage, enemy 4 is calculated. The noteag of is only skill is:
<srpgRange:2>
<srpgMinRange:1>
<doubleAction:false>
<aiTarget: (a.mpRate() >= 0.3) ? 50 : 0>
(so as long as his mpRate is bigger then 30%, he should use his awesome skill)
but in the mentioned line above it says " (a.mpRate() ", the rest is...well...gone :3
The description of the skill is also shown correctly.
So...yeah...if the notetag is cutted, then of course the error is shown as in the " there is something missing for the correct syntax :3
It could be right, what you say @Dopan. Not sure, if a patch is required though XD
another theory:
the AI Plugin has 3 little functions that use the words "Game_Event"
perhaps if you clone/copy these 3 functions and put them right below the 3 original functions .. with changing only: "Game_Event.prototype" into "Game_SpawnEvent.prototype "
..that could do the trick?
i dont know if other functions need edits aswell or if all this makes no sence, but its worth a try.. -
@Dopan
I just tried this (well...just cloned the functions with the rename for starters), but nothing happend. Same error still...
But thx again for trying -
Is it possible to remove the "Weapon" section in the battle menu, that allows to enter the Equipment menu?
My problem with it is that it gives a common inventory to all characters even when they are 50 tiles apart. Of course if there is a fix to this annoyance, I'll be happy to try it as well. -
if its the Battle_command you mean, this can be made with switch when using the edited core of my github..Is it possible to remove the "Weapon" section in the battle menu, that allows to enter the Equipment menu?
My problem with it is that it gives a common inventory to all characters even when they are 50 tiles apart. Of course if there is a fix to this annoyance, I'll be happy to try it as well.
If its about going into the menu scene while battle than this menu can be edited with 2 plugins.. i did that in my demos..
-
Thank you. I'm thinking I could just open (once) the Equipment menu whenever a treasure chest is opened, and then make it unavailable the rest of the time.
But that leaves me with the question, what's the script call to open the Equipment menu? -
I am just commenting report a game-breaking bug in this plugin- Suddenly and inexplicably, after the first player turn and the first enemy turn, the game goes into this situation where the game behaves as if both sides are using the End Turn command, so you cannot play (this was on the first sample map of the demo, with unmodified events). I tried removing any plugins I had added myself (Yanfly Core, Yanfly Message Core, and SRD Auto NameBox for Yanfly Message Core), but that didn't help either. I was using this in a game jam entry, but because of this bug, I am having to drop out of that jam.
After talking with some other people who have used this plugin before on various Discord servers, we all have had this happen to use while using it. -
Does anyone know where the metadatas are created? In which of theses plugins an in which line? I want to help @Diz89 but I can't find the responsible code...
With metadata I mean 'item.meta.aiTarget' (SRPG_AIControl, line 664) for example. -
@CarpenterScr
try this
Can I open the equipment menu of a specific actor with a script call? --
@JtheDuelist
sry but without Error info, screenshots ect, your info doesnt help ..
( also its nothing i had seen myself ,so i got no idea sry)
--
@MisterFu
meta data is allways someting like a "note" which the system reads,in that case its probably the Skill Notetag: "ai target"
so its the Stuff which @Diz89 added and showd in his postings
-
Is it possible to teleport an unit somewhere? For instance from 5,10 to 8,13, but directly, without it having to move all the way there.
-
of course, you can use the eventcommand :Is it possible to teleport an unit somewhere? For instance from 5,10 to 8,13, but directly, without it having to move all the way there.
or you can use the Plugin from DrQ => SRPG_PositionEffects
this was shown in the demos, and explained a few times in this topic allready..
(sry but it will take longer time till i can reupload a new tutorial demo,if i will make a new one in future, and i want to avoid to explain the same stuff again inhere)