• Content count

  • Joined

  • Last visited

Community Reputation

2,241 Excellent

About CarlZalph

  • Rank


Visited by the Title Fairy
  • Visited by the Title Fairy

Recent Profile Visitors

9,472 profile views
  1. This is what I used to use: local activeplayercount = #(TheNet:GetClientTable() or {}) - (TheNet:IsDedicated() and 1 or 0)
  2. 'v.product' is of string type, and you're trying to index it as if it's a table. I don't see a way to safely obtain this item information you're trying to request here. It would be easier to make a blacklist of the torso items you don't want and check against the table. local blacklist = { amulet = true, blueamulet = true, purpleamulet = true, orangeamulet = true, greenamulet = true, yellowamulet = true, beargervest = true, hawaiianshirt = true, onemanband = true, raincoat = true, reflectivevest = true, sweatervest = true, trunkvest_summer = true, trunkvest_winter = true, } if blacklist[v.product] then inst.components.builder:AddIgnoreRecipe( end
  3. From So at most all I can say is to see who 'KU_QyKzdpSz' is to you by checking any server logs you have on the person. Without the ability to directly go from KU->Steam64 it's hard to say just who the person is. There was this thread a while ago about fake Klei servers: But Klei ended up making them stand out on the server list to ensure that they look different. Upon further inspection the user has a Steam group attached to it. Which as of this time only has one group administrator: Make of it what you will, as anyone could attach any group to their server. But perhaps you know this person and could resolve it between you two. Oh, and this is the group's comment: So yeah, this looks like the person you'd want to resolve your conflicts with.
  4. Alternatively to make it a fixed guarantee to do it X times in Y tries, create a set of Y tries with X of them being the good outcome. This can be simplified down nicely if X is 1 by using an incrementer and a stored random integer between the set size to compare against. Example of simplified:
  5. Just don't forget to put a 'local' in front of those things, otherwise you're populating the global table. G = GLOBAL -> local G = GLOBAL
  6. How much free RAM do you have during worldgen? Too little and then hard drive paging happens, which would slow everything down like that.
  7. Those mods replace the files directly, which give it that incompatible nature.
  8. My mod here is a giant blanket one that removes all colour cube changes: However, to do what you're wanting to do involves some file edits due to how much local variable scopes Klei made colour cubes. They're not accessible directly through the mod interface.
  9. Unfortunately it requires some tomfoolery in the memoryspace of the server to do it with your own token. A workaround that you could do without any technical stuff is to have a trusted friend generate a key for you to use on your server. Of course they'd have admin on your server, hence the trusted part.
  10. Most of those games don't go through a scripting language for their logic, making direct access to the game state much quicker for serialization out. Don't Starve (Together) both use LUA as the primary area for logic and entity handling, which all need to get serialized out to something that can be reloaded later. This takes time, and their use of LUA is a single threaded instance so it isn't multithreaded to speed it up a lot. Then there's the amount of active entities and just raw data in games from now compared to then are a lot higher thanks to better hardware capabilities. Further, larger files doesn't necessarily mean more complexity. For all I know the game you're referencing to saves it all out as an uncompressed blob that if something didn't save properly would cause the entire file to be considered corrupt. With DS(T) there's a lot of error checking and ensuring things function properly. You two might find value in my mod here: It can disable those shaking jungle leaves, as with other things. All optional.
  11. Its funny but sad...

    Yeah, and then I put up a mod to get it back into the game: Current stats after all this time: I'd say that it's safe to say that the people who truly wanted it were a loud vocal minority. I have a feeling that this whole thing will blow over once people realize that what happened isn't the deal they're making it out to be.
  12. It makes me wonder if anyone says 'Warbucks' anywhere on here and JoeW'll be there to keep the peace.

    1. CarlZalph


      24h later and the entire subforum is just a swarm of joke threads and vitriol.

      Sorry, JoeW/mods.

  13. Custom Sleep Effects

    The thing is that the onsleep/onwake functions are called once, and in the prefabs they're creating a timer from these callbacks. So it's a oneshot. The callbacks here shouldn't be created for these when the component postinit is done, since they're defined in the prefabs after the component is created. Then there's the thing that the callback for the timer for each prefab in the base game follow a nonstandard way on using variables for doing the deltas- some store the tuning variable for (hunger/health/sanity) while the others don't. To top it all off the timer variable when it's killed isn't being set to nil like it should, so can't even use a metatable hook for that. These all scream of 'old code from DS' which should have been rewritten if time permitted; even if they're functional they're not modder friendly. Luckily all of the default prefabs for the base game use the same variable name for the sleep timer called 'sleeptask', so it's not as bad as it could have been for a blanket hook. Last note you had a typo for the siestahut with a 'b' in front of it. Here's what I did to get this all functional and generic so you can apply it to anything really: local HookSleepingData = { wolfgang = { bedroll_straw = { sanity = 1.0, health = 1.0, -- This doesn't do anything due to prefab stopping it, this is here in case Klei changes that. hunger = -0.67, }, bedroll_furry = { sanity = 1.33, health = 1.33, hunger = -0.67, }, tent = { sanity = 1.33, health = 2.33, hunger = -0.67, }, siestahut = { sanity = 1.33, health = 2.33, hunger = -0.33, }, }, waxwell = { tent = { sanity = 400.0, health = 900.0, hunger = -50.0, }, }, } local HookThese = { "bedroll_straw", "bedroll_furry", "tent", "siestahut", } local HookDoDelta = function(hooks, sleeper, component, value) if value == nil then return end local tohook = sleeper.components[component] if tohook and tohook.DoDelta then local DoDelta_old = tohook.DoDelta tohook.DoDelta = function(self, amount, ...) -- You could do math here with the old value 'amount' and the new replacement 'value' if you wanted it to be additive or multiplicative. -- Right now it's just flat out replacement. return DoDelta_old(self, value, ...) end table.insert( hooks, { component = component, DoDelta_old = DoDelta_old, } ) end end local UnHookDoDelta = function(hooks, sleeper) for _, hook in ipairs(hooks) do sleeper.components[hook.component].DoDelta = hook.DoDelta_old end end local HookSleepingbags = function(prefab, sleeptask) local fn_old = sleeptask.fn sleeptask.fn = function(inst, sleeper, ...) local data = HookSleepingData[sleeper.prefab or "None"] if data and data[prefab] then local hooks = {} HookDoDelta(hooks, sleeper, "sanity", data[prefab].sanity) HookDoDelta(hooks, sleeper, "health", data[prefab].health) HookDoDelta(hooks, sleeper, "hunger", data[prefab].hunger) -- Temperature/Woodiness/custom component/etc could be done here. fn_old(inst, sleeper, ...) UnHookDoDelta(hooks, sleeper) else fn_old(inst, sleeper, ...) end end end for _, prefab in ipairs(HookThese) do AddPrefabPostInit( prefab, function(inst) if not GLOBAL.TheWorld.ismastersim then return end if inst.components.sleepingbag and inst.components.sleepingbag.onsleep then local onsleep_old = inst.components.sleepingbag.onsleep inst.components.sleepingbag.onsleep = function(...) onsleep_old(...) if inst.sleeptask -- Hopefully other 'sleepingbag' mod stuff uses this exact same variable name Klei uses, otherwise fix it here. then HookSleepingbags(prefab, inst.sleeptask) end end end end ) end
  14. Doing that is functionally equivalent to the 'fixed' code posted, and looks as much of a jumble as the 'unfixed'.