Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

Click here to join us on IRC (#charas on irc.freenode.net)!



  • Charas-Project »
  • Game Creation »
  • Requests »
  • Tutorials »
  • Change character class
« previous next »
  • Print
Pages: [1]

Author Topic: Change character class  (Read 5162 times)

Offline razzy

  • Initiate
  • *
  • Posts: 16
Change character class
« 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.
« Last Edit: January 06, 2010, 04:39:01 AM by razzy »
Logged

Offline Prpl_Mage

  • Administrator
  • Sage
  • *
  • Posts: 7,645
  • The Administrator Mage
    • Check out our itch website
Re: Change character class
« Reply #1 on: January 06, 2010, 04:00:51 PM »
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.


Logged
Cool RPGM Project!
Sprite till you die

Oh my god, this was ...10 years ago...

Offline razzy

  • Initiate
  • *
  • Posts: 16
Re: Change character class
« Reply #2 on: January 06, 2010, 07:24:16 PM »
Thank you so much  !
Logged

Offline razzy

  • Initiate
  • *
  • Posts: 16
Re: Change character class
« Reply #3 on: January 07, 2010, 05:21:49 AM »
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 ? ;-;
« Last Edit: January 07, 2010, 05:24:18 AM by razzy »
Logged

Offline Prpl_Mage

  • Administrator
  • Sage
  • *
  • Posts: 7,645
  • The Administrator Mage
    • Check out our itch website
Re: Change character class
« Reply #4 on: January 07, 2010, 10:53:10 PM »
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.
Logged
Cool RPGM Project!
Sprite till you die

Oh my god, this was ...10 years ago...

Offline razzy

  • Initiate
  • *
  • Posts: 16
Re: Change character class
« Reply #5 on: January 08, 2010, 01:26:44 AM »
Quote from: Prpl_Mage on January 07, 2010, 10:53:10 PM
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. ;-;
Logged

Offline Prpl_Mage

  • Administrator
  • Sage
  • *
  • Posts: 7,645
  • The Administrator Mage
    • Check out our itch website
Re: Change character class
« Reply #6 on: January 08, 2010, 07:33:02 AM »
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.
« Last Edit: January 08, 2010, 07:36:39 AM by Prpl_Mage »
Logged
Cool RPGM Project!
Sprite till you die

Oh my god, this was ...10 years ago...

Offline razzy

  • Initiate
  • *
  • Posts: 16
Re: Change character class
« Reply #7 on: January 08, 2010, 10:56:23 AM »
Thank you prpl_mage ! It worked out perfectly ! 8D
Logged

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • Tutorials »
  • Change character class
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum