R.E.D. World War II development thread

I'm working on making a Winter War scenario for this mod that includes a new civilization, Finland.
But since I can't do lua coding like at all, I've pretty much done all I can.
I defined the civ in newcivilizations.xml and added a sound file, a loading screen, and a diplo screen. Maybe someone else can help continue this, cuz I think its a good scenario idea.
 
Judging by what I saw there, I haven't got that far, so nevermind. I'll just try with Norway or something...
 
Firstly, thank you Gedemon for all your time and input into your MODs, they are truly works of thought. I have only recently started playing with them and love them, especially the WWII.

I will try to provide more feedback and reports as I come across them. I have been messing with the LUA files a little bit trying to tinker with the scenario setup, so apologies if I can't report on your most current version and debug desires.

My ideal setup is starting as a nation (major or minor) in either '36 or '39 and moving forward in that time with a TRULY alternate history, i.e. no pre-established alliances nor pre-set declarations of war, etc. I simply enjoy the WWII time period's units and combat and want to play out alternate-universe scenarios with a given country (what if France and Germany allied against US and Italy, and a 3rd alliance of UK and USSR were all 3 fighting against each other?)...I've just been trying to remove some of the scripting (acknowledging that it truly is well thought out and much time was spent on it) to allow for different diplomatic scenarios to play out on this wonderfully crafted MOD.

Anyway, a suggestion that doesn't drastically alter Gedemon's goal, with the addition of Oil resources, would it be possible to reduce the Oil/turn cost for ships if they are in or near a city's harbor, or tanks Oil/turn if they are within certain tiles of city or have been fortified (or stationary) for a certain time? I don't think scratching to 0 is necessary as a tank or ship uses gas in idle, but if they are in harbor or fortified, surely they don't use as much gas. I know part of strategic planning in war is ensuring supply needs are met, but with so few Oil resources on the map, I thought it might be nice to at least provide some relief on the Oil/turn cost.


Thanks again Gedemon!
 
I'm pondering this, it's on my todo list, but I'm always afraid of the consequence for the AI when making the rules more complex, I've just started to balance the AI units build list to take into account the reinforcements... The feature would not be hard to code, but translating it to the AI is a lot of works.

If I were to implement it, I would raise the values of the convoy and oil fields but make each action require fuel consumption, the actual values being the "idle" or "stay operational" consumption.

That is the same for the AI, but the actual consumption values are low integer, it's better to raise the global values that start rounding "25% of 5 fuel per turn" for example.
 
And for those using GitHub, I've pushed the quickfix for the Fall of Poland, I won't be able to release a full update until this week end I think.

v.41 beta 1
Bug fix : cities not converted during Fall of Poland, Denmark
Balance : mark convoy as "CIVILIAN_ATTACK_PRIORITY_HIGH" for the AI
 
Is there a current use for the aluminum or iron resources? Or were they done for a future update?

Any thoughts on a scorched earth policy by USSR? When a city falls, the buildings and improvements could be destroyed...
 
Iron and aluminium are for a future update, but you can already disrupt Germany's convoy in the Baltic Sea and from Narvik by cutting the roads (placing an unit on them or using special forces for pillaging) between the mines and the coastal cities in Norway, Finland, Sweden. Other mines are not used like that, but when playing Germany you may find cities near coal mines to be useful...

There also may be a project added to allow transfer of soviet improvements to other cities far from the front.
 
Understood. In past games I usually did cut off the Narvik line to whittle away at GE. You mentioned before that you were going to work on a world map after v.39. If I can help in any way with that or whatever else, let me know. I've not had much experience modding but I do learn quickly. I also don't mind research if that's what's needed.
 
ATM I'm still collecting data for resource placement during the WWII era.
 
Heyo Gedemon, I've been playing around with the new versions for a bit now and I like a lot of the changes and want to thank you for your hard work.

