• Content Count

  • Joined

  • Last visited

Community Reputation

578 Excellent

About Serpens

  • Rank
    Senior Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. When you do move your character by clicking on a location with the mouse and holding the mouse button, normally the character is following the mouse pointer even while moving the mouse as long as you hold the button. But this does not work when you start this with a click+holding while the cursor is over the spidernet that is spawned by wickerbottoms new book "Overcoming Arachnophobia".
  2. [00:54:20]: [string "scripts/components/boatphysics.lua"]:123: attempt to index field 'sounds' (a nil value) I hit a mod-object with a boat and this was the crash report (the component is the one from the game). Of course modders should make sure that the objects they add are complete, but that it should include a "sounds" table is not that obvious... So I think you should add a inst.sounds~=nil check there and simply play no sounds if none is defined.
  3. After harvesting a bananabush, it stops growing. It starts growing again only when: log out/log in again, or console command LongUpdate(1) (it will be instant stage 2 then) or dig it out and replant+fertilize. Especially that log out/in again solves it makes me very sure that this is a bug, although I did not find the problematic line of code yet...
  5. that one is true, yes, thanks for the idea. I build my code like the one in worldsettings_overrides.lua, which is replacing the old TUNING entries/tables, so with the same style the devs are using (with OverrideTuningVariables function) this does not work. But if I write the code a bit differently to not replace the whole table, it should work in this specific case.
  6. required_prefab does not add soemthing. I just makes the worldgeneration stop and try again, until some other code finally was able to place that prefab. If you just want to place a single prefab, with no special stuff around it, it is best to simply spawn it in within modmain ( AddPrefabPostInit("world",...) (eg. count how many prefabs exist in Ents and if it is less then 10, spawn some. Or save and load somewhere if the prefabs were spawned already or not (so it is not spawned again on every game start). You can take a look at my teleportato mod for this. Normally the teleportato parts are generated by setpieces. But setpiece placement from DST is very bad, especially for big setpieces it fails very often. Therefore I have code in modmain.lua to manually spawn the parts that are missing.
  7. Just a guess: I think the "Loop" and/or "Branching" worldgeneration settings have an effect one this. Did you already publish your mod? Can you share a link? My teleportato mod also has a setting to split tasks into islands (by just adding a regionid and "not mainland" to them)
  8. How should one use "TheSim:AtlasContains" function? Or how in general check if an image name exists in an atlas? I don't add images myself, I would like to use the ones from the game, so I eg do: _G.TheSim:AtlasContains("images/customisation.xml", "berrybush") in modworldgenmain and also tried in modmain within AddPrefabPostInit, it always returns "false", although: This image exists in that atlas AND I can use that image without problem when using the modutil functiion "AddCustomizeItem". So how do I check withing modmain if an atlas image exists? I also tried local customisation_xml = GLOBAL.resolvefilepath("images/customisation.xml") but this did not change anything... edit: I it needs ".tex", so this will work: _G.TheSim:AtlasContains("images/customisation.xml", "berrybush.tex") I did not try that, because AddCustomizeItem does not require the ".tex"...
  9. Testing is always difficult and error prone, but I'm quite sure that it does NOT have an effect (based on testing results). The evergreens.lua script is also executed long before the world exists, and therefore the old TUNING values are saved within the local variables. Then Pre is running and changing the TUNING values, but it has no effect on the local variables. - I copy pasted the evergreens.lua into my mod and added a print directly above the local variable "builds" and it proved that the evergreens.lua script is executed BEFORE applyoverrides_pre functions. - So in the end, moving these locals in this and at best also all other prefabs to the constructor must be done at some point. And if the devs plan to add worldsettings for the GROW_TIME too, this will be done anyways.
  10. Short: I think customize.lua should not use "Levels.GetDataForLocation(location)" for "Worldsettings", only for "Worldgeneration", because this can be different from TheWorld.topology.overrides (although this also might be a misunderstanding from me, but although I spent 200 hours into it, I'm far away from being able to understand it, since most of it is done in C++ I guess.. the game is calling modworldgenmain.lua several times and it is impossible to know for modders when what is done... and should be done...) I would be really grateful if someone can write a tutorial for how to change worldsettings via mod properly, see:
  11. In util.lua you have two functions to iterate in a sorted order about key,value tables: orderedPairs(t) (copy paste from lua website) and sorted_pairs(t,fn). I assume that they should do the same, except sorted_pairs can handle a custom sorting function. But currently sorted_pairs(t,fn) is not working. When you give it a table like {b=10,a=40,c=50} it should sort it by key, so alphabetically. But instead you will receive 1,2,3 as keys and a,b,c as values. Is this what it is supposed to do? I doubt it.
  12. When a mod uses an invalid preview.tex file (tried one with 526x527 pixels) the game will crash when scrolling through mods shortly before reaching the mod with the error message you see in screenshot. When I changed the preview.tex to 128x128 , everything worked fine. I don't think the game should crash just because of an invalid mod image.
  13. I just saw that you added "worldsettingsutil.lua" which does handle various timers. For example you already made a "WorldSettings_Pickable_RegenTime", although right now only the lightflier_flower is using it. But I assume that you will expand this to all pickables and then add worldsettings to change the regrow speed from pickables. - And therefore I assume that you will expand this even further also to growable component , so also to evergreens. So if you plan is to do this anyway in the future, then it is no hurry for me, do it when you implement this worldsettings timer for growable. In case this is not planned, please kindly let me know, then I will make a mod which adds worldsettings for those.
  14. Not urgent, but nice to have: Analog to this solved request: I would like to ask if you could also improve other code, to not use local variables that are saving TUNING values. For example in the evergreens.lua (and maybe other scripts with growable stages), you define "builds" and "growth_stages" outside of any function, which makes it very hard to change anything about grow stages by changing the TUNING values. This is not only helpful for mods, but also for your "new" system of "Worldsettings" that can be changed anytime. In applyoverrides_pre from worldsettings_overrides.lua you are changing TUNING values. So if you one day want to add a setting to multiply the grow time of evergreens, your current system with local variables won't work.
  15. Hi, since the MonkeyIsland was introduced, generating a new world sometimes takes very long, especially when the world_size is small. In the logfile you can see alot of "PANIC: missing required prefab [monkeyqueen]! Expected 1, got 0" I attached a logfile with only client_mods enabled and world_size small. I made alot of tests and even tried to change the start_mask and fill_mask of the MonkeyIsland-layout via a mod, but for whatever reason this did not help. And although the Hermit-Island is roughly the same size, this island nearly never fails to generate. With mods that alter the worldgeneration a bit, the MonkeyIsland fails even more often before it finally succeeds, if it ever does. So maybe you can make the placement code for the MonkeyIsland better somehow? Btw. Also the terrariumchest setpieces have the same problem, they are also often the reason for "PANIC", but luckily you can disable it in the worldsettings.