Difference between revisions of "Modding variant text"

From Wildermyth Wiki
 
(17 intermediate revisions by one other user not shown)
Line 1: Line 1:
This page walks through the process of adding different types of variant text and faces to a comic.  The focus is on getting something simple which you can see in the game, and adding more details later.  The description and screenshots are current as of November 2019, early access version 0.10+98 Ryvio Wartmarch.   
This page walks through the process of adding different types of variant text and faces to a comic.  The focus is on getting something simple which you can see in the game, and adding more details later.  The description and screenshots are current as of November 2019, early access version 0.10+98 Ryvio Wartmarch.   


==Getting started==
==Prerequisite encounter==
# This is a brief summary of the prerequisite steps.  If you have an example event already skip  to the next section.  For more details see [[Modding Wilderness encounter|Modding a wilderness encounter]]
# This is a brief summary of the prerequisite steps.  If you have an example event already skip  to the next section.  For more details see [[Modding Wilderness encounter|Modding a wilderness encounter]]
# Select "Tools" at the main game screen, then "Open Editor", then "Content and Comics Editor"
# Select "Tools" at the main game screen, then "Open Editor", then "Content and Comics Editor"
# At the upper left, click "Mods", click "Create New Mod" in the browser, and fill in the form.
# At the upper left, click "Mods", click "Create New Mod" in the browser, and fill in the form.
# At the upper left, click "effects", then "New", and fill in the form. In the "Type" dropdown, select "Wilderness Scouting". The name field will fill in with auto-generated text.
# At the upper left, click "effects", then "New", and fill in the form. In the "Type" dropdown, select "Wilderness Scouting". The name field will fill in with auto-generated text.
# Add the default "hero" story role and a second story role "volunteer2"
# On the targets line, add the default "hero" story role and a second story role "volunteer"
# In the outcome section, delete "choice" and add "description".  This creates the comic.
# Delete the choiceTarget section, and in the outcome list, add "description".  This creates the comic.
# '''This is the most common mistake, causing a mod to not work! New events are disabled by default.''' Under abilities, set encounterEnabled to true
# '''This is the most common mistake, causing a mod to not work! New events are disabled by default.''' Under abilities, set encounterEnabled to true
# Save, and go to the comics screen
# Add a basic full size panel with the hero and volunteer facing each other.
# Your screen should look similar to this:
[[File:ModdingVariantText.PNG]]


==Modifying the files==
==Visual variations==
# TBD
* You can experiment with different facial expressions.  This page is a reference of all the choices: [[Face Tags]].  When the panel is selected, you can use the tiny blue smiley face icons on each actor to cycle through the expressions.  Or, by expanding actorSlots on the right, you can get a picklist by clicking on "form".
* You can experiment with different balloon and text styles.  The tiny left/right arrows on the basic balloon cycle through fonts.  To choose between speech balloons and other styles, find the textSlots section for your text and choose from the "style" picklist.
 
==Simple text replacement==
There are tons of markups you can use to fill in values.  This page is a reference: [[Tag Reference]]
 
For an easy example, make the hero's speech refer to the volunteer by name.  In the left panel for the hero text, type: ''What do you mean, <volunteer.name>?'' You will see the text update in the center panel.
 
==Personality dependent lines==
You can have a character give a different line based on personality stats.  These are the different personalities: [[Story Role]].  The syntax is a little complicated; you give a list of N personality types and then a numeric rating, and then a list of N+1 lines.  For example, suppose you have a generic line "No", and you thought of a bookish line, "No, I'm reading" and a loner line "No, leave me alone".  You would write:
 
<hero.bookish/loner/80:No, I'm reading/No, leave me alone/No>
 
Try pasting this exact text into the hero dialog panel on the left. You should see one of these lines displayed in the center preview panel, probably the default line "No".  If you see the unformatted text in the center preview panel, it means the syntax is off, or you misspelled one of the personality types.  See below for how to test all the variants.
 
==Relationship dependent lines==
You can have a character give a different line based on their relationship with another character. Suppose we have a generic line "No", and we also want a rival variant "No, you idiot" and a lover (romantic) variant "No, sweetheart".  The tag to switch between them is "rfln", which gives rival, friend, lover, neutral lines.  This goes between the two role names.  You would write:
 
<hero.rfln.volunteer:No, you idiot/No/No, sweetheart/No>
 
Try pasting this into the hero dialog.  See below for how to test the variants.
 
There are other tags including rivalLevel, friendLevel, loverLevel which you can use if you know the two characters have a relationship, and you want different intensities.  Each of the relationships has 5 levels, so you will need to provide 5 lines.


==Seeing the effect in game==
==Seeing the effect in game==
# If you haven't already done so, enable developer mode(Save and exit before doing this.) In file explorer, create an empty file under steam\steamapps\common\Wildermyth called devmode.txt.
It's quicker to test the text variants using the comic editor, rather than in-gameIf you have a poet and bookish variation of the same line, it would take many games to trigger them allBut, using the inspect button at the top center, you can easily get the variations you needYou can even save and load characters to use for testing.
# Choose tools from the game main menu, then select combat lab.  This will give you a chessboard-like battle map with a few characters and monsters already spawned.
 
# In the "Generate a unit" dropdown at the left, choose "Davea's monster" and then click Side AYour monster should appear:
This is how you can test the variations of the personality variant lines above. Probably, the default line "No" was shown in the comic preview because your hero does not have the bookish or loner stat above 80.  Click the inspect button at the top center, and display the hero character.  In the center panel, click to show personalityYou will see edit buttons for every personality value, as shown here.
[[File:ModdingMonsterPickMe.PNG]]
 
[[File:ModdingVariantPersonality.PNG]]
 
To display the bookish variant, first click the 0 button on their highest stat (romantic, in this screenshot).  Notice that the list re-sorts and now romantic is at the bottom.  Find bookish, and click the +20 button to raise it.  (The list re-sorts again).  Once bookish is highest, and over 80, click done.  You will see that the comic panel now displays the bookish line.
 
For the relationship options, you can test the "rfln" tag using the friends, lovers and rivals buttons at the top of the screen in the center.  I am not sure how to restore to neutral after this.


==Other references==
[[Category:Modding]]
There are some other pages on the wiki which seem helpful but some are more out-of-date than others.  (This may change dynamically, sorry for any stale information)
[[Category:Modding Guides]]
[[Tag Reference]] : current details on fonts and keywords, very useful
[[Actor styles]] : some bits of this appear relevant? but mostly out of date
[[Comic Editor Reference]] : badly out of date, refers to a page Face Tags which doesn't exist

Latest revision as of 22:10, 4 December 2019

This page walks through the process of adding different types of variant text and faces to a comic. The focus is on getting something simple which you can see in the game, and adding more details later. The description and screenshots are current as of November 2019, early access version 0.10+98 Ryvio Wartmarch.

Prerequisite encounter

  1. This is a brief summary of the prerequisite steps. If you have an example event already skip to the next section. For more details see Modding a wilderness encounter
  2. Select "Tools" at the main game screen, then "Open Editor", then "Content and Comics Editor"
  3. At the upper left, click "Mods", click "Create New Mod" in the browser, and fill in the form.
  4. At the upper left, click "effects", then "New", and fill in the form. In the "Type" dropdown, select "Wilderness Scouting". The name field will fill in with auto-generated text.
  5. On the targets line, add the default "hero" story role and a second story role "volunteer"
  6. Delete the choiceTarget section, and in the outcome list, add "description". This creates the comic.
  7. This is the most common mistake, causing a mod to not work! New events are disabled by default. Under abilities, set encounterEnabled to true
  8. Save, and go to the comics screen
  9. Add a basic full size panel with the hero and volunteer facing each other.
  10. Your screen should look similar to this:

ModdingVariantText.PNG

Visual variations

  • You can experiment with different facial expressions. This page is a reference of all the choices: Face Tags. When the panel is selected, you can use the tiny blue smiley face icons on each actor to cycle through the expressions. Or, by expanding actorSlots on the right, you can get a picklist by clicking on "form".
  • You can experiment with different balloon and text styles. The tiny left/right arrows on the basic balloon cycle through fonts. To choose between speech balloons and other styles, find the textSlots section for your text and choose from the "style" picklist.

Simple text replacement

There are tons of markups you can use to fill in values. This page is a reference: Tag Reference

For an easy example, make the hero's speech refer to the volunteer by name. In the left panel for the hero text, type: What do you mean, <volunteer.name>? You will see the text update in the center panel.

Personality dependent lines

You can have a character give a different line based on personality stats. These are the different personalities: Story Role. The syntax is a little complicated; you give a list of N personality types and then a numeric rating, and then a list of N+1 lines. For example, suppose you have a generic line "No", and you thought of a bookish line, "No, I'm reading" and a loner line "No, leave me alone". You would write:

<hero.bookish/loner/80:No, I'm reading/No, leave me alone/No>

Try pasting this exact text into the hero dialog panel on the left. You should see one of these lines displayed in the center preview panel, probably the default line "No". If you see the unformatted text in the center preview panel, it means the syntax is off, or you misspelled one of the personality types. See below for how to test all the variants.

Relationship dependent lines

You can have a character give a different line based on their relationship with another character. Suppose we have a generic line "No", and we also want a rival variant "No, you idiot" and a lover (romantic) variant "No, sweetheart". The tag to switch between them is "rfln", which gives rival, friend, lover, neutral lines. This goes between the two role names. You would write:

<hero.rfln.volunteer:No, you idiot/No/No, sweetheart/No>

Try pasting this into the hero dialog. See below for how to test the variants.

There are other tags including rivalLevel, friendLevel, loverLevel which you can use if you know the two characters have a relationship, and you want different intensities. Each of the relationships has 5 levels, so you will need to provide 5 lines.

Seeing the effect in game

It's quicker to test the text variants using the comic editor, rather than in-game. If you have a poet and bookish variation of the same line, it would take many games to trigger them all. But, using the inspect button at the top center, you can easily get the variations you need. You can even save and load characters to use for testing.

This is how you can test the variations of the personality variant lines above. Probably, the default line "No" was shown in the comic preview because your hero does not have the bookish or loner stat above 80. Click the inspect button at the top center, and display the hero character. In the center panel, click to show personality. You will see edit buttons for every personality value, as shown here.

ModdingVariantPersonality.PNG

To display the bookish variant, first click the 0 button on their highest stat (romantic, in this screenshot). Notice that the list re-sorts and now romantic is at the bottom. Find bookish, and click the +20 button to raise it. (The list re-sorts again). Once bookish is highest, and over 80, click done. You will see that the comic panel now displays the bookish line.

For the relationship options, you can test the "rfln" tag using the friends, lovers and rivals buttons at the top of the screen in the center. I am not sure how to restore to neutral after this.