• Content count

  • Joined

  • Last visited

Community Reputation

488 Excellent

About Serpens

  1. 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.
  2. Hi vagnerdarochasantos + Godless (authors of Tropical experience), Baku and me are currently creating the Slanty Shanty (house of hamlet with interior) for DST: One problem is, that DS-Hamlet has no anim for the walls/floors, they are adding them with an "InteriorManager" which is not available in lua. So we have to create the wall/floor anims ourself and add them as prefabs instead. Godless already created many of the wall/floor anims, but some are still missing. I'm not art expert and Godless is unavailable, so maybe someone of you would like to help? How you could help: Hamlet only has texture tex files of the wall/foor. Use them to create the shape of the back and sidewalls/floor. Eg. 3 textures next to each other will form the backwall. And many textures next to each other will form the floor. Also rotate the sidewalls, so they look exactly like template. You can use the walls/floors Godless already made as template. After you did the tex files, merge them into an anim and use proper naming for the different animations (and tell me those names, so I can switch between the animations within the anim. If I do not use the right words here, forgive me, hope you know what I mean) Attached: - Example walls anim from Godless ( - Example floors anim from Godless ( - hamlet textures (from which the anim is currently missing)
  3. if you dont want to disable single mod by mod, you can also disable half of them and look at the result. this way it is much quicker to find the mod that is causing it.
  4. I doubt you have all these mods active at the same time? But we can only guess. You have to make a test world and disable mod by mod and find out which is causing it.
  5. The code above worked fine for me, had a firestaff with infinite uses and no percentage displayed. This is still the recommended way. If you still want to hide the percentage: I just saw in the itemtile code is written: if not self.item:HasTag("hide_percentage") then so you can also add this Tag to everything you dont want to see percentages on. Eg also within the AddComponentPostInit, add the tag to self.inst. And another way to hide percentage would be: AddClassPostConstruct("widgets/itemtile",function(self) if self.percent~=nil then self.percent:Hide() -- simply hide it end local old_SetPercent = self.SetPercent local function new_SetPercent(percent,...) local ret if old_SetPercent~=nil then ret = old_SetPercent(percent,...) end if self.percent~=nil then self.percent:Hide() -- simply hide it end return ret end self.SetPercent = new_SetPercent end) This will overwrite the "SetPercent" function, but remebers the original function. So our new function will first call the original function ,which will set up the precentage, but directly after it, we will simply Hide() it. If your mod is "all client require" and you want it to work for every percentage of every item, regardless what/what happens, then one single mod is enough (so no need for client_only and no need for complicated code (it gets complicated if the server has to tell the clients whento hide precentage and when to show percentage. But if you always want to hide all percentages, it is easy)
  6. changing a precentage display is muuuuuch more complicated then everyhting else. It is one of the most complicated I can imagine Mostly because it is a client display and messing with clients is always difficult, unless it is a client_only mod and you only want to remove the precentage for only the players who have the client mod installed (but as client mod you can not make items last infinite) You can use instead: AddComponentPostInit("finiteuses",function(self) self.inst:DoTaskInTime(0,function(inst) inst:RemoveComponent("finiteuses") end) end) This will make everything with finiteuses remove that component after the game was loaded.
  7. you simply have to do in modmain: AddPrefabPostInit("theprefab",function(inst) inst:RemoveComponent("finiteuses") end) This will remove the finiteuses (which is used for weapons and tools) from yourprefab. And therefore also the percentage.
  8. cant you just use the existing indestructable items mod, which simply removes the "finiteuses" component? This will automatically also removes the percentages. Dont know the exact name of that mod currently.
  9. There are plenty of options. You can also listen for "attacked" and print or remeber this instead. Just search for "PushEvent and you will get al list of all currently existing events. And you can even push your own events. So you can nearly get every info that you can imagine. Although I dont think "print" is what you are looking for. Many mods and other stuff is using print for debugging.
  10. simply search the game code for the specific event. So in case of death, search for - PushEvent("death - with notepas++ in all files. Then you will will see that usually a table of information, like "cause" and other info is provided with all events. This means you ListenForEvent("death",function(inst)... should look like ListenForEvent("death",function(inst,data)... and this data will include the said information
  11. 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, 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.
  12. At best, test the fixed file I linked above, and report back The update incompatibility should be fixed, same for the flute.
  13. you can find all predefined consolecommands within consolecommands.lua in scripts folder of the game To make sure it is indeed caused by the componentactions you can add this to modmain: AddComponentAction("USEITEM", "fuel", function(inst, doer, target, actions) -- this wont overwrite anything, it is just an additional check if not (doer.replica.rider ~= nil and doer.replica.rider:IsRiding()) or (target.replica.inventoryitem ~= nil and target.replica.inventoryitem:IsGrandOwner(doer)) then if inst.prefab ~= "spoiled_food" and inst:HasTag("quagmire_stewable") and target:HasTag("quagmire_stewer") and target.replica.container ~= nil and target.replica.container:IsOpenedBy(doer) then print("is returning without checking FUEL",inst) return end for k, v in pairs(GLOBAL.FUELTYPE) do if inst:HasTag(v.."_fuel") then if target:HasTag(v.."_fueled") then table.insert(actions, inst:GetIsWet() and ACTIONS.ADDWETFUEL or ACTIONS.ADDFUEL) print("ADDFUEL action should was added",inst) end return end end end print("end of function",inst) end) you can add more prints if neccessary. In case the action is not added to the actions table and you can not fix it by changing your previous code, you can also use the code above to simply add the action yourself. So lets assume this is called "print("is returning without checking FUEL",inst)", then you could simply remove the first part of the code above, to only have the "for ... FUELTYPE..." function in it. This will then be executed after the checks written in componentactions.lua and will add your action. (so AddComponentAction is only adding, not overwriting)
  14. there are other ways, yes. But if you overwrite that function, make sure to save the old funciton and call it within your new one. So you new function should only contain the preishness stuff and then simply call the old function. This way it is totally okay to overwrite the original function (cause you are calling the old one within yours new one). The other way might be the "dropitem" event you see within container component. I see no reason why it should not work.
  15. At first look everything looks right. you can add more prints/print some things ingame to. So check if the fueltype and tags are really there while being ingame. you can use c_select() and hover over the thing with mouse. Or use c_findnext(prefab) to use the things within console.