First of all I'd like to let you know that the mod works as smooth as ever and I've had no crashes thus far and I'm on my second 39-45 (I agree with BeLikeWater that we should have the 36' start available again, creates some interesting situation with Alt H.) scenario playing GE. Fall of France/Poland worked perfectly, good stuff right there.
Now I think we really need to change the alternate history option to disable teams, as to allow Germany to invade Italy and Britain to attack France etc.. Maybe not new alliances but give it a more 'free' feeling. I've been messing with the lua files that and I think I might be able to change the option for that to be possible, need to look into that when I have some free time.

Another thing I've noticed is that I can't use Faster Aircraft Animations anymore with the mod? Is it possible to add that permanently or add an option for it?
It's just a bit slow in the later stages of a game when you have lots of planes.

I'll keep an eye out for bugs and balancing and I'll gladly help with an adaption of a world map/NA-Europe map/TKommanders map for the mod as well :)
 
The new scenario will have multiple start date and I'll try also to keep a "free diplomacy" option.

Faster Aircraft should be compatible, I'm using it in every game.

On another note, I want convoy to be automated (resources acummulated in a city and generating convoy to ally/friends from excedent) , and I'll show land routes between cities (visual only) based on the same mechanism.
 
The new scenario will have multiple start date and I'll try also to keep a "free diplomacy" option.

Faster Aircraft should be compatible, I'm using it in every game.

On another note, I want convoy to be automated (resources acummulated in a city and generating convoy to ally/friends from excedent) , and I'll show land routes between cities (visual only) based on the same mechanism.

Weird. I tried to use FAA on multiple occasions and all it does it answer with the 'some mods are not needed' message and a disabled menu with the auto exit active.
I've used it with the mod before but I've grabbed the national hymn mod just recently so I'll see if there are any compatibility issues anywhere.

But the plans for the new scenario sounds great :)
The ideas for convoys are also cool, I think having the resources accumulate in a city makes sense from a realism and gameplay point of view. You will have to think about where to build storage/production facilities and actively go for resources (My strategy has already changed now that oil is a thing).
I guess you could use the 'show trade routes' option from Vanilla that lets you see your routes for internal and external convoys with those convoys spawning from excess resources. That will make a raid of those improvements actually worthwhile And example would be, to go pillage an axis oil field in the balkans as USSR and supplies to GE being actually disrupted. Adds so much complexity and depth to the mod.

It's really cool to see this much progress with the mod here, you're doing great work Gedemon!
 
can you open a bug report with your lua.log when trying to launch the mod with Faster Aircraft Animations please ?
 
Great work with the new versions! I just returned after a 3 or 4 month hiatus for work, and am very very impressed.

The new oil resource (and I assume a future inclusion of strategic important of iron and aluminum...?) looks really fantastic, and already fairly well balanced.


I have a few suggestions that would add some balance and playability:

Two routes for GB from "Pacific to Suez", one for the AI (which delivers high quality units every 3-6 turns; tanks, field guns, artillery, experienced infantry, or spitfires), and one when playing as GB which delivers infrequent units.

My second suggestion is that some improvement to the current AI's "Defend units in transport" be made. I noticed the new code and the reinforcement routes from UK to africa and that, as opposed to the UK just suiciding its land units into France too early, is really fantastic. Great job. But their Navy is no where to be found near large clusters of these units, and become easy pickings easy for the AI Germany.

Lastly, when allowing scripted events like Fall of France, why not add some "Fortress Europe" fortifications along the Dunkirk to Brest coast, like the maginot/siegfried line emplacements?

Furthermore, I still like using this little bit of code (which i had been using in RedFunctions but now goes in RedInitFunctions):

"
local plot = GetPlot(cityData.X, cityData.Y)
if plot then
local city = plot:GetPlotCity()
if city then

local player = Players[city:GetOwner()]

if player:IsHuman() then -- auto-set wealth to all cities, micromanagement is allowed/encouraged, but not the default option
city:pushOrder (OrderTypes.ORDER_MAINTAIN, GameInfo.Processes["PROCESS_WEALTH"].ID, -1, 0, false, false)
--added code-- city:ChangePopulation(2, true)
--added code-- elseif not IsSameSideHuman(player) then
--added code-- city:ChangePopulation(5, true)

