Jump to content

I hope my mod is compatible with Hamlet


Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

 

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!!!!!!!:(

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.!:(

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

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