Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Transforming Skript! I need one!

I Need skript like this:
If i press "T" Button my hero will tranform to an Animal Spirit!:yes:
Please help me TY!:D

~Slaaperz @_@
 
It would be cool if the Tranforming will be shown in menu and battle.. because it looks idiot if the hero is cat on map but in battle s/he is an fighter... :D
Ty FoR YoUR TiMe XD
 
Here it is:

Code:
# RMXP buttons: A B C X Y Z L R UP DOWN LEFT RIGHT
# Usage: Input::A, Input::B, Input::C, and so on
# Change the last character (right after Input::) to any RMXP button you want
# (case sensitive)
# ----------------------------------
# SETTINGS BEGIN HERE
# ----------------------------------
# Button for transforming to animal
TRANSFORM_BUTTON = Input::X
# Button for transforming back to human
BACK_BUTTON = Input::X
# Pretty self-explanatory I think ;)
TRANSFORM_CHARACTER_NAME = "151-Animal01"
TRANSFORM_BATTLER_NAME = "063-Beast01" # don't have cat battler :)
ACTOR_CHARACTER_NAME = "001-Fighter01"
ACTOR_BATTLER_NAME = "001-Fighter01"
# Sound effects
TRANSFORM_SE_FILENAME = "002-System02"
TRANSFORM_SE_VOLUME = 75
ACTOR_SE_FILENAME = "003-System03"
ACTOR_SE_VOLUME = 75
# ----------------------------------
# SETTINGS END HERE

class Game_Actor < Game_Battler
  attr_reader :battler_name
  attr_reader :battler_hue
  attr_reader :transform_mode
  alias transform_setup setup
  def setup(actor_id)
    transform_setup(actor_id)
    @transform_mode = false
  end
  def transform_mode=(transform_mode)
    @transform_mode = transform_mode
  end
end

class Scene_Map
  alias transform_main main
  def main
    @actor = $game_party.actors[0]
    transform_main
  end

  alias transform_update update
  def update
    transform_update
    # transforming?
    if Input.trigger?(TRANSFORM_BUTTON)
      # transforming to animal?
      if (@actor.transform_mode == false)
        Audio.se_play("Audio/SE/" + TRANSFORM_SE_FILENAME, TRANSFORM_SE_VOLUME)
        @actor.transform_mode = true
        unless $game_player.moving?
          call_transform
          return
        end
      end
    end
    # transforming back?
    if Input.trigger?(BACK_BUTTON)
      # transforming back to human?
      if (@actor.transform_mode == true)
        Audio.se_play("Audio/SE/" + ACTOR_SE_FILENAME, ACTOR_SE_VOLUME)
        @actor.transform_mode = false
        unless $game_player.moving?
          call_transform
          return
        end
      end
    end
  end
  
  def call_transform
    character_hue = @actor.character_hue
    battler_hue = @actor.battler_hue
    if @actor.transform_mode
      @actor.set_graphic(TRANSFORM_CHARACTER_NAME, character_hue, TRANSFORM_BATTLER_NAME, battler_hue)
    else
      @actor.set_graphic(ACTOR_CHARACTER_NAME, character_hue, ACTOR_BATTLER_NAME, battler_hue)
    end
    $game_player.refresh
  end
end

Paste it in a new page above Main. However, your old savefiles will not work. Should be compatible with other scripts since I alias anything. Not tested with SDK.

Let me know if there's any error.
 
How do you choose heroes gender? By script or by event? (Do you store it in a game variable?)

Basically, my script works for the first actor in your party (you stated that there was only one hero in your game anyway), no matter what the actor gender is. Tell me if you need different transformation for male and female (e.g. Arshes becomes cat but Gloria becomes dog).

That's why I need to know how do you choose gender in your game, so I can merge my script instead.
 
Gender change is based on events..
i think its cool if they just stay in the same form but if they transform they come back to theyr own gender... XD

(sorry for i replyed so late)
 
I am working on a pretty complicated transfomration script. It can change you into another actor, or just change your graphic and stats to whatever.

I will look over this topic and add any features I can into it. If you guys have any ideas, just let me know.
 
Ah, what a coincidence! You can take it over from here Seph ;)

OK Slaaperz, you now have a choice. You can continue using my script (which will only fit your needs), or you can wait patiently for SephirothSpawn's script (which, believe me, will exceed your needs).

Oh, and for the ideas, how if... transforming can be done more than once, meeting some requirements to do so? Let's say at level 10 Arshes can transform to a cat, then at level 20 he can transform to cat then tiger. This might have a slight effect to Arshes' stat...
 
I didn't mean to steal your thunder btw Exsharaen. If you want to still do this, or maybe even work together on this, I would be more than happy to work with you. Sorry if I offened you in anyway. If you are interested in working together on this, let me know. We can get on msn or something and merge our brains if you so wish.

That sounds like a pretty neat idea. Another requirement checking system horray. Oh no wait, I am just going to make a requirement module, rather than reworking it over and over. Horray for more junk to throw in the MACL.
 
No Seph, you didn't offend me in any ways. I was about to leave this forum temporarily that I was very excited you wanted to make similar script. Maybe I used wrong words then, silly me ^_^;

Working together? I'd be honored and I'd love to, but as I said before, I must go for now (gotta work on my final project). Alas, I'm not an SDK-scripter FYI.

BTW isn't MACL Trickster's? I really don't know if you are him or he is you or both!

@Slaaperz (so this won't go out of topic :D):
Soo... how do I know if Arshes is male or female? Via a variable or a switch?
 
Actually, you can use events to do this, very simple in fact.

First, you need to decide which key to use.

The keys that I suggest would be:
Shift or Z (A)
A (X)
S (Y)
D (Z)
Q (L)
W (R)

Any of these will work, just decide which one will best suite this.

you need to make two switches, one for activation, and another to switch between animal and human.

Go to common events, and make a new one, call it whatever, and make it so it is a conditional branch, then, on the last tab, choose button, select the respective one you want (The ones I put in parenthesis)
No, we simply make another conditional branch inside of that one, and that is if the switch for switching between animal and human is ON
ON will be animal, and OFF will be human.
So, if it is ON, then simply make the action under this conditional branch be change actor graphic, select the sprites for the character. and then a event that turns this switch OFF
Under ELSE you want to change actor graphic, make it be the animal sprite, and then turn the switch ON

under trigger on the common event you want it to be parallel and the switch that allows wether or not you have that ability.

now, once that switch is on, it will allow you to push the button of your choice to transform your character.

Ok, so that is the basics.
You can expand that to be much more complex.

I hope this made you understand what they were talking about.
 
Read the whole thread carefully. Someone (including I) have suggested using common events (which apparently works), but s/he prefers to script. Besides, it will change only the actor chara (i.e. what appears in the map); actor battler won't. As s/he said, it would be silly to see your character to be a cat in the world map but still humanly wo/man in the battle ;)

I wonder if SephirothSpawn has completed his transformation script?
 
Yes, it will only work on one actor (since Slaaperz only has one actor for the entire game), and the lucky number one is the first actor in your party (the one that will appear in any map). S/He'll be transformed only into one form, which is determined at the beginning of the script.

However...

With some edit, I'm sure it will also work on anybody on the party :)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top