Jump to content

How does one change the script files of a pigman?


Recommended Posts

For clarification I am trying to figure out how to change the assets for pigman when they have dialogue, eg: when a pigman says “YOU NOT PIG” I am wondering how to change that. I have looked inside the data folder for don’t starve and found the chatter box node, and I found the place holders for the pig man lines in the pigman brain Lua file but I don’t know how to edit what the pigman says or what the variable string is.

Link to comment
Share on other sites

If I understand you correctly, you need the most basic mod template with nothing and a strings file

add the following line to the modmain file:

local STRINGS = GLOBAL.STRINGS

and then the line from the file, if it has many levels, then you need to write all levels: for example, this is how the name of the subject looks:
STRINGS.NAMES.SPEAR = "spear"

temp.zip

Link to comment
Share on other sites

Now I have very little experience with lua, but I assumed that it was all stored somewhere, but I guess not… But what you’re saying is I just need to download the modding template then define the strings?

Additionally, where would I find the mod main file. And for example if the string was “PIG_CHATTER_WORK” what would I do then? I would like any ideas for this.

Link to comment
Share on other sites

You don't need experience, just a text editor, any. Open common\Don't Starve Together\data\databundles\scripts.zip then strings.lua file

Next, I recommend using the search to quickly find the required line

image.png.61653b37d5907637eb1d6a34299bd10e.png

and all that remains for you is to follow the path where this phrase lies, for example, I scrolled up

image.png.c66a48c208fc972bd361640b77400247.png

and all that remains for you is to follow the path where this phrase lies, for example, I scrolled up
that is, my way will be
STRINGS.NAMES.DAYWALKER = "New Name "

 

in the archive there is already a small example from me in the modmain file. put the folder from the archive in the mods folder

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...