Charas-Project
Game Creation => Requests => Tutorials => Topic started by: razzy on January 06, 2010, 04:34:35 AM
-
I'm trying to change character classes for a character and keep all the same stats. I've managed to do it. But I'm having it if the player equips a weapon / animations change . And the only way I can do that is changing character class . The exp points seem to reset or go lower then they should be. Is there a way to remember how many exp there was in the class previous? and keep the previous equipment that the player has equipped on them. I'm using rpg maker 2003.
-
For the exp:
You can set a variable equal to the amount of EXP that a hero have.
Variable operation:
choose a variable
Set equal
Hero
Experience
Then in the event that change class:
Add experience equal to the variable. Piece a cake.
------------------------------------
For the equipment. You're gonna need some more variable fun!
There are two ways to do this. One is easy another one is not as much. I'll take the easy way out!
So. Variable operations again.
choose a variable.
set equal
hero
Weapon number/shield number/armour number/ helmet number/ accessory number
(This will set the variable equal to the number the equiped item have in the database. In other words (with the default database) Club is 0017, and potion is 001. So if your sword is number 0044 in the database - the variable will be set to 44.)
Then in the event after you changed the class-command.
Change character equipment:
HERO1
Equip item
item with ID stored in: VARIABLE
I hope that helps 'cuz there isn't much more to it!
Just remember to make the experience and the equipment check in the event before the class is changed and add the stuff after the class is changed.
Good luck and godspeed.
-
Thank you so much !
-
Okay I tried doing this.
I get. " Event script referenced an item that doees not exist"
I currently don't have anything for a shield or accessory. But i did input in common event to memorize and re-equip these items.
So I'm guessing .. What if the player doesnt have anything equipped ? would that mess up the event ? ;-;
-
Give it another try when he does have all slots occupied.
If the problem is the lack of items then I'll have to think something out.
-
Give it another try when he does have all slots occupied.
If the problem is the lack of items then I'll have to think something out.
When all slots are occupied. It does correctly transfer over to the new class.
So yeah. IF there is a lack of an item. But the system is told to memorize ,lets say the shield slot ,and there is nothing there. When re-equipping the character with the non existent item in variable whatever. It crashes. ;-;
-
Alright, shouldn't be too hard.
Conditional branch time.
Before the thing that equips - for example the shield.
Put a conditional branch that checks if the variable (in which the shield number is stored) is equal to or above 1(I assume that having nothing equipped gives the variable the value 0000).
YES
equip item according to variable ID
NO
nothing at all.
END
the rest of the event.
-:rinse and repeat for all item slots:-
In other words: the CB checks if you actually have something equipped(above or equal to 1), if you have a value that follows that condition : you will equip it according to the value. Otherwise nothing will happen, it will skip the entire equip process if the item isn't more than 1.
And either way if you do equip something or not - the rest of the event will play at the end. Like armour, helm and whatnot.
And that should fix the problem.
Let me know if it doesn't though.
-
Thank you prpl_mage ! It worked out perfectly ! 8D