Hiya! I'm trying to create custom messages in the battle log using the damage formula. The way I'm trying now is through having the formula use an empty skill with a message. I've looked in many places, but I don't see how to use the damage formula to either use a skill or at least to force an action. Does anyone know how to do this? Thanks.
How to make a damage formula force action or use a skill
RPG Maker VXAce SupportHmmm...not sure if this will work yet, but can you use the damage formula to call a script command? If you can do that then you could call the force action command directly, though you'd need to know what the force action command is. I know Archiea posted a list of all the script calls for ACE (and MV) somewhere, unfortunately my internet is too slow to do a search right now (I time out when I do them). I'll see if I can find them when I'm on an internet that isn't slower than a carrier pigeon, unless someone has a better answer by next time I'm logged on.
While it might not be the most efficient solution, if it is only for the extra message I'd usually use states for this. You could create a short lasting state with no icon/effect and an appropriate "inflicted" message and let the skill add it.
The problem with this is that state messages are limited to naming the target first thing. But it could work for some stuff.
Ok, here is the article with the script call list. Now I have no idea if these will work in the damage formula, but it's worth a shot.
Edit: Not sure it if it is just me, but those script calls are hard to read. Wonder if there is a way we can let Archeia know so we can get the stuff under the spoilers fixed, as it used to not be like that.
Edit: Not sure it if it is just me, but those script calls are hard to read. Wonder if there is a way we can let Archeia know so we can get the stuff under the spoilers fixed, as it used to not be like that.
While this looks extremely helpful, it doesn't list Force Action or even anything involving enemies. Whaa...
It would be on page 3, battle, if it existed, but I couldn't find them either when I looked, though I thought that might be because it was displaying all funny on me. Or, it could be because script call is usually used outside of battle when enemies and therefore force action wouldn't exist.
Might still be useful for some of the other things you need down the line though, even though it looks like it's a lost idea for this problem, unless someone knows the script call for forcing an action?
Might still be useful for some of the other things you need down the line though, even though it looks like it's a lost idea for this problem, unless someone knows the script call for forcing an action?
I think I solved the problem, but now I want help checking my syntax, since I am not good with it yet:
What we're looking at is:
If in state "Confusion" and a random number less than or equal to 50 is generated, add empty state that just says "[User] was confused! Then add empty state that just says "[User] hurt itself in its confusion!" Then do damage to itself.
Else if in state "Confusion", add empty state that just says "[User] was confused!" Then do normal attack formula.
Else just do normal attack formula.
And people told me I would need scripts for everything. 😛 I don't even need them to break the damage formula character limit. I don't think I even need them for battle log messages!
Update: The fell in state message doesn't seem to be appearing. It doesn't work...
Update 2: Turns out applying a state by the damage formula doesn't activate the state message, which I already knew but forgot. Gah! I still need to make sure the syntax is correct here though.
Code:
damage_formula:
if a.state?(101) && rand(100) <= 100; a.addState(501);
a.addState(502);
a.hp -= (40*a.atk/a.def.to_f*(2*a.level+10)/250.to_f+2)*0.93
elseif a.state?(101);
a.addState(501);
a.element_rate(32)*(20*a.atk/b.def.to_f*(2*a.level+10)/250.to_f+2)*0.93
else
a.element_rate(32)*(20*a.atk/b.def.to_f*(2*a.level+10)/250.to_f+2)*0.93
end
What we're looking at is:
If in state "Confusion" and a random number less than or equal to 50 is generated, add empty state that just says "[User] was confused! Then add empty state that just says "[User] hurt itself in its confusion!" Then do damage to itself.
Else if in state "Confusion", add empty state that just says "[User] was confused!" Then do normal attack formula.
Else just do normal attack formula.
And people told me I would need scripts for everything. 😛 I don't even need them to break the damage formula character limit. I don't think I even need them for battle log messages!
Update: The fell in state message doesn't seem to be appearing. It doesn't work...
Update 2: Turns out applying a state by the damage formula doesn't activate the state message, which I already knew but forgot. Gah! I still need to make sure the syntax is correct here though.
Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-damage-formula-force-action-or-use-a-skill.60369/