v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Editing Speech file

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.

If you are creating a redirect to the current version's page, do not use any namespace. For example: use #REDIRECT [[Cat]], not #REDIRECT [[Main:Cat]] or #REDIRECT [[cv:Cat]]. See DF:Versions for more information.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
{{av}}
 
{{av}}
 
{{Modding}}
 
{{Modding}}
'''Speech files''', also known as '''text sets''', are text files that define sentences which can be spoken by people in [[adventure mode]] and phrases used to name [[books]]. Most of them are found in the <code>data/vanilla/vanilla_text/objects</code> folder, though the creature specific files can be found in <code>data/vanilla/vanilla_creatures/objects</code>. Like other raw files, mods can replace or introduce new sentences.
+
'''Speech files''' are text files that define sentences which can be spoken by people in [[adventure mode]] and phrases used to name [[books]]. Most of them are found in the <code>data/vanilla/vanilla_text/objects</code> folder, though the creature specific files can be found in <code>data/vanilla/vanilla_creatures/objects</code>. Like other raw files, mods can replace or introduce new sentences.
  
 
== List of files ==
 
== List of files ==
Line 359: Line 359:
 
|}
 
|}
  
== List of Tokens ==
+
== Special tokens ==
  
 
Speech files can contain tokens in square brackets (<code>[]</code>), which are replaced with context-specific strings before the speech is displayed.
 
Speech files can contain tokens in square brackets (<code>[]</code>), which are replaced with context-specific strings before the speech is displayed.
Line 372: Line 372:
 
|-
 
|-
 
| {{text anchor|NAME}}
 
