Jump to content

Anyone want to fix custom_tech_tree.lua?


Recommended Posts

The custom_tech_tree.lua made by star/marix seems to be incompatible to the sculpture Tab from the pottery wheel. As soon as you call the AddNewTechTree function to add a new tech tree, the recipes shown in the scultupre tab are not complete or wont do anyhting. Easy to reproduce if you give a sketch via console to let the pottery learn the recipe. With AddNewTechTree in modmain, you wont see the new recipe in sculptures Tab, without it you will see the recipe.

Unfortunately star/maris dont has the time to fix it and I also have other stuff to do, while I have absolutely zero knowledge about techtrees.
I don't need the fix urgently, but since there might be quite a number of mods depending on this file (no clue how to find them), I thought it might be good if someone or we together could fix the code. You can find one copy eg here:
https://github.com/Serpens66/QuestMod-Dont-Starve-Together/blob/master/QuestAPI/custom_tech_tree.lua

Or maybe you already know another mod that is using this file and which already fixed it?

Edited by Serpens
Link to comment
Share on other sites

  • Developer
3 hours ago, Serpens said:

The custom_tech_tree.lua made by star/marix seems to be incompatible to the sculpture Tab from the pottery wheel. As soon as you call the AddNewTechTree function to add a new tech tree, the recipes shown in the scultupre tab are not complete or wont do anyhting. Easy to reproduce if you give a sketch via console to let the pottery learn the recipe. With AddNewTechTree in modmain, you wont see the new recipe in sculptures Tab, without it you will see the recipe.

Unfortunately star/maris dont has the time to fix it and I also have other stuff to do, while I have absolutely zero knowledge about techtrees.
I don't need the fix urgently, but since there might be quite a number of mods depending on this file (no clue how to find them), I thought it might be good if someone or we together could fix the code. You can find one copy eg here:
https://github.com/Serpens66/QuestMod-Dont-Starve-Together/blob/master/QuestAPI/custom_tech_tree.lua

Or maybe you already know another mod that is using this file and which already fixed it?

I have one available inside gem core, but obviously you might not want to require gem core for your mod, so yeah/ 

  • Like 1
Link to comment
Share on other sites

On 18.9.2019 at 1:23 AM, Zarklord said:

I have one available inside gem core, but obviously you might not want to require gem core for your mod, so yeah/ 

Does it work independend of your gem api? And are people allowed to use only this file, instead of the whole gem api mod?
Or should I instead use your code to see what the problem with stars script might be?

https://gitlab.com/DSTAPIS/GemCore/blob/master/gemscripts/tools/customtechtree.lua

Edited by Serpens
Link to comment
Share on other sites

  • Developer
12 hours ago, Serpens said:

Does it work independend of your gem api? And are people allowed to use only this file, instead of the whole gem api mod?
Or should I instead use your code to see what the problem with stars script might be?

its not allowed to be independent of gem core, feel free to use it, feel free to inspect the code to attempt to star's, but don't actually copy the code.

  • Like 1
Link to comment
Share on other sites

On 18.9.2019 at 2:34 PM, Zarklord said:

its not allowed to be independent of gem core, feel free to use it, feel free to inspect the code to attempt to star's, but don't actually copy the code.

is it possible to require your GEM API, but without any intended or unintended downsides?

I mean we already had the overrides issue (which is solved now) and there are reports that the memspike fix can cause issues for some mods (I even read earlier by other modders that the memspike fix is not needed anymore, but you will have more knowledge about it).
Anyway, there might be even more unknown/known downsides, so I currently wont consider it reasonable to force a mod to use the whole GEM API, while it only needs the customtechtree.lua.

So.. maybe is it possible to change the behaviour of gem api, that it does nothing on its own. And only acts if another mod is calling a specific function of it? So in my case I would call a function for that customtechtree and only code that is absolutely necessary for this is executed from gem api. Same for "global pause mod", "island adventures" and so on.
And for the memspike thing: Add a setting to enable/disable all memspike fixing at once in gem api settings. Of course I dont have any knowledge about the memspike fix. But something that can cause trouble for some mods, should not even be active by default, shouldnt it? So in case mods like Island adventures or so require the mespike fix, let them also run it via a function within their code.

Edited by Serpens
Link to comment
Share on other sites

  • Developer
3 hours ago, Serpens said:

is it possible to require your GEM API, but without any intended or unintended downsides?

I mean we already had the overrides issue (which is solved now) and there are reports that the memspike fix can cause issues for some mods (I even read earlier by other modders that the memspike fix is not needed anymore, but you will have more knowledge about it).
Anyway, there might be even more unknown/known downsides, so I currently wont consider it reasonable to force a mod to use the whole GEM API, while it only needs the customtechtree.lua.

So.. maybe is it possible to change the behaviour of gem api, that it does nothing on its own. And only acts if another mod is calling a specific function of it? So in my case I would call a function for that customtechtree and only code that is absolutely necessary for this is executed from gem api. Same for "global pause mod", "island adventures" and so on.
And for the memspike thing: Add a setting to enable/disable all memspike fixing at once in gem api settings. Of course I dont have any knowledge about the memspike fix. But something that can cause trouble for some mods, should not even be active by default, shouldnt it? So in case mods like Island adventures or so require the mespike fix, let them also run it via a function within their code.

