[RMVX ACE] CONTROLLING VARIABLES USING BATTLE STATES

Posts

Pages: 1
I'm in the barely-planning stages of my next game, a dungeon crawler with a branching story, and one of my ideas is for each time a character dies in battle, a specific variable tied to that particular character is altered, which in turn would alter the outcome of the story. Is there any way to make a "death" state trigger, say, a common event that could alter the variable in question? Or would that only be possible with scripting?

Thanks in advance for any ideas about this!
I believe you could use a conditional branch set to if Actor "<Actor 001>" is state "<Death>" and just have the game check that for every map. That may work.
author=BlackWolf1992
I believe you could use a conditional branch set to if Actor "<Actor 001>" is state "<Death>" and just have the game check that for every map. That may work.


But wouldn't that make it easy to artificially inflate the variable just by walking in and out of map areas? It also wouldn't count deaths where the character was revived before the battle's end I don't think. Ideally I'd like to make it one death = variable +2 (to use an example, there would be other ways to increase the variable as well).
It should not as far as I know. Then again I am trying to put this all together in my head so I could be wrong. I may not sure. If I was setting it up I would just run a check with a conditional branch in the end scene/battle or whatever to check if said actors are dead, but that is just me.
pianotm
The TM is for Totally Magical.
32388
No, not on the map. The map event wouldn't read the death variable. In the battle event:

If actor HP is 0% or less, + 1 to such and such variable, or call common event where you have the variable.
It depends if you want the check to be conducted in or outside of battle. Personally, I think you should use a battle event for this.

Go ahead and get this script.

https://yanflychannel.wordpress.com/rmvxa/utility-scripts/base-troop-events/

Put it in your game. Then, the first slot in your Troop in your Database will be dedicated to the "Base troop events", meaning that every battle in your game will reference your Troop 1 event pages. This is handy for all sorts of things, such as regenerating health and mana per turn, customizing how poison works, and checking to see if a player character has died.

In your Troop #1, after you have added that script to your game, you can make an event page for combat which runs one-per-turn (will run at start of turn unless you click the box to make it run at the end of the turn) which can then be filled with condition branches.

If so-and-so is afflicted with Death, turn Switch 001 on, or change Variable 001 to whatever. If so-and-so is afflicted with Death, turn Switch 002 on, change Variable 002 to whatever. One of the things I did back when I experimented with perma-death, is I would make an end-of-turn check which checked to see if a player character was dead, and if they were, then I would remove them from the party.

Don't worry about this taking up time or slowing down VX Ace: VX Ace is a very fast and efficient system, and it will run the per-turn check without skipping a beat.
author=Gredge109
It depends if you want the check to be conducted in or outside of battle. Personally, I think you should use a battle event for this.

Go ahead and get this script.

https://yanflychannel.wordpress.com/rmvxa/utility-scripts/base-troop-events/

Put it in your game. Then, the first slot in your Troop in your Database will be dedicated to the "Base troop events", meaning that every battle in your game will reference your Troop 1 event pages. This is handy for all sorts of things, such as regenerating health and mana per turn, customizing how poison works, and checking to see if a player character has died.

In your Troop #1, after you have added that script to your game, you can make an event page for combat which runs one-per-turn (will run at start of turn unless you click the box to make it run at the end of the turn) which can then be filled with condition branches.

If so-and-so is afflicted with Death, turn Switch 001 on, or change Variable 001 to whatever. If so-and-so is afflicted with Death, turn Switch 002 on, change Variable 002 to whatever. One of the things I did back when I experimented with perma-death, is I would make an end-of-turn check which checked to see if a player character was dead, and if they were, then I would remove them from the party.

Don't worry about this taking up time or slowing down VX Ace: VX Ace is a very fast and efficient system, and it will run the per-turn check without skipping a beat.

Oh nice!!! This might be just what I need! :D

I'm not doing permadeath; the idea is that each time a character dies it affects their morale or "Despair Variable", resulting in a greater likelihood that character will receive a Bad Ending. I'm assuming if I could check for a death state every turn, I could also check for HP > 1 each turn so I could use switches to keep the variable from going up every turn a character is dead. So something like this:

End of turn, if Actor X HP = 0, Variable X +2, Switch ("Actor X Dead") ON
If switch ("Actor X Dead") ON, the variable cannot be further changed.
If Actor X HP > or = 1 (after revival), Switch ("Actor X Dead") OFF
If Switch ("Actor X Dead") OFF, variable X CAN be changed when the death conditions are met again.

The end result would mean a change in the variable for each time a character dies without it changing for every turn the character remains dead. One instance of death = one change in the variable. Does that sound about right to you guys?

I'll play around with it and see what I can come up with. :V
Oh see I thought you were doing a permeant death kind of thing. xD
Pages: 1