[Mod] Uchronia - Another Humankind History (W.I.P.)

As you've seen above, you'll have stockpile in settlements (exchanged automatically between settlements of the same Empire), and you won't trade resource individually with other Empires, but will buy the access to a settlement stockpile, the type of resource exchanged (food, luxuries, strategic, equipment) still being dependent on the diplomatic trade level.

So I've made a new district ("Market Center") that generate a luxury resource ("Trade Destination") which is the only *resource* that can be traded now. (see screens) they will be unlocked in the first era. I'm looking for better names for both. IDK if "Trade Center" would fit so early for a district. "Trade Hub" ? Not sure of the resource name either, as it's more of a trade source from the PoV of the Empire buying the access. "Trade Access" ? simply "Trade Route" ?

Suggestions ?

Spoiler :
upload_2022-4-12_12-12-34.png


upload_2022-4-12_12-12-50.png


upload_2022-4-12_12-13-4.png


upload_2022-4-12_12-13-18.png
 
I think I'll go for "Trading Hub" for the district and "Trade Route" for the pseudo-resource, and I'll adapt the text on the "buy" screen to make it say "Sponsor" ("a Trade Route") instead of "Buy".
 
Development update, I've no ETA for the next alpha, as implementing stockpile as they were used in the civ6 project is kind of a full economic overhaul.

But I'm progressing, here is a screenshot of my tests with the visualization of a pathfinder supply line result, here over a river in the context of resources collected in a settlement (to calculate satellite territories to main territory transport cost)

Then there should be supply lines between settlements, and the "usual" trade routes between Empires using the new pseudo-resource to set the source/destination settlements.

upload_2022-4-18_15-19-47.png
 
A first draft for Supply Lines, looking for feedback.

My current implementation is to have stockpiles in the main district of a settlement (aka the city center).

Administrative Centers of attached territories would (try to) have a supply line with that main district (screenshot posted previously)

Resources are collected in territories that have a supply line to the main district, and processed/stocked in the main district.

Some other districts (harbor, garrison, ... ?) would try to set a supply line with the Administrative Center of their territory or the Main District if they can't reach them. Those districts would act as alternative supply source for armies. Note that I think of limiting garrison to one per territory.

Armies in your territories would try to find a path to the nearest supply source (Administrative Center, Garrison, Harbor, ...) of that territory, which would give them access to the Administrative Center stockpile. If they fail, they'll use the foreign territory method below.

In foreign territory, only the biggest army in that territory will try to find a path for a supply line to one of the supply source in a nearby territory (only adjacent first, further away after some techs/eras). If it fails, then the second bigger army will try, etc...

The other armies in that territory will try to find a supply line path to the "central" army.

That way most path finding computation would be made inside territories, limiting the processing time a lot.

The problem I have with that design, is what happen when a Main District is under siege ?

It should not be able to receive new resource, but it should be able to process those that are in its stockpile.

But what about your armies ?

Should they be able to access the (then considered "virtual") stockpile of that City via the previous supply sources ? (meaning I'd remove the check for a supply line between them and the city, else that solution won't be viable)

Or no supply at all ?

I could have them try to find a path to another City, like if they were in a foreign territories but that would require more processing power, and with the huge size one settlement can be, while their supply lines would be short, they surely won't be able to reach one (or it would mean using unrealistically long supply lines)

It would be strange to have them unsupplied in some of your own territories when only one is under siege. OTOH it would be strange to have a sieged city still providing supplies for armies outside its walls...

So I'm pondering using more stockpiles, one in each administrative center and supply sources, with more limited stocks (and limited to equipment only for garrison for example). That would mean the city itself will have access to less resources, and it will require more processing power each turn (to transfer the resources), but would also make the effect of siege being less dramatic and/or more realist depending on the choice made if I keep the actual design.
 
Last edited:
Toying a bit with the concept of Farmer Quarters outside of cities

Something I did on a personal mod is:

- Range of 2 for farms.
- Changed the infrastructure bonus from adjacency to increasing food on grassland/prairie.
- Changed the crop rotation from feudalism to bonus to grassland/prairie.

So this way the focus was more food on fertile terrain that on the quarter, plus also makes it so that you need to chop forests to make place for farms, which is quite historical I believe.
 
It makes sense to me that a city under siege would lose the ability to gather/distribute resources but would still have access to the existing stockpile for use by defenders. Perhaps you could add events to dismantle districts to cannibalize resources (in the manner of the Faded Lady event) as the city exhausts the stockpile, possibly through an attrition tick based on population/districts/units.