players can completely disable memspikefix with a config option, and if disabled, the only change that "could" get applied is worldseed. those are the only "passive" features that get applied. individual mods can still force memspikefix enabled/disabled, but users can disable memspikefix completely if they have issues with it.

  • Like 1
Link to comment
Share on other sites

1 hour ago, Zarklord said:

players can completely disable memspikefix with a config option, and if disabled, the only change that "could" get applied is worldseed. those are the only "passive" features that get applied. individual mods can still force memspikefix enabled/disabled, but users can disable memspikefix completely if they have issues with it.

yes, you are right about memspikefix, did not see that option to disable it for all mods, alhough in case memspikefix does harm a mod, it will cause alot of confusion and trouble if people reporting bugs to the mod author while memspikefix is causing it.
Can you go into detail about memspikefix what it does and why it could harm? Isnt there a way to find out in advance it it could harm a mod?

And what was this issue with overrides? And couldnt there be more unknown issues like this?

Edited by Serpens
Link to comment
Share on other sites

  • Developer
11 minutes ago, Serpens said:

yes, you are right about memspikefix, did not see that option to disable it for all mods, alhough in case memspikefix does harm a mod, it will cause alot of confusion and trouble if people reporting bugs to the mod author while memspikefix is causing it.
Can you go into detail about memspikefix what it does and why it could harm? Isnt there a way to find out in advance it it could harm a mod?

And what was this issue with overrides? And couldnt there be more unknown issues like this?

memspikefix delays the asset table for the prefab from loading until the first time the prefab is spawned, if a mod fails to include all the assets a prefab uses inside its asset table, problems with invisible prefabs can occur, if all mods were well programmed this issue wouldn't exist.

The issue with the overrides was me only half implementing a feature syncing the worldgen options between the worldgen options screen and the actual world itself(and not expecting anyone to do something like you did). as for more unknown issues, there can always be more issues, but that can be true for any mod...

  • Like 1
Link to comment
Share on other sites

38 minutes ago, Zarklord said:

memspikefix delays the asset table for the prefab from loading until the first time the prefab is spawned, if a mod fails to include all the assets a prefab uses inside its asset table, problems with invisible prefabs can occur, if all mods were well programmed this issue wouldn't exist.

The issue with the overrides was me only half implementing a feature syncing the worldgen options between the worldgen options screen and the actual world itself(and not expecting anyone to do something like you did). as for more unknown issues, there can always be more issues, but that can be true for any mod...

ok thanks.
short question to the assets loading in a prefab, because I just had this issue here https://forums.kleientertainment.com/forums/topic/112241-error-sourcegamecomponentspostprocessorcomponentcpp30-trace-follows/

In Multi Worlds mod are beavers that use the werebeaver anim files. But if these assets are included within the prefab ( Asset("ANIM", "anim/werebeaver_build.zip") ), we will get an error message within logfile, that this asset was already loaded (this error message is quite new I think, was introduced within the past months). So.. this sounds like a contradiction to include all assets within the prefab file ?!

 

Edited by Serpens
Link to comment
Share on other sites

  • Developer
18 minutes ago, Serpens said:

ok thanks.
short question to the assets loading in a prefab, because I just had this issue here https://forums.kleientertainment.com/forums/topic/112241-error-sourcegamecomponentspostprocessorcomponentcpp30-trace-follows/

In Multi Worlds mod are beavers that use the werebeaver anim files. But if these assets are included within the prefab, we will get an error message within logfile, that this asset was already loaded (this error message is quite new I think, was introduced within the past months). So.. this sounds like a contradiction to include all assets within the prefab file ?!

 

the error in that thread is not caused by a duplicate asset, its happens when PostProcessor:SetColourCubeData is used improperly more specifically it occurs when argument number 2(the first file path) isn't a valid file.

  • Like 1
Link to comment
Share on other sites

19 minutes ago, Zarklord said:

the error in that thread is not caused by a duplicate asset, its happens when PostProcessor:SetColourCubeData is used improperly more specifically it occurs when argument number 2(the first file path) isn't a valid file.

yes I hoped you could also answer this question (within that thread), but I also linked in that thread to the "anim bug with beaver".
This is the asset error message I meant:

Quote

[00:02:19]: ..\source\animlib\animmanager.cpp(516) :: Tried to add build [werebeaver_build] from file [anim/werebeaver_build.zip] but we've already added a build with that name!

if we remove Asset("ANIM", "anim/werebeaver_build.zip") from the assests within the wildbeaver prefab, then we wont get this error.

Link to comment
Share on other sites

  • Developer
Just now, Serpens said:

yes I hoped you could also answer this question (within that thread), but I also linked in that thread to the "anim bug with beaver".
This is the asset error message I meant:

if we remove Asset("ANIM", "anim/werebeaver_build.zip") from the assests within the wildbeaver prefab, then we wont get this error.

this is also not an error regarding loading the same asset multiple times, but two separate assets adding stuff under the same build name.
this is due to the fact that they moved the werebeaver build to the path anim/dynamic/werebeaver_build.zip so upon also loading anim/werebeaver_build.zip it thinks your loading another asset that adds an already existing build.
 

  • Like 1
Link to comment
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
 Share

×
×
  • Create New...