Jump to content

Character Speech Template for DST


Recommended Posts

I've noticed that a common issue in making character mods is making a custom speech file for examination quotes. The speech files are usually at least 1000 lines long, which can be overwhelming, especially for people who haven't coded before.

And accidentally deleting a bracket, or quotation mark, or comma, or adding too many of any of them, will just screw up everything, and the crash log might not tell you the exact problem.

This tutorial involves using a simplified, blank version of a character speech file, designed so that only the lines you want to edit need to be edited, better organised so you can see what quotes you've added, what lines you've edited, making it easier to find mistakes and less overwhelming to edit overall.

speech_basic.lua 

How to use: Coding Basics

Despite it's long length, the speech file is relatively easy to edit. Just type between the quote marks and you'll be fine.

three things you need to pay attention to

--  : (aka. a tag) this appears in front of lines that will not be used by the game. any line of speech with this in front of it will be set to default unless you delete the -- (your character will say whatever Wilson would say when examining that object). 

"", : this is on every line of speech. You only want to type inside this. Typing outside this can cause issues and accidentally deleting part of this will almost definitely cause issues.

{ } : brackets. These always come in pairs of two. If you untag one of them in your code, you MUST untag the other one and vice vera.

 

so here's an example:

Quote

 

--    ANNOUNCE_HOUNDS = "",  would become

 ANNOUNCE_HOUNDS = "Hounds are coming", if you untagged it and wrote that inside the quotes

 

thus your character would say "Hounds are coming" when warning of a hound attack.

if you left this line untagged, you'd have your character saying Wilson's default "Did you hear that?" whenever hounds were approaching.

 

bracketed quotes are slightly more complicated

--    BATTLECRY =
--    {
--        GENERIC = "",
--        PIG = "",
--        PREY = "",
--        SPIDER = "",
--        SPIDER_WARRIOR = "",
--    },

would become:

    BATTLECRY =
   {
        GENERIC = "DIE!",
       PIG = "I'll Huff and I'll puff!",
        PREY = "You look tasty!",
        SPIDER = "Ahhh, kill it!",
        SPIDER_WARRIOR = "etc.",
    },

basically bracketed quotes are the same as regular quotes you just have to make sure both of them are untagged.

Edited by mf99k
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...