Gedemon's Civilization, development thread

Yes, that's planned, but will require DLL access (or new events and methods for direct AI units control from Lua)
 
Small update on gitHub:

Code:
fix for summer patch: remove ranged and recon unit from the support formation class and set their own formation class.
 
Small update on gitHub:

Code:
fix for summer patch: remove ranged and recon unit from the support formation class and set their own formation class.

Working fine.

What's the drawback... no linked movement? That was wonky anyway... one unit would always lose it's attack unless you remembered to de-link. Marginally useful in that state.
 
Just a confirmation: the last patch was not just about breaking as many mods as possible, it also brings some welcome additions, like custom FontIcons :D

Clipboard-2.jpg
Clipboard-3.jpg
Clipboard-4.jpg
 
Speaking of units, I'd like to discuss the unit tree, classes and abilities (including promotions)

Don't limit your thoughts to the scope of civ6, I'm assuming that we'll get DLL access at some point, here are some of my design plan

  • limited stacking
    • 1 melee unit + 2 support unit (numbers could changes with eras / policies, not sure if we'll use/need the corps/army mechanism of civ6 then)
    • translated to modern terms, "melee" would be division sized, "support" would be regiment sized
    • "support" include ranged, recon, and other regiment sized unit like heavy tanks, assault guns, etc... (think R.E.D. WWII if you used it)
  • most current "support" units will be removed and their effect reintroduced as promotions (keeping anti-air unit as regiments)
    • medic promotion -> field hospital (less dead from wounded, heals wounded faster, applied to all units on the same tile)
    • engineer-like promotions : unit could automatically spawn city-assault units (siege tower, battering ram, if it has enough materiel) when near an enemy city with walls
  • techs unlock equipment (bronze equipment, iron equipment, steel equipment, chariot, crossbow, musket, rifle, cannon, ...)
  • a city that has access to enough of that equipment (using trade for example) can build the corresponding units, even without the corresponding technology
  • each units has an small upgrade path with an equipment type, unlocked using projects, you need the equipment tech to research those project
    • for example bronze equipment allows spearmen, the "base" unit, and a military project unlocked by the same tech as bronze equipment allows phalanx units based on spearmen

Now what I'd like to discuss based on this is the global unit tree, IE what kind of units we should have for each era, and what should be the rock/paper/scissor for the gameplay

Finally a post where I feel like I got something to add, as someone who is interested but neither has modding experience nor wants to play a pre-alpha mod. :)

(just adding this in here, I didn't really take stacking into account, as I've never played with stacking mods. I'm just writing down what feels logical, and I assume it should be possible to pour it into a stacking mold. I'm also using quite a bit of what I know from Civ 4 as I feel like that game does a super good job on units, even though combat is bland with stack of doom vs stack of doom)

As for the rock/paper/scissors, I feel like there should be made a distinction between pre-gunpowder and post-gunpower, maybe in different unit classes, maybe not. This because pre-gunpowder, there is a clear distinction between melee and ranged, while post-gunpowder everyone is ranged, it's just that the ranges are different. Pre-gunpowder, I think it should look like this:

Anti-cavalry should beat mounted
Mounted should beat ranged/siege.
Ranged should beat anti-cavalry.
Melee should neither counter nor be countered by anything.

The thought process is as follows: Anti-cavalry (obviously) have pikes, which people sitting on horses don't like. Mounted units are fast, and are therefore good at flanking. That makes it only logical for them to be strong against ranged units, who tend to be lightly armored and who just don't have the time to shoot the horsemen down before they reach them. Ranged units should beat anti-cavalry because anti-cavalry, again, have pikes or the like, which means that they have a two-handed weapon, and therefore have no shield.

