State-based dialogue side-images

Blueworx

Villager
Member
Joined
Jan 6, 2019
Messages
15
Reaction score
1
First Language
English
Primarily Uses
RMMV
DontUStareAtMe.png
Seems like an easy one, but I couldn't find anything related. The player character in my game will have dialogue like you can see above, and he will be able to change his outfit pretty much all the time. Meaning that he could wear pretty much everything while having said dialogue. And you can probably already see the problem, especially when there is a lot of dialogue and a lot of outfits.
Is there a function or script to choose the side image based on a variable (state, flag, switch, I'm not choosy)?
 
Last edited:

HumanNinjaToo

The Cheerful Pessimist
Veteran
Joined
Apr 18, 2013
Messages
1,226
Reaction score
603
First Language
English
Primarily Uses
RMMV
The link doesn't work for me...

by side image, if you are referring to the character image, there is an event command to change the character image. If you want to do that based on switches or variables, it's doable, with a common event and a bunch of conditional branches.

I'm not exactly sure how the dialogue part of that fits into what you are asking though. Do you mean that there will be dialogue when the actor changes their outfit? Because then you could use the show text event command. Or if you don't want a regular text box, Yanfly and Galv both have a plugin for pop up text.
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
533
Reaction score
235
First Language
English
Primarily Uses
RMMV
Provided you always update your main character's actor image when his outfit changes (with Change Actor Images), I believe Shaz's MoreEscapeCodes plugin (included in the dlc folder if you have the Steam version) should do what you want.
 

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
960
Reaction score
2,247
First Language
Not English
Primarily Uses
RMMV
So the player can choose their appearance anytime they want? That's very random and just variables won't work because it's a mixture of changes (in your example you showed moustache, clothes; no moustache, no clothes... what if the player chooses moustache and no clothes? Get what I mean?) The closest I can find is this plugin: http://sumrndm.site/ccex-dynamic-actors/
 
Last edited:

Blueworx

Villager
Member
Joined
Jan 6, 2019
Messages
15
Reaction score
1
First Language
English
Primarily Uses
RMMV
(...) The closest I can find is this plugin: http://sumrndm.site/ccex-dynamic-actors/
Stumbled upon that already, and while it's a great plugin it would require me to split my character into at least 15 actors, and I'm not entirely sure how to access the different emotions from the spritesheet. I remember thinking "yes, this could do the trick", but it would come out almost as messy as copypasting the same dialogue 15 times.


(...)I believe Shaz's MoreEscapeCodes plugin (included in the dlc folder if you have the Steam version) should do what you want.
Since there is no escaping in my game I'd never looked into that. :|

This is getting really close to what I need, since it's also accessing the "emotional states" by using simple tags, and *simple* is what I really like about it:

\f[1,2]blah blah blah

Now if there was a plugin to have

\f(x,2) blah blah blah

instead, x being the player's outfit, that would do it. It's not the first time I run into problems with RPG Maker because it somehow seems to hate arrays.

Thinking about it, both suggested plugins together could do the trick. I'll continue experimenting, thank you for your assistance so far!
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,118
Reaction score
1,526
First Language
EN
Primarily Uses
RMMZ
Have you tried something like \f[\v[1],2]blah blah blah? I.e. use the value of variable 1 (change ID as needed) as the first argument. I'm guessing you already have such a variable, if not then you can set it before the dialogue happens. :)

This should work if Shaz's plugin processes the \f code after the default stuff. Hopefully that's the case, I haven't checked. :kaoslp:
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
533
Reaction score
235
First Language
English
Primarily Uses
RMMV
Since \f is a late-processing code in Window_Message and \v is an early-processing code in Window_Base, I imagine it should be fine?
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,118
Reaction score
1,526
First Language
EN
Primarily Uses
RMMZ
Yep, just tested and it seems to work OK with variables! :kaojoy:
 

Blueworx

Villager
Member
Joined
Jan 6, 2019
Messages
15
Reaction score
1
First Language
English
Primarily Uses
RMMV
Yep, just tested and it seems to work OK with variables! :kaojoy:
I think I gave up too early, normally a syntax like that just results in fun messages like
f[object,object] Well, hello there

Gonna give this a try and report back if it works. It's a shame because I already shifted everything to face-free speech bubbles (using GALVs message styles) which I happen to like a lot, too. On the other hand letting all those faces go to waste would have been... well, a waste:)
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
533
Reaction score
235
First Language
English
Primarily Uses
RMMV
If the escape codes make it hard for you to see whether or not your text fits in the message box, you can always select the message command in the event editor and hit Ctrl+R (or right-click and select Test). That'll show you the message exactly as the game will interpret it... as long as the escape codes don't depend on the current map, at least.
 

Blueworx

Villager
Member
Joined
Jan 6, 2019
Messages
15
Reaction score
1
First Language
English
Primarily Uses
RMMV
If the escape codes make it hard for you(...)
I just didn't know that the tags where referred to as "escape codes". That's something I experience here more often than I want to admit, I also had no idea what "busts" are supposed to be until I was looking for what I consider "side images"(I still speak Renpy better than RPGMaker;)).

Anyways: Shaz's MoreEscapeCodes plugin is the solution I was looking for. I haven't tested it thoroughly (not exactly a full time developer), but it does what I want without having to copypaste the dialogue for every possible outfit (and resulting bust/side-image).
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,047
Messages
1,018,540
Members
137,834
Latest member
EverNoir
Top