Thanks very much for helping correct what I was doing wrong. It's working like a champ now, although I still have to fiddle with the damage numbers for play balance.
I have another question, though.
I have a skill that binds movement (and drops EVA), but that only functions with the party is in a certain environment, as defined by a switch. [[it uses plants to bind the enemies, so isn't available indoors, or other places where there aren't any plants. The player can still use the skill, it'll just fail.]]
Would I set that up like this?
$game_switches[switch number]?b.add_state(state number)
if $game_switches[id];addstate method;end;damage_here
Two related questions:
1) what is the code to store the actor-ID of the user (a) into a variable?
$game_variables[999] = ???
2) If the ID of the user is stored into a variable by the damage formula, is that before or after a feature calls a common event?
Basically I want to know if an actor uses an item that calls a common event, can the damage formula of the item be used to get the ID of the user into a variable before the common event is executed, allowing the common event to use that ID to target its effect - or is a script neccessary to get that user-ID for the common event?
(there is a script from Tsukihime that already provides this data to common events, but I want to know if it's possible without a full script)
v[999] = a.id will set variable 999 to the user's id and common events are run after the skill has finished being used.
@Andar - just do what Xypher posted... I have actually used that same method before in order to run a common event for the user of a skill. and if in case v won't work for you, you can change it back to $game_variables
Hey, I was making my own custom formula for my "Turn Undead" skill that's supposed to check to see if the enemies element rate was dark or not. As a result, one of two things should occur: 1) The monster is a dark type, so the attack does extra damage, 2) The monster is not a dark type, the attack does substantially less damage.
Here is my formula:
b.element_rate == 3 ? ((a.mat * 2) - (b.mdf / 2)) : ((a.mat * 2) - (b.mdf * 1.5))
The three main elements used in the game under the terms tab are Physical, Light, and Dark. With Dark being third on that list. Please let me know what I am to do about fixing it. when ever I use this attack it keeps saying "Monster1 was not affected" when it clearly was marked as a dark monster.
what would be the exact formula for that?:
-Attack deals a.atk * 5 - b.def * 2
-and reduces the the attackers defense
I tryed:
a.def / 8 ; a.atk * 5 - b.def * 2
but it didnt seemed like it worked.
I'm new in this and dont know much about the mechanics of rpgmaker vx ace
it should be
a.def /= 8;damage_here
the difference lies in the = sign...
a.def / 8 simply means you divide the defense by 8 and return the value while the original a.def won't be changed... putting an = will make it such that the result will be the new value of a.def
though IMHO, I really suggest not doing that because it can have unwanted consequences... you're better off using a reduce defense state instead and do
a.add_state(state_id_of_lower_def_state);damage_here
also, b.element_rate returns the multiplier for the damage depending on the element of the attack and the resistance of the target, it's not the elements themselves ...
Enemies also don't cannot have a specific element in Ace, so I'm not sure why you thought of doing that... the only thing you can do element related is set-up elemental resistances and that never gives an enemy a specific element...
Yeah, that's also the best way I can think of, without using an external script...
ok, yeah sorry I had no clue what I was thinking. but I got it fixed though. since I know ill have a set of "undead" enemies, ill just have it check for the enemy numbers in the list. so say if the zombie is 003, ghost is 067, and skeletal warrior is 129 then ill have it check to see if the enemy id is one of those numbers. if it is, then it does the first set of damage, if the enemy id is not one of those, then it does the second, much lesser, damage calculation.
though I do think it's far easier to just directly use your own element for that attack and set the corresponding resistance values for the undead enemies
ok, I'm trying to boost affinities for various things. I know you can do an affinity for items (a.pha), but what are the variables called for the rest? (defense effect, recovery effect, magic damage rate, floor damage rate)
also, are Defense Effect, Physical Damage Rate and Magical Damage Rate applied automatically, or do they have to be added to the calculations manually? I'd like to create "affinities" for certain types of attacks by repurposing these, but I'm not sure how, or even if it's viable to do so.
all parameters are explained in the help file, where their short names are also listed.
depending on the type of parameter, some parameters are additive with a base of 0%, while others are multiplicative with a base of 100%.
no, I mean for, say, Physical Damage Rate, do I have to do (a.atk-b.def)*b.pdr in the formula box, or is the b.pdr implied?
through testing, I know a.pha has to be put manually into the formulas...I'm just wondering if the ones I don't want to use, like pdr, can be repurposed.
AFAIK, if it's a healing skill/item pha will be applied automatically... same with pdr and mdr, if it's recognized as a physical skill/item then pdr will be applied, same for mdr
after extensive testing, REC, PDR and MDR are applied automatically, but PHA is not.
ok, so I'm trying to recreate Sabin's "Spiraller" attack, but to no avail. sofar, my formula box is simply a.add_state(1), and the on-use effects healing all HP, MP, TP and status (including death - revival is sparse in my game). I've also tried if b.state?(1);b.remove_state(1);a.add_state(1);else;a.add_state(1);end, with similar results.
in testing with enemies, it's either not hitting alive members, or not hitting dead members (mattering on whether all allies collapsed is selected), and the enemy using the attack isn't disappearing, so the battle is finishing with an enemy onscreen.
am I missing something, or is this a skill best suited to troop events?