Now, melee units on the other hand, do have shields. They're not lightly armored, so they're also not easily routed by mounted units, and they're also not weak against pikes as they can relatively easily break pikeman formations. On the other hand, their weapons are shorter, so they can't reach horsemen that easily, they're not as fast as mounted units, so they cannot rout archers, and they do not have ranged weapons so they will need to get in range of the pikes in order to kill the pikemen. This together makes them the jack-of-all-trades of units, where they're not the best at anything but also don't get destroyed by anything, which then also logically means that they will make up the bulk of every army, even moreso if you do not know what you will go up against. This is also historically accurate (I'm not certain wheter the countering is; that's just a gut feeling), as most people in any army were just people with swords, shields, maces, etc.

Note on siege units (which I totally forgot for the most part): They are weak against mounted because they tend to be slow, and are strong against cities, of course.

As for post-gunpowder, it kind of becomes more difficult. Basically, you just want lots of guns. In other words, gunpowder units, musketmen, riflemen, etc. They're pretty strong and really don't have a clear weakness. Additionally, you would of course have the gunpowder mounted units like dragoons and cavalry. Those would later get replaced in their role by armored units like tanks and modern armor. However, there aren't really any other clear distinctions in classes, as the counter to guns is typically "bring your own guns". Mounted units would be faster, but I suppose that non-mounted units would be slightly stronger. Of course, siege units simply continue, and they'll still be weak to mounted in particular. In my opinion, siege units from artillery on should outrange anything else, requiring you to move units out of a city in order to stop them from hitting said city.

I do realize that this doesn't give for much interesting rock/paper/scissors, but I really just can't think of a proper way to handle that. Maybe armored units should beat gunpowder units though, so that you'll have to build AT units. And of course, air units beat anything on the ground if there's no AA.

---

Time to move on to the specific units. I'd personally like to see lines like this. It might interfere with Civ 6 promotions though, so maybe it's just not possible at all.

Melee: Warrior (game start) -> Axeman (late ancient, prob Bronze Working) -> Swordsman (late classical) -> Maceman (medieval) -> Gunpowder line.
Ranged: Slinger (game start) -> Archer (ancient) -> Composite Bowman (classical) -> Crossbowman (medieval) -> Gunpowder line.
Anti-cavalry: Spearman (ancient) -> Phalanx (classical) -> Pikeman (medieval) -> Gunpowder line.
Mounted: Heavy Chariot (ancient) -> Horseman (classical) -> Knight (medieval) -> Mounted gunpowder line.
Siege: Catapult (classical) -> Trebuchet (medieval) -> Cannon (renaissance) -> Artillery (industrial) -> Modern artillery (atomic) -> Rocket artillery (information).
Gunpowder: Musketman (renaissance) -> Rifleman (industrial) -> Infantry (modern) -> Mechanized Infantry (atomic).
Mounted Gunpowder: Dragoon (renaissance) -> Cavalry (industrial) -> Armored line.
Armored: Landship (modern) -> Tank (atomic) -> Modern Armor (information).

I also feel like the game should have machine guns but in my opinion they do not really fit into any category. Additionally, there should of course be anti-tank and anti-air units. And helicopters, which most certainly should not come from upgrading mounted units.

As for other air units I feel like the age-old system of fighters and bombers simply does it's job and does it well. And ships is a mess that I don't think I've ever really understood, so I won't start talking about that.
 
Thanks, I'll come back on that.

In the same time I'm still pondering the level of details for equipment.

It could be something generic like:

none : spearmen, warrior, archer
bronze equipment: axemen
iron equipment: swordsmen
steel equipment: pikemen, knight, longswordsmen

or more complex:
wood -> spear, clubs, bow, crossbow
copper -> bronze axe, bronze swords, bronze spear
iron -> iron sword, iron spear
etc...

I'm also considering secondary equipment, like armor types.

Note that names are just for reference with current/previous civilizations game.

thoughts ?
 
"Materiel" is a direct port from my civ5 WWII mod (ie military supplies), but I thought that it could also be used for the end product of any supply chain ?
 
