Chaos Project

RPG Maker => Event Systems => Event System Requests => Topic started by: TrueCynder on May 14, 2013, 06:39:37 pm

Title: XP / Spellblades ?
Post by: TrueCynder on May 14, 2013, 06:39:37 pm
quick questions :
Okay im using XP now and i wanted to imploment the spellblade class from final fantasy in otherwords your character gets new wepons depending on what magic spell he / she used

well i know HOW to do it
it worked perfectly in 2003

But it just wont work in XP the change equipment commando must be broken or some shit

what can / should i do ?
Title: Re: XP / Spellblades ?
Post by: KK20 on May 14, 2013, 07:34:33 pm
You don't even explain how you did it before in 2k3 and how you are doing it now in XP. No one can help you until you explain your methods.
Title: Re: XP / Spellblades ?
Post by: TrueCynder on May 15, 2013, 03:16:30 am
Quote from: KK20 on May 14, 2013, 07:34:33 pm
You don't even explain how you did it before in 2k3 and how you are doing it now in XP. No one can help you until you explain your methods.


It´s basicly quiete easy
Hero X uses Skill Y = a trrop event changes Hero X´s equipment to Item Z

There its a realy easy formula which worked perfectly in 2003
but for some reason the troop events in XP wont do that
Title: Re: XP / Spellblades ?
Post by: G_G on May 15, 2013, 08:22:25 am
You could just attach a common event to a skill.
Title: Re: XP / Spellblades ?
Post by: TrueCynder on May 15, 2013, 04:36:20 pm
Quote from: gameus on May 15, 2013, 08:22:25 am
You could just attach a common event to a skill.


Doesnt work eather allready tried apperntly you cant changed the equipment in battles
Title: Re: XP / Spellblades ?
Post by: KK20 on May 15, 2013, 04:48:33 pm
Ah, I think I know what the problem is. In RMXP, in order to equip any item, the party must possess one. Lookie:

  def equip(equip_type, id)
    case equip_type
    when 0  # Weapon
      if id == 0 or $game_party.weapon_number(id) > 0 #<===== This right here is the problem
        $game_party.gain_weapon(@weapon_id, 1)
        @weapon_id = id
        $game_party.lose_weapon(id, 1)
      end

Try adding the weapon to the party first, then equip. Of course, if the weapon is not supposed to be in the party, you will have to remove the weapon(s) at the end of every battle.

Edit: I think you can also remove that 'if' statement, making the code look like this:

  def equip(equip_type, id)
    case equip_type
    when 0  # Weapon
        $game_party.gain_weapon(@weapon_id, 1)
        @weapon_id = id
        $game_party.lose_weapon(id, 1)

Of course, you still have to remove the weapon(s) at the end of every battle. You can find this in 'Game_Actor' around line 395.