Don't Starve Together

Don't Starve Together

32 ratings
Random Spawns Adjusted
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
19.057 KB
2 Sep, 2020 @ 3:34am
12 Sep, 2020 @ 12:14pm
6 Change Notes ( view )

Subscribe to download
Random Spawns Adjusted

Description
This mod allows spawning random entities around players every few seconds or by using a command. Entities are set in various categories (edibles, mobs, weapons, bosses, etc.) which have configurable spawn chances.

Random spawns are disabled for dead players, and a command can be used to disable certain players from getting them too.

Spawn chance is weighted against the total of all other categories. For example, if weapons category is set to 10 and armor is set to 40, there is a 20% (10 / (10 + 40)) chance for a weapon to spawn and an 80% (40 / (10 + 40)) chance for an armor to spawn. Entries under the same category currently all have equal spawn chances (e.g. all bosses have equal chances to spawn).

Missing prefab? Got a suggestion? Found a bug? Leave a comment or start a discussion! This is my first time uploading a mod so all feedback is appreciated :)

Commands

Each command starts with GetRandomSpawner() in order to access the mod's spawner, followed by the name of the function to call and must be entered in the console. For example, GetRandomSpawner():Start().

Start()
Stop()
Start or stop the spawn timer.
DisableFor(player)
EnableFor(player)
Blacklist a player from getting random spawns. The blacklist is empty by default and persists on server refresh.
SpawnRandomOnAll()
Manually trigger random spawns on all players. This is the same command the spawner uses on a timer.
SpawnEntityOn(prefab_name, player)
Spawn an entity on a player.
GetRandomEntity()
Get a random prefab name registered in the mod's spawn lists.

Note: All random spawns are based on the configured weighted chances.

Possible future updates
Let me know if any of these future updates interest you, any other suggestions are welcomed:
  • Commands to spawn from certain categories only.
  • Find a way to allow users to customize the individual entities under each category.
  • Tweak spawn settings so different categories spawn entities at different ranges (e.g. items appearing under players, but not bosses).
  • Add a despawn timer for indestructible structures.
  • Add missing prefabs to the spawn lists.
  • Add more complex spawns (e.g. multiple items at once, configured entities such as Poison Birchnut Tree, etc.).

Credits
Inspired by DST random spawner created by zaptrap
Thank you to Whisper, Smasher, Gear519, KoreanWaffles, iso, SpiffyShirt and everyone else that helped create the prefab list and test the mod!
18 Comments
That Arousing Platypus Elder God  [author] 15 Feb @ 3:57pm 
No idea. You'll have to figure out what's stopping you from using the console commands probably.
Bread 15 Feb @ 12:27am 
Oh, also I didn't expect you to respond but also how do I access it then?
That Arousing Platypus Elder God  [author] 14 Feb @ 5:14am 
@Bread there are no UI elements, no.
Bread 13 Feb @ 10:59am 
@That Arousing Platypus Elder God uh, is there like a panel that i can use with a keybind to open it, since my console commands aren't working and i can't access it
TheSilentAngryCat 9 Aug, 2024 @ 1:00pm 
oof, yeah ill let you know if peeps do :happyfriend:
That Arousing Platypus Elder God  [author] 9 Aug, 2024 @ 8:04am 
Adding prefabs automatically would be a bit broken... some prefabs can't be removed or don't have an immediate effect (e.g. beefalo herds), and worse, some prefabs are internals of other prefabs, which would crash your game when spawned.

I wish there'd be a way, though... Let me know if anybody has an idea.
TheSilentAngryCat 8 Aug, 2024 @ 5:30pm 
yeah i dont see how to add but i found the text file for your mod just not the others that have entities
TheSilentAngryCat 8 Aug, 2024 @ 1:41pm 
wish it would do it automatically xd
TheSilentAngryCat 8 Aug, 2024 @ 1:40pm 
ah
That Arousing Platypus Elder God  [author] 8 Aug, 2024 @ 7:25am 
@TheSilentAngryCat it does but only if you configure it yourself.
The spawn lists are in a configurable text file that comes along with the mod.