Jump to content

Recommended Posts

Hello everyone,

I’ve developed a skill tree mod for Wanda in Don’t Starve Together. One of the skills, wanda_time_body, increases her maximum health (age cap) to 100. While the skill itself works as intended, I’ve encountered a persistent issue:

  1. After investing points in wanda_time_body, Wanda’s current age resets to 20 when transitioning between the Forest and Cave worlds. 

  2. The same issue occurs when restarting the server as the host.

  3. As a client, the bug triggers during world transitions and occasionally when connecting to the host’s server.

I am currently just a college student who generates electricity for love, and I really don't have the energy to browse through all the official codes. And I didn't find where the problem was. Please help me solve this problem, big shots.

Has anyone experienced similar issues or have insights into how world transitions or server connections handle character state changes? Any suggestions for resolving this would be greatly appreciated.

Thank you!

ProjectO.zip

6 hours ago, Dream Jing said:

Hello everyone,

I’ve developed a skill tree mod for Wanda in Don’t Starve Together. One of the skills, wanda_time_body, increases her maximum health (age cap) to 100. While the skill itself works as intended, I’ve encountered a persistent issue:

  1. After investing points in wanda_time_body, Wanda’s current age resets to 20 when transitioning between the Forest and Cave worlds. 

  2. The same issue occurs when restarting the server as the host.

  3. As a client, the bug triggers during world transitions and occasionally when connecting to the host’s server.

I am currently just a college student who generates electricity for love, and I really don't have the energy to browse through all the official codes. And I didn't find where the problem was. Please help me solve this problem, big shots.

Has anyone experienced similar issues or have insights into how world transitions or server connections handle character state changes? Any suggestions for resolving this would be greatly appreciated.

Thank you!

ProjectO.zip 2.22 MB · 0 downloads

image.jpeg.4b3e174576d0f9230c077f13e50f824e.jpeg

This happened to me yesterday. This is because these types of changes aren't saved and only last while you're playing. When you restart the server or switch from the forest to the caves (which is basically like entering another server), all the stats are "reset."
To fix this, there are two ways: save the information with SavePersistentString and retrieve it (after switching or restarting) with GetPersistData, or recalculate the health again.

Now, I don't know if this will work for switching between the world and the caves because SavePersistentString is saved in a separate instance of TheSim, and I don't think it's the same instance as the caves, but give it a try and let us know if it works.

11 hours ago, FerniFrenito said:

image.jpeg.4b3e174576d0f9230c077f13e50f824e.jpeg

This happened to me yesterday. This is because these types of changes aren't saved and only last while you're playing. When you restart the server or switch from the forest to the caves (which is basically like entering another server), all the stats are "reset."
这是昨天发生在我身上的事。这是因为这些类型的更改不会保存,并且仅在您玩游戏时持续。当你重新启动服务器或者从森林切换到洞穴时(基本上就像进入另一个服务器),所有的统计数据都被“重置”了。"
To fix this, there are two ways: save the information with SavePersistentString and retrieve it (after switching or restarting) with GetPersistData, or recalculate the health again.
要解决这个问题,有两种方法:用 SavePersistentString 保存信息,然后用 GetPersistData 检索(在切换或重新启动后),或者再次重新计算健康状况。

Now, I don't know if this will work for switching between the world and the caves because SavePersistentString is saved in a separate instance of TheSim, and I don't think it's the same instance as the caves, but give it a try and let us know if it works.
现在,我不知道这是否能在世界和洞穴之间切换,因为 SavePersistentString 保存在 TheSim 的一个单独的实例中,我不认为它和洞穴是同一个实例,但是试一下,让我们知道它是否有效。

Thanks for your help, now I have fixed the issue.
The solution is to call the original save and load function, and then save and load the data I need to pass again.

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
×
  • Create New...