Don't Starve Together

Don't Starve Together

Limit Prefab
cs8425  [developer] 2 Feb, 2016 @ 1:11am
configuration setting
if you set the config,
will override the default config.
ex: default has "bee = 60"
you haven't set any "bee = XXX", then the bee is unlimit!!

in "modoverrides.lua"
--- some other mod ["workshop-609675532"] = { enabled = true, configuration_options = { despawn_delay = 0.1, res_mode = "MEM", despawn_mode = "RANDOM", limit_table = { bee = 30, killerbee = 20, babybeefalo = 5, beefalo = 20, beefaloherd = 20, bat = 30, frog = 30, mosquito = 20, monkey = 30, spiderden = 40, spider = 60, spider_warrior = 30, spiderqueen = 5, spider_hider = 60, spider_spitter = 35, skeleton_player = 16, bunnyman = 30, pigman = 30, merm = 30, rocky = 30, leif_sparse = 10, lightninggoat = 10, mossling = 12, rabbit = 160, penguin = 40, }, }, }, -- Limit Prefab --- some other mod
Last edited by cs8425; 2 Feb, 2016 @ 1:53am
< >
Showing 1-10 of 10 comments
cloudnaeris 19 Feb, 2016 @ 1:24am 
Every time I configure modoverride.lua it resets at launch to the default. If I click 'table of prefabs limit' and put 'set yourself' it just goes right back to default. If I take 'def' out of 'limit_table' it doesn't work. If I try to change the default few prefabs it ignores and resets...if I copy and paste this modoverride.lua that you provided it ignores and resets. Do not have any other mods except this one so it isn't a conflict. Any ideas?
cloudnaeris 20 Feb, 2016 @ 11:20am 
Nevermind, all I needed to customize was modinfo.lua and modmain.lua. After I got it working I tested it with ten mods. Seems perfectly compatible even after these recent changes! Basically just ignoring modoverride.lua at this point. The only thing that causes any trouble is if I try to test it by spawning in spiderden_2 and spiderden_3 with a number greater than what I configured as the max. Seems when it tries to despawn those two objects it doesn't like it. We won't be using the console to spawn things so shouldn't be a real problem. I haven't tried it on regular dens, the only concern I have is if I try to plant a nest if it would crash. I doubt it will ever come up though. Good work, and happy modding!

Willow UnNerfed
Less Lags
Health Info
Gesture Wheel
More Actions
Advanced World Generation
Food Values - Item Tooltips
Minimap HUD
[DST] Auto Catch
Combined Status
Smarter Crock Pot
Fix Multiplayer
No Mods Warning (working DST)
cs8425  [developer] 20 Feb, 2016 @ 8:18pm 
@cloudnaeris Which type of server did you use?
modoverride.lua I have only tested at dedicated server before 2/11 update.
'limit_table' should be a table(lua table), otherwist will fail back to default table.

spiderden, spiderden_2, spiderden_3 are all the same prefab call 'spiderden' (as I know).
So, there is no way to do as they have same prefab name without change any mod's code.
cloudnaeris 21 Feb, 2016 @ 12:20pm 
Yea, it's weird I had everything working perfectly fine tuned to how I needed it. Then after our session tonight I went to check into a crash that began during autosave phase of each morning in winter. (was missing a line about penguins) I'm pretty good about making one change at a time and keeping backups but everything fell apart. Something updated and everything went crazy but now it seems I only have to change modmain.lua and it works great. It also 'sticks' when I use the option 'use your own' but I don't even need that now haha. I was using a dedicated server through steam.cmd before but I'm playing with a friend that is basically the furthest geographical location humanly possible from where I'm at. Got a good system (can have 1000 mobs on screen in server with just me) and get 90mbps up/down and stay below 10ms ping as host but when he joins it gets really laggy so I needed to cut out the prefabs any way I could. There was literally no difference in performance between client hosting and dedicated so I just have been doing client hosting now for convienience of not having two grab my other computer every session.

I listed the mods I'm using and of them all yours has given me the best boost in performance with him on. (And also the most headaches, I don't know lua and am not a programmer by any means. I am sure I made everything more difficult on myself. Just make a change, test, rinse, repeat.) I have it back up and running great with all those other mods. Thanks again! (I couldn't live without my Willow mod though, xp)
cloudnaeris 21 Feb, 2016 @ 4:14pm 
Still getting a crash every morning in Winter. Disabling this mod prevents it. Gonna tinker a bit more, it's perplexing.
cloudnaeris 21 Feb, 2016 @ 5:46pm 
Not trying to spam, have limited account and can't comment regularly. Issue is with icehounds. You have them noted out, perhaps for good reason. During winter if I set them to a limit it crashes every morning. I went as high as 30 and it still crashes. So I just won't be limited Ice Hounds haha. Not going to test Summer and Fire Hounds, it'll come when we finally get there. Going to assume it's the same haha. I corrupted our world but at least I have isolated the issue! Again, I really appreciate this mod. Spent a lot of time messing with it, it's a minigame in itself haha. For now I'll just keep Ice Hounds noted out in Winter and Fire in Summer (except the first day, just to test) unless you have some insight as to why it is that way.
cs8425  [developer] 22 Feb, 2016 @ 7:32am 
Finally, I figure out the problem...
It cause by the walrus's pet hound.
Component 'leader' and 'follower' leaking 'onremove' Listener to clean up.
So, if remove the pet hound will cause crash :(
(use kill/death works but drops item)
I modify the code to skip despawn pet hound, should be fine now.
cloudnaeris 22 Feb, 2016 @ 8:28am 
I was just coming to say the same thing! We made it to summer and the fire hounds didn't break so it immediately, by process of elimination, narrowed it down to that. I started off narrowing it down to anything that would be associate with winter. Rabbits came to mind (same prefab but the skin changes) and bee's for their behavior. Penguins were my immediate first notion, but testing one at a time setting a save a few minutes before dawn eventually ruled them out too. The log kept talking about follower and when it first happened I had pigs following me so I had at first ignored that line. Even disabling them it didn't make too big a difference in the early game. Good to know I can uncomment that out though, haha. I appreciate you looking into it, this mod rocks. (Less lags is only reactive, this one is more preventative and that's what I need. It's also very hilarious during frog rain and penguin splash :p)
FreckledFraggle 26 Feb, 2017 @ 1:06pm 
Why monkey around with the config files so much? Just host it locally through the game, where you can configure everything by easy-clicking...then copy/paste the Klei modoverride file contents into the dedicated server file of the same type and save...voila (works great).
DawnGaming 2 Jan, 2018 @ 9:06am 
how to set config in dedicated server?
< >
Showing 1-10 of 10 comments
Per page: 1530 50