1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

R.E.D. World War II development thread

Discussion in 'R.E.D. World War II Edition' started by Gedemon, Jul 14, 2011.

  1. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,322
    Location:
    France
    from the "fall of" topic:
    simple, in DefinesEuro1940.lua find
    Code:
    -- Modifier for maintenance free units
    g_Units_Maintenance_Modifier = {
    	[FRANCE] = 0,
    	[ENGLAND] = 10,
    	[USSR] = 0,
    	[GERMANY] = 0,
    	[ITALY] = 7,
    	[GREECE] = 5,
    }
    
    and change the numbers (you can use negative values, I may try that for USSR)

    this table can be copied in others scenario defines files too if you play with them.
     
  2. MacLazer

    MacLazer Chieftain

    Joined:
    May 23, 2015
    Messages:
    43
    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.
     
  3. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,322
    Location:
    France
  4. MacLazer

    MacLazer Chieftain

    Joined:
    May 23, 2015
    Messages:
    43
    Judging by what I saw there, I haven't got that far, so nevermind. I'll just try with Norway or something...
     
  5. BeLikeWater

    BeLikeWater Chieftain

    Joined:
    May 26, 2015
    Messages:
    6
    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!
     
  6. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,322
    Location:
    France
    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.
     
  7. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,322
    Location:
    France
    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
     
  8. ruckingit

    ruckingit Chieftain

    Joined:
    May 22, 2015
    Messages:
    24
    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...
     
  9. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,322
    Location:
    France
    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.
     
  10. ruckingit

    ruckingit Chieftain

    Joined:
    May 22, 2015
    Messages:
    24
    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.
     
  11. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,322
    Location:
    France
    ATM I'm still collecting data for resource placement during the WWII era.
     
  12. DanAndStuff

    DanAndStuff Chieftain

    Joined:
    Feb 1, 2013
    Messages:
    10
    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 :)
     
  13. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,322
    Location:
    France
    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.
     
  14. DanAndStuff

    DanAndStuff Chieftain

    Joined:
    Feb 1, 2013
    Messages:
    10
    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!
     
  15. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,322
    Location:
    France
    can you open a bug report with your lua.log when trying to launch the mod with Faster Aircraft Animations please ?
     
  16. ilshur

    ilshur Warlord

    Joined:
    Feb 25, 2008
    Messages:
    250
    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.
     
  17. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,322
    Location:
    France
    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.
     
  18. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,322
    Location:
    France
    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
    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:

    For infantries

    for Air units

    For naval units

    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:

    if not linked to city:

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



    And felicitations to those who have read everything :D
     

    Attached Files:

  19. ZeroZeroSix

    ZeroZeroSix Prince

    Joined:
    Oct 15, 2008
    Messages:
    347
    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.
     
  20. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,322
    Location:
    France
    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 :)

     

Share This Page