Serpens

  • Content count

    1,262
  • Joined

  • Last visited

Community Reputation

523 Excellent

About Serpens

  • Rank
    Senior Member
  1. In the local function SetBoat within anchor.lua component starting at line 25 you try to call "self.OnLeaderRemoved" which does not exit (so is nil). In normal game this does not cause a problem, because the event "boat_onremove" is never triggered anyway. But because of the lack of an SetBoat function earlier, I added it in my mod to the anchor component. That means when the game is calling your new local SetBoat function self.boat was already set by my mod, which results in the call of self.inst:RemoveEventCallback("boat_onremove", self.OnLeaderRemoved, self.boat) but since "self.OnLeaderRemoved" does not exist, this throws an error "[00:04:43]: [string "scripts/entityscript.lua"]:963: assertion failed!" So please dont leave wrong code within your scripts, just because it is no called from your current code.. And why is SetBoat a local function and you give self to it? Why isnt it a component funciton, like in mast.lua and others? edit: bug was solved with todays (13.12.19) game update. (but I still dont understand why you made SetBoat a local function, while it is a class function in other boat components)
  2. Forcing Island Retrofit

    oh, yes, seems the file is only loaded when retroffiting, so try again with your old world (you can force quit the game to prevent saving, but I guess you know that :D). You can also modify another file, eg. in prefabs the player_common.lua and add a print at the beginning. This way you can make sure that your modification was succesfull. in ocean retrofit file you put one print at the top and one print inside the "TurnOfTidesRetrofitting_MoonIsland" function, so directly after the line "local function TurnOfTidesRetrofitting_MoonIsland(map, savedata)". As soon both prints are in logfile, you can start modifying this TurnOfTidesRetrofitting_MoonIsland function. This function tries to call 3 times the "TryToAddLayout" function, like you see at the bottom of it "local success = ...". So it tries to place the big island first and if this does not work then smaller ones. I think the "Another way" below is better and saves time. ((Within this try-function first you could try to print the "candidates". So after the line "if #candidtates > 0 then" you could write: dumptable(candidtates) to print the content of this list. Then you will see how many possible positions where found. Find out if the position you would prefer is already within the candidtates. If so, you only have to remove all the other ones and you are fine.)) Another way, if this does not work, would be to write your own candidtate, so before line "if #candidtates > 0 then" you simply define: candidtates = { {top = top, left = left, distsq = VecUtil_LengthSq(left - map_width / 2, top - map_height / 2)} } and put your custom values in for top, left. I think distsq can be any number (make it 0), since it is only used if more than one candidtate is given, to find the best.
  3. Forcing Island Retrofit

    Please write your response in this thread, not via private message. Others might have the same question. I wrote you in my first response what to do. I attached a sample mod testmod.zip. Unpack the zip and put the testmod into your DST modfolder, so it looks eg like this Steam\steamapps\common\Don't Starve Together\mods\testmod I already included the ocean retrofit lua from DST. You can open that file and modify it, eg adding the print at the beginning of the file. Then activate the mod and start the game (create a new world without caves, just for testing). After that you go to Documents\Klei\DoNotStarveTogether and open the client_log.txt. search if you see your print there (so in your example, search for "MyFunction was called" without quotes.) If you find it, great, then you can simply modify the file to change the location of the island. If you dont find it, it wont work that way (some files work like this, other dont, I dont know which do work, that is why you test it) If it does not work, you have to change the gamefiles directly without a mod. To do so you unpack the scripts.zip from DST, change the ocean retrofit file to your linking and then pack the scripts folder again to zip. This new zip replaces the orginal scripts.zip (make a backup from the original somewhere else, or check files with steam after you succeeded). Start the game and now it should load your new ocean retrofit file. Check again if your print is now printed, it should work now. Change the coordinates in the file and try to make the island spawn at your location. testmod.zip
  4. Forcing Island Retrofit

    hm.. if you not even know how to add print statements, you also wont know how to adjust the code to spawn the island somewhere else, right? To figure this out might take some hours and one would need your savegame (to get the cooridnates you want the island to spawn). I have no time currently to do this everything for you, sorry. But everyone with just a very little coding experience can help you with that.
  5. Forcing Island Retrofit

    you can see the code for island retrofit in scripts/map/ocean_retrofit_island.lua The problem now is to change this code... it is neither a class nor component, so we can not use these commands. You could try to copy paste the file into a mod in scripts/map folder and add some print statements to the file to see if it gets executed instead of the original one. If that also does not work and since it is only for one-time retroffiting, you can also make a backup of the scripts.zip, then modify the original file to your liking and zip the scripts folder again. Then the game will use the zipped scripts folder with your modified file. After the retrofit worked, you can use the original zip again.
  6. At best, test the fixed file I linked above, and report back The update incompatibility should be fixed, same for the flute.
  7. @AretMaware you still there? I will upload the files I currently fixed, see limitations I wrote above. Its the modmain and the sax and whyatt prefab file. You can remove the SGwhyatt file from your mod. whyattfixedfiles.zip
  8. I can fix it. It would help if you would have older game files.. The person who did your code simply copied the SGwilson.lua from that time instead of adding/changing stategraphs properly within modmain. And since the SGwilson.lua was updated from the devs, your character is using too old code now. And it would help alot if I could compare the original SGwilson.lua from that date with your SGwhyatt.lua to see what changes exactly were made by the person (to distinguish his changes from the changes made by devs). I guess he only changed the panflute code, but I can not tell for sure. I already fixed the stategraph stuff (assuming the person did only change the panflue stuff) and fixed the oneman band sanity code. So boat and most other bugs related to old code/game update are now fixed and it wont break in 99% of new game updates anymore. Unfortunately I never did a character mod myself. So while I can help you with general code, I cant help much for character specific stuff, like the portraits. So I have 0 knowledge about anything related to adding animations and sounds I still could try to add your custom saxophone sound, at least if you know how to add the sound in general to the game, I can assign it to the saxophone play. @AretMaw
  9. Geometric Placement

    I have no knowledge about dedicated servers, so it may be better to wait for response of the creater @Zarklord
  10. marbleshrubs grow_stages have no name

    thank you for your response Yes, but in the harvestable/workable functions is stuff wirtten like "if growstage==3 then give3coconuts end". This is impossible to use by a mod. So the only constant we currently have is the growstage. Dont you think it would help modders and also developers, if you would make the loot more accessable? Eg. put into the growstages something like loot="none", loot="big" and within harvestable you have a mod-accessable table that the "big" loot will be eg. 3 coconuts. Of course this is only an example to show you what I mean. Anyway even if you dont implement it, thank you for your time
  11. marbleshrubs grow_stages have no name

    thank you very much But, say, will you have any kind of pattern for this in the future? I mean I just saw that for the new rock_avocado_bush you have 4 grow stages, while again the 3rd seems to be the one to considered "tall", but now you simply named them "stage_3" instead of "tall". Why dont you keep a pattern for this? Or in case the stage.name is not recommended to be used for that, how else can we modders find out if something growable is now in his best stage to be harvested? Or will stagenumber 3 always be the best stage?
  12. Geometric Placement

    in case you still want to know, you can use the librarymanager of zarklord (its eg. used to force enable the gem api mod) https://gitlab.com/DSTAPIS/GemCore/wikis/home
  13. Just here to notify you of a bug with geometric placement, in hope you get an email noification here (while you dont get one on steam). The bug makes Action Queue Reborn dont work properly and maybe more: https://steamcommunity.com/workshop/filedetails/discussion/351325790/620702121669723777/?ctp=8#c1628538707056295524

    1. rezecib

      rezecib

      The memory leak affects action queue? I'm confused, I've been using them together without noticing a problem.

      Memory usage for geometric placement is more or less unavoidable, collision checking is expensive and the game does not optimize for this scenario of checking a grid of collisions. It sounds like GC is working as intended if it cleans up the memory.

    2. Serpens

      Serpens

      I made a dedicated server with no mods and I only had action queue reborn active -> planting pinecones in queue works fine.  But if I also enable geometric placement it was 100% reproducable, that at latest when the character starts planting the second line of plants, they are planted outside of the usual template. I hope you can reproduce it, you will notice when it happens and it happend everytime at my side, it simply wont plant on the template after few plants. This only happens if 'm client, not when I'm host.

      I reported this bug to the author of AQR and he told me he reported a memorey leak at your modpage and that my reported problem might be related.

  14. Within the batbat.lua within onattack you do: if owner.components.health ~= nil and owner.components.health:GetPercent() < 1 and not (target:HasTag("wall") or target:HasTag("engineering")) then owner.components.health:DoDelta(TUNING.BATBAT_DRAIN, false, "batbat") owner.components.sanity:DoDelta(-.5 * TUNING.BATBAT_DRAIN) end So you are checking if health~=nil , but you forgot to check if sanity~=nil. Mods which allow mobs or other things without sanity to carry a batbat, the game will crash on attack. Please let me know if this is a kind of bugreport you would like to receive, or if you want the modders itself to implement some kind of security checks/workarounds, although this would mean alot of unnecessary code and overwrites. Similar problems apply to some other files, eg. chest_random_good.lua where you should add security checks for all the mentioned components (although this is not that important, since it is not used in default DST as far as I know)
  15. marbleshrubs grow_stages have no name

    1) the "Show Me" mod by star/Maris is showing alot of information. One of this information is the the grow stage of trees/spiderdens and also marble trees (most useful for twiggy trees). But for marble trees there is no stagename to show. 2) My "Evolving Maxwell Shadows" mod is only allowing the shadows to cut stagedata.name=="tall" trees. For all normal trees this works fine, but not for the marbletrees because of missing name. I had to add special code for them "stage==3" now, but who knows if stage 3 will always be the "tall"==highest stage value (of course for marbletrees it wont change, but I should not add code for "if stage.name nil then use stage==3", because this might not be correct for everything.)