RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[Event Tut] Visually Changing Equipment [VX] [Difficulty:Intermediate]

0 Members and 1 Guest are viewing this topic.

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
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 for:
----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:]

Step 2:

Spoiler for:
----Import your images like you would any other resource.

Step 3:

Spoiler for:
----Create 1 switch.
--Name that switch " Armor ON ", or anything like that.

Step 4:

Spoiler for:
----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.


THE MEAT:

Step 1:

Spoiler for:
--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]

Step 2:
Spoiler for:
--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]

Step 3:
Spoiler for:
----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).

Step 4:
Spoiler for:
--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.

Step 5:
Spoiler for:
--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.

Step 6:
Spoiler for:
--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


Step 7:
Spoiler for:
--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 ")

Step 8:
Spoiler for:
--Test Play


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.
« Last Edit: August 16, 2008, 02:05:11 AM by grafikal007 »

**
Rep:
Level 85
I am already there
wow that's great grafikal  ;D

**
Rep: +0/-0Level 84
How do I make it so it changes the character's graphic back to normal when the armor is removed? 

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
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.