I love what you are doing with this mod. I have been working on my own Overhaul mod
  • Everything is unlocked via the tech tree.
  • Expanded tech tree
  • New civic tree
  • Changed the policy to be based off more real life policy ideas like taxes and health care
  • Workable mountains (observatories give 6 science to each mountain)
  • I also used projects to make new recourses like steel.
  • No adjacency requirements
  • No district cap
I hope you will include some of these features in your mod.

I think workable mountains is a great addition and can help with later changes.
(you can make them workable by making them passable than disabling them to be passable using the inverse of the tech modifier that allows every unit on the ocean)

I like the focus more on science than culture that my mod has and I hope you copy it and use it in your mod
 

Attachments

Last edited:
Thanks, I'll come back on that.

In the same time I'm still pondering the level of details for equipment.

It could be something generic like:

none : spearmen, warrior, archer
bronze equipment: axemen
iron equipment: swordsmen
steel equipment: pikemen, knight, longswordsmen

or more complex:
wood -> spear, clubs, bow, crossbow
copper -> bronze axe, bronze swords, bronze spear
iron -> iron sword, iron spear
etc...

I'm also considering secondary equipment, like armor types.

Note that names are just for reference with current/previous civilizations game.

thoughts ?

I like it. Would you then, for example, need wood to build a clubman, copper to build an axeman, etc, or would you be able to somehow turn wood into clubs and then need clubs to build an axeman, and so on? I kind of like the second one, but it would also mean a game where you'd have to micro-manage every city to produce the right goods, like in Colonization, and that might take too much attention away from the other aspects of the game (contrary to Colonization, which is based around managing all kinds of goods).
 
The building/resource production mechanism of the mod can be as complex (or simple) as we want it, the mod's trading mechanism taking care of the transfer of intermediate materials between cities.

But at the end of the supply chain, at this moment, an unit can only require one type of equipment, and when an equipment is required by an unit, you can't build/reinforce/heal that unit without it.

What I'm pondering to code is different types of equipment per unit, some mandatory, some optional.

For example, take a swordsmen unit.

Swords would be a mandatory equipment, but it could be bronze sword, iron sword or steel sword. A swordsmen unit would prefer to be equipped with the steel swords but would use the other types if steel swords are not available. Having a high percentage of better equipment would give a combat bonus. Without any kind of swords available for reinforcement, the unit wouldn't be able to reinforce the frontline (combat ready) troops (representing the "health" of an unit) even if it has access to enough personnel.

Armors could be an optional equipment type, again we could have leather, bronze, iron or steel armor equipping an swordsmen unit. And again a high percentage of equipment would give a bonus (higher for steel), but in that case the unit would be able to "heal" even if it doesn't have access to an armor type.
 
Last edited:
ASAP I'll try to expand a bit on the units tree as posted by Leyrann and also using R.E.D Xtended, R.E.D. WWII and Combat & Stacking Overhaul for civ5 as references, and keeping in mind that with limited stacking (when fully coded), the "rock/paper/scissor" idea is to allow a weakness to any stack.

But now, trying to put on paper the concept of multiple equipment, we could have for the basic infantry line:

[table=head]|Ancient|Classical|Medieval|Discovery|Industrial|Machine|Arms Race|Atomic|Information|Future
Heavy Infantry| wood club + leather armor|swords/axes + armors (bronze and Iron) + shield (wood, leather, bronze, iron)|swords/maces + armors (steel) and Arquebus + armors (steel)|Musket|Rifled musket (Line infantry) upgrading to Rifle (Riflemen)|Repeating rifle + Combat Helmet|Automatic rifle + Combat Helmet|Assault Rifle + Combat Helmet|Assault Rifle + Connected Combat Helmet
Medium Infantry (Anti-cavalry)|spear (wood) + armor (leather) |spear (bronze and iron) + armor (leather)|Pikes (steel) + armor (leather, iron, steel)|(merging with/upgrading to heavy infantry)[/table]
 
And a small note about ranged units too:

Most land/sea ranged units will have a range of 1 (except late game missile equipped unit), but that doesn't prevent to simulate different ranges with the mod's mechanism (once the DLL source code is available)

For example the ability to return fire or not: a longbowman can attack a slinger from a distance preventing any return fire, while a slinger attacking a longbowman will suffer from return fire.

If possible, some "melee" unit will have the ability to return fire against some ranged unit (to prevent the situation of an archer attacking a riflemen without loss)

Some ranged units will provide only defensive support fire (like machine guns) when the tile they are on is attacked by a melee unit.

Ranged units will have a variable number of fire points reinitialized each turn that will be used when providing various type of fire:
- direct ranged fire (player controlled)
- return fire (against direct fire on the unit from another ranged unit)
- preparation fire (supporting a nearby melee unit attack)
- counter-preparation fire (supporting a nearby unit defense against a melee attack)
- counter-fire (against a ranged unit that has attacked a nearby unit)
 
The building/resource production mechanism of the mod can be as complex (or simple) as we want it, the mod's trading mechanism taking care of the transfer of intermediate materials between cities.

But at the end of the supply chain, at this moment, an unit can only require one type of equipment, and when an equipment is required by an unit, you can't build/reinforce/heal that unit without it.

What I'm pondering to code is different types of equipment per unit, some mandatory, some optional.

For example, take a swordsmen unit.

Swords would be a mandatory equipment, but it could be bronze sword, iron sword or steel sword. A swordsmen unit would prefer to be equipped with the steel swords but would use the other types if steel swords are not available. Having a high percentage of better equipment would give a combat bonus. Without any kind of swords available for reinforcement, the unit wouldn't be able to reinforce the frontline (combat ready) troops (representing the "health" of an unit) even if it has access to enough personnel.

Armors could be an optional equipment type, again we could have leather, bronze, iron or steel armor equipping an swordsmen unit. And again a high percentage of equipment would give a bonus (higher for steel), but in that case the unit would be able to "heal" even if it doesn't have access to an armor type.

As for this equipment, there's also armor, for example, that is of the same material (iron, for example), yet different in quality because of advancements made. Will this also be reflected ingame or will you only use different resources?

Also, how will you handle the promotion system? Or is that something you'll work on later?
 
As for this equipment, there's also armor, for example, that is of the same material (iron, for example), yet different in quality because of advancements made. Will this also be reflected ingame or will you only use different resources?

Also, how will you handle the promotion system? Or is that something you'll work on later?
If I code the base mechanism, it can then be made simple or complex, again it's just a matter of adding more "resources" .

The promotion system may change, but the types of promotions will have to be adapted to the new mechanisms in the mod anyway.
 
unrelated small update on gitHub
Code:
- add new font icons
- restore supply line display
 
The more I think about the possibilities, the more I want the multiple equipment requirement/option with bonuses.

So I'll do it :D

That means some heavy changes to the actual code, but on the other hand, it's much better to decide that now than after what I was initially planning to code next: gold requirement when producing units/buildings based on the resources/equipment prices and coding the upgrade of units based on the requirements of the new unit (more personnel, more materiel, different or more equipment)

Upgrades will be automated, based on the supplies available to an unit that can be upgraded.
 
And now before coding, I need to design the equipment mechanism.

First, a simple possible example with Combat Strength bonus for a swordsmen depending of the type of swords

