You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dialog heavy games often introduce the concept of an actor. That concept is used to apply base styling to the text when an actor is talking, change the avatar and do other things.
currently trying to do this with dialogtools is kind of cumbersome. You have to manually do it with bbtags all over the place that are later difficult to update (if you decide to change an actor's text color for example)
Solution suggested
The dialogtools extension can get a new mechanism that lets you add, remove and keep track of existing story actors.
Its interface can get a few new actions and conditions, as well as scrolling text parsing capabilities;
actions:
add actor: parameters - color (text base color when they talk), name (displayed name), id (name for yarn to identify) example: addActor(id="fl", color:230,122,113, name="Florian")
remove actor: removes an existing actor example: removeActor(id="fl")
change actor info: this can be done via by using the existing setting dialog state value command - since that is where the actors are stored anyway. New event sheet actions could also be added to do it
expressions:
get dialog actors - gives you a list of added actors - to be used to display their stats
get actor info - parameters: id, statName (color, name, etc) example: getActorInfo(id="fl", key="color") --> outputs "230,122,113" which can be used to set the color in the dialog box via the event sheet
get current active actor - returns the id of the currently talking actor example: return fl or mike (the id), you can pass that to getActorInfo to drive base styling of objects in GD integration within yarn syntax:
// we can also directly alter the actor's stats and even add more new stats by doing this in yarn:
<<set $actor.fl.name = Florian>>
<<set $actor.fl.outfit = office>>
<<set $actor.fl.color = 230,122,113>>
<<set $actor.mike.name = Michael>>
<<set $actor.florian.outfit = office>>
<<set $actor.florian.color = 10,220,30>>
<<if $actor.florian.mood == happy>> yay! <<endif>>
// we are doing this by writing and reading directly to the dialog state
// that has the added benefit of greatly simplifying implementation of load/save game
also when we write a line like this in yarn
fl: this is an interesting idea
mike: is it?
fl: I think it will make it much easier to do polished looking dialog in games
dialog tools can identify that the line starts with an existing actor's id, followed by ":",
and if so, automatically apply a style to it in the game via the new event sheet expressions + strip out the id: from the beginning of the scrolling text line
Florian: this is an interesting idea (you can now easily set up via events the text displayed to be in blue + avatar with applied mood to it)
Michael: is it? (notice how the name you can display is Michael, not mike the short alias and the short alias is now stripped out of the text)
Florian: I think it will make it much easier to do polished looking dialog in games (the name can be show in another label object and not be embedded in the dialog text)
And so of course this is entirely optional and if the user has not created any actors linked to dialog text lines, this new behavior is not applying any change to the scrolled text
@4ian is this something that would be welcome as pr?
I kind of take this idea from how visual novels are implemented - specifically renpy. Also notice that alot of existing yarn games are doing this extra step in order to reduce tying to set text color/avatar/etc when the talking character is changing
the basic goal here is to eliminate the need to use tons of repeated commands and bbtags to set things up every time the talking actor in the game changes. Make the actual story writing process much easier and less verbose/prone to errors.
If the dev takes the extra steps to add actors and set them up, they can benefit from just starting a dialog line with their name
The text was updated successfully, but these errors were encountered:
blurymind
changed the title
feature: extending dialogtools to (optionaly) recognise the concept of an actor and apply some
feature: extending dialogtools to (optionaly) recognise the concept of an actor and apply some styling to things via the event sheet
Mar 15, 2024
This is now in PR, I just need to create a simple example of the new mechanics and do some more testing.
This was tested in a more complete project setting via javascript event blocks before pr-ed. I just migrated my code to the pr and renamed/hooked some things.
Description
Dialog heavy games often introduce the concept of an actor. That concept is used to apply base styling to the text when an actor is talking, change the avatar and do other things.
currently trying to do this with dialogtools is kind of cumbersome. You have to manually do it with bbtags all over the place that are later difficult to update (if you decide to change an actor's text color for example)
Solution suggested
The dialogtools extension can get a new mechanism that lets you add, remove and keep track of existing story actors.
Its interface can get a few new actions and conditions, as well as scrolling text parsing capabilities;
actions:
example: addActor(id="fl", color:230,122,113, name="Florian")
example: removeActor(id="fl")
expressions:
example: getActorInfo(id="fl", key="color") --> outputs "230,122,113" which can be used to set the color in the dialog box via the event sheet
example: return fl or mike (the id), you can pass that to getActorInfo to drive base styling of objects in GD integration within yarn syntax:
also when we write a line like this in yarn
dialog tools can identify that the line starts with an existing actor's id, followed by
":"
,and if so, automatically apply a style to it in the game via the new event sheet expressions + strip out the id: from the beginning of the scrolling text line
And so of course this is entirely optional and if the user has not created any actors linked to dialog text lines, this new behavior is not applying any change to the scrolled text
@4ian is this something that would be welcome as pr?
I kind of take this idea from how visual novels are implemented - specifically renpy. Also notice that alot of existing yarn games are doing this extra step in order to reduce tying to set text color/avatar/etc when the talking character is changing
the basic goal here is to eliminate the need to use tons of repeated commands and bbtags to set things up every time the talking actor in the game changes. Make the actual story writing process much easier and less verbose/prone to errors.
If the dev takes the extra steps to add actors and set them up, they can benefit from just starting a dialog line with their name
The text was updated successfully, but these errors were encountered: