The RPG Maker Resource Kit

RMRK RPG Maker Creation => XP => XP Event Systems => Topic started by: darkblast on July 28, 2009, 02:18:06 AM

Title: [XP] FF5 Thieving System
Post by: darkblast on July 28, 2009, 02:18:06 AM
 I am starting a project on RMXP (hasn't been named yet) where you play as different characters with their own unique abilities, like in FF2, FF4 and FF6. This is not only the
first RMXP project I started that is making headway, but also my very first expirience coding on any RM program, so please bear with me here.

The first skill I'm making is the Thieving skill, similar to the !Steal skill used in FF5. It's a relitivily easy system to make, but I have a few questions with it. Here's what I have so far...

Common Event [Called when the "Thieving" skill is used]
--------------------------------------------------------------------------------------

@>Conditional Branch: Switch [0001: battle_on] == ON
   @>Conditional Branch: Variable [0001: t_enemy_item] == 0
      @>Text: This enemy has no item!
      @>
    :  Else
      @>Conditional Branch: Variable [0001: t_enemy_item] == 1
         @>Change Items: [Tonic], + 1
         @>Text: You stole a Tonic!
         @>Control Variables: [0001: t_enemy_item] = 0
         @>
       :  Else
         @>Conditional Branch: Variable [0001: t_enemy_item] == 2
            @>Change Items: [Nectar], + 1
            @>Text: You stole a Nectar!
            @>Control Variables: [0001: t_enemy_item] = 0
            @>
          :  Else
            @>
          :  Branch End
         @>
       :  Branch End
      @>
    :  Branch End
   @>
 :  Branch End
@>

--------------------------------------------------------------------------------------

The way this system works is that before an event initiates a battle, I declare the switch "battle_on" to ON and declare a value for the variable "t_enemy_item". Then after the battle is over I turn the switch off and I set "t_enemy_item" back to 0. Here's how it looks.

Action Button Event
--------------------------------------------------------------------------------------

@>Control Switches: [0001: battle_on] = ON
@>Control Variables: [0001: t_enemy_item] = 1
@>Battle Processing: Soldier
@>Control Variables: [0001: t_enemy_item] = 0
@>Control Switches: [0001: battle_on] = OFF
@>

--------------------------------------------------------------------------------------

Obviously, the system is coming along well. But it can be better.
My goal right now is to make...

A) A failure/success system

B) Assigning the item variables to enemies

I have some idea to make this, but that would involve tedious coding which probably isn't nessecary. So, I need help. I'll post a few screenshots and mabye an exe. example (if someone told me how...  :P) if you want, so don't hesitate to give the word.

~Darkblast
Title: Re: FF5 Thieving System
Post by: Falcon on July 31, 2009, 02:09:45 PM
Do you want one number assigned, or multiple ones?

Even if you did this though, I don't believe you have a way of knowing which enemy the actor targeted. That would fuck the whole thing up. You should just look for a steal script.
Title: Re: FF5 Thieving System
Post by: darkblast on July 31, 2009, 02:57:14 PM
Grafikal told me I would need a script for this... Does the database have such a script? I'm looking at it now.
Title: Re: FF5 Thieving System
Post by: Falcon on July 31, 2009, 03:41:57 PM
Learn to search. This isn't the only site for scripts.
Title: Re: FF5 Thieving System
Post by: darkblast on July 31, 2009, 03:48:13 PM
Alrighty then, thanks for the help!
Title: Re: FF5 Thieving System
Post by: Mjustin on August 19, 2009, 05:27:22 AM
I made a steal skill a while ago that's pretty much fully functional and that you don't need a script for. It's in this thread: http://rmrk.net/index.php/topic,28736.0.html
Title: Re: FF5 Thieving System
Post by: Grafikal on August 19, 2009, 05:52:46 AM
You can't fully and successfully event a steal skill in battle. You can't target enemies. You can only make AOE steal skills which are kind of pointless unless I guess the only goal is to attempt to steal money from the entire group of enemies or something. It's useless for items.
Title: Re: FF5 Thieving System
Post by: Mjustin on August 19, 2009, 08:52:00 PM
Why wouldn't you be able to target enemies or steal items? I accomplished it pretty well with my system. It lets you choose which enemy to steal from, and keeps track of which enemies have already been stolen from. It's currently configured to steal gold, but it can easily be reconfigured for items. It's also only configured for a party of one enemy type, but I already know how to configure it for multiple enemy types.
Title: Re: FF5 Thieving System
Post by: Grafikal on August 19, 2009, 09:10:27 PM
Which is why I suggested a script. That's way too much work to do for something like a simple steal script. It's a good learning process to do it yourself like that, but truthfully, once you start getting into multiple items for multiple enemies and cast by multiple characters, the conditional branches feeding through that whole event system will lag the shit out of any battle. I've already done it. It does do that. It has to think through way too many conditionals.
Title: Re: FF5 Thieving System
Post by: Mjustin on August 19, 2009, 11:24:24 PM
1) Even if there is lag, it's still possible with events, which was my point. Of course it's easier just to copy/paste a script, but I find it fun to see what I can do within the limitations of events.

2) There isn't any lag. I made an item-stealing version of the skill. It works the same way as the gold version, but instead of giving a semi-random amount of gold, it sets a variable based on which enemy you target. In the troop I used, I decided that each enemy will have three possible items to steal. The variable is set to 1-3 for enemy 1, 4-6 for enemy 2, etc. Then it checks what the variable was set to and gives you the corresponding item.

I tested this versus giving the skill a common event that just gives you a potion and tells you so, and they both took the exact same amount of time. The "lag" comes from the skill trying to act before its common event. If it has nothing to do it waits anyway, giving the illusion of lag. I added an attack to the skill, and it filled the lag time.