[Request/Idea] Population Mod

This is the place to request new mods or give ideas about what could be done.
Post Reply
doppelEben
Fast Inserter
Fast Inserter
Posts: 117
Joined: Thu Oct 27, 2016 6:21 am
Contact:

[Request/Idea] Population Mod

Post by doppelEben »

oops; think I took the wrong board; if a mod can switch the post to the right; would be nice
Just started another playthrough last night with Bob & Angel overhaul on 0.15; and had some thought about a new mod.

But to be honest, I dont really know if its actually possible to creat a mod like this; so I just share the Idea here; maybe some1 is willing to create something like this; or could lend me a hand or seven, if I would start create a mod.

I thought about a "population mod". Every Building has a defined amount of "people" working in it. Sciencecenter adds like +10 Population, a Boiler +3 and an assembler +15 or something like this.
Then it would need some more Buildings; like baracks; so one must have enought Space for all the workers in his big Facility (denie or deactivate new workplaces until there are enough beds in baracks)
Communitybuildings like a Taverne Sportcenter, Church, whatever, for pushing the will to work because "they" are more happy.
And at least a new line of products; producing food / drinkable water. Like the Greenhouse / Waterpump. If food or drinks are 0, the population begins to decrease until whole facility stands still.

In my eye there isnt a need of new graphics and ppl walking through the facility. Its just that I like the mechanism overall it would give to the whole thing.

Is something like this even possible in a mod? Or would that be a too big overhaul and is far over the top of the mod possibilities?
What are your thoughts about something like this? Yay or nay?

/discuss

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: [Request/Idea] Population Mod

Post by Adil »

Without the graphics or people movement simulations it is simplistic to the point of triviality:
Unverified code example
The last thing to do is to declare the new buildings prototypes and to fill out their consumption/yield table.
But without the visualization and without the calculation of population distribution in space that mechanic degrades to a simple equivalent of some building cap.

In general, you can implement pretty much any mechanic you want, lua inside the factorio is as turing-complete as any other language. The problems start when you need to express that mechanic through means of the factorio api and want to do that efficiently. (The code above would become notably more convoluted if I'd tried to remove not very efficient cycle from `recalculate_state`.)
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

foodfactorio
Filter Inserter
Filter Inserter
Posts: 454
Joined: Tue Jun 20, 2017 1:56 am
Contact:

Re: [Request/Idea] Population Mod

Post by foodfactorio »

hi, this sounds interesting :)

without wishing to pinch your thread, id just like to post a link to a mod idea i posted some time ago that could maybe be related in some way (at least for the prestige part) which was a Colony mod idea:
viewtopic.php?f=33&t=50256

(its also cool that you got a quick reply with some possible code :) maybe Adil if you have a spare few moments you could have a quick look there too, just to see if something on the colony mod idea is feasible or possible in some way? :) and maybe a future mod could possibly utilise some elements of each to make up a nice complimentary mod of some sort? :D
(also me from the mod portal - im not dustine lol) = https://mods.factorio.com/mods/Dustine/ ... ssion/9108
my 1st Mod Idea :) viewtopic.php?f=33&t=50256

doppelEben
Fast Inserter
Fast Inserter
Posts: 117
Joined: Thu Oct 27, 2016 6:21 am
Contact:

Re: [Request/Idea] Population Mod

Post by doppelEben »

Wow! Thanks for the response and the code-snipped. Very appreciate it. I'm looking through it and try to tinker something like I thought.

Post Reply

Return to “Ideas and Requests For Mods”