"

To add some population to my own cities but much more to the enemies, to allow them to properly scale up a full sized army more quitely.


I will write a customized "Harder handicap" guide on how a player can make a user side adjustment with this code, but I wanted to mention how usable it is.



A final question:

Did any thought go into extending the Atlantic ocean in 1939 west a little further and including some kind of token North America with a few city states as America that would auto-annex or become allied with GB in December 1941?

Either it'd auto annex and it'd spawn infantry and armor regiments with American names (added cities and population with icnrease UK's unit cap to accomodate the new units), or it'd ally and send convoys which would spawn these units in Plymouth as the system already seems to work. Either way, I think it'd make for a much more challenging UK enemy while playing Germany.
 
AI coding (real coding I mean) is difficult... And even tweaking the defines values for the AI is a challenge, there is always a butterfly effect... But looking at the AI code is on my todo, I've already tweaked a few things.

I plan to have projects linked to fortifications since some time, it could definitively be done.

OTOH I won't do big change on the Europe map now that I've started to work on a new earth map and a new framework.

But even so, I'm still trying to limit the number of units on the map, without removing too much freedom to the humans players.
 
A few words on what I've done yet on the new version...

I'm still a bit lost in the pathfinder, I want to take one step further now that I've removed the ZoC for naval units and I'm trying to make naval and embarked units able to move through (not just near) enemy naval units, combined with an "opportunity fire" mechanism to compensate the complete freedom of movement.

The movement code for naval units works fine, but I've not found yet how to make it works for the embarked units...

I've also had a lot of thought on the design with the new resources and the way it will be managed at the city scale.

But I'd like to discuss another layer I want to add to the mod and that I've in mind since a very long time: war casualties and a better sense of scale relative to the size of units and requested reinforcements.

Some thoughts/example in no specific orders:


multiple "components/resources" separated in "front line" and "reserves" for each unit:
- personnel (both in "front line" and "reserve")
- officers (both)
- vehicles (both)
- materiel (reserve)
- damaged vehicles (reserve)
- wounded personnel (reserve)
- wounded officers (reserve)
- prisoners (reserve, transferred to cities ASAP)


About officers
Officers are trained in barracks/academy (% from personnel reserve) or promoted from personnel in fighting units (related to combat XP, total damage received/given, personnel number and combat result)

Officers would be required to heal some units (like aircraft, armors, etc...), would just be a requested ratio in others (like infantries), but will be required in both case when "producing" the unit.

In units with a requested ratio, officer can die when the unit is damaged and could be replaced during the reinforcement process or from the reserve or by promotion.

If the officer ratio is low, the unit will get a combat penalty

Max health will not be the same for each units, but relative to the unit's size (division, regiment, brigade, ...)

- Each damage received kill or wound personnel/officers, killed troops must be replaced by fresh troops, wounded are send to a "global pool" in cities to be healed (faster if there are hospitals there) if there is a supply line
- Wounded would stay with the unit if supply is cut (and a % killed each turn, less with medic, even less with field hospital)
- medic and field hospital promotions would raise the ratio wounded vs killed from damage received and heal a few each turn (back in reserve as fresh troops) before sending the rest to a city if there is a supply line
- field hospital could heal nearby units' wounded too
- we could add a "salvage" promotion to allow % of destroyed vehicles (own or enemy) to be added to materiel reserves


For mechanized units (except naval units), 1 HP will represent 1 vehicle and it's crew .

For tanks we may have:

battalion (ger) / brigade (fr)
https://en.wikipedia.org/wiki/German_heavy_tank_battalion
30-45 heavy tank -> max HP = 35

light/medium/heavy tank regiment
equivalent to ~2-3 battalion
70-100 tanks - > max HP = 75

armored division (light/medium tanks)
equivalent to ~3 regiments -> max HP = 200

and each HP would represent
1 vehicle (tank in this case)
1 officer
2-4 personnel

example for a light tank, healing 1 HP would require
1 officer (tank commander)
2-3 personnel (crew)
1 reserve vehicle or 7-9 materiel (1 materiel / ton, for ref a panzer II = 9 tons)

losing 1 HP would means that one tank and it's crew are damaged/wounded or destroyed/killed

a damaged tank is transferred to the unit reserve and may be repaired in the next reinforcement cycle at a lower cost in materiel than a complete replacement

the wounded troops are transferred to the unit reserve and can be healed in the next reinforcement cycle if the unit has medics or field hospital promotions or are send in cities ASAP

each turn wounded that are neither healed or send to a city may die of injuries (ratio lowered by medics or field hospital)

For infantries

infantry division
~10.000 men -> max HP = 400
25 pers/ HP
(1 HP would represent roughly a platoon)

Special Forces (regiment)
4 squadron of ~60 men -> ~240 men -> max HP = 10
5 officers / HP
20 pers / HP

for Air units

Air Wing (US) / Group / Escadre (fr) / Geschwader (ger)
unit size would be equivalent to 3-5 squadrons (12-15 aircraft each) -> 26-75 aircraft -> 75 HP

to "heal" 1HP of a fighter:
1 officer (pilot)
10+ materiel (1 plane cost ~10 material, bf-109 = 2 "aluminium" tons ?)

to "heal" 1HP of a heavy fighter:
1 officer (pilot)
1-2 personnel (gunner/radio)
15+ materiel

to "heal" 1HP of a bomber:
2 officers (pilots)
3-6 personnel (crew)
15-20 materiel (for reference a B-17 = 16 tons, use "steel" equivalent or a ratio steel/aluminium ?)

For naval units

Bismarck: 75 HP
1900 sailmen -> 1900/75 = 25 personnel / hp
100 officer -> 100/75 = 1 officer / hp (optional, see ratio)
41700 tons ("iron") +> 4170 tons ("steel")/75 = 56 mat/ hp

Resources equivalents:

10 tons iron -> 1 ton steel
1 ton "steel" -> 1 materiel
10 tons bauxite -> 1 ton aluminium
1 ton "aluminium" -> 5 materiel


I'd also raise average damage from combat by a factor between 2 and 4 and max received damage per combat would be a percentage of unit's max HP (20% to translate the actual value which is 15 damage max / 75 HP)

each unit would also have an anti-tank (AT)/ anti-personnel (AP) value that would have an impact on the ration of damaged/destroyed vehicles or/and wounded/killed soldiers.

When retreating: lose all damaged vehicles & wounded become prisoners

Prisoners are made during normal combat too and transferred to cities with PoW camps ASAP

I may add a building to raise production a bit in a city with a PoW camps


Healing would be processed this way:

reserve contains officer, personnel & vehicle
need personnel to resuply #personnel in reserve
need materiel to resuply #vehicles in reserve

each turn:

if linked to city:

all wounded -> city

healing (5 "equivalent HP" max / turn), calculate the max received materiel and max personnel separately

infantry
- linked city - > personnel/materiel to refill reserve (up to 5 equivalent hp)
- linked city -> personnel/materiel to frontline troops (if not reached the 5 hp/turn limit)
- reserve -> personnel/materiel to frontline troops (if not reached the 5 hp/turn limit)

mechanized unit
- linked city -> personnel to reserve (max 5 hp of equivalent personnel)
- linked city -> % of materiel per HP to repair each damaged vehicle (max 5 hp of equivalent materiel and if there is enough personnel in reserve to handle them)
- reserve - > repaired vehicles + personnel to handle them to frontline troops (if not reached the 5 hp/turn limit)
- linked city -> personnel/materiel (representing "vehicle production" here) to frontline troops (if not reached the 5 hp/turn limit)
- linked city -> materiel (representing "vehicle production" here) to vehicle reserve (if not reached the 5 hp/turn limit)
note: materiel in reserve is only used to repair, not to make a new vehicle "on the field"

if not linked to city:

wounded -> % healed to reserve personnel (if medic/field hospital promotion)
wounded -> % dead (more important without medic/field hospital promotion)

healing (3 "equivalent HP" max / turn), calculate the max received materiel and max personnel separately

infantry
- reserve -> personnel/materiel to frontline troops (up to 3 HP)

mechanized unit
- reserve -> % of materiel per HP to repair each damaged vehicle (if not reached the 3 hp/turn limit, and if there is enough personnel to handle them)
- reserve -> personnel to handle them + repaired vehicle to frontline troops (if not reached the 3 hp/turn limit)
- reserve -> personnel/vehicles to frontline troops (if not reached the 3 hp/turn limit)
note: materiel in reserve is only used to repair, not to make a new vehicle "on the field"

if no materiel left in reserve, the unit "bleed"

And finally a small preview of the font icons related to all this:



And felicitations to those who have read everything :D
 

Attachments

  • RED_WWII_FontIcons.png
    RED_WWII_FontIcons.png
    28 KB · Views: 296
I must say its going to be awsome! It remind me of an old game, 'Second Front' featuring the Barabarossa operation where the reinforcment came trought north/center and south HQ after being processed by the GHQ. All those HQ where mobile in some way and included airfield.
 
finally, I've got something working for the embarked units, I've updated the DLL code on gitHub, I can now switch to something else :)

