Randomization Logic
I'm trying to lay down good logic for randomization that makes sense, and wonder if I've made some oversights in my planning. I know there are efficiency optimizations that can be done, but wrapping my head around this one by itself has already bent my brains into a pretzel so that will come later.
Variables:
Processing Logic
8 Replies
:adithinka: Randomizers that my kind of thing
:adisweata: sorry i find this all very complicated to what your trying todo
i guess you want to randomize resources nodes? then generate a list of all vanilla nodes and just change thier locations amoung eachother right?
you will probably need some logic as you forexample dont want all few sulfur nodes ending up behind explosive barriars
that's correct
I just am trying to ensure like-resources are grouped (aside from optional exceptions like uranium/sam etc) and then we go through the remaining single ones, and leave a couple outliers to toss around randomly
for now I have more or less random randomization and its "ok" but not great
no matter what there'll be a chance all the sulfur ends up behind explosive barriers, if not literally then proverbially, but it should be a low chance. I'll have an option to re-roll resources but that may be a a idea to allow re-rolling selectively (e.g. re-roll only sulfur/uranium) :interesting: but that adds complexity as i'll need to have nested seeds so that's a down the road one
I already have the list of the properties of vanilla and modded resource nodes and their locations, which are stored in NotProcessedResourceNodes (sorted by class and then by purity from pure->impure) and NotProcessedPossibleLocations (this is already in a pseudorandom order based on seed)
ideally you dont just shuffle locations but add a bit of logic in
like allowed locations,
start with all directly
accessable locations
, (maybe even only those near the starting location)
then place coal/coper/iron/limestone
then you know your player can get to vehicles, so you place extend the pool of accessable locations
with locations further away
then place caterium / sulfur
then you know your player has access to coal + sulfur, so you know they can make explosives, so add all explosive locked locations to the poolAh I see what you're suggesting
The only issue is I now have to hardcode locations or at least regions to some degree to spawn resources in, vs right now its flexible to handle modded resources
I like the idea though, theres certainly a way to implement it and ill figure something out :interesting:
even all few sulfur nodes behind barriers is not a problem because you can use portable miners to mine even when they're blocked. but certainly something to keep in mind
There's a bunch of resource deposits scattered around too
I doubt you want to put collecting resources around the map in logic, however I did not know you could place portable miners near it