Help - Search - Members - Calendar
Full Version: [SOLVED]Skill Script
RPG RPG Revolution Forums > Scripting > Script Development and Support > Script Requests
hainkiwanki
I am making my game about someone (a guy named Jason) that can transform into animals, monsters, ... To be able to transform into an animal, let's say a dog (example), you need to go to your skills and click the proper skill to transform into one. But then I have a problem, when he battles he keeps the skills (ofcourse) He is also allowed to use them but it would be dumb to transform into a dog in the middle of the battle. So I was thinking if there would be any way of letting a skill have 2 effects depending you are in a battle or not. And he can transform into (now) 25 different things and to make them all twice would be unhandy, then you have to search between 50+ skills to find the skill you wanted.

To clarify I will work out an example:
So as I said before he has a skill to transform into a dog, outside of battle. Now I want him to be able to use that same skill inside a battle but then it gets a total different animation/effect.
Out of battle he will transform into a dog
Inside of battle he will get a buff or transform into a dog, attack and then transform back into a human at the end of the turn.

That's basicly what I want.
Is this possible with scripting? No/Yes, how?
Is this possible with eventing? No/Yes, how?
Or any suggestions on how I can solve this?
Night_Runner
I'm very tired, so this doesn't have any of the usual details that I have, but I've tested it and it should work as you described

CODE
module NR_MenuBattleSkills
  Skill = {
  # In Battle; Skill 3 becomes 4
    3 => 4,
  # In Battle; Skill 59 becomes 60
    59 => 60,
  }
end
    

class Game_Actor
  #--------------------------------------------------------------------------
  # * Get Skill Object Array
  #--------------------------------------------------------------------------
  def skills
    result = []
    nr_skills = NR_MenuBattleSkills::Skill
    # If it is a battle scene
    if $scene.is_a?(Scene_Battle)
      # Loop through the skills
      for i in @skills
        # If the skill one defined as one that changes during battle
        if nr_skills.keys.include?(i)
          # Apply the battle one
          result.push($data_skills[nr_skills[i]])
        # Otherwise, run as normal
        else
          result.push($data_skills[i])
        end
      end
    else
      for i in @skills
        result.push($data_skills[i])
      end
    end
    return result
  end
end

See the examples at the top, I had a mage with skill 59 (Fire), and when in battle it replaced the fire with skill 60 (Fire II).
It sounds like what you're after, let me know if I'm too tired and shouldn't be trying to script this late at night happy.gif
hainkiwanki
Works like I just wanted smile.gif Thank you smile.gif
Night_Runner
In that case yay!
Glad I could help
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.