MV Changing Actor Faces with SRD Hud Maker

Yanfly Buff and State Core: http://www.yanfly.moe/wiki/Buffs_&_States_Core_(YEP)
SRD HudMaker: My modified version of the text file is attached.

I am trying make one of my actor change their face graphic when they obtain a certain state.


Similiar thread I followed along with what they did and the face didn't change: https://forums.rpgmakerweb.com/index.php?threads/faceset-changes-with-state.79819/

Also here is what I have what I have in my state notebox.

Spoiler: State Notebox
<Custom Apply Effect>



if (target.isActor()) {



if (target.actorId() === 1) {



target.setFaceImage('Actor1', index);



} else if (target.actorId() === 2) {



target.setFaceImage('Actor1', 4);



} else if (target.actorId() === 3) {



target.setFaceImage('Actor1', index);



}



}



</Custom Apply Effect>



Repeat the chain for as many actors as your game has.



This custom apply effect will change your actor's face to the face specified by the filename and the index.



Example: target.setFaceImage('Actor1', 0);



This will set the face image to Harold's picture.



Yes, you will have to specify the exact face for each actor for each state (I'm pretty sure there's no other way of doing it, no matter what plugin one makes).





To return the face back to the original once the state is removed:



<Custom Remove Effect>



if (target.isActor()) {



if (target.actorId() === 1) {



target.setFaceImage('Actor1', index);



} else if (target.actorId() === 2) {



target.setFaceImage('Actor1', 4);



} else if (target.actorId() === 3) {



target.setFaceImage('Actor1', index);



}



}



</Custom Remove Effect>
Moved to: Plugin Support

Hi @KazukiT can you please modify your signature to keep it within the 800x220px limit?
best way to change image for the state they are in, make a condition.

poison face -> condition if it has the state (best marked with #gameMembers....[0]
for each actor, in case you can switch members around in different order.

that is the most easiest way I can think off, require more image, but it works.
not sure if you can "just" impliment it in the way SRD create hudmaker.

hud maker is to make huds, not automate things for changing, which require
new functions and might break the functionality of the plugin itself.
best way to change image for the state they are in, make a condition.

poison face -> condition if it has the state (best marked with #gameMembers....[0]
for each actor, in case you can switch members around in different order.

that is the most easiest way I can think off, require more image, but it works.
not sure if you can "just" impliment it in the way SRD create hudmaker.

hud maker is to make huds, not automate things for changing, which require
new functions and might break the functionality of the plugin itself.
How would I set that up?
if you have a poisoned actor that you want to change to a poison state image:

condition: $gameParty.members()[0] && $gameParty.members[0].isStateAffected(stateID)

the same can be used, with 0 as 1, 2, 3 if you can place formation in any order 🙂
that you do with all states you want to change image with 🙂
if you have a poisoned actor that you want to change to a poison state image:

condition: $gameParty.members()[0] && $gameParty.members[0].isStateAffected(stateID)

the same can be used, with 0 as 1, 2, 3 if you can place formation in any order 🙂
that you do with all states you want to change image with 🙂
It worked. I just had a different picture appear on top of the actor's current face when the state was applied.
you can place it on top, but also remove, but if the face is the same,
you can apply the state alone on it, if it looks different, just on top.

However, you can apply more, for checks or checks for priority state,
if you you for example, state, poison, darkness, paralized, and all on 50 priority,
and it does stack, not sure if you want this too, because it require alot of checks.

but if you check the first state that is activated first, than I got no clue or
how to priotize the states.

but this is only the basic setup, if it works how you want it,
good luck on your project further, if you need more assistance, I try to help
or someone else if the code is more complex 🙂

Original thread: https://forums.rpgmakerweb.com/threads/changing-actor-faces-with-srd-hud-maker.135922/