Jump to content

Custom character mod crashes the game [Solved]


cyborgvirus

Recommended Posts

I've been trying to create a custom character mod for my own use, but I can't make it work. I followed step by step all the guides I could find and still when I try to activate the mod, the game crashes.

 

Can somebody help me? I'm kind of new to all of this.

 

Here's the file: https://mega.nz/#!NbZS0T4J!gPZlKt0I6rgT6q67hNuaK-Ug8mRabDswJxmvlGTu_6c

Link to comment
Share on other sites

While your project files are useful, it'd also be good to have the error (though it can probably be recreated easily). The easiest way to ge tthis would be via the log file, located in 'Documents/Klei/DoNotStarve/log.txt'. Note that the log file is overwritten each time you launch the game, so you need to copy it after it crashes, before relaunching.

Link to comment
Share on other sites

This is your error:

...arve/data/../mods/beaker 2.1/scripts/prefabs/bea.lua:51: attempt to index field 'BEA' (a nil value)

(The list of files and lines after it in the log - known as the stacktrace - are also useful, but not in this case)

 

The offending line is as follows:

STRINGS.CHARACTERS.BEA.DESCRIBE.EVERGREEN = "A template description of a tree."

 

The error is caused because the table 'BEA' does not exist within 'STRINGS.CHARACTERS'. In modmain.lua, there is a table defined as 'STRINGS.CHARACTERS.bea' (case sensitive):

GLOBAL.STRINGS.CHARACTERS.bea = {}

 

I'd also like to point out that your prefab file ideally should not contain string definitions (for organizational purposes; you are of course free to do whatever works). Additionally, these are redundant, as they are already defined in modmain.lua.

Link to comment
Share on other sites

Excellent, thanks! I removed the unnecessary lines and changed all the lower cases to uppercases (I also editted the image/saveslot_portraits tex named as "beaker" to "bea") and the character actually appears in the list of characters now, but whenever I try to click on him the game crashes.

Here's the log in case you need it

https://sta.sh/05vfkgh3566

 

I found out what was wrong with the textures and I fixed them, now the character actually appears and is able to be chosen, nevertheless when it finishes creating the world the game crashes.

 

here's the new log https://sta.sh/01svegylpvd4

 

Nevermind, I already fixed it, it just needed a . after sanity xD my bad. Anyway, thank you so so much for your help! I'm glad you stopped by to answer the first post in this thread <3

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