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

The Great Patriotic War: WWII on the Eastern Front (Development Diary)

Discussion in 'Civ5 - Creation & Customization' started by ww2commander, May 9, 2012.

  1. ww2commander

    ww2commander Emperor

    Joined:
    Aug 23, 2003
    Messages:
    1,243
    Location:
    Australia
    The Great Patriotic War: WWII on the Eastern Front

    This project is now 2 years 3 years in the making and is approaching close to Beta stage. Given the scale and complexity of this mod, my lone wolf approach has had to share time with real life, family and other priorities of life......so be patient with me!

    Scope
    • Human Players - USSR Only (this decision is based on game complexity and to focus in more detail on key events and objectives that the AI may not understand)
    • AI Players - Germany, Finland, Romania, Hungary, Italy, Slovakia, Allies (US/UK/Commonwealth)
    • Date - 22nd June 1941 through to 3rd June 1945 (207 turns)

      [*]Map
      - Eastern Europe stretching west-east from Dortmund Germany to the Ural mountains in the USSR, and north-south from Murmansk USSR to Bucharest Romania.

    UPDATED AS AT: 4th February 2015 13 November 2015
    Features
    • Custom Calendar (1 week per turn) - Complete
    • Seasonal change impacts game-play - Complete
    • Enhanced building production system - Complete
    • New artwork for icons, flags and leader screens - WIP (Ongoing)
    • Enhanced supply system (fuel and equipment) - Complete
    • Unit morale system - Scrapped (for now...too many issues!)
    • Seasonal weather system - Complete
    • Detailed scenario map - Complete
    • Units structured around historic personnel numbers and equipment - Complete
    • Custom events (i.e. city captures, partisans) - WIP (Down to the complex events such as Citadel, Stalingrad)
    • Lend Lease system - Done, but needs robust testing
    • Regions System - Complete
    • UI Changes - WIP (Around 80% done)


    Special Thanks (So far...)
    I want to thank the following people for helping me out with their guidance and tips as well as allowing me to use their code up to this point

    Gedemon
    danrell
    whoward69
    snafusmith
    Spatzimaus
    Pazyryk
    rhettrongun
    Wolfdog
     
  2. ww2commander

    ww2commander Emperor

    Joined:
    Aug 23, 2003
    Messages:
    1,243
    Location:
    Australia
    For some reason the IMG links I provided to my Flickr site did not work so here are the forum uploaded versions instead.
     

    Attached Files:

  3. ww2commander

    ww2commander Emperor

    Joined:
    Aug 23, 2003
    Messages:
    1,243
    Location:
    Australia
    Production Model Overview

    Industry, resources and their output will play a pivotal role to ensuring the front line can be defended and the eventual offensive can be taken in capturing Berlin.

    All players will utilize the new production model, however, the AI will need to receive some assistance in the form of bonuses to overcome the fact it is not aware of the production model developed to run concurrently with the game production system.

    Here is a diagrammatic example showing the strategic production model for the USSR player.



    Here is a break down of how the model works:

    Raw Resources
    These are the existing resources used by the game you would find on the map. In the scenario, these are referred to as raw resources as they alone are not sufficient for manufacturing equipment.

    The raw resources in the scenario are Iron Ore (used for Steel), Bauxite (used for Aluminum), Coal (used for powering buildings) and Oil (used for Fuel). There are also secondary resources in the form of Wheat and Horses which boost food production and the building of cavalry units respectively.

    Holding on to raw resources is critical in that the loss of, and insufficient quantities of, raw resources will eventually grind down your production to a stand still.

    Utility & Support Buildings
    Raw resources are converted into useful manufacturing resources that enable factories to produce the necessary equipment for building new units and resupplying existing units.

    Power Plants - Use coal and convert it into Power (energy) which is measured in GWh. Without power, factories will suffer blackouts and production lines will be halted reducing the output of equipment.

    Steel Mills - Convert iron ore and coal into Steel which enables the production of all equipment types.

    Aluminum Smelters - Convert bauxite, with the assistance of coal (to power smelters) into Aluminum which is extensively used in aircraft manufacturing.

    Oil Refineries - Convert oil into Fuel which enables the mobility of units in the game. No oil means no fuel, which in turn means your mechanized army comes to a grinding halt.

    Synthetic Fuel Plants (Germany only) - Converts coal into Fuel. This special building allows Germany to overcome its fuel handicap.

    Food Buildings - These buildings produce Food sources that feed your workers. Building types include farms, grain silos, harbors and water supplies. At this stage food is only consumed by your workforce and not actual units in game.

    Manufacturing Buildings
    The manufacturing resources output by your utility buildings are in turn consumed by your equipment factories which produce various equipment types. Unique structures exist for all the nations that reflect the production model utilized by each nation during the war.

    In the diagram, the USSR utilised a standardized approach to manufacturing where a Zavod (or factory) was dedicated to a specific production line throughout the war. These zavods are limited to producing a specific type of equipment and enable the city that contains them to produce specific units (i.e. a city with a heavy tank zavod will be able to produce KV-1 units)

    Germany on the other hand, has a very corporate driven model where various equipment types were scattered across companies. In game, most of the major German weapon companies are represented in their historic (or closest neighboring) city. As with the USSR factories, these companies are limited to producing specific equipment types and enabling a city to produce certain types of units (i.e. Henschel in Kassel can produce Tiger tanks).

    This model (whilst hard to code) has certain advantages in that it can limit production of rarer unit types and also force a player to produce a balance of unit types. Furthermore, factories are limited in quantity and possible locations through existing light, medium and heavy 'works' or infrastructure. These works represent a cities capacity to actual (or historically) support certain production lines.

    Equipment
    Equipment output is the end result of the production model. Equipment is stored as counters (i.e. similar to normal resources) and is used to enable the building of actual units. Want to build a Tank Brigade, then you will need to make sure you have enough of the specific equipment types used by the unit.

    Each unit in the game is allocated up to 6 structure entries that includes personnel and up to 5 equipment types. This structure is allocated across the hit point structure which means an infantry division will have more personnel assigned to its total HP then field guns and vehicles.

    As units fight, they lose equipment and personnel which is then replenished through resupply (similar to the WW2 R.E.D. mod system). Run the risk of having units cut off and they will not be able to get resupplied or refueled. Within a few turns, you will start losing a powerful force if not defended and position appropriately.

    Are you crazy, is this possible?

    Yes and yes. As you can see from the Live Tuner sample posted in the first post, the counters are live and working. The equipment counters are being finalized as well as the unit allocation system.

    Most of the system I have described above is implemented and working (more testing is required of course) and runs parallel to the normal game production system.

    New database tables and huge quantities of code assist in managing a large quantity of counters that ensure building, resource and unit levels remain productive. Of course the 'input' numbers will need to be balanced when the game reaches alpha stage, but for now things seem to work fine.

    That's all for now, more updates as things progress...

    Thanks for staying tuned! :D
     
  4. ww2commander

    ww2commander Emperor

    Joined:
    Aug 23, 2003
    Messages:
    1,243
    Location:
    Australia
    Update 11 May 2012

    Work progresses on the unit hit-point (HP) allocation system. Most of my time has been spent on trying to write code that will work with the spreadsheet data I have for units.

    The current concept I am trying to implement involves sub-dividing a units HP total across personnel and equipment. Thus a player can get a visual of the level of personnel and equipment in each unit when they hover over it or pull up a the unit summary screen.

    • Each unit will have a total of 72HP at full health.
    • Those 72HP are then sub-divided in a separate global table across personnel and up to 5 equipment slots.
    • A unit must have personnel at all times (meaning the last HP of health is always personnel only).
    • A unit can have anywhere from 1 equipment slot up to 5 depending on what is being represented in the scenario.

    A unit example
    June 1941 Soviet Infantry Division (72HP) consists of:
    • 40HP personnel
    • 20HP field guns
    • 12HP vehicles

    Thus every time the above unit receives wounds, it will have HP subtracted from across these three slots.

    When the unit is resupplied (assuming they are not cut off), the code will try to heal up to 6HP each turn based on current personnel and equipment available.

    However, the way the HP are healed is also predefined in that (using the infantry example), out of the 6HP that can be healed per turn, 4HP must be personnel, 1HP must be field guns and 1HP must be vehicles.

    This prevents a unit healing via the use of only one equipment slot or personnel alone. If the player does not have enough personnel, then the unit above will only receive 2 out of the 6 possible HP healing that turn. The same applies to equipment.

    Thus it becomes imperative to maintain the output of personnel and equipment during the scenario in order to both recruit new units and resupply existing units. Lend lease becomes even more important for the Soviet player as they will tend to burn through more personnel and equipment.

    So far I have the code working for storing the unit HP data and resupplying the unit. I am presently trying to figure out the most appropriate (yet random) way to remove HP wounds whilst maintaining some sensibility in the resulting data.
     
  5. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    8,762
    Location:
    France
    No comments yet, but I will follow this thread with interest :D
     
  6. ww2commander

    ww2commander Emperor

    Joined:
    Aug 23, 2003
    Messages:
    1,243
    Location:
    Australia
    I was starting to get the impression no one was interested :dunno:...especially given the appetite for WW2 scenarios on this board!

    Cheers and by all means happy to share ideas if it helps out with the more 'tailored' scenarios such as your latest Stalingrad scenario.

    Probably harder to implement a generic form of most of my code as there is liberal sprinkling of 'hard-coding' throughout it. This is especially the case with the building production model which is very German/Soviet centric.
     
  7. magzhi

    magzhi Warlord

    Joined:
    May 23, 2010
    Messages:
    197
    i am interested in this, but I was just impressed by your work and had nothing to comment on this. ^^
     
  8. Red Valhalla

    Red Valhalla Chieftain

    Joined:
    May 10, 2012
    Messages:
    7
    Nice work. I too will follow this thread avidly. Version to download and examine?
     
  9. ww2commander

    ww2commander Emperor

    Joined:
    Aug 23, 2003
    Messages:
    1,243
    Location:
    Australia
    At this stage I am developing the framework for the mod which means there is no map populated with units or events. Plus I am waiting to see what G&K has to offer to ensure the mod is compatible.

    I had originally added a wide selection of danrell's units, but now am having second thoughts and want to try the unit counter approach. My 'thread of frustration' in this section has proven that converting a simple square counter is extremely difficult!!!

    Not that there is a problem with danrell's units, but I want to make the mod a manageable download size (currently 100+mb) and reduce the slow down in-game due to too much 3d graphics....heck I still for the life of me can't figure out why civ went full 3d for a turn based counter style game!
     
  10. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,366
    Location:
    Near Portsmouth, UK
    Because it looks "cool" in a 30 second clip to "sell the game" to the Games/Computer press ;)
     
  11. ww2commander

    ww2commander Emperor

    Joined:
    Aug 23, 2003
    Messages:
    1,243
    Location:
    Australia
    Exactly. Everybody cares more about eye candy then playability these days!

    BTW whoward....hopefully now you have a good idea of the complexity I am dealing with when I sent that PM about custom screens. At the rate I am going, I might need a good half dozen custom screens.

    Is there any good reference sites on the web that explain how to do LUA/XML coding for graphics? I gather the approach Firaxis is using is based on some common coding architecture out there...or is it their own in-house technique?
     
  12. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,366
    Location:
    Near Portsmouth, UK
    If you're talking about 2D images ...

    Assuming you have the image as a jpeg or png file (or can create one of those formats) this tutorial explains how to add them either as icons for units, buildings, etc or images for part of the UI - http://forums.civfanatics.com/showthread.php?t=459392

    If you want to animate them within the UI (except for leader heads) see http://forums.civfanatics.com/showthread.php?t=460482

    And following your PM, I've started a "mind dump" of all the things I've learnt from my UI mods - see http://forums.civfanatics.com/showthread.php?t=461552
     
  13. ww2commander

    ww2commander Emperor

    Joined:
    Aug 23, 2003
    Messages:
    1,243
    Location:
    Australia
  14. ww2commander

    ww2commander Emperor

    Joined:
    Aug 23, 2003
    Messages:
    1,243
    Location:
    Australia
    Update 14 May 2012


    Work continues painfully on the HP damage allocation code. I have tried several different approaches with each one needing to be scrapped or re-engineered to give acceptable results that are both sensible and random. I am hopeful that the current version of the code will work in an acceptable manner.

    The key issues encountered when trying to sub-divided an overall HP total across personnel and equipment entries include:
    - Ensuring personnel retains priority as a unit still alive with only equipment is unacceptable
    - In doing the above, we don't exhaust equipment counters too fast
    - Managing 'negative' overflows once an entry is zeroed
    - Maintaining a threshold (acceptable loss level) depending on the overall HP total. We don't want to have a unit that has 50 out of 72 HP with one equipment entry completely zeroed already.

    This plus other weird outcomes have to be carefully balanced to ensure the player is not presented with confusing or funny results.

    In doing the above, I stumble across the following website which provides a java driven on-line emulator for different languages: repl.it

    This site allows me to cut/paste code snippets into self-contained functions which I then manually feed battle results in and see what prints out as the result. This has enabled me to work faster without having to test things by loading civ and pick out errors or unexpected results. Once a code snippet works, I cut/paste back into ModBuddy and modify to include game-references tables and objects.

    Will post outcomes of the HP battle system as things continue to progress.
     
  15. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,366
    Location:
    Near Portsmouth, UK
    Something I've been working on which may be of use for your "information screens"

     
  16. ww2commander

    ww2commander Emperor

    Joined:
    Aug 23, 2003
    Messages:
    1,243
    Location:
    Australia
    From reading your recent threads, I gather this uses the animation tags to grab the relevant level image in a larger image map file and then display it?

    Looks very useful and I will add it to my list of things to consider including.

    Thanks for the heads up....and I am eagerly anticipating your next update in your tutorial thread. :)
     
  17. ww2commander

    ww2commander Emperor

    Joined:
    Aug 23, 2003
    Messages:
    1,243
    Location:
    Australia
    Update 17 May 2012

    Progress this week has been a bit slower as real-life responsibilities receive more of my attention. However, the HP code is now 96% complete.

    After much hair pulling and testing (still need much more), the code seems to be doing what I want in a semi-random manner. At some point late in the evening, I concluded that units will be limited to a personnel entry and only 4 equipment entries as opposed to 5 equipment entries.

    It turned out that only one early scenario unit (Soviet Tank Division formation) requires 5 equipment entries, but I figured this can be modified to simplify coding efforts given that particular unit is only in play for a few turns (2 months).

    I plan to include some explanatory graphics in my next update outlining the mechanics of the HP system.

    Whilst working on the above, it dawned on me that implementing a morale system might not be as daunting as previously thought and am now giving consideration to how the mechanics might work in a way that does not require any awareness or understand from the AI (similar to my HP system and production model).

    Using ideas from my tabletop war-gaming experiences (one of my other hobbies), I figured I would try and emulate a system similar to those in my rulebooks which use various levels based on present +1 or -1 modifiers across a range from 0-10 points.

    Some modifiers might include:
    - Battle experiences (represented via automatic promotions)
    - HP level too low for too long
    - Supply cut-off for unit
    - Failed HP healing (lack of equipment for x amount of turns)
    - Weather effects

    Thus two things could occur if a unit fails morale, it either retreats or in some random cases surrenders.

    I will scratch down some calculations over the weekend and see if anything workable comes out of it!
     
  18. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    8,762
    Location:
    France
    Morale is on my todo list since a very long time, but I have not started any coding on it :D

    I agree it shouldn't be very difficult to code once the rules and effect are established.

    For individual morale, I'll add each victory and defeat (and the level of them aka large, small) to your list. I may also go for a 0-100 range with variable modifiers.

    And I was pondering using a national morale on top of that, based on territory gain/loss, city bombing, etc...
     
  19. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,366
    Location:
    Near Portsmouth, UK
    Nope, uses the <Meter> tag and its :SetPercent() method.

    The code and screen grabs for Part 4 are done, Part 5 code is mostly done (I got side-tracked by these meters), hopefully will get written up by the end of the week-end
     
  20. ww2commander

    ww2commander Emperor

    Joined:
    Aug 23, 2003
    Messages:
    1,243
    Location:
    Australia
    It probably makes it easier for me given I am dealing within a limit scope and some hard-coding for the player nation. However, I can understand why it may be a bit harder to do this on a broader multi-outcome mod like R.E.D. thus making it lower on your priority list. If you have any notes I will be more than happy to take a peak :mischief:

    On a side note, I am trying to avoid using the OnCombat events given their lack of triggering in strategic view. My reasoning is that with so many things to represent on the map and the scenario, some users may want to play it purely in strategic view to speed things up such as turn lengths and scrolling around the screen quickly.

    I have been making a note of all the tips and pointers on this board on how to speed things up such as restricting workers, eliminating combat animations (renaming XML entry fix as opposed to having quick animations on) etc.


    Can't wait for the update and to read more about these meters.

    Wishful thinking, but combining this wealth of knowledge and an open DLL would probably enable us to rewrite the vanilla interface into a wicked WW2 gameplay engine.
     

Share This Page