| {{text anchor|NAME}}
| Inserts a name relevant to the book's [[topic]], or a random noun for art and star charts. Notably, these may or may not be plural and/or have an article.
+
| Inserts a name relevant to the book's [[topic]]. Notably, these may or may not be plural and/or have an article.
| The [[Tower_(necromancy)|Tower]], The [[Forest retreat|Tree]], [[v0.31:Stories/Bronzemurder|Bronzemurder]], [[Book#History|Likot Ubendeb]], [[Book#Nature|Animal Behaviours]]
+
| The Tower, The Tree, Bronzemurdered, Likot Ubendeb, Animal Behaviours
 
|-
 
|-
 
| {{text anchor|NO_ART_NAME}}
 
| {{text anchor|NO_ART_NAME}}
| "No article name." As [[Speech_file#NAME|NAME]], but never has an article.
+
| "No article name." As [[Speech_file#NAME]], but never has an article.
| Tower, Tree, Bronzemurder, Likot Ubendeb, Animal Behaviours
+
| Tower, Tree, Bronzemurdered, Likot Ubendeb, Animal Behaviours
 
|-
 
|-
| {{text anchor|NOUN}}
+
| [{{text anchor|NOUN}}
 
| A random noun pulled from [[language_words.txt]] or a hardcoded list. May or may not be plural.
 
| A random noun pulled from [[language_words.txt]] or a hardcoded list. May or may not be plural.
| Despair, Roots, Scrolls, Wheel-and-axles
+
|  
 
|-
 
|-
 
| {{text anchor|ADJ}}
 
| {{text anchor|ADJ}}
 
| A random adjective from [[language_words.txt]].
 
| A random adjective from [[language_words.txt]].
| Boyish, Inky, Angry, Bronzed
+
|  
 
|-
 
|-
 
| {{text anchor|ANY_AGE}}
 
| {{text anchor|ANY_AGE}}
 
| References an [[Calendar#Ages|age]] that has occurred in the world's [[Legends|history]].
 
| References an [[Calendar#Ages|age]] that has occurred in the world's [[Legends|history]].
| The Age Of Legends, The Age Of Hill Titan and Dragon
+
| The Age Of Legends, The Age Of Hill Titan and Dragon  
 
|-
 
|-
 
| {{text anchor|ANY_PRONOUN}}
 
| {{text anchor|ANY_PRONOUN}}
| Chosen from among singular and plural subject pronouns (not "Us" or "Them").
+
| Generates singular and plural subject pronouns (not "Us" or "Them").
 
| He, She, We, They
 
| He, She, We, They
 
|-
 
|-
Line 398: Line 398:
 
| A random phrase of a noun/pronoun, a verb, and some other words.
 
| A random phrase of a noun/pronoun, a verb, and some other words.
 
| The Fool Laughs, The Day Can Say It In The End, It Foretells Afterwards, The Day Mourns
 
| The Fool Laughs, The Day Can Say It In The End, It Foretells Afterwards, The Day Mourns
|}
 
 
=== Dialogue tokens ===
 
 
Character dialogue uses its own set of tokens to reference data.
 
Scopes identify participants in a conversation and various forms of background information. They can be nested within each other in various cases. If the scopes refer to a historical object, it is expected [verify] that not using the TRANS_NAME argument will display the untranslated name.
 
Strings are the arguments for scopes, outputting a specific word based on the conversation data. In certain files, they are used by themselves with an implied scope.
 
 
{| class="wikitable"
 
! Token !! Type !! Meaning
 
 
|-
 
| {{text anchor|SPEAKER}}
 
| base scope
 
| The person speaking the dialogue.
 
|-
 
| {{text anchor|AUDIENCE}}
 
| base scope
 
| The person receiving the dialogue. Has buggy behavior without a defined audience, such as when shouting out to everyone.
 
|-
 
| {{text anchor|CONTEXT}}
 
| base scope
 
| Holds additional information depending on the subject of conversation. Must use HIST_FIG as its argument to retrieve personal info from a creature that isn't present.
 
|-
 
| {{text anchor|HIST_FIG}}
 
| scope
 
| Usually written as [CONTEXT:HIST_FIG], this refers to a historical figure referenced by the speaker.
 
|-
 
| {{text anchor|PLACE}}
 
| scope
 
| A location, such as a biome.
 
|-
 
| {{text anchor|SITE}}
 
| scope
 
| A site given by the context.
 
|-
 
| {{text anchor|HF_LINK}}
 
| scope
 
| Looks for historical figures [[Relationship|associated]] with the scope.
 
|-
 
| {{text anchor|DEITY}}
 
| scope
 
| An argument for [HF_LINK], in this case referring to a (presumably, devoutly worshipped) [[deity]].
 
|-
 
| {{text anchor|TRANS_NAME}}
 
| string
 
| The full translated name of the referenced object.
 
|-
 
| {{text anchor|FIRST_NAME}}
 
| string
 
| The first name of the referenced creature.
 
|-
 
| {{text anchor|PRO_SUB}}
 
| string
 
| The referenced creature's subject pronoun (she, he, it).
 
|-
 
| {{text anchor|PRO_OBJ}}
 
| string
 
| The referenced creature's object pronoun (her, him, it).
 
|-
 
| {{text anchor|PRO_POS}}
 
| string
 
| The referenced creature's possessive pronoun (her, his, its).
 
|-
 
| {{text anchor|ABSTRACT_BUILDING}}
 
| string
 
| The first name of the referenced creature.
 
|-
 
| {{text anchor|RACE}}
 
| string
 
| The [[Creature token#NAME|name]] of the context's species.
 
|-
 
| {{text anchor|NUMBER}}
 
| string
 
| A number (expressed as plain text rather than numerals?).
 
|-
 
| {{text anchor|ORDINAL}}
 
| string
 
| An ordinal number, such as first or second.
 
|-
 
| {{text anchor|UNIT_NAME}}
 
| string
 
| The [[Unit type token|unit type]] of the referenced creature.
 
|-
 
| {{text anchor|ARCH_ELEMENT}}
 
| string
 
| An architectural element given by the context.
 
|-
 
| {{text anchor|ABSTRACT_BUILDING}}
 
| string
 
| A named building given by the context.
 
|-
 
| {{text anchor|JUSTIFICATION}}
 
| string
 
| A [[Speech file#JUSTIFICATION_ANTITHETICAL|justification]] chosen by the context.
 
|-
 
| {{text anchor|DEF_SPHERE}}
 
| string
 
| A divine [[sphere]] chosen by the context.
 
|-
 
| {{text anchor|RANDOM_DEF_SPHERE}}
 
| string
 
| A random [[sphere]] associated with the scope.
 
|-
 
| {{text anchor|FAMILY_RELATIONSHIP}}
 
| string
 
| The [[relationship]] given by the context.
 
 
|}
 
|}
  
Line 512: Line 405:
  
 
{| class="wikitable"
 
{| class="wikitable"
! Token !! Meaning !! Example
+
! Token !! Type !! Meaning
  
 
|-
 
|-

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)

This page is a member of 2 hidden categories: