Timberborn

Timberborn

Bobingabout's Housing Optimize
41 Comments
Skunk 26 Jun @ 6:40pm 
amazing :steamthumbsup:
Lego 9 Jun @ 7:18am 
Thank You!
fabio.capela 9 Jun @ 7:10am 
The original (abandoned) project source is linked from its mod.io page (the "Visit Homepage" link at the top).
Bobingabout  [author] 8 Jun @ 1:14pm 
I don't use actively use github, none of my projects are online.

I don't have access to the original project, it has been abandoned. I updated it by popular demand.
Lego 8 Jun @ 8:36am 
Found your github, but you've not uploaded your mods.
Would you mind sharing the source? I would like to take a look at it without needing to decompile it. :)
fabio.capela 7 Jun @ 8:04am 
You could improve the results by making a slight change to the algorithm. Before starting to assign beavers to houses, find how many child slots will need to be taken up by adult beavers (i.e., number of adult beavers minus the number of non-child housing slots) and assign the beavers with no regard for which kind of slot they go into until that number of child slots are taken; after that you revert to only assigning adult beavers to non-child slots.

This should make it a lot rarer for housing dedicated to isolated workplaces to be taken by unrelated beavers.
Bobingabout  [author] 26 May @ 6:53pm 
The tests I did... there's a lot of strange CPU usage going on, the game seems to use MORE CPU while paused than running...

but the behaviour is the same with and without this mod. it doesn't seem to have any effect on CPU usage at all, as far as I can tell.

Tested on various savegames of IronTeeth and Emberpelts.
Bobingabout  [author] 26 May @ 5:47pm 
@illerayn You're not the first to mention this mod causing lag, but I'm not sure how it could be possible.
This mod doesn't do anything except for at Day Start, where it re-assigns where beavers live.
I'll make a note to look into it.
illerayn 26 May @ 1:16pm 
Hello there,
This is a wonderful mod that both made me expend a bit more where I place my houses, but also reduced commute times a lot in my game !
Thanks a lot for making it !

Addendum : I realised today that the latest update (2025/05/26, yyyy/mm/dd) seems to have broken something in the mod. Now, I get weird stutters every few seconds, with the beavers gradually slowing down until the game fast forward them to their normal position. It seems like it comes from this mod after I tried deactivating my other 2 mods, which didn't change anything. If you have the time, I would love to see this fixed, if you manage to reproduce it ofc.
Loyalist 22 May @ 7:40pm 
Wow, night and day change in my colony. TYVM
Bobingabout  [author] 20 May @ 5:44am 
@nordstern The mod does all it's calculations at dawn (The start of a day), so worst case scenario, the game would stutter slightly for a single tick at dawn as it recalculates where every beaver should live.

I've never seen any kind of lag from this mod.
nordstern 20 May @ 1:29am 
How is the performance of these mod. I like to build huge and the game has its limits. Does the mod slow it down or freeze the game when the new days starts?
Bobingabout  [author] 11 May @ 8:06am 
@Raistlen Unlikely to be this mod. This mod doesn't edit or save any information related to beavers or districts.
It just registers an event, and on that event (Day started) just runs through the whole script. All information needed by the script is gathered when it is run, so unless the game crashes the moment day starts, it's highly unlikely that it's related to this mod.
Raistlen 11 May @ 7:51am 
I'm getting a crash when clicking on a district center and I think there's a chance this mod is the culprit, though I haven't been able to recreate the conditions in a test game.

I think what is happening is a beaver gets stranded, then upon rescue joins a random district. The district that they join has no housing. Other technical things happen with the script that I can't see. Then when clicking the district center an out of bounds exception is triggered.
Bobingabout  [author] 9 May @ 9:04am 
@Smaugo there could be a few reasons for that.
The script basically does as follows:
1. Makes a list of all houses.
2. Makes a list of all workplaces.
3. Makes a list of all unemployed beavers (including children)

4. Iterates through every Workplace, and assigns it's workers to the closest house, ignoring CHILD slots. Once all adult slots are occupied, it then starts assigning adults to child slots.
5. Iterates through every unemployed adult beaver and assigns them a house, same rules as previous.
6. iterates through every child beaver, and assigns them a free slot.

Because of this order of operations, it's possible that if you have more than 2/3 workers than housing places, workers will be assigned to distant housing. Especially if that remote scrap flag is low down on the workplaces list.
Smaugo 9 May @ 5:41am 
I have the same problem as nhwhiting
A house is put right next to an isolated scrap beaver but it's a beaver near another house that is assigned every day.
nhwhiting 6 May @ 3:24pm 
Yes. I am sure.
Bobingabout  [author] 6 May @ 6:11am 
@nhwhiting Are you sure you're running version 7 of the game?
nhwhiting 6 May @ 12:31am 
Hi. I've subscribed to the mod, but my beavers are still at random workplaces. I have a workplace with no other workplaces for about 100 blocks, but the beavers from that workplace live across the map. Is there any reason for this
ThelianTech 1 May @ 7:42pm 
awesome, I found you and I sent a Friend/Message request on discord.
Bobingabout  [author] 1 May @ 4:17pm 
@ThelianTech I am on Discord.
I'm in the Official Timberborn channel, and the official Factorio channel, plus also in the Omnissiah group that hosts the Bobs mods Factorio Chat.

Though, be warned, I haven't even looked at Factorio for several years, so if Kiwi Hawk doesn't know the answer, it's unlikely I can help either.
ThelianTech 1 May @ 2:09pm 
Hey BobingAbout, I havent seen any other way of contacting you but here, Instead of clogging up your workshop comments, would you mind at all if I either friended you on here or possibly get your discord? I have some questions for you about BobsMods on Factorio that KiwiHawk couldn't answer for me.
Lareesha 18 Apr @ 9:00am 
Hi Bobing, been watching the post on it and this is the last post made by author: (Thx for reports. Unfortunately I am kinda swamped with life atm. Will fix when I have time, but don't hold your breath. ) I'll keep an eye on it though just in case.
KarolOfGutovo 2 Apr @ 2:07am 
Dagnabbit, if it were for U6 it'd be mighty useful for the Whitepaws. Guess I'll wait for them to cross ot U7.
Samuel L 23 Mar @ 6:57pm 
I don't see this in the in game mod menu when I subscribe?
Big Fat Seal 22 Mar @ 4:07am 
Hey Bobingabout, I just wanted to let you know that, Ive waited almost half year for this, i thought no one else would update it. Thank you sooooo much for doing this. Thank you~~~~ and hope you have a great day~
Bobingabout  [author] 17 Mar @ 7:30am 
@Lareesha U7 has already changed in a way that has broken mods twice. I've spoken to some modders, and they're waiting for U7 to become stable before they update their mods. I'm just one of the crazy guys who updated early.

I can't speak for SimpleFloodgateTriggers specifically, but it is likely that it will be updated for U7 at a later date.

The main reason why I did this mod, (Housing Optimize) is because it hadn't been updated for U6, and people were asking if someone would do it. I tried to contact the original author with no response.

I suggest you ask the author of SimpleFloodgateTriggers if he plans to update it.
Lareesha 16 Mar @ 5:25pm 
Have you thought about making a mod like SimpleFloodgateTriggers, I use all your mods and keep checking on this one but it won't work on update 7. Was just wondering.
Bobingabout  [author] 13 Mar @ 5:19pm 
@xTUx Death Lord
I just updated this one to work with the latest version, someone else wrote it.

What I know about their choices, when it comes to something like Water, or fuel for bots, the two key factors are Distance, and Queue.
Each liquid storage has a queue, and can only let one character access it at a time, so if you see beavers (or bots) running across the map to try and get a drink (or fuel), then you probably don't have enough storage tanks in the area where they're working.

The same goes for food, but they decide WHAT to eat (if you have carrots and potatoes, and their need for carrots is less satisfied than potatoes, they'll go for the carrot at the other side of the map, rather than the potato right next to them), before deciding where to get it.

So right now, the best way to stop them trying to get food from the other side of the map, is to have multiple containers of every need option available at each housing cluster.
xTUx Death Lord 12 Mar @ 11:30pm 
i see you got alot of mods and this one is very nice was just wondering if you got any plans of expanding this to include food and water as well since beavers like to travel across the whole map it seams just to get water when you have a water tank next to their work area and same with food
Bobingabout  [author] 6 Mar @ 8:49am 
@Acerr68 The version I wrote is for U7, which is currently Experimental. It doesn't work in U6, the current stable.
L. Velociraptor 5 Mar @ 7:24pm 
You're amazing, thank you so much for this. This is something I've hoped for for a while, as I like to build large districts with lil suburbs around various industries.
Majibow 5 Mar @ 5:35pm 
Iterate jobs by priority from highest to lowest before making the selection. That will improve the ordering at least a little bit. Highest priority jobs get first pick.
Acerr68 5 Mar @ 4:03pm 
I subscribed to this mod. does not seem to be effecting housing arrangements. Do I need to start a New Game, for it to work, or should it work on an existing "save".? I keep game version up2date.
Bobingabout  [author] 5 Mar @ 1:01pm 
They just pointed me to a different way of doing things, after all, they know the engine better than me.

I still have no idea why the path finding system always returned a distance of zero, but that does seem like the value it returns for "No path found".
DracoDruid 5 Mar @ 11:07am 
Did they have to patch something or were you missing something?
Am a developer myself and just curious for the details. :)
Bobingabout  [author] 5 Mar @ 8:59am 
Okay, I talked to the devs.

Here's an update.
Bobingabout  [author] 5 Mar @ 4:41am 
@arjen.bakker The current calculation for distance is literal "As the crow flies" distance from entrance to entrance.

I did try using the navigation system, but it always returned a distance of 0. I'll probably look into this again when Update 7 is closer to stable release.
arjen.bakker 5 Mar @ 2:59am 
Very well done! Just what the game needed.
Would it be possible to include a calculation for path distance? Though it may be in literal distance, I instantly subscribed to the mod.
DracoDruid 5 Mar @ 1:14am 
Awesome!
Very weird that path distance doesn't work though.
★AlienRus★ 4 Mar @ 9:46pm 
Finally! I'm already tired of the fact that beavers run hundreds of kilometers in order to come to their place of work (but it's realistic ... :D ), despite the fact that there is a house 10 meters from this place... Finally, someone fixed it!
When will the developers hire Bobingabout as a game development staff?))
Sorry for my clumsy English with a translator