Help - Search - Members - Calendar
Full Version: rmxp help
RPG RPG Revolution Forums > Game Engines > RPG Maker XP Discussion
redcrimson23
How do i make a skill in rmxp that acts like a physical attack where the dammage is the same and everything it is just a physical attack only hits all enemies.
Redd
Is it a physical attack where a player has a weapon equipped at the same time or when the player has no weapon equipped?
Tsukihime
In FF7 there is a materia called "slash all" that turns your regular "attack" command to "slash all", which is just your regular attack..that hits everyone.
That's how I interpreted it.

Oh it would be cool if I could equip a weapon and it changes my command from "fight" to "slash all"

redcrimson23
No im talking about making a skill that deals the same damage that your melee attacks do only to all enemies.

Yes must have a weapon equipped.
Tsukihime
Assuming you're using the default damage system, take a look at game_battler 3 and compare normal_effect and skill_effect.
It seems pretty complicated cause it goes through all sorts of corrections.

But I think the only thing you need is this:

CODE
atk = [attacker.atk - self.pdef / 2, 0].max
self.damage = atk * (20 + attacker.str) / 20


CODE
power = skill.power + user.atk * skill.atk_f / 100
if power > 0
    power -= self.pdef * skill.pdef_f / 200
    power -= self.mdef * skill.mdef_f / 200
    power = [power, 0].max
end
# Calculate rate
rate = 20
rate += (user.str * skill.str_f / 100)
rate += (user.dex * skill.dex_f / 100)
rate += (user.agi * skill.agi_f / 100)
rate += (user.int * skill.int_f / 100)
# Calculate basic damage
self.damage = power * rate / 20


We want self.damage to be the same for both equations, so clearly if rate = 20, then self.damage = power.
So now we just need power = atk * (20 + attacker.str) / 20, which would be the same as a normal attack before all of those corrections (skill correction might be different, so then you'd have to do some more math to consider those)

But I'm not sure how to solve that equation.

Anyways once you figure out the values you need for all of those stats and rates, you just need to plug them in and it should be about the same as your normal attack.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.