Epic sim

From Adam Colton
Revision as of 17:39, 28 December 2017 by Adamcolton (talk | contribs)
Jump to navigation Jump to search

Base Units

  • people
  • governments
  • military's
  • religions
  • goods
  • Monuments
  • terrain

Governments rule lands and people. Religions influence people and governments. Governments collect taxes, religion collect tithes. Governments also have military's. Military's enforce laws, protect citizens and fight wars (conquer or protect territory).

Goal

The idea I've had is to build a large scale simulator and let it run through a few hundred years. Then go through and extract interesting story lines. This provides the outline of a story. Further, it provides a database of exquisite detail. You can follow a sword starting with the iron that is mined, to the smelter, the weapon-smith, the seller, who carried, which swords were forged before and after, who was slain by it and who was slain while carrying it.

Finally, this outline and these tools can be provided to a few authors and editors. They can add details (like character descriptions). Then each paragraph can be written independently a few times, then those drafts can be combined.

Pipeline

The pipeline allows each pass to be simple and I can replay making sure each improves the process.

Tectonics

Creates the base grid, lays down minerals and igneous rock. Then it creates tectonic plates and shifts the rocks around. Finally it does a rough diamond smoothing pass.

Hydrology

Sets the ocean level so that 1/2 the land is covered by water.

Air currents are established, this can be refined over time to take geography into account, but initially just set alternating bands. Each square has moisture and temperature. If the moisture is less than 100% and the tile has water on it, enough water will evaporate to move 50% of the way to 100%. If the moisture is more than 100%, it will precipitate down to 100%.

The water on the tiles flows and carries sediment. Each tile looks at the previous iteration for inflow. The flow is reduced by a fixed amount (~10%). Then the slope of the tile is used to increase the flow. Tile height is computed by the top of the water, not the top of the land. Outflow can go to 3 tiles at most.

Sediment is determined by flow rate. There's a linear relationship to how much sediment can be carried and how fast the water is moving. Just like humidity, if the rate is too high, sediment is deposited. If it's too low, it's picked up. The sediment composition is also tracked.

I think this is where I should add soil development as well. I won't simulate organisms, but I can use light (at the land surface to exclude deep sea), temperature water and mineral diversity to convert some percent of the surface mineral deposit to soil and track the soil quality. I could add a basic "plants" mechanism to simulate the root systems resisting erosion. I need to think about how to do this, but I think it's something like have a plant mass based on soil, water and temperature. Plant mass absorbs water, reduces flow and reduces erosion. When plant mass decreases, it's translated directly to high quality soil.

Ecosystem

At this level detailed plant growth is tracked and so are individual animals and some evolution.

Each tile contains one "plant", though that may be a single tree or a few meters of grass (I need to decide how big a tile is). I need to figure out plant rules.

Grass

Grass trades (evolution) hardiness for ability to spread. There are dials for moisture, temperature and soil quality. A grass tile has a chance to die based on it's hardiness and it's conditions. It also has a chance to spread to any adjacent barren tile. So one species of grass may not be hardy but can spread through temperate climates fast. Another species may be very hardy, but will be slow to spread only dominating the harsher climates. Any time it spreads there is a small chance of mutation.

Shrubs

Shrubs produce berries and the seeds are spread by animals. When a seed lands on a barren or grass tile, it has some chance to spread. It also has a hardiness rating that determines it's odds to grow. The rate of berry production is both genetic and based on light and water. There will be an actual berry count on the shrub, with a max.

Trees

Similar rules to shrubs, but they go through a life cycle. A sapling can easily be killed. An adult tree cannot. Only an adult tree can produce nuts. Trees can hold on to large reserves of nutrients and water, allowing them to survive through brief, harsh weather.

Bee hive

A bee hive increases the reproduction rate of all plants within X tiles. A bee hive will not form within Y tiles of another bee hive. Bee hive has tolerance and random chance of death, it's health is determined by how many plants are near by.

