So I know it's possible, but it's somewhat daunting as a first-time game-maker: how do you make an attack hit harder if the enemy has a low agility? I have a lumberjack class in my game, and created a skill called "Tree Feller" and when I imagine the skill being used for its "true intent" I think of "the bigger they are, the harder they fall". I could make weights for every enemy that I've made, but I would rather do it for agility because I have that set up already. Any and all help is appreciated, and I would love to see how and why it's done, not just a "here, boom. you're welcome" kind of thing. Thanks a lot!
First Game Question
RPG Maker VXAce Supportthe damage formula box of the skill can do calculations based on almost everything, so just place your code for checking agility there.
for example you can use
4* a.atk - 2* b.agi
using agi to reduce damage instead of def.
for example you can use
4* a.atk - 2* b.agi
using agi to reduce damage instead of def.
To elaborate just a bit on what Andar wrote: the "a" at the beginning of "a.atk" is used in the damage formula box to refer to the "Attacker" while the "b" in "b.agi" is used to refer to the "Target".
You use the dot/period at the end of "a" or "b" to access parameters of either unit. The parameter you get will be whatever you put on the right of that dot/period. So "a.atk" is the Attacker's attack power while "b.atk" would be the Target's attack power. If you replace "atk" with "def" you get Defense, "mat" would get Magic Attack, "agi" Agility, etc.
The " 4* " and " 2* " simply mean "4 times" and "2 times" as in multiplication. So Andar's formula above reads "4 times Attacker's Attack minus 2 times Target's Agility".
The best tip I can give you is to hover your mouse over the damage formula box for a moment. You should see a tooltip popup on screen that will give some pretty detailed instructions on how to use it. Compare those instructions to some of the default skills and it's pretty easy to figure out how it works. Mostly just a matter of matching up parameter names and doing simple math stuff.
That's about as much as I can break it down for you without getting into the details of Ruby coding (which I know can get quite confusing for those with no coding knowledge). For for all intent and purposes you should be able to do anything you need to do without knowing any of that. Unless you're wanting to do something super complicated for whatever reason.
Hope that helps!
You use the dot/period at the end of "a" or "b" to access parameters of either unit. The parameter you get will be whatever you put on the right of that dot/period. So "a.atk" is the Attacker's attack power while "b.atk" would be the Target's attack power. If you replace "atk" with "def" you get Defense, "mat" would get Magic Attack, "agi" Agility, etc.
The " 4* " and " 2* " simply mean "4 times" and "2 times" as in multiplication. So Andar's formula above reads "4 times Attacker's Attack minus 2 times Target's Agility".
The best tip I can give you is to hover your mouse over the damage formula box for a moment. You should see a tooltip popup on screen that will give some pretty detailed instructions on how to use it. Compare those instructions to some of the default skills and it's pretty easy to figure out how it works. Mostly just a matter of matching up parameter names and doing simple math stuff.
That's about as much as I can break it down for you without getting into the details of Ruby coding (which I know can get quite confusing for those with no coding knowledge). For for all intent and purposes you should be able to do anything you need to do without knowing any of that. Unless you're wanting to do something super complicated for whatever reason.
Hope that helps!
Straightforward "How do I ...?" questions belong in the Support forum for the engine you are using. Based on the info under your avatar...
I've moved this thread to RPGMaker VX Ace. Please be sure to post your threads in the correct forum next time. Thank you.
I've moved this thread to RPGMaker VX Ace. Please be sure to post your threads in the correct forum next time. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/first-game-question.65169/