Jump to content

Custom Character Scripts?


Recommended Posts

Hey! I'm working on creating a custom Don't Starve character, but currently I've hit a problem. In attempting to create a fully customize script for my new character, I found myself unable to determine the names of certain script actions such as...

 

Whenever it calls up,

 

Tree =

 

Link to comment
Share on other sites

Hey! I'm working on creating a custom Don't Starve character, but currently I've hit a problem. In attempting to create a fully customize script for my new character, I found myself unable to determine the names of certain script actions such as...

 

Whenever it calls up,

 

Tree =

 

ACTIONFAIL =

    {

        SHAVE =

        {

            AWAKEBEEFALO = "I don't think she'd take kindly to that.",

            GENERIC = "That's unshavable.",

            NOBITS = "But it's already as smooth as a baby's rear end.",

        },

        STORE =

        {

            GENERIC = "It wouldn't fit.",

            NOTALLOWED = "That can't go in there.",

        },

    },

Link to comment
Share on other sites

Ah sorry, I mean I've edited most of the existing text as is. That the Character Mod suggests in the sense of..

        GLOBAL.STRINGS.CHARACTERS.WAX.DESCRIBE.COOKEDMONSTERMEAT = "I think it moved."
        GLOBAL.STRINGS.CHARACTERS.WAX.DESCRIBE.COOKEDSMALLMEAT = "It's a bit small, but it'll do."

 

These ones work, by using the words provided in that same speech-file. But then there are ones that spread out into several options with the same item like

        -- COOKPOT =
        -- {
                        COOKING_LONG = "Wait for it..."
                        COOKING_SHORT = "Here it comes!"

 

And I'm not sure how to list it in the [ GLOBAL.STRINGS.CHARACTERS.WAX.DESCRIBE. ] format, and it's really troubling since most of these are the general descriptions the characters will make.

          

Link to comment
Share on other sites

@Mirrorrabbit, oh I see.

 

It's quite simple, actually. Let me explain with an example:

ACTIONFAIL =    {        SHAVE =        {            AWAKEBEEFALO = "I don't think she'd take kindly to that.",            GENERIC = "That's unshavable.",            NOBITS = "But it's already as smooth as a baby's rear end.",        },    },

In here, "ACTIONFAIL" is a "parent" element (it comes before the "=" sign) and "SHAVE" is its "child" element (it comes inside the brackets for "ACTIONFAIL")

 

So you would write it as:

ACTIONFAIL.SHAVE

to refer to it.

 

Similarly, if you want to refer to the inner-most string, you would keep writing a dot between each parent-child relation.

In this case,

ACTIONFAIL.SHAVE.AWAKEBEEFALO = "I don't think she'd take kindly to that.",ACTIONFAIL.SHAVE.GENERIC = "That's unshavable.",ACTIONFAIL.SHAVE.NOBITS = "But it's already as smooth as a baby's rear end.",

Since these are all related to your character, you would use this before them (as a parent element):

GLOBAL.STRINGS.CHARACTERS.WAX

All together, that makes something like this:

GLOBAL.STRINGS.CHARACTERS.WAX.ACTIONFAIL.SHAVE.NOBITS = "But it's already as smooth as a baby's rear end."

Understanding the syntax is really useful, you'll be able to figure them all out on your own.

 

The syntax is like this when using brackets,

Parent = {    Child_of_Parent = {        Grandchild_of_parent = "Hey there",        Another_Grandchild = "Hello"    },    Another_Child_of_Parent = "I don't have children"}

Commas ( " , " marks ) separate children from each other inside the same parent group.

 

And the syntax when using dots:

Parent -- Root parentParent.Child_of_Parent -- First childParent.Child_of_Parent.Grandchild_of_parent = "Hey there" -- First grandchildParent.Child_of_Parent.Another_Grandchild = "Hello" -- Second grandchildParent.Another_Child_of_Parent = "I don't have children" -- Second child

Remember, every element can only have one parent, but every parent can have multiple children (and grandchildren, etc)

 

Hope this helps!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...