Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Weapon Procs?
Elastic Mush
post Feb 20 2013, 09:09 AM
Post #1



Group Icon

Group: Member
Posts: 4
Type: None
RM Skill: Undisclosed




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.

Go to the top of the page
 
+Quote Post
   
Jens of Zanicuud
post Feb 23 2013, 03:33 AM
Post #2


Dark Jentleman
Group Icon

Group: Local Mod
Posts: 904
Type: Scripter
RM Skill: Skilled
Rev Points: 120




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


__________________________
"Thorns are the rose's sweetest essence..."
-Jens of Zanicuud


Games I'm working on:
>

official website: TryAdIne eFfeCt

>

Games I worked on (mainly as a scripter):
>
(Warning: it's a 3rr3's project and it's in Italian!)


Awards

Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 22nd May 2013 - 07:43 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker