Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> 


———
Before you ask! Read! ;)

You must have 30+ Posts to create a topic here!

Thanks for reading!
———

 
Reply to this topicStart new topic
> [SOLVED]Skill Script
hainkiwanki
post Apr 2 2012, 12:53 PM
Post #1


Level 5
Group Icon

Group: Member
Posts: 69
Type: Event Designer
RM Skill: Beginner




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?

This post has been edited by hainkiwanki: Apr 3 2012, 07:32 AM


__________________________
Signature


Go to the top of the page
 
+Quote Post
   
Night_Runner
post Apr 3 2012, 06:02 AM
Post #2


Level 50
Group Icon

Group: +Gold Member
Posts: 1,522
Type: Scripter
RM Skill: Undisclosed




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


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
hainkiwanki
post Apr 3 2012, 07:32 AM
Post #3


Level 5
Group Icon

Group: Member
Posts: 69
Type: Event Designer
RM Skill: Beginner




Works like I just wanted smile.gif Thank you smile.gif


__________________________
Signature


Go to the top of the page
 
+Quote Post
   
Night_Runner
post Apr 4 2012, 05:27 AM
Post #4


Level 50
Group Icon

Group: +Gold Member
Posts: 1,522
Type: Scripter
RM Skill: Undisclosed




In that case yay!
Glad I could help


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
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: 21st May 2013 - 01:34 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker