Sign in to follow this  
Sexy Piggy

I hope my mod is compatible with Hamlet

Recommended Posts

Sexy Piggy    0

Hello!

I want to know how to upgrade Shipwrecked to Hamlet, like change some code.

Every time I run my mod I get an error like this.

...ommon/dont_starve/data/scripts/widgets/crafttabs.lua:497: attempt to compare two nil values
LUA ERROR stack traceback:
    D:/steam/steamapps/common/dont_starve/data/scripts/widgets/crafttabs.lua:497 in () ? (Lua) <492-498>
    =[C]:-1 in (field) sort (C) <-1--1>
    D:/steam/steamapps/common/dont_starve/data/scripts/widgets/crafttabs.lua:492 in (method) HandleMultiCraftingStationTabs (Lua) <460-557>
    D:/steam/steamapps/common/dont_starve/data/scripts/widgets/crafttabs.lua:685 in (method) DoUpdateRecipes (Lua) <610-711>
    D:/steam/steamapps/common/dont_starve/data/scripts/widgets/crafttabs.lua:430 in (method) OnUpdate (Lua) <408-432>
    D:/steam/steamapps/common/dont_starve/data/scripts/frontend.lua:573 in (method) Update (Lua) <425-593>
    D:/steam/steamapps/common/dont_starve/data/scripts/update.lua:46 in () ? (Lua) <3-50>

And my mod is a character mod

Share this post


Link to post
Share on other sites
Ultroman    604

We will need to see your mod in order to discern what is wrong, but it looks like your character has a unique crafting tab, and if their structure has changed, then you gotta figure out what changed in the game code, so you can fix your own code. If you can't find anything, perhaps try finding a newer character mod which has a custom crafting tab and is compatible with Hamlet, to see how it should be done.

Other than that, try commenting things out until it doesn't crash anymore, starting with your crafting-stuff, and then uncomment the code bit by bit to see which line makes it crash.

  • Like 1

Share this post


Link to post
Share on other sites
Sexy Piggy    0

 

9 hours ago, Ultroman said:

We will need to see your mod in order to discern what is wrong, but it looks like your character has a unique crafting tab, and if their structure has changed, then you gotta figure out what changed in the game code, so you can fix your own code. If you can't find anything, perhaps try finding a newer character mod which has a custom crafting tab and is compatible with Hamlet, to see how it should be done.

Other than that, try commenting things out until it doesn't crash anymore, starting with your crafting-stuff, and then uncomment the code bit by bit to see which line makes it crash.

Thank you!

I made "sort=6"and got an error

One more question I want to ask is how do I turn off the other music in the game

For example, I use "killsound("name")" to turn off the music which is named "name",but I don't know the names of other music.

Please!

Share this post


Link to post
Share on other sites
Ultroman    604
16 hours ago, Sexy Piggy said:

One more question I want to ask is how do I turn off the other music in the game

For example, I use "killsound("name")" to turn off the music which is named "name",but I don't know the names of other music.

This should get you a way to see all the names of music in the game.

Share this post


Link to post
Share on other sites
Sexy Piggy    0
11 hours ago, Ultroman said:

This should get you a way to see all the names of music in the game.

One last question, I want to upload my mod, but it keeps coming up with errors, 
like "Error: Failed sharing mod data file." or Publishing failure
I've seen your tutorial before.

I really appreciate your help:D

Share this post


Link to post
Share on other sites
Sexy Piggy    0
23 hours ago, Ultroman said:

I updated my tutorial post with information about how to debug Don't Starve Mod Tools' uploading process.

13:27:47: Start FileShare [mod_publish_data_file.zip] ...
13:27:47: Progress: Uploading mod data file...
13:27:49: OnShareModFileResult 
13:27:49:    EResult 9, ffffffffffffffff
13:27:49: EndProgress FAILED: Failed sharing mod data file.
13:27:49: MainFrame::OnPublishComplete FAILED: Failed sharing mod data file.

It always shows like this, I really don't know what to do, feel very desperate

And "EResult 9   = EResult_FileNotFound", but I don't know what it means

I think all the necessary files are there and have been checked many times

Please help me ! It took me a long time to make this mod!!!!!!!:(

Share this post


Link to post
Share on other sites
Ultroman    604

EResult 9 also triggers when the preview image is identical to the last one you uploaded, even if the upload failed on a file after the preview image. Try tweaking the color of a single pixel on your preview image by just a tiny bit, export a new PNG, convert it to TEX and try again.

That said, it seems to fail on the main mod zip file, which doesn't make much sense, unless it's about or over 100mb.

Share this post


Link to post
Share on other sites
Sexy Piggy    0
3 hours ago, Ultroman said:

即使预览图像后的文件上传失败,预览图像也与上一张相同时,EResult 9也会触发。尝试只对预览图像上的单个像素进行微调,导出新的PNG,将其转换为TEX,然后重试。

也就是说,它似乎在主mod zip文件上失败,这没有多大意义,除非它大约或超过100mb。

09:22:12: FinalizePublish()
09:22:12: Setting 4 tags...
09:22:12:    character
09:22:12:    reign of giants compatible
09:22:12:    shipwrecked compatible
09:22:12:    version:1.0
09:22:12: Progress: Publishing...
09:22:13: OnPublishWorkshopFileResult 
09:22:13:    EResult 8. ffffffffffffffff
09:22:13: EndProgress FAILED: Error publishing mod!

I know what you said and corrected it, but a new problem came up

"EResult 8 = EResult_InvalidParam"

But I checked my modinfo.lua again and again and found no errors

Of course I also read your tutorial

Please help me.!:(

Share this post


Link to post
Share on other sites
Ultroman    604

The modinfo.lua file only allows a certain character set to be used. You're probably using characters that are considered invalid for that character set. If you can't find any invalid characters anywhere, share your modinfo.lua so I can have a look.

Share this post


Link to post
Share on other sites
Sexy Piggy    0
10 hours ago, Ultroman said:

The modinfo.lua file only allows a certain character set to be used. You're probably using characters that are considered invalid for that character set. If you can't find any invalid characters anywhere, share your modinfo.lua so I can have a look.

OK!

modinfo.lua

Share this post


Link to post
Share on other sites
Sexy Piggy    0
12 hours ago, Ultroman said:

Well, first thing you should try, is removing all the Japanese characters in the file.

XD,I know why I can't upload,thank you for all your help

And I'm Chinese:D

Share this post


Link to post
Share on other sites
Ultroman    604
50 minutes ago, Sexy Piggy said:

And I'm Chinese:D

Sorry about that.

50 minutes ago, Sexy Piggy said:

XD,I know why I can't upload,thank you for all your help

You're very welcome :)

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