Common event during battle equip command?

Status
Not open for further replies.

Crazy Rob

Villager
Member
Joined
Mar 3, 2015
Messages
20
Reaction score
1
First Language
English
Primarily Uses
I'm using a lot of Yanfly's scripts, in this case the command equip script. I'm trying to make it so that when the command equip window closes, it calls a common event that adjusts the actor's HP and MP if they equipped something that changed certain 'crystal stats' from another script.

How it works right now is-
*Player opens equip in battle to change equip
*Equips or unequips vit/spr gear.
*Closes window, a common event is called in the commandequip script, but no change in HP or MP.
*Inputs command, resolves. (RogueDeus AP script for initiative based battle, long story.)
*HP/MP changes take effect.

I'm trying to make it so that once the window closes, the HP/MP changes take effect immediately. Ultimately it's just so much QOL for the player, but it'd be a nice thing to accomplish.

Failing that, is there a way to alter how HP is calculated via script so that xstat.vit*level is added to the base HP?
 

Attachments

Kes

Global Moderators
Global Mod
Joined
Aug 3, 2012
Messages
21,442
Reaction score
10,856
First Language
English
Primarily Uses
RMVXA

I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
544
Reaction score
382
First Language
English
Primarily Uses
RMVXA
Common events aren't called until you leave the menu, so that's probably why. How do you have your common event set up?
 

Crazy Rob

Villager
Member
Joined
Mar 3, 2015
Messages
20
Reaction score
1
First Language
English
Primarily Uses
Parallel process depending on switch 555. The switch is shut off at the end of the event so it doesn't make the game lag.

Okay, so common events aren't called until the menu window closes. Is there a way to futz with the base HP and MP formulas so that they adjust when xstat.vit and xstat.spr are altered?
 

Crazy Rob

Villager
Member
Joined
Mar 3, 2015
Messages
20
Reaction score
1
First Language
English
Primarily Uses
Okay for the sake of pruning redundant topics and helping anyone else who wants to do this stuff, someone named Hinola helped me find where to make the alterations. In Yanfly's equipment stats script.

Attached is the script in question, with the new adjustments indicated in the red box. As the player is allowed to choose what they increase each level up (strength, vitality, agility, speed, magic, or spirit) and vitality determines both HP and Armor, it's a neat little thing I wanted to include.

As this problem is solved, this topic can be closed and archived when ready.
 

Attachments

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
5,895
Reaction score
4,217
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

Oh, stop with the Melodrama...

...Listen to it instead!

anybody else like getting baked whilst coding?

When you go to the beach watch out for coconuts. Coconuts are more dangerous than sharks. Fact.
Try to get into pixelart again, so far its a sucess.
Also finally found a useful pixeltutorial which helps a lot.
♫ Anyone knows an ant can't move a rubber tree plant, but he's got high hopes, he's got high hopes, he's got high apple pie in the sky hopes ♫

Forum statistics

Threads
93,616
Messages
913,989
Members
123,182
Latest member
SaberRoy
Top