Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3]

Author Topic: Suggestions to abstract worldgen  (Read 15144 times)


  • Bay Watcher
    • View Profile
Re: Suggestions to abstract worldgen
« Reply #30 on: February 29, 2012, 12:49:22 pm »

So how do you get 100 entries for 50 types and materials under that model?
With 200 chairs, 49 other item types, and 50 materials (on average) you should get 50*50=2500 entries. With the strait forward method, you get 200*50=10000 entries, assuming that chairs are an average quantity good. You're changeing which variables determine the entry list size, and maybe it's a little faster your way, but your previous math does not match what you're descrbing here.

I'm not sure what you mean. 

If there are only 200 chairs, then even with the straightforward method, you should only have 200 data entries.  That would be the 10,000 entries if we have 200 of 50 different types of items, I presume.

If you are using retroactive accounting and abstraction, you should have only 1 value for chairs (some sort of total number), and then the values for the abundance of any given material, which can be shared between all material types, so you'd have 50 item type data values plus 50 data values for material abundance, which would total 100 data values.

Updating 100 values is faster than updating 10,000 values every game year cycle, obviously, however, even then, I highly doubt the game actually manually handles every single individual item in a town every year, so I don't know why you'd pull that number up.

What abstraction can do, however, is work over broader swaths of history - again, you might only need to determine general rate of production, and general availability of a material (which should not fluctuate much, especially for stone or wood), and simply leave those numbers alone for large periods of time when they will not actually need any updating.  Although I talk about percentages, you can generally use a weight pool so that Slate has 80 weight in coming up, while Rhyolite has 80 weight, and Microcline has 120 weight when drawing up the odds of an item.  Traded-in materials would then have the special weights that would fluctuate based upon the strength of the trade routes, while microcline would always be sitting basically unchanged as a static local supply.  You wouldn't need to check or change Microcline.

When a material is only available through trade, you would need a tag attached to it that would determine the places that it could have come from, and that material type weight would fluctuate based upon trade routes.  When you have engravings, the engravings would come from the places that have that trade location token, simulating the act of having come from the trade partner, rather than being made locally.  (And products that local and trade routes share would have a small chance of drawing an engraving from the history of the trade partner, based upon a ratio of imports to local supply.)

For the actual numbers of items produced, you largely only need to recover rate of production, importation, consumption, and decay or loss, as well as quality skew for production.  Trade is just another rate of production, and can be pumped up either when shortfalls occur, or when foreign workspeople have a higher quality skew and local trade surpluses favor imports.  Thievery events or bandits hitting the caravans or workspeople taking up the craft or dying or whatever are recorded as the spikes in production or loss, while allowing the game to largely just skip over that town's trade on years where no major changes take place.

You don't need to record overall numbers so long as trends are positive or neutral.  You only need to start an overall number check when you start getting serious looting or the like, which should hopefully not be too common.  That's the only time you start actually running out of tables, or have all tables actually getting stolen from current households.  (Of course, who really goes into a town to steal their supply of microcline tables...)

The higher production outstrips demand (As a fraction, not as a straight subtraction), the lower the abstracted price of the goods go, and the less likely it is new workspeople will take the job that makes that item, since it's not a lucrative job.  Vice versa occurs, as well, so goods that are uncommon have worksmen flock to that job. 

Keep in mind, however, that food does not keep for years, and nor does leather or clothing in general.  You don't even need to track those for more than a few years back, and in the abstract of worldgen, all that really matters is that there is enough food, not which types, so you don't need to retroactively track food more than a few years.
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare
Pages: 1 2 [3]