Ruminants

These eat grass. Any tile with a ruminant on it has both a higher chance of death and a higher chance of spreading. Ruminants will have a lot of evolutionary knobs. Size, armaments (antlers), gestation, sociability. Each will also have a "species" represented by a string and can only mate with ruminants of a closely related species.

Birds

Similar to ruminants in species and evolution. Birds eat berries from shrubs and nest in trees. A bird cannot nest on a tile with a bee hive. It will eat randomly from berries in range of its nest and deposit seeds randomly in the same range.

A nesting pair will occasionally produce offspring. Once the offspring is grown, it will either seek a nesting spot or a mate (a single with a nest).

Squirrels

Similar to ruminants. A squirrel moves tiles, always staying on tree tiles. It can eat from any tree within X and will can randomly (~1%) plant a tree within the same distance.

Fox

Will eat birds and squirrels

Wolf

Will eat ruminants and foxes.

Disease

Has a virulence, a species key (can affect certain species) and mortality and survival rate. These are different. Mortality is the chance of dying when something is sick and survival is the chance of getting better.

Terrain

Will have a number of qualities. Soil quality will determine what can grow, if the quality is none, nothing can grow, in low quality soil, only sparse grass, in higher quality soil crops or prairies can grow. A plant that grows, dies and decays will raise the quality of the soil slightly. Animal waste will also raise the quality. But an animal eating the plant will carry it away.

There will also be a rating for underground metals which will decrease as the area is mined.

Governments

Governments control all people living withing a region they rule. Initially, the only government will be monarchy, but later I'd like to bring in theocracy, military rule, aristocracy and republic.

A lot of this is taken from Civ. A government may be aligned with a religion. The benefits are that citizens with that religion are happier, but citizens with other religions are persecuted (and taxed higher). It also reduces the likely hood of war with another country of the same religion.

A government will set a number of laws - inheritance, draft. They will also set tax rates on income and exchange.

Governments will have a sort of genetic code describing all this. When a new government forms, or citizens demand change, two nearby successful governments will be used as 'parents'.

The goal of the government is to control more land. They must balance their investment between placating citizens, protecting the borders and attempting to expand.

Duchies

Just a thought. Large governments could be divided into duchies. This would allow for more local control and could potentially reduce the overhead costs but at the risk that a duchy may declare itself independent. Also, if the government is overthrown the duchies all become independent nations.

People

People are the base unit. The higher order constructs must act through people.

Farmers

Owns a farmhouse and some land. Family members work the farm, can also hire farm hands. Certain goods provide a bonus. One person can till one tile per day. But for every work-animal + plow, they can till 10 tiles. I want to throw in a number of concepts - crop rotation, blight, fertilizer. Different crops will have different times to mature, so farmers need to plant different things at different times otherwise they won't grow or the farmer won't have enough time.

Miners

A mine will produce some quantity of ore when it's started, and that quantity will drop asymptotically over time. Mines will also occasionally produce gems.

Lumber Jack

They will buy and clear land producing wood and when the land is cleared, sell it to farmers. Farmers can also hire lumber jacks to remove trees from their land.

Crafters

Produce goods. This include smelters producing iron bars, blacksmiths producing goods, carpenters, builders. Gem carvers. Basically all the DF stuff.

Rulers

Needed to run a government

Priests

Needed to run a religion

Monuments

Increases happiness/pride for citizens. A monument can be a building, a statue or something functional (wall or damn). And will receive bonuses based on that.

Military

A military belongs to a government. Later, I may want religious military's and mercenaries, but not initially. A military will have a type - foot, archer, cavalry and Civ type bonuses. It will have some number of units assigned to it. The most senior member will be the leader. Over time, members will more and more resemble their leaders, this should leave a legacy in the squads.

Military's are given assignments from their government. They can be set to patrol an area or attempt to sack a tile. If they sack the tile in which the capital is located, the entire government is overthrown.