Allow naval & embarked units to move through enemy naval units
Water plots can't be owned
Prepare options for inclusion of R.E.D. DLL for BNW functions
 
Now that I've solved my pathfinding problem (until we'll find the new bugs it must have generated...), I was able to advance faster on the coding this WE.

First I've converted the functions from RED DLL for BNW to the WWII mod, basically that means that the support fire and counter-fire mechanisms are now coded in C++ instead of Lua, and I've started to code the plot capture mechanism.

Then I've coded two major features, that will require a lot of testing:
- The Max Hit Points value can now be different for each unit, there is a new column <MaxHP> in the Units table to set that.
- I've also changed the limited stacking based on a limit using two different types of unit to a limited stacking based on a total weight per domain, ie the addition of each unit weight (<StackValue> in the units table) on a plot (cities could use different limit)

For testing I've set the plot limit to 100 (reusing "PLOT_UNIT_LIMIT" in the Defines table) and I've set:
"infantry divisions": weight 60, Max HP 400
"divisions": weight 60, Max HP 200 (medium tank, light tank, "elite" infantry & paratroopers)
"regiments": weight 30, Max HP 75 (artilleries, tank destroyer, assault gun, ...)
"heavy regiments": weight 39, Max HP 45 (heavy tank, heavy tank destroyer, ...)
"special forces": weight 20, Max HP 10

