Jump to content


Designing Settlement Raw/Clean Water System - I'm stumped and need input please

workbench scripting settlement

  • Please log in to reply
3 replies to this topic




  • Members
  • Pip
  • 6 posts

I've been trying to figure this out on my own for a while, but scripting is a weak point for me, so I decided to ask the community. I'd appreciate any advice or help. 


OK, so what I'm tying to do is divide WATER into two types of water systems in a settlement.


a) "Raw Water", which is your normal dirty water, acquired by constructible pumps of several available capacities, and the total available amount displayed on it's own icon (Raw Water) similar to the way "WATER" is currently shown in vanilla. 


b) "Clean Water", which is purified water, created by constructible filtration units that draw from the available RAW WATER, and output CLEAN WATER, based upon the capacity of the filtration unit(s). Again, with an icon displaying the total available amount. 


I pretty much have all the pumps and filtration units ready. The problem I'm running into is the vanilla water resource system buried in with the WORKSHOPPARENT script, which I've been poking around in a lot, but it's simply over my head on how to implement what I want. 


So to bottom line the sticking points for me...


I need separate RAW and CLEAN water register/tracking, and matching display icons. Heck, the icons can be on the side if it's too hard to put in the vanilla top bar. 



    collaber and futzer

  • Members
  • PipPipPip
  • 885 posts

that's an awesome idea!


the "Better Wasteland Trading/Economy" and "War of the Commonwealth"

among others, have also been grappling with a similar issue.


making it more like a Fermi-Drake equation style "multivariate"/'back of envelope',

rather than solely a linear if.

contrapositive-intransative eigen-logic on those nested multivariates...

rather than 'floatingpoint'-y style values, which in the base game didn't realize defense values etc could be greater than 3 digits... hehe.


you might like to check out the "better-settlement-menus" project, and see how they've appended the pipboy menu and how they count stuff from

the total available power and water check. those even work for playerhomes and for para-settlements (the unlisted kind which Preston Garvey can never send you to, because he doesn't know they're there...)

workshop parent is checking the attached nodes at that workshop, and their valueRefString stuff.

Shavkacagarikia and Steve40 shared some snippets a while back on how to make things

triply constrained for build-conditions - ie, you can only build the thing;

with a blueprint, with science or leadership greater than |value|, and if you have enough people and surplus resources etc.

that might come in handy here.


another way it could be done... 'table of fail' get-thats from a hidden container ref... muahaha.

not an elegant kludge

they're hidden containers, learning from the JunkJet, China Lake, and Lazer Overcharge Backpack,

which update a conditional logic.

water is assumed clean on the other side of the purifier of the circuit.

water is dirty by default.

purifier produces clean water at a given rate per gameplay hour IFF power greater than |value cutoff| for same interval of time.

water sourced from inter-settlement trade is not tracked at this time, but it could also complete that.




good luck, and I'm hoping

some modders with greater FO4 mod-fu than I

will be along to help point you in the right direction.

this is an awesome concept for a mod project, it'll make survival that much more interesting hehe

and it could have a lot of spinoffs.




  • Members
  • Pip
  • 6 posts

Thanks for the input! I looked into a couple of the ideas you proposed. Still running into a brick wall though when it comes to implementing the plan in the direction I wanted.


Interestingly, I think the mod HORIZON, with it's custom resource system, has some scripts that could be adapted in many promising ways. I haven't contacted the author of that mod yet because, unfortunately, I wouldn't know how to adapt those scripts even if I did get permission to use them.   



    collaber and futzer

  • Members
  • PipPipPip
  • 885 posts

dang, I had hoped one of the kludges might have done the trick in the interim hehe.

it would be an awesome mod, to go along with Survival Power Grid and better irrigation for crops etc.

it'd make micromanaging RTS's another feature of Survival hehe.


if you get permissions to workshop that stuff,

it could then be snippet discussed in the Mod Creators thread etc.

it would be tricky to calculate the total clean, total dirty and total other per settlement

(extra tricky for that to also work for 'para-settlements'/'place anywhere stuff" hehe).


then, folks can help you workshop the snippet to do what you're trying to get it too.

there's also additional snippet workshopping at Moddb, github, codestackexchange, thisweekintech etc,

they're often very rapidly able to troubleshoot and find stuff that

would take most folks eons of trial and error hehe.

Also tagged with one or more of these keywords: workbench, scripting, settlement

Page loaded in: 1.108 seconds