While I am certainly wary of demands on processing power, it would also seem logical for armies to draw on resources from the region they are passing through, whether foreign or domestic. For example, instead of supplying from the nearest city, the reinforcements above could also collect resources from any administrative center (or supply center) they passed that was unoccupied by hostile forces.

Likewise, hostile forces might draw resources at a penalty from supply centers, diverting those resources away from the city. I imagine this could help offset some of the burden on supply lines.

Currently, an invading force has to either raze an administrative center and resettle it or besiege the city to administer the region. Instead, supply centers could act such that invaders might sack an armory here, quarter there, requisition grain elsewhere before or during the siege.

Perhaps battles would disrupt local resource gathering, such that any battle halted resource collection from/to/in the region(s) where the battle took place for as many turns as the battle lasted. This could open opportunities for raiding.

These suggestions would obviously err on the side of excess in terms of stockpiles and supply lines.
 
Something I did on a personal mod is:

- Range of 2 for farms.
- Changed the infrastructure bonus from adjacency to increasing food on grassland/prairie.
- Changed the crop rotation from feudalism to bonus to grassland/prairie.

So this way the focus was more food on fertile terrain that on the quarter, plus also makes it so that you need to chop forests to make place for farms, which is quite historical I believe.

Yep, I've set a late game replacement with range 2, and I do want to change the adjacency bonus too that way. I'd also like to differentiate biomes if that's possible from the DB (maybe a lot of work to try to implement that code-side if it's not already handled)

Exploitation tiles will be important in the mod, because it's those tiles (and mines/artisan quarters) that will give the resources

It makes sense to me that a city under siege would lose the ability to gather/distribute resources but would still have access to the existing stockpile for use by defenders. Perhaps you could add events to dismantle districts to cannibalize resources (in the manner of the Faded Lady event) as the city exhausts the stockpile, possibly through an attrition tick based on population/districts/units.

While I am certainly wary of demands on processing power, it would also seem logical for armies to draw on resources from the region they are passing through, whether foreign or domestic. For example, instead of supplying from the nearest city, the reinforcements above could also collect resources from any administrative center (or supply center) they passed that was unoccupied by hostile forces.

Likewise, hostile forces might draw resources at a penalty from supply centers, diverting those resources away from the city. I imagine this could help offset some of the burden on supply lines.

Currently, an invading force has to either raze an administrative center and resettle it or besiege the city to administer the region. Instead, supply centers could act such that invaders might sack an armory here, quarter there, requisition grain elsewhere before or during the siege.

Perhaps battles would disrupt local resource gathering, such that any battle halted resource collection from/to/in the region(s) where the battle took place for as many turns as the battle lasted. This could open opportunities for raiding.

These suggestions would obviously err on the side of excess in terms of stockpiles and supply lines.
Armies will "live from the land", especially pre-industrial, additional resource capture/pillaging is also planned.

I'm switching from "settlement" to "territory" stockpile, will also make it easier to handle merge/split of territories.

Basically Camps, City Centers and Administrative Centers will provide the stockpile, and some other districts (military) will provide alternate source point to that stockpile content for the Armies supply line if it's closer than the center/camp.
 
progress on the UI
Spoiler :
upload_2022-4-21_8-56-42.png


Now I need to add a line of buttons to select which Territory stockpile to display in a Settlement.
 
Army Supply: would it be possible to treat a supply route like a fuse, so that once cut, it still supplies until it "burns off"? This mimics the chain of historical hidden transports being made up of many separate units (Caravans, Trucks, Ships) vs just one long mystery chain. Cut the route and the closer ones still make it.

So if the army is 20 tiles away, and the supply is cut near the source, the army still has x number of turns of full supply ( x = 20, 10, 5, 4, or 2?). If cut at the midpoint 10 tiles away, the fuse lights from there (x then = 10, 5, 2.5, 2, 1? It would depend on how long you think a turn of battle is vs supply travel time.). If the route is reestablished, the fuse is made whole again.
 
the civ6 mod had a similar "buffer", the stockpile of units was split in 3, the "Frontline" /"Ready" that defined its health, the "Reserve"/"Camp" and the "Rear"/"Supply Train"

I'll use something similar, a stockpile at the unit level, the "Frontline", and another at the Army level, the "Reserve" and "Supply Train" that will provide a limited supply (growing with eras) to the army's units when the line is cut.
 
I was wondering about the feasibility of an idea.