The swords is mandatory, at 100% health the unit will have 3000 personnel and 3000 swords on its frontline position (remember post #5 for reference).

We could set a max bonus for each type of sword, for example
+0 CS max for Bronze Swords (the basic type)
+2 CS max for Iron Swords
+5 CS max for Steel Swords

Let's suppose the following composition for a swordsmen unit (frontline position) at full health:

3000 personnel
1500 bronze swords (50%)
1200 iron swords (40%)
300 steel swords (10%)

the bonus would be:
(40/100*2) + (10/100*5) = 0.8 + 0.5 = +1.3 CS (I don't think the game accept decimals for combat strength, so that would translate to +1CS)

The bonus would have to scale with the unit health, to prevent having +5 CS because the last component could be the better one (if I decide to handle the level of the component in the damage calculation)

Imagine the same unit at 50% health after a few fights, the worst components being damaged first:

1032 personnel (the function to calculate personnel / health is not linear)
200 bronze swords (~20%)
600 iron swords (58%)
232 steel swords (22%)

the bonus would then be:
((58/100x2) + (22/100x5) ) * 50/100 = (1.16 + 1.1) * 0.5 = +1.13 CS (still + 1CS...)

Now, if you have blacksmith in all your cities and access to iron and the steel tech, the same unit could be composed like that at full health:

3000 personnel
300 bronze swords (10%)
1500 iron swords (50%)
1200 steel swords (40%)

and the bonus would be:
(50/100*2) + (40/100*5) = 1 + 2 = +3 CS

That's a simple usage, but I really think that we could/should push it further.

For example, armors type could affect the fate of your personnel casualties after a combat, less dead, more wounded. When cut from your supply lines, the ability to have more personnel that could eventually heal to join the frontline again (even more if you have enough medicine) is essential.

Another example, actually the mod can manage anti-personnel and anti-vehicle values only, this would have to be expanded in relation to a multiple equipment system.

So we could have equipment classes:

Required:
- Weapons (Swords, Spears, etc...) or Vehicles (Tanks, Fighter, Bomber, ...)

Optional:
- Personnel Protections (Armor, Shields, Helmet)
- Vehicle Protections (Additional armor)
- Special Ammunition (HEAT rounds, Fragmentation Bombs, Torpedoes, AGM...)


Then Vehicle/Weapons/Ammunition would need to be defined by:
- Anti personnel value
- Anti personnel protection value
- Ignore personnel protection value
- Anti vehicle value (Air, Land, Sea)
- Anti armored vehicle value
- Ignore vehicle armor value

The difference between vehicle/weapons and ammunition would be that the vehicle/weapons position would be frontline and reserve, and they will be damaged/destroyed in frontline during combat relatively of the unit damage (the ratio between destroyed/killed and damaged/wounded depending of the opponent and/or the unit's optional protections), while the special ammo position would be mostly in reserve, the type and number used depending of its value against an opponent (so that a bomber unit is not going to launch torpedoes against tanks...)

This may look over complex, but it's the kind of background mechanism that would make the game/mod much more "alive" IMO.

Still, before coding anything (I will take some more time to think about how to implement it anyway), I'd really like to gather some feedback, comments and suggestions.
 
Last edited:
As for the game not accepting decimals, you could multiply all combat strengths by 10 to get a more accurate representation. This would require a change to the combat code itself, however, as currently a strength difference of 10 means "twice as strong", which should then of course become a strength difference of 100.
 
I was about to answer that we can't change the code, but we do have access to the variables of the combat formula, so yes, that is possible.

Edit : for reference, the formula should be similar to this:

(COMBAT_BASE_DAMAGE + rand(0, COMBAT_MAX_EXTRA_DAMAGE)) * e^(COMBAT_POWER_SCALING * StrengthDifference)

(where e = 2,71828, from https://forums.civfanatics.com/threads/hans-lemurson-figures-out-the-combat-formula.606147/ )

in the base game COMBAT_BASE_DAMAGE = 24, COMBAT_MAX_EXTRA_DAMAGE = 12 and COMBAT_POWER_SCALING = 0.04

in the mod ATM COMBAT_BASE_DAMAGE = 12 and COMBAT_MAX_EXTRA_DAMAGE = 6

I can keep those, multiply all the units combat Strength per 10 and use COMBAT_POWER_SCALING = 0.004
 
Last edited:
Back
Top Bottom