''Training Tokens'' - How can I make an item that gives EXP?

CrazyCrab

Veteran
Veteran
Joined
Mar 5, 2014
Messages
950
Reaction score
403
First Language
Polish
Hi guys,

I'm trying to make an item that would make class changing and permadeath less punishing, aka a ''training token''. The player would buy them in the arena or somewhere, then would use them to level up characters to replace the dead ones or make the newly lv 1 character from class change useful. Given that my game has a low level cap, it wouldn't be too much of an abuse problem I think, so no use limits or anything would be necessary.

Anyway, I figured out I can just make it a consumable item that would call a common event when used on an actor, but how do I determine which actor the item was used on? I don't want to make it ''entire party'',

Thanks in advance!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
there are several ways to do this depending on what exactly you want to do and which info you need, but the simplest would be to have the item add an invisible target state in addition to the CE, and then check in the CE which actor has the state to target that.

For more complex data you'll need a script to create data values (there are two, one by Tsukihime and one by Enelvon if I remember correctly)
 

CrazyCrab

Veteran
Veteran
Joined
Mar 5, 2014
Messages
950
Reaction score
403
First Language
Polish
there are several ways to do this depending on what exactly you want to do and which info you need, but the simplest would be to have the item add an invisible target state in addition to the CE, and then check in the CE which actor has the state to target that.
Hmm all I really need is just a really basic function to help the players.

Can you explain it in a little bit more detail? Im not sure how to check who has the state... ^^' 

I don't really get combat / states too well to be honest, I always give up before I get to any of that... not this time. ;)
 

CharcoalKidd

Villager
Member
Joined
Mar 3, 2015
Messages
27
Reaction score
10
First Language
English
Primarily Uses
An alternative way to do this is to add the line "$game_variables[n] = b.id" into your item damage formula, and then run the common event, in which [n] is the variable checked for in your "Change Level" function.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
Can you explain it in a little bit more detail? Im not sure how to check who has the state... ^^' 
For each actor, you'll need one conditional branch.  Select the correct condition from the second tab (actor has state "target" inflicted), and if the answer is yes add the XP to that actor and remove the target state.
 

EatYourBeetS

The Abysswalker
Veteran
Joined
Feb 23, 2015
Messages
96
Reaction score
30
First Language
Italian
Primarily Uses
Wouldn't it simply work by setting

$game_actors[b.id].change_exp(b.exp + n, true)to the damage formula?(with n amount of exp to give)
 

CharcoalKidd

Villager
Member
Joined
Mar 3, 2015
Messages
27
Reaction score
10
First Language
English
Primarily Uses
Ouu, clever. I was wondering if there was a script function for that.

I'd think you would still have to fetch the value for remaining exp until the next level though, unless there's a function for changing level independently from exp.
 

EatYourBeetS

The Abysswalker
Veteran
Joined
Feb 23, 2015
Messages
96
Reaction score
30
First Language
Italian
Primarily Uses
Ouu, clever. I was wondering if there was a script function for that.

I'd think you would still have to fetch the value for remaining exp until the next level though, unless there's a function for changing level independently from exp.
Yes I tried it and it changes level too, does not display a level up message though, strangely.
 
Last edited by a moderator:

CrazyCrab

Veteran
Veteran
Joined
Mar 5, 2014
Messages
950
Reaction score
403
First Language
Polish
Wouldn't it simply work by setting

$game_actors[b.id].change_exp(b.exp + n, true)to the damage formula?(with n amount of exp to give)
Hmm this is much cleaner and it teaches me a little bit more about how the script works over here :)

Thanks! I also wouldn't want the level up message anyway, so thats not a problem.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,047
Members
137,569
Latest member
Shtelsky
Top