Jump to content

Custom Character Dialogue Error?


Recommended Posts

Before I begin, I am very new to coding, and also to this forum. If I make this in the wrong location, I apologize.

 

I've recently started creating a custom character in Don't Starve, and have run into a small snag. I cannot get the custom dialogue to appear ingame. I've been using several other mods for reference, and while the game no longer crashes and functions ingame, the dialogue is Wilson's default text. I've tried repeatedly to get it to register, but either it will continue to use Wilson's dialogue or crash the game. I'll post the small bit of code below. I'm new to code and any help is appreciated.

 

This is a snippet from inside the Prefab folder.

STRINGS.CHARACTER_TITLES.sml = "The Grinning Demon"STRINGS.CHARACTER_NAMES.sml = "Mr. Smiles"STRINGS.CHARACTER_DESCRIPTIONS.sml = "*A well-dressed Demon from beyond \n*Hated by all things living \n*Strong, Durable, Hungry"STRINGS.CHARACTER_QUOTES.sml = "\"You seem...Edible\""STRINGS.CHARACTERS.SMILES = require "speech_smiles"
Link to comment
Share on other sites

 

Before I begin, I am very new to coding, and also to this forum. If I make this in the wrong location, I apologize.

 

I've recently started creating a custom character in Don't Starve, and have run into a small snag. I cannot get the custom dialogue to appear ingame. I've been using several other mods for reference, and while the game no longer crashes and functions ingame, the dialogue is Wilson's default text. I've tried repeatedly to get it to register, but either it will continue to use Wilson's dialogue or crash the game. I'll post the small bit of code below. I'm new to code and any help is appreciated.

 

This is a snippet from inside the Prefab folder.

STRINGS.CHARACTER_TITLES.sml = "The Grinning Demon"STRINGS.CHARACTER_NAMES.sml = "Mr. Smiles"STRINGS.CHARACTER_DESCRIPTIONS.sml = "*A well-dressed Demon from beyond \n*Hated by all things living \n*Strong, Durable, Hungry"STRINGS.CHARACTER_QUOTES.sml = "\"You seem...Edible\""STRINGS.CHARACTERS.SMILES = require "speech_smiles"

 

GLOBAL.STRINGS.CHARACTER_TITLES.sml = "The Grinning Demon"

GLOBAL.STRINGS.CHARACTER_NAMES.sml = "Mr. Smiles"

GLOBAL.STRINGS.CHARACTER_DESCRIPTIONS.sml = "*A well-dressed Demon from beyond \n*Hated by all things living \n*Strong, Durable, Hungry"

GLOBAL.STRINGS.CHARACTER_QUOTES.sml = "\"You seem...Edible\""

GLOBAL.STRINGS.CHARACTERS.SMILES = require "speech_smiles"

Link to comment
Share on other sites

GLOBAL.STRINGS.CHARACTER_TITLES.sml = "The Grinning Demon"

GLOBAL.STRINGS.CHARACTER_NAMES.sml = "Mr. Smiles"

GLOBAL.STRINGS.CHARACTER_DESCRIPTIONS.sml = "*A well-dressed Demon from beyond \n*Hated by all things living \n*Strong, Durable, Hungry"

GLOBAL.STRINGS.CHARACTER_QUOTES.sml = "\"You seem...Edible\""

GLOBAL.STRINGS.CHARACTERS.SMILES = require "speech_smiles"

 

Or just put a

STRINGS = GLOBAL.STRINGS

above it all

Link to comment
Share on other sites

Thank you for the replies.

 

I have tried both suggestions, but changing the strings to global.strings caused the mod to crash shortly after it was enabled. It did the same thing when I tried the Strings = global.strings.

 

It is worth mentioning that this time around it did not give the "Mod Crashed" message from before, but instead showed the "Mod Enabled" screen before the game went unresponsive. Because It did not give the message, I cannot tell where the error is originating from in the code. Is there a crash log somewhere where I can see what happened/post here for suggestions?

 

I, again, apologize for my inexperience, any help is welcome.

Link to comment
Share on other sites

Sorry for the double post.
I can't edit the other one for some reason...
 

Anyways, I'm a goof ball. I was editing the speech file that was in my 'working on' folder and I forgot to update the speech file within the SteamLibrary\SteamApps\common\dont_starve\mods\<mod name>\scripts folder.

 

But since it works, this is what I have in my modmain.lua

STRINGS = GLOBAL.STRINGS

I put that in the first line of my modmain.lua

 

then you can put

STRINGS.CHARACTERS.SMILES = require "speech_smiles"

in your smiles.lua file  found in your 

SteamLibrary\SteamApps\common\dont_starve\mods\<mod name>\scripts\prefabs folder

 

I know i'm just repeating what others have said but maybe you're like me; editing a different copy than what's in the game's mod folder.

 

I really hope this helped! :)

 

Oh and your log.txt is in Documents\Klei\DoNotStarve folder.

Link to comment
Share on other sites

This is an old thread, I know this. If there is anyone, I'm having the exact same trouble this guy is having. If anyone has a video tutorial on how to do this, please let me know. I'm a very visual person, and so far this thread has helped me in the slightest.

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