If you manage to identify "biomes" in the game, could you use that info to generate the "territory - culture" table of relations (like Myceneans and Greek are both linked to the territory of Greece) ? The objective would be to assign biomes to cultures instead of specific region based on historic geography. For example, steppe cultures would have steppe-like territories linked to them instead of only the specific historical region.

This would allow ahistorical spawning of certain culture on the Earth map (which I'd like but I understand it's not a motivating case, like having the Zhou spawn on the west coast of the Americas because of the mountains), and also make TSL generation for random maps more interesting (randomized map and assigning culture based on their Earth map location definitely works, but isn't ideal).

I'll mention that I don't know how big of an IF identifying biomes is ^^'
 
The problem I have with that design, is what happen when a Main District is under siege ?

I don't know much about pathfinding, but any battle triggers an area of the map becoming "disrupted" by the battlefield, limiting movement of all units in the region as stepping inside this disruption drags you unto the battlefield. I'd expect pathfinding functions trying to go around those, and get updated before the end of the turn if the battle ends fast enough.

I'm mentionning this because I think you could treat both "pitched battles" between 2 armies and "siege battles" between an invasion force and a city the same way, by forcing supply lines to go around. A city would be unable to gather resource nor supplies, but would still have its reserve stockpile, so does all the armies during battle. If an army was under supplied when the battle started, they should be expected to suffer penalties if the battle lasts too long because of that. Capturing an enemy's camp (or simply killing all enemy units) should award its supply as loot to the victor (could be modeled as the victor healing a little bit, especially if they were under supplied by this point). A battle or siege lasting several turns would drain supplies as no one can resupply during the battle (armies then to harass rival foraging parties and supply wagons). The only way to resupply an army mid-battle would be to send a reinforcement(/relief) army (their supply train will merge with the rest and bring the average up, would require organized warfare tho).

If only the "battlefield" is blocked and covers a Main Plaza, this would mean other supply depots (harbour, garrison, admin centers) would still function as distribution centers for your armies (if they are outside of the fight, that is), but may not be receiving their usual amount of supply given that they depend on the city under siege. Maybe a city's total stockpile is actually including all the depots, and when it's under siege it stops gathering new supplies and simply spends the stockpile, with each depot having its % of the stockpile available (meaning that a city with 5 depot may have most of the stockpile in the Main plaza supplying the defenders, but the far-flung harbour may have 10-20% of that stockpile still available to itself to help inbound armies get to the fight faster and with fresh supplies? This method would allow you to only consider one stockpile per city in times of peace, and then just "split" how it empties out during sieges.

Just ideas I'm throwing in, in case one of them ends up being helpful.
 
The concept and implementation of "supply lines" are fascinating.

I always thought the "Territory-based Trade Route" system in HMK is much better than what we have now in Civ. Trade routes IRL had/have much less freedom (due to geographical constraints) than Civ's city placements (which are far too forgiving), and a fixed-Territory system could translate this inflexibility of trade routes very well.

A quick suggestion for the name of the pseudo-resource used for setting up trade access: Instead of "Trade Destination," what about "Trading Charter"?
(There is also a fancy word for it in Latin - Carta Mercatoria - but it doesn't seem too easy to understand for average players.)

Another quick question regarding the trade/supply calculations:
I know that the game could register and calculate distances between territories, as already shown in trade UI and religion/culture UI. I wonder if the game could also register the distance of a specific hex from a City Center or Admin Center?
 
I was wondering about the feasibility of an idea.

If you manage to identify "biomes" in the game, could you use that info to generate the "territory - culture" table of relations (like Myceneans and Greek are both linked to the territory of Greece) ? The objective would be to assign biomes to cultures instead of specific region based on historic geography. For example, steppe cultures would have steppe-like territories linked to them instead of only the specific historical region.

This would allow ahistorical spawning of certain culture on the Earth map (which I'd like but I understand it's not a motivating case, like having the Zhou spawn on the west coast of the Americas because of the mountains), and also make TSL generation for random maps more interesting (randomized map and assigning culture based on their Earth map location definitely works, but isn't ideal).

I'll mention that I don't know how big of an IF identifying biomes is ^^'

Almost anything possible, the issue is time needed. ID biomes is simple, coding an option is much longer, and providing long term support for options is exponentially more time consuming, meaning I'll limit them (already removed a lot from the TCL setup, and I will remove more)

That said I pondered biome-based placement, and hadn't discarded it, but I can't say if I'll implement it (won't be an option, would still be something using relative to real earth coordinates for randomly generated map, and what I would do is give more weight to latitude over longitude then change the biome of the starting territory to fit the culture)

I don't know much about pathfinding, but any battle triggers an area of the map becoming "disrupted" by the battlefield, limiting movement of all units in the region as stepping inside this disruption drags you unto the battlefield. I'd expect pathfinding functions trying to go around those, and get updated before the end of the turn if the battle ends fast enough.

I'm mentionning this because I think you could treat both "pitched battles" between 2 armies and "siege battles" between an invasion force and a city the same way, by forcing supply lines to go around. A city would be unable to gather resource nor supplies, but would still have its reserve stockpile, so does all the armies during battle. If an army was under supplied when the battle started, they should be expected to suffer penalties if the battle lasts too long because of that. Capturing an enemy's camp (or simply killing all enemy units) should award its supply as loot to the victor (could be modeled as the victor healing a little bit, especially if they were under supplied by this point). A battle or siege lasting several turns would drain supplies as no one can resupply during the battle (armies then to harass rival foraging parties and supply wagons). The only way to resupply an army mid-battle would be to send a reinforcement(/relief) army (their supply train will merge with the rest and bring the average up, would require organized warfare tho).

If only the "battlefield" is blocked and covers a Main Plaza, this would mean other supply depots (harbour, garrison, admin centers) would still function as distribution centers for your armies (if they are outside of the fight, that is), but may not be receiving their usual amount of supply given that they depend on the city under siege. Maybe a city's total stockpile is actually including all the depots, and when it's under siege it stops gathering new supplies and simply spends the stockpile, with each depot having its % of the stockpile available (meaning that a city with 5 depot may have most of the stockpile in the Main plaza supplying the defenders, but the far-flung harbour may have 10-20% of that stockpile still available to itself to help inbound armies get to the fight faster and with fresh supplies? This method would allow you to only consider one stockpile per city in times of peace, and then just "split" how it empties out during sieges.

Just ideas I'm throwing in, in case one of them ends up being helpful.
ATM I'm only allowing auto-resolve as it's much simpler to develop around that than changing the tactical battles to something more to my liking while fixing some of the issues I have with them. I may add a switch in the XML files to allow tactical battles, but won't support using them (modding time factor again)

So only siege can take more than one turn to resolve, and the siege area is limited to the city center and all adjacent tiles, nothing more.

Supply lines will avoid the area, armies inside will use the city stockpile, armies outside will need a supply line coming from the adjacent territories (linked to that city or to another)

The concept and implementation of "supply lines" are fascinating.

I always thought the "Territory-based Trade Route" system in HMK is much better than what we have now in Civ. Trade routes IRL had/have much less freedom (due to geographical constraints) than Civ's city placements (which are far too forgiving), and a fixed-Territory system could translate this inflexibility of trade routes very well.

A quick suggestion for the name of the pseudo-resource used for setting up trade access: Instead of "Trade Destination," what about "Trading Charter"?
(There is also a fancy word for it in Latin - Carta Mercatoria - but it doesn't seem too easy to understand for average players.)

Another quick question regarding the trade/supply calculations:
I know that the game could register and calculate distances between territories, as already shown in trade UI and religion/culture UI. I wonder if the game could also register the distance of a specific hex from a City Center or Admin Center?

"Trading Charter" sounds good, thanks.

Straight line distance or path distance ?

Both are possible, I started by using the game's pathfinder for armies (calculate number of turns to reach a destination tile to tile based on army capabilities and terrain), but switched to my own implementation of the A* pathfinder as I had specific need for calculating the path cost of supply lines over river/sea and could not do that with the game's pathfinder without also changing drastically the movement of armies.
 
Straight line distance or path distance ?

Both are possible, I started by using the game's pathfinder for armies (calculate number of turns to reach a destination tile to tile based on army capabilities and terrain), but switched to my own implementation of the A* pathfinder as I had specific need for calculating the path cost of supply lines over river/sea and could not do that with the game's pathfinder without also changing drastically the movement of armies.

I meant the straight line distance - interesting to hear that even the path distance is possible to measure.
 
@Gedemon How did you implement the district limit?
 
@Gedemon How did you implement the district limit?
not by using the modding tools, it's part of the patched code using BepinEx

or do you mean which function is patched ?
 
not by using the modding tools, it's part of the patched code using BepinEx

or do you mean which function is patched ?

It's alright, was curious if possible somehow with the modding tools. In any case, looking forward to the finished mod!
 
Hey Gedemon, I've been keeping an eye on this and wondering if I could give the alpha a shot to give feedback as well? Just let me know what I need to download/do, I really love these types of mods for 4x games.

EDIT: I know you may need to do some updates since Bolivar though so no rush!
 
Top Bottom