The damage are still limited to 20% of max HP, which means you can deal a max of 2 HP of damage per combat to special forces, or 80 HP/combat to an infantry division.

With those values, you can stack 1 "division" and 1 of any "regiment" or 2 "heavy regiments", or 3 "regiments" (that could include 1 "heavy")

See 999- FinalizeRules.sql in R.E.D. WWII Reloaded for an example of configuration that could be modified by any scenario.

There is nothing really playable yet, but tests are already possible on two maps, here are the projects in GitHub, that can be compiled with modbuddy for testing (except the DLL that require MS VS C++):

https://github.com/Gedemon/RED-WWII-Data <- v.6 beta 1 (if you use a gitHub client, you won't have to download everything with each update)
https://github.com/Gedemon/RED-WWII-Reloaded <- this will replace RED WWII Edition when released, it include the compiled DLL
https://github.com/Gedemon/RED-WWII-Test-Map <- small test map to play on with IGE or Firetuner
https://github.com/Gedemon/RED-WWII-World-Map <- It's not ready for edition with the WB yet (we need to add improvements/resources/cities names in the DB first)
https://github.com/Gedemon/Civ5-DLL/tree/RED_WWII <- the DLL (just in case you want to compile your own, rename it to CvGameCore_RED.dll)
 
Top Bottom