MVP stuff: 1. Technology (experts, discovery and improvements) 2. Rising population desires and discontent and population growth and migration 3. Resource management panels 4. Underground resources 5. War, fog of war & trade 6. Custom layers Natural resources - Underground minerals (coal, gold, iron...) Order: 1. Happiness 2. War, passive behaviours 3. Culture & loyalty Past war events display scenarios: - 1 clubman (X) fights 1 clubman (Y). This is an even fight. It happens over 5 ticks. - X tried and failed 5 times to kill Y. Y tried and failed 5 times to kill X. - X tried and failed 5 times to kill Y. Y is not attacking back. - X tried 4 times and then killed Y on the fifth attempt. Y fought back the whole time. - 10 clubmen (10X) fight 1 clubman (Y). 10X has overwhealming advantage. It happens all in one tick. - 4X fail to kill Y, but the fifth X kills Y. The other 5X do nothing. Y tried and failed to kill one of the 10X. - 10X fail to kill Y, and Y succeeds and kills 1X. - 30 It has to express a sense of who is more likely to win on the map (maybe arrow size?). Accounted for in panels: Resource totals Resource increases and decreases and from where Resource logistics (where are they going and coming from, trade) Possible resources, resource recipies (inputs & required building & required techs) Possible building, building costs, required techs Possible tech events, required techs, output Possible techs, which tech events give it, what they unlock Owned techs Population happiness, population growth / decrease (if decrease, show survival panel) Satisfied population demands "Reachable"/recommended population demands TODO: Owned units, total mobalized population Possible units, unit recipies (inputs & required building / required techs) Unit face-off War Alarms (expect 100 wood from Bernie per 5 days) Layout: Top left bar: Resource highlights, happiness, etc... Top left under bar: Info panel buttons Middle left: Action buttons Bottom left: Filters & view options Bottom middle: Time bar Bottom right and middle right: All side-panels that open Top right: Other players info Action panels: - Build (buildings, trails). Shows reachability after picking what to build. - War (zones). Shows war filter. - One-resource logistics. Actions: (Change the flow and production easily.) Info: (total amount of a resource over time past & future by source, recipes they are being used for over time, recipes they are coming from, trade, where resources are, how they're moving past and future). Shows logistics filter. - Trade (deals (not shared, personal): what to give, what to expect). Info panels: - All-resources (total resources for each resource, gain & loss) - Building info (description, all recipes building can do, techs building required, construction cost, construction time). Includes trails. - All-techs (owned techs, possible tech events rn that aren't useless) - Population (average happiness, growth/decrease, graph, all enabled desires and their happiness outputs, available desires, close desires and all desires) - Trade panel (all current automatic trade outflows, all past trade inflows) Other panels: - One-resource info (all recipes that use it as input with current techs or close techs, all recipes that use it as output with current or close techs, and the same but regardless of current techs) Side panels - One-desire-pair panel (shows which housings have it enabled, allows you to easily enable it for more, and shows how high the % is for each housing graphically) Components: - Recipe: Inputs, outputs, time, techs required, building, building techs required. - Tech events: Required techs, output techs, primer, output resources) Filters - Population happiness (happiness at each housing heatmap) - Reachability - Loyalty - Culture - Logistics (depends on resource open) WAR 1. Each unit has a various stats like health, armor, damage per hit, hit frequency and range. These all go into a calculation that takes in the agressor and the agresee and outputs the % chance of victory. It bases itself on the expected number of hits required to kill it. It is deterministically random. 2. Units move on a grid. However, they occupy space between grid points liminally. Units can remain inbetween grid points indefinately if they happen to stop there. 3. Certain objects like walls can prevent movement, in which case a unit may be trying to move forever. Units however do NOT block other units like walls do. Units can go right through other units. 4. Range works in manhattan distance meaning they are rhombuses not circles. 5. Resources can be seized by a unit if they are there are no enemies nearby. If there are enemies nearby, the resource will be noones. That is, it will not move. This means that if a tank is destroyed in battle and becomes a damaged tank item, and it's in no man's land, it will just stay there. War strategies 1. Each unit can have as a passive action a previously created war strategy. 2. In the war logistics tab, you can assign for each unit type the % that should be part of each war strategy. Units will then automatically assigned passive actions to keep this %. 3. Zone: A zone of area that will be constantly patrolled by your units to ensure there are no enemies. Can be used defensively and offensively. Units will be evenly distributed. Can move the zone as a group forwards or backwards. 4. Line: A line that will be patrolled by your units. Can be used defensively and offensively. Units will be evenly distributed. Can move the line forwards and backwards. 5. Division: A grouping of units. 6. You can choose a "buffer zone" which will be counted as part of the zone, an "alert zone" which will start moving units towards enemy units that are in it and a "aggressivity" which establishes the overpower ratio desired. 7. You can pick which units are "enemy" and which are "neutral" and which are "friendly". Should be able to make more categories as you wish. 8. Military units do not have a running health, so they must be immediately killable. This means that infantry units should represent just 1 person. 9. You may design divisions in the war logistics panel. Each division is just a number of each unit type. 10. When you attack a unit, you don't have control over whether or not you hit that unit. You are equally likely to hit any unit at that unit's position. E.g. even if you're trying to kill a builder, chances are you'll hit the infantry. That is, unless you're in the same time as it. In that case you do have control. A.k.a you only don't have control when it's a ranged attack. In war mode, you: - Have the option to create lines and zones on the left, alongside see all division types and create new ones. Furthermore, if you're pretending to be someone else you have 3 more options: create fake unit, create fake division (from your templates) and clear all simulated war plans for this player. - Can see all lines, zones, divisions on the map - On the right, you can select a unit type, and for that unit type see a list of: 1. First, all passive action types (except war scheme) and the # of units that are doing that (exclude nonzero). 2. Then, all war schemes that are set to # for this unit. 3. Finally, all war schemes set to % for this unit, with an estimate of how much that will end up being. Either way, you will always see all war schemes no matter the selected units, only the passive actions part may change. This means that this is always a full view of all war schemes. You may change the # and % for any war scheme (except divisions). If you change %, the rest automatically adjust so they still add up to 100. For each war scheme, it also tells you if it's "ready" or "mobilizing", "pending". It's ready if it has as many units as all the # and they're all at their positions, it's mobilizing if they're still going to their positions and it's pending of it doesn't have enough. There are five columns, zone/line+image, name, actual assigned #, desired #/% and status (with estimated days until ready if mobilizing). - If you click on a zone on the map, or click on it on the right, it opens the menu for it. Here you can also see the # or % of all units, and for lines and zones, change the # or % or add new units to it (unhide zeros). For divisions, you can change the division type or click to edit the division type. - If you click to edit the division types, you can make new ones, and assign # for each. Divisions do not support %. You may also change the default passive behaviours for the division. War schemes - War schemes also have passive behaviours and actions, just like units. Passive behaviours Zones and lines have: - Which resources to seize (when? from who? how many?) - Which enemies to actively fight - Buffer zone (counted as part of scheme, but not manned) - Alert zone (units will move towards units in an alert zone, but not attack) - Aggressiveness (how many times more units than the attacking units to send to defend) - Movement style (together vs aggressive). If "agressive" each unit moves as fast as possible. If "together" they move at the speed of the slowest unit. - Units can still set all passive behaviours except seize, since that's set at a scheme level. Divisions have all of the unit ones except fight: - Units lose the ability to set any of their passive actions. They move as one. - Using the military training grounds, you can produce divisions. War schemes function - For each unit type, distribute to the #s first, then calculate % and distribute. After distributing, do a "trade" distribution scheme to minimize the number of "swaps" that occur (units changing schemes when they could've both stayed). - Then, each war scheme calculates the desired position for all their units, and moves the units towards it. Also, set all the passive behaviours for the units (e.g. fight). Enemy prediction (only shows up in war mode): - Move enemy units, including changing passive behaviours. As they actually move around, the move actions will be recalculated. - Create fake enemy units (any type) - Create enemy divisions (based on your types) - You can create lines and zones and configure them like you would your own. - You can group any arbitrary enemy units into divisions. - You may clear all this away whenever you want. All actions that are just for simulation purposes get stored in a separate file called sim_actions. They get applied only in the client. Important TODO: 1. Make it so that getReserveResourcesLocations and reserveResourcesFromLocations reserve items 2. Then, use that new functionality in distributeResourcesForDesiresInGroup. It already adds the available resources coming to housing buildings in availableResources, but it won't distribute them. It's a bug. 3. However, fixing it will require grabbing those items coming to those housing buildings that are technically "available" but are coming to this building and so getReserveResourcesLocations won't consider them since they aren't truly available. It will require actually making them available somehow.ñ Unit selector - A priority list of: (unit type/any, empire/any) Item selector - Only after a certain amount of time - A certain amount/weight/volume of bread/anything - A certain % of the amount of bread/anything Seize amount, amount/weight/volume, amount, resource/resourceType/anything, player/anyone Seize amount repeatedly, amount/weight/volume, amount, resource/resourceType/anything, daysInterval, player/anyone Seize %, %, resource/resourceType/anything, player/anyone Seize all, resource/resourceType/anything, player/anyone Wait, days War scheme function (for zones and lines) - Spread units along line or zone - Economy - Buildings (inputs, labour, output) - Population demand (consumer goods, caps, goodness) Calculating - Consumer goods dollar value determined by goodness-weighted consumption % of total dollars in circulation - Dollar War units - Unarmed muscular men - Clubmen - Spearmen - Swordmen - Slingshot man - Archer - Pikemen - Horsemen - Assassin (dagger) - Roman shield man - Axemen - Horseback archer - Elephant man - Siege stick unit - Siege tower - Tunnel team - Catapult - Trebuchet - Arsonists - Fire archers - Ocean - Raft - Cannoe - Longboat In war mode, you can see all your war schemes and add new ones. On the left, you add new ones. In the map you see your current ones. On the right you can see a list of all your war schemes so that you can quickly find them, edit their settings or remove them. From here you can also change the % or # of each unit that they take (except for divisions). The ones that take a # come first, then it calculates the total remaining, and draws the % from that. All units with passive actions other than war schemes show up here too and are unavailabe for the %. You should be able to assign units easily to different schemes: - You can click on the zone on the right which will select it, and then click on as many units as you want to add them. Only available for #, not %. - You can as always change the zone a unit is in in their popup. - You can design divisions, which includes the amount of each. Production 1. Various buildings produce military units. WAR SCHEMES: All war schemes have: - % or # of each unit to assign to it Zones and lines have: - Which resources to seize (when? from who? how many?) - Which enemies to actively fight - Buffer zone (counted as part of scheme, but not manned) - Alert zone (units will move towards units in an alert zone, but not attack) - Aggressiveness (how many times more units than the attacking units to send to defend) - Movement style (together vs aggressive). If "agressive" each unit moves as fast as possible. If "together" they move at the speed of the slowest unit. Schemes: 1. Zone: A zone of area that will be constantly patrolled by your units to ensure there are no enemies. Can be used defensively and offensively. Units will be evenly distributed. Can move the zone as a group forwards or backwards. 2. Line: A line that will be patrolled by your units. Can be used defensively and offensively. Units will be evenly distributed. Can move the line forwards and backwards. 3. Division: A grouping of units, limiting their movement speed to the slowest. Unlike line or zone, still allows units to set all passive behaviours themselves. A division simply limits speed so that units stay together. Passive things that matter: Passive actions (what action to do when no action is planned) - Trade: what to grab and who to give it to - War scheme: A part of a bigger war scheme - Repair: repair stuff in a given area - Scout: move around and clear fog of war - Research: move around and research random things - Patrol: repeat some movement over and over again Passive behaviours (different triggers and situations to react to) - Run away from certain units - Can configure "Desired range". Will automatically attempt to maintain that range, but has to suspect current action to do so. It will continue if it can get back to where it needs to be. - Follow certain units (when? how long? what after?) - Can configure "Follow distance", and it will follow - Which resources to seize (when? from who? how many?) - Which enemies to actively fight - Stay in areas (will stay in an area always) - Stay away from areas (will avoid entering area) The chosen passive action, the passive action config, and all the passive behaviours config make up a unit's "passive profile." Each unit type has a default config for each passive behaviour and for its passive action and its config. After changing it away from the default, the player may choose to set the new config values / passive action as the default for this unit. You can also copy configs and paste them elsewhere. Any of these behaviours may be overriden by the passive action, which in certain cases could cause it to coordinate with many other units (e.g. front line) in which case they won't just be "filled in", they'll just be unavailable to change on a unit-by-unit basis. Unit popup: - All selected units + deselect unit types + leave selected only some number - You should be able to group by nothing, type or location&type. - Then you can deselect accordingly. If you change the number, it selects the first x. - Change passive behaviours - If multiple units selected, and some can't change this behavaiour, offer the option to deselect all units that can't change this behaviour. - If you try to change a setting that's been taken by a passive action, it will take you to the place you can change it or tell you why you can't. - See and change passive action - Only allow changing passive action if all units selected are the same type. Some passive actions (like "trade") should only show up if only one unit is selected. - See all planned actions and an estimate of how long they will take. Can cancel actions, and some actions have additional settings that can be changed (e.g. initial production queue) - Only works if you have just 1 unit selected. - See the total amount of time until it completes everything. This requires keeping for each unit a data structure of when it starts each action and when it finishes each. This structure can also be used to show units that will be doing nothing at some point in the next big time skip. Others: - Should an attack from an empire make them an "Enemy"? Scenarios: - You're building a road when an enemy comes near. You set to run away from armed enemies. After outrunning the enemy, you pathfind back to where you left off. - You want to give 100 wood every 100 days to empire A. - You want to seize 30% of all oil passing through some area belonging to empire B. - You want to seize 20% of all resources but 30% of wood passing through a specific area from specific empires. Some sort of resource - empire grid with numbers and percentages, with the ability to set percentages for all. - You want the artillery to run away from all other armed enemy units up to a range. - You want artillery to follow certain units but stay at a certain range away from them. - You want an armed unit to protect a builder, killing things that get close. - All of this should work for divisions. Units in divisions lose access to most options, e.g. follow units. The whole division must do this. - You want to have a front line of tanks and infantry, with another line of artillery behind it. When you launch the infantry line forwards, you also launch the artillery line forwards, but you want the artillery to stay a certain distance away from enemies. - You want a spy to move back to your territory in 200 days Happiness (fast-moving) A number for each house. Happiness affects: - Growth rate (From 0-10 children per woman. 0.2 children per woman at 0 happiness, that is decline. Growth rate is laggy (happiness pushes it, not sets it).) - Loyalty Happiness is calculated for each housing as the sum of all the policy's happiness minus the dissatisfaction coefficient (DC). If happiness is positive, DC increases at a constant rate, bringing happiness down. If happiness is negative, DC increases exponentially, bringing happiness towards 0 at a speed proportional to how far from 0 it is. The time it takes to get to 0 is the punishment for decreasing standard of living, and the natural constant increase of DC is the pressure to pursue more policies. Culture (slow-moving): A pie chart with each "culture". - Reflects original settlers - Mixes over time with passing units, trade - Mixes over time with immigration - Economic wealth changes culture towards you - Entretainment sources Culture itself does nothing, it just affects loyalty and can be used as casus beli. Each culture is freeform text made by each empire. They get to name their culture (e.g. American or Liberterian). ChatGPT automatically scales the culture on two axis: Collectivist vs Individualist, Hierarchical vs Egalitarian. As such, cultures are two-dimensional vectors. Given a housing complex with a % of all empire's cultures, you can do a weighted average to figure out the culture of the place. With a smart clustering algorithm we can create new subcultures to give a name and description to the combinations! Note that these subcultures are just for vanity - the ground truth is the combination of cultures. Loyalty: A pie chart with each empire. Determined by "pressures" applied by: - Happiness (high happiness draws loyalty towards you) - War (enemy deaths/army size a.k.a victories nearby increases loyalty. "nearby" is very far-distances. that is this benefit will ordinarily apply to your entire empire for a major war) - Culture (constant pressure towards dominant cultures) - Propaganda (propaganda policies decrease happiness but increase loyalty. enemy panflets, enemy radio towers, enemy entretainment services all decrease loyalty) Pressures increase loyalty for you. If all pressures are barely active, it's easy to add a propaganda pressure. Affects: - Spionage (can know everything going on around the house if you're a majority) - Rebellion (all production is 2x less efficient for enemy, all units produced become yours instead, loyalty flips entirely to you, requires >75% loyalty) - Cultural revolution (all production is 2x less efficient for you, loyalty flips entirely to you, requires it to be your housing) Technology A new tech is basically just a boost to units or buildings where applicable. You can see all your techs whenever you want, and each building shows which techs applies to it. Once you learn a tech, it applies to all things under your control instantly. You may go out of your way to not use a tech in certain situations to avoid spionage. You may also teach a skill to a non-owned unit or building. Buildings taken by enemies keep your techs applied to them (examples: You make a farm with modern farming techniques. It is near an enemy's territory and they may spy it, so you disable it in that farm. A friend is willing to pay for you to make some of their farms more efficient, which you agree to on the condition they bring no scientists or spies to those farms.) You may also click on one of your skills to see which buildings / units it applies to. Being able to produce items is also a tech. For example, the tech that allows you to produce hoes applies to workshops (stone hoes) and blacksmiths (iron hoes) and gives you that extra option. Once a technology is discovered by a sufficient % of the population it becomes "public domain" and thus everyone knows it. Scientists are in charge of going around and discovering techs, as well as being responsible for their transfer to other empires. The higher your education level, the smarter and more quantity of scientists you get. You must place them somewhere, and then "discover". Depending on where they are and their intelligence, they make advancements. The player must experiment to see what they get. The scientist may just find items, which could be useful (e.g. seeds or horses). Once a tile yields items, it will never yield those items again. Other times they discover new techs, which will instantly have their effect throughout the empire. The game will tell you all the locations scientists could "discover" at and successfully discover a tech or an item that you've never owned (e.g. new stuff). This way there is less guessing. Unlike items, techs and be re-discovered from the same tile over and over. Furthermore, the same place which displays all your items also displays all available items. Here, you can see all the places you can make an item, the inputs required, and the technologies required, making the game transparent. You can also see where you need to go to find the technologies. Maybe just items? 1. Wheat seeds (wheat seed items, instantly gets farming tech) 2. Farming (builders can make farms) 3. Hoe (workshops and blacksmiths can make hoes, farms can use hoes for new wheat (all seeds in future) recipe that yields far more wheat) 4. Horses (horse items which must be stored in stables, instantly unlocks stables) 5. Stables (builders can make stables) 6. Horseriding (many units can now ride horses a.k.a use horses as a fuel to go faster. furthermore, many units ca) 7. Saddle (blacksmiths can make saddles, units can use horses AND saddles as a "fuel" to go even faster) 8. Horse-plow (blacksmiths can make the horse-plow, and improve farms to use it) Units should be able to interact with buildings (take items, place items, spy, etc...). This should be simple, while moving them onto a building the option should appear. There are many ITEMS each optionally with a CATEGORY. Each ITEM also has a SIZE, by default it's just 1. (e.g. cars have SIZE 1, but food has varying size). The units used for display are per CATEGORY. The expiry days is also set per CATEGORY. There are a set of DESIRES, each with a category and a set of THRESHOLDS. Each THRESHOLD has a AMOUNT and HAPPINESS values. That is, you linearly interpolate up to that amount to receive that happiness by summing the sizes. Each housing will calculate for each desire for each threshhold amount these values: 1. Total needed: amount * population 2. Total needed per day: amount * population / expiry days Then, it will attempt to consume the total needed per day for each, and depending on the % it can consume it will interpolate to get the happiness increase. High - Ella - Marshy - Yeh Chan Yoo - Jacob - Bernie - Simon - Amough Medium 1 Tommy - Dominic - Johannes - Jorge - Timy - Joe - Arthur - Alejandro (WDB) - Matt - Sophia - Ergun (cody) - Alyssa (cody) - Michael (cody) - Shaylan (cody) - Josh (cody) - Curtis (152) - Minjune - Euhan - Allan - Jaewon lee (cody) - Giorgio Low: - Vik - Yashish - Enrique - Alex - Manu - Oliver - Evan? (7B) Bread: 10 happiness Rice: 5 happiness 1 wheat + 1 person = 4 bread 1 corn + 1 person = 4 rice 1 person = 1 wheat 1 person = 1 corn $400 in circulation A: (1 wheat) - 0 = A B: (1 corn) - 0 = B C: (4 rice) - (1 corn) = C D: (4 bread) - (1 wheat) = D