Sign in to follow this  
cyborgvirus

Custom character mod crashes the game [Solved]

Recommended Posts

cyborgvirus    1

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

Edited by cyborgvirus

Share this post


Link to post
Share on other sites
Arkathorn    124

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.

Share this post


Link to post
Share on other sites
Arkathorn    124

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.

Share this post


Link to post
Share on other sites
cyborgvirus    1

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

Edited by cyborgvirus
Fixed!
  • Like 1

Share this post


Link to post
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

Sign in to follow this