Change Player Battler Based On Status Effect/Health Value

Torpf

Villager
Member
Joined
Oct 3, 2017
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMMV
I'm working with an artist on a game at the moment, and she's got some fantastic ideas for mechanics and features. So far I've been able to implement them pretty well, but this one has me stumped as I'm both semi new to JavaScript and have no idea what I'm doing with plugin programming.

My Google-Fu has failed me so far in my search for something similar to her idea, so here I am! I'll add that I'm currently using a plugin that displays a custom battler image for the player in the far right of the screen, so what is described below would be in addition to what I already have implemented. That plugin was written by Mr. Trivel and can be found here.

The basic idea that she had is as follows. During combat, the player's battler image would change if they acquired a certain status effect, or as their health dropped below a certain value. Two examples are below!

  • Example 1: Say the PC was fighting a minotaur. The minotaur lands a massive swing, dazing the character. She's got a battler drawn up that shows the character looking dizzy and with stars over their head (the classic 'stunned' video game depiction) drawn up that she would like to be displayed while this status effect is applied. Once the status effect ended, the player's battler would return to normal.
  • Example 2: The PC has been fighting the minotaur from above for awhile, and has taken some damage. When the character's health drops below 50%, she would like the character's battler to change to one showing a 'damaged' version of the character's armor.
If you need any further clarification please ask! I couldn't find any visual examples of other games doing something like this so I apologize for the lack of visual representations.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
Perhaps it would help if you could explain how this differs from having those poses in the battler sprite sheet, especially the 'damaged' version. I can see that having the stunned image would need to be tied into having that specific state, and so would need something extra maybe, but not the damaged one.
 

Torpf

Villager
Member
Joined
Oct 3, 2017
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMMV
Perhaps it would help if you could explain how this differs from having those poses in the battler sprite sheet, especially the 'damaged' version. I can see that having the stunned image would need to be tied into having that specific state, and so would need something extra maybe, but not the damaged one.
Thanks for the reply! Apologies for how long it took me to get back to you, its been a long day.

The problem I've run into is that we aren't using the sprite sheets for combat--she's going for something similar to this or this with images she's drawn being used as the battler images. As far as I'm aware there isn't a way to tie different images to character states (whether that is a particular status effect or a percentage of health) directly from MV itself. I've been reading through the documentation to try and figure this out myself but haven't been making enough progress. I figured out how to initially set the battler image from playing around with Mr. Trivel's plugin, but tying the image to a character state has proven to be a bit more difficult.
 

Torpf

Villager
Member
Joined
Oct 3, 2017
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMMV
Bump! Still picking away at trying to figure this out on my own but any help would be appreciated.
 

Torpf

Villager
Member
Joined
Oct 3, 2017
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMMV
Yet another bump! Still working at trying to figure this out when I get the chance.
 

Johnboy

Veteran
Veteran
Joined
Jan 13, 2016
Messages
344
Reaction score
124
First Language
English
Primarily Uses
EDIT: I derped and only read half the post. Disregard.
 

LadyBaskerville

Hell-poodle
Veteran
Joined
Sep 12, 2016
Messages
645
Reaction score
524
First Language
German
Primarily Uses
RMMV
Just to make sure I understood correctly: You want to change the image that Mr. Trivel's plugin displays for an actor when that actor is affected by certain status effects or drops below a certain percentage of their health, yes? A few more questions for clarification:
- Are the alternate battler images static or animated?
- Are the images only tied to states and percentages of health, or other conditions as well? (e.g. equipment)
- In your example in the opening post, what happens if the character is both stunned and below 50% health simulateously? (Or stunned and also poisoned, if you have different state images for those.) Which image will take priority?
 

Torpf

Villager
Member
Joined
Oct 3, 2017
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMMV
Just to make sure I understood correctly: You want to change the image that Mr. Trivel's plugin displays for an actor when that actor is affected by certain status effects or drops below a certain percentage of their health, yes? A few more questions for clarification:
- Are the alternate battler images static or animated?
- Are the images only tied to states and percentages of health, or other conditions as well? (e.g. equipment)
- In your example in the opening post, what happens if the character is both stunned and below 50% health simulateously? (Or stunned and also poisoned, if you have different state images for those.) Which image will take priority?
Correct, that's what we had in mind!

