Main Menu
  • Welcome to The RPG Maker Resource Kit.

[Event Tut] Visually Changing Equipment [VX] [Difficulty:Intermediate]

Started by Grafikal, August 16, 2008, 01:40:49 AM

0 Members and 1 Guest are viewing this topic.

Grafikal

Visually Changing Equipment
TUTORIAL by: Grafikal007

Purpose:
If you equip any equipment large enough to be seen visually on a 32x32 sprite, it will change the appearance of your character(s). [Note: This won't work for in battle, unless you have a script that sets your sprite as your battler.]

Pros:

  • It's freakin' awesome
  • If you wanted, you could just forget about your stats and make yourself look pretty when you walk around
Cons:

  • Takes approximately FOREVER to do correctly and you need a depth of knowledge on conditional branches


SCREENSHOTS:

Not really applicable. Just imagine your character looking different for each thing you equip.


PREREQUISITES:

Step 1:

[spoiler]----Gather images that contain your character wearing every single combination of armor you plan on including for them to wear. [Yes, I realize that it is A LOT, just check my demo ...  :tpg:][/spoiler]

Step 2:

[spoiler]----Import your images like you would any other resource.[/spoiler]

Step 3:

[spoiler]----Create 1 switch.
--Name that switch " Armor ON ", or anything like that.[/spoiler]

Step 4:

[spoiler]----Create 1 common event. [It's going to be big.]
--Name your common event something like " Swapping Equipment ".
--Make sure you make it a Parallel Process.
--Make sure that it's switch to activate it is the one you created.[/spoiler]


THE MEAT:

Step 1:

[spoiler]--In your common event, create 1 conditional branch.
--On second page of the branch, check on Actor.
--Choose the actor that is going to be changing his armor visually.
--On that page, check on Armor.
--Select his basic chest armor. [It's the biggest visual piece and is usually standard while other things like helmets/capes/weapons are conditional][/spoiler]

Step 2:
[spoiler]--In that conditional branch, create a new event command from page 3: Change Actor Graphic...
--Select the corresponding character from the conditional branch
--His/her new graphic should be nothing but just a chest armor of some type [what ever you plan on having his chest armor being alone with nothing else equipped][/spoiler]

Step 3:
[spoiler]----Step two is the 'Base' of where the rest of the armor is included.
--Under the newest event command (Change Actor Graphic...) but still in the first conditional branch, create a NEW conditional branch.
--Uncheck ' Set handling when conditions do not apply '.
--Repeat Step 1 and Step 2. However, a part different from Step 1, make the specific equipment the character wears this time a helmet. A part different from Step 2, select an image that corresponds with the body armor AND a new Helmet (or cape/weapon).[/spoiler]

Step 4:
[spoiler]--Repeat Step 3 over and over including a different and single piece of armor for each condition/image that ONLY corresponds with the chest piece your character wears from the FIRST conditional branch.[/spoiler]

Step 5:
[spoiler]--When finished with Step 4, go back through each secondary conditional branch (the one that includes the separate armor pieces) and create a tertiary conditional branch that is one piece separate from 1: The chest, and 2: (whatever the secondary conditional branch is while editing).
--This third conditinal branch will look like all the others.
--Also recreate a new command event for changing the image
--The new image should include A: The basic chest armor from the first conditional branch, B: The armor from the current second conditional branch, and C: the armor from this third conditional branch.[/spoiler]

Step 6:
[spoiler]--Repeat Step 5 into each secondary conditional branch. (At this point, your character is at a maximum of 3 different pieces of armor worn in all)

----We'll stop here for the amount of armor you need[/spoiler]


Step 7:
[spoiler]--Create a parallel process event on the very FIRST map your character ever begins on.
--In that event, create a new event command
--Turn on the switch you made at the beginning (" Armor ON ")[/spoiler]

Step 8:
[spoiler]--Test Play[/spoiler]


Now, this may seem a bit confusing at first, however once you get the rhythm of making the branches, it will get easy.

Note: Looking at the demo's Common Event may clarify a lot of your questions.

Also Note: In the demo, if you're not wearing any chest armor at all, you'll retain your character image even if you change your helmet or cape. As soon as you put on a chest armor, the image will change appropriately.


CREDITS:

Grafikal007


DEMO:

The demo is attached.


littlekittygarden

How do I make it so it changes the character's graphic back to normal when the armor is removed? 

Grafikal

I'm not sure what you mean by 'back to normal'. But if it's anything, just make some new conditions that have you wearing whatever your specific 'normal' is. The same way I described how to make other suits.