Help - Search - Members - Calendar
Full Version: Weapon Procs?
RPG RPG Revolution Forums > Game Engines > RPG Maker XP Discussion
Elastic Mush
Hello.

So In my project I'm trying to have a sort of weapon proc system where depending on the powerup this character has, his basic attacks will have a chance to trigger additional attacks or effects.

This would be fine and dandy but using events I see no way to check if a character has used a basic attack.

How would you guys suggest I go about doing this? I understand Ruby and most of RGSS now, since I learned it over the past few days. So if scripting is necessary, I'll be welcome to that.

Jens of Zanicuud
QUOTE (Elastic Mush @ Feb 20 2013, 06:09 PM) *
I understand Ruby and most of RGSS now, since I learned it over the past few days. So if scripting is necessary, I'll be welcome to that.


Okay, this is quite the point.
You could create a script which modifies this function in Game_Battler 3 section: def attack_effect(attacker).
You should create a hash like this:

CODE
WEAPON_ADDED_STATUS = {
#powerup id => [chance of the status addon, status id]
1 => [0.25, 5],#in this example, there's a 25% chance that standard attack has status #5 added
}


CODE
WEAPON_REPLACEMENT_SKILL = {
#powerup id => [chance for the attack to be replaced by a skill, skill id]
2 => [0.25, 15], #in this example, there's a 25% chance that standard attack is replaced by skill #15
}


and then create a function which changes the hero's current action (Scene_Battle 3 - update_phase3_basic_command), according to the two hashes you just created.

I've told you the main guidelines, if this wasn't clear enough, just ask wink.gif

jens
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.