# Moebius Structure

## Units

### Non-managed

#### Peasant

• Needs
• Food
• Shelter
• Family
• Wants
• Social standing (relative wealth)

Stats

• Health (tinyint, unsigned, starting 0-4 (0 'dead', 1 'poor', 2 'fair', 3 'good', 4 'excellent'), up to 255)

## Data Manipulation

### Time

• Each year is 360 days divided into exactly 12 months of exactly 30 days.
• Time progresses by 6-day weeks, with one week game time per one minute real time. These increments are called "ticks".

#### Tick Formulae

Each tick, the following calculations are made in the order in which they are listed. If two calculations fall under the same heading, they are performed as if each was performed before the other. Unless otherwise stated, each calculation is done per plot.

##### Food Production
• Variables: F = Food Produced (in kilograms), P = Number of Active Farm Plots, T = Number of Trained Farmers Farming, M = Magical Food Production Enhancement
• FP = 20 * (P + T) * MFPE
##### Food Consumption
• Variable: C = Food Consumption (in kilograms), P = Number of People eating
• C = 15 * P
• Source. Food consumption comes out to about 2.5 kilograms per day, and with a 6-day week, this is 15 kilograms per tick.
##### Resource Production
• Variables: R = Resource Production (in applicable units), D = Difficulty Level, P = Total Plots Worked, T = Number of Trained Workers on Plots, M = Magically Enhanced Production Factor
• R = 100 * M * (P + T) / 10^D
##### Population Damage

Everything is calculated per plot, but any damage is applied to each person on the plot.

• Natural Disease: continuously afflicts every person in population; its effects can be mitigated (or increased in an enemy nation) using magic
• Variables: ND = Natural Disease, DR = Disease Rate, HR = Healing Rate at certain health value
• ND = DR * HR(75)
• Plague Outbreak: sudden increased onset of disease for one tick, can occur randomly or deliberately
• Variables: OC = Outbreak Chance, DR = Disease Rate, PRM = Plague Resistance Magic
• OC = DR * PRM / 60000
• (Should occur roughly once every thousand years per plot of land without magic.)
• Variables: PD = Plague Damage
• PD = PRM * HR(50)
##### Population Decrease

After all damage has been calculated and before healing is calculated, any person with 0 Health dies and is removed from the database, simulating death.

##### Population Healing

Calculated per person.

• Variables: HR(input) = Healing Rate for a given input, e = Euler's number
• HR(Health) = 200/3 * e^(3.5 - Health/15) / (1 + e^(3.5 - Health/15)^2

## MySQL

The MySQL tables will contain all of the hard data of the game, including many of the games operating parameters. This allows for a level of flexibility across ongoing and new instances of the game. (Potentially even allowing for difficulty levels.)

Tables:

• Players
• Games
• GameID | NatPopLim1 | NatPopLim2 | RegPopLim | BarPopLim | Year | Day
• Kingdoms
• NationID | GameID | PlayerID | Name | Population
• Regions
• RegionID | NationID | RegentID | RegentType
• Baronies
• BaronyID | RegionID | BaronID | BaronType
• Plots
• PlotID | BaronyID | CoordX | CoordY | Elevation | BaseTemp | BasePrecip | SoilType | Surface | MagicType | MagicStrength
• People
• PersonID | TerritoryID | BaronyID | Gender | Pregnancy | Age | Education | Occupation | Health
• Heroes
• HeroID | NationId | Class1Lvl | Class2Lvl | Class3Lvl | Strength | Dexterity | Stamina | Presence | Manipulation | Composure | Intelligence | Wits | Resolve
• Military
• UnitID | NationID | PlotId | PersonID | TerritoryID | Health | Type
• Resources
• ResourceID | Type | PlotID | Quantity