Change level with item

Status
Not open for further replies.

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
I want to be able to use an item from the menu which will increase the target actor's level by one.

The event command "Change Level" presumes that I know which actor I want this to work on, but the player can choose any actor. Therefore that command won't work.

I have tried various script calls in a common event and just get the buzzer of doom.
How would I go about this?

Thanks.
 

shockra

Slightly Crazy Programmer
Veteran
Joined
Feb 16, 2016
Messages
444
Reaction score
208
First Language
English
Primarily Uses
RMMV
I think there's a way to change a variable using an event to a particular actor ID. So I'm thinking a common event like this:

Show Choices: One for each Actor
Set Variable: Actor ID
Change Level: +1, Actor ID

Might be a bit of work to make the choices work right based on who's in the party at the time, but I did something like that with a Curse remover, so it can be done. It's been a while since I've done it, so I can't remember exactly how it's done, but I think there was a text tag for it.
 

Another Fen

Veteran
Veteran
Joined
Jan 23, 2013
Messages
564
Reaction score
275
First Language
German
Primarily Uses
For cases like this I usually let the item apply an empty state with no icon, which can then be checked in the common event to recognize the target.
This doesn't solve the fact the common event throws you out of the menu of course, so using a script might be more fitting. :)

The buzzer usually appears then the item you are using has apparently no effect on the target. I can't look it up but I'm quite sure that triggering a common event was enough to qualify the item as effective... ^^
Could be wrong here though.
 
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@shockra I really, really want to avoid using a 'Show Choices' if I can, I think it looks quite clumsy for something like this which is why I'm searching for a way to use the item in the same seamless way that the engine does automatically for a potion, or whatever. But thank you for the suggestion.

@slimmmeiske2 That topic looks exactly like what I need, thank you

EDIT
@Another Fen You posted while I was typing my reply. I think slimmmeiske2's suggestion will sort me out. If it doesn't then I'll try out the state route and see where that gets me. Thanks.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
This exact problem is why I made my level increasing items just affect all actors, as I couldn't find a workaround. Though I thought I saw a script by someone (Hime?) to get around this somehow, but I might be mistaken.
 

Rinobi

Veteran
Veteran
Joined
Mar 24, 2014
Messages
579
Reaction score
219
First Language
English
Primarily Uses
RMVXA
On my phone at work, so I can't look anything up. If memory serves:

b.increase_level

As a damage formula should do it.

There are other methods, but I don't remember their arguments...
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@bgillisp This now works perfectly. For your info (should you ever want to know this again)

In the damage formula put $game_variables[id] = b.id; 0
putting in the id of the variable you have allocated to this.
Have the item also call a common event.

In the common event use the Change level command. For the actor choose Variable and select the one you've allocated.
Pick the number of levels you want.
Done.

@Rinobi You posted just as I was typing this reply. As you can see I have something which works, but I shall try out your option as well so that I have more than one way of doing it should I ever need it.
Thank you
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
$game_party.target_actor
grabs the selected actor, IIRC.

no need to grab the target actor through the damage formula, you can just apply the dummy item with a common event after it, and the event will process whatever choice you make.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@gstv87 I tried that first. The change level command will not work with just that script call. I think I tried every combination. It needs either a specified actor or a variable.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
lvlxp.jpg

.............how do you think the automated command works in reality, grassuhoppah?
 
Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@gstv87 If I knew how the automated command works I would not have needed to post this query, now would I? And your screenshot demonstrates amply that $game_party.target_actor on its own is insufficient. Which bears out my experience, and why I needed something else (instead of/as well as).

And grassuhoppah? Really?

[closed]IgnoreMe[/closed]
 
Status
Not open for further replies.

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

Latest Threads

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,867
Messages
1,017,062
Members
137,575
Latest member
akekaphol101
Top