- The alternate battler images are static.
- The images are only tied to states and percentages of health, correct. The artist has also thrown around the thought creating an 'armor durability' stat instead of tracking health %age, but at this stage we're still planning on tracking the health alone for armor damage.
- The artist plans on creating art for all the combinations, so there won't be an issue with running into the character being stunned/poisoned and having to choose priority. She doesn't have a problem making slight alterations to the art to represent the different states.

Thanks for the interest, and hopefully that clarified things a little bit!
 

LadyBaskerville

Hell-poodle
Veteran
Joined
Sep 12, 2016
Messages
645
Reaction score
524
First Language
German
Primarily Uses
RMMV
Yes, it's clear enough now for me to play around with the code a bit :)

As of now, I have implemented the state and state combination images as an extension plugin. I'll do some more testing to make sure everything works so far, and then I can move on to the HP percentages.
 

Torpf

Villager
Member
Joined
Oct 3, 2017
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMMV
Yes, it's clear enough now for me to play around with the code a bit :)

As of now, I have implemented the state and state combination images as an extension plugin. I'll do some more testing to make sure everything works so far, and then I can move on to the HP percentages.
Sorry for the super late reply, holy cow has this been a busy week for me.

Thank you so much for even getting it that far. I feel like I've just been bashing my head against a brick wall with this so far and its been the one thing that has slowed us down.
 

LadyBaskerville

Hell-poodle
Veteran
Joined
Sep 12, 2016
Messages
645
Reaction score
524
First Language
German
Primarily Uses
RMMV
@Torpf It is done! Or at least, I've produced something that is functional. (The notetags looks a bit messy, but they work.) I can't find any more bugs (which usually means they are just hiding from me now), so I've attached the plugin file to this post for you to test :D

I think I've explained everything in the Help file, let me know if anything is unclear or doesn't work the way it should. In general, you specify the images for the "poses" with notetags in the Actor notebox, one notetag for each state(s)/hp combination. As a reference aside from the Help file, this is what my actor notebox for testing looked like:
Code:
<Pose 1: Actor2_dead>
<Pose 2: Actor2_gua>
<Pose 2HP%<60: Actor2_gua_low>
<Pose 2HP%<20: Actor2_gua_cri>
<Pose 4: Actor2_poi>
<Pose 4HP%<=60: Actor2_poi_low>
<Pose 4HP%<=20: Actor2_poi_cri>
<Pose 2,4: Actor2_poi_gua>
<Pose 2,4HP%<=60: Actor2_poi_gua_low>
<Pose 2,4HP%<=20: Actor2_poi_gua_cri>
<Pose HP%<=60: Actor2_low>
<Pose HP%<=30: Actor2_cri>
 

Attachments

Torpf

Villager
Member
Joined
Oct 3, 2017
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMMV
@Torpf It is done! Or at least, I've produced something that is functional. (The notetags looks a bit messy, but they work.) I can't find any more bugs (which usually means they are just hiding from me now), so I've attached the plugin file to this post for you to test :D

I think I've explained everything in the Help file, let me know if anything is unclear or doesn't work the way it should. In general, you specify the images for the "poses" with notetags in the Actor notebox, one notetag for each state(s)/hp combination. As a reference aside from the Help file, this is what my actor notebox for testing looked like:
Code:
<Pose 1: Actor2_dead>
<Pose 2: Actor2_gua>
<Pose 2HP%<60: Actor2_gua_low>
<Pose 2HP%<20: Actor2_gua_cri>
<Pose 4: Actor2_poi>
<Pose 4HP%<=60: Actor2_poi_low>
<Pose 4HP%<=20: Actor2_poi_cri>
<Pose 2,4: Actor2_poi_gua>
<Pose 2,4HP%<=60: Actor2_poi_gua_low>
<Pose 2,4HP%<=20: Actor2_poi_gua_cri>
<Pose HP%<=60: Actor2_low>
<Pose HP%<=30: Actor2_cri>
Thank you so much! I've been chipping away at it in my free time myself but I feel like I've just been bashing my head against a brick wall so this is like a godsend, haha.

I seriously appreciate your work on this! I wish I had something more to offer you than my thanks but unfortunately that's the best I can do at the moment. I'll let you know if I run into any issues, but from just reading over the file everything is pretty self-explanatory so far.

Thanks again!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top