[SOLVED] ITEM GIVES RANDOM PARAMETER INCREASE

Posts

Pages: 1
As the title says, I'm trying to make an item that gives the chosen character a random stat increase (ATK/DEF/MAT/MDF/AGI/LUK). That is, I want a chosen amount to be added to a random stat. On the next use of the item the same amount gets added to a random stat again. So the first use might add 3 to ATK, with the second adds 3 to MDF and the third adds 3 to ATK. I think you get the general idea.

So while I can do this via a common event, I'd have to make a list of current characters and have the player choose who to give the item to, and if you have more than one of the items to use at a time... well, it just plays awkwardly as hell, especially as you have other parameter boosting items that don't require you to go through hell and back to work.

Ideally, what I'd like is either a snippet of code that allows me to tag an item to randomise certain stats on or a way to refer to the character that was picked in the item use screen (you know the one - use an item and you get to choose which character to use it on.) via script line or variable.

The first way would allow me to, say, have an item that would randomise between ATK/MAT/AGI for stat gain or one that would let me tag it for all parameters. It'd use like a normal item so I wouldn't have to worry about targeting in the menu.

The second would let me use the Common event set-up but not have to worry about messing with messy message boxes and choices asking who to use it on. I'd just be able to plug in the script snippet telling the game who to target and apply the effects.

Ideally I'd like the first but I'll use the second if necessary.



So far I checked out the item targeting for in-menu uses, but couldn't make heads or tails of it. I also did a search for scripts but the only one I could find randomised the amount added instead of the parameters themselves.


Any help is appreciated! Thanks in advance! ^.^
That just gave me an idea of how to solve a current problem in Carolyne:Remake xDDDD
Anyway, another option maybe would be to make an item that, when used, subtracts itself and adds a random statup? I don't know, sounds a bit dorky, but could do if no one is able to figure it out. Still, I think Tsukihime has a script for the second option.

I hope it does its trick lol.

I think if you have the target and the item in the variables, it will work. Still, you'll probably have to reopen the menu again after the random statup, even though no message boxes were shown or anything. Speaking of which, how will the player know what stat was increased?

EDIT: maybe this could help too? >.<
That first script helped a bunch. Thanks a lot!

It's easy to call the item window back, just use the "SceneManager.call(Scene_Item)" line in a script command after you do the effects (including the message window telling you what got used). ^.^

And yeah, I'm just using a message to tell what changed. Strangely enough, no message comes up for other parameter items (or even a status screen showing the change) so I might just go through and use this method for all of them, just for the sake of consistency.

Thanks again~ ^.^
Pages: 1