1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Roadmap to Preview Version .2

Discussion in 'Gedemon's Civilization, a total overhaul project' started by Gedemon, Dec 11, 2017.

  1. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,111
    Location:
    France
    As discussed in the development thread, the current priority is to provide a second preview version (the first version is incompatible with the Fall patch)

    While waiting for the first expansion for Civ6 before pondering to update the mod for it or stick to vanilla, here are the points to work on:


    - Mid-game slowdown:

    The main issue here seems to be the mod's trade networks that are becoming massive once every civs on the map know each other and have a visibility on a lot of cities.

    ATM a city try to connect to every other cities in its trading range, I'm going to try to limit the number of possible connections (closest cities coming first), and lower the ranges of the different trade routes. I'll keep the trader units as they are in the first tests.


    - Naval upgrades:

    The difficulty here is about units scale, while it's fine to have multiple cities building and stocking "equipment" like swords, war horses or tanks before sending them to units requiring them (or when training an unit), building and stocking battleships and aircraft carriers would be an important waste of resources, and an "unit" represent a single ship.

    On the other hand, upgrading using gold like the vanilla system would shortcut the whole supply chain mechanism the mod is based on.

    An alternative would be to allow the action of "upgrading using gold", but then the unit would be automatically send to the nearest harbor (or coastal city), with 0 health and averything in "frontline" moved to "reserve", and "locked" there until the required resources are transferred using the healing mechanism of the mod to bring it back to 100% health. That way you don't lose the unit's current resources (materiel & personnel), XP and promotions (whatever mechanisms we decide to use for that) but don't magically gain resources you don't have access to (like "Steel" or other "equipment" we may use to define a "Battleship" or an Aircraft Carrier)


    - Promotions:

    The problem here is technical, I'd keep the current mechanism if we could (with different promotions type, but we're talking on how to assign promotions to units)

    For the organization level mechanism, I need to attribute temporary promotions to units, but to remove a temporary promotion, the only way I've found is to delete the unit and recreate it without the promotion(s) to remove. A literal overkill, but not so difficult to code.

    The real issue is that while we can reattribute the XP "points" of an unit, we can't set the XP "level", which means that the unit start again at level 1 and will gain a new promotion when it reaches 15 XP points.

    I don't have any easy-to-code solution here for short term development, I may either keep it as a "known issue" or disable promotions entirely.


    - Balance on Cost/Income:

    That's the most complex issue. I may change a bit the values to lower the speed of prices variations, but I don't think there is a point to balance the cost of "steel pikes", "Iron Swords" and "War Horses" while all those equipment are kind of placeholders until we have some complete unit lines

    It's also something that will require a lot of work on the UI to give a good feedback (we'll get graphs at some points BTW, I want them), but what we can do now is fixing some limits to expense per turn using the policy mechanism (and a minimal UI feedback to show if an unit is not healing because of that kind of limit, or if a city can't produce something because the resource cost is too high relatively to the fixed limit)

    And of course the "debt" being also a placeholder, it's not game breaking to lose a lot of money


    - Supply chain for Air Units

    That one is not hard, the code exist, it's just a matter of providing data (what building producing which resource/equipment for this or that air unit)

    I may use that one to provide a (relatively) more complex chain for later air units (like separating the buildings producing electronic equipment / engines / fuselage and the one assembling the aircraft)


    - Expand a bit the simplified units tree currently used

    I'd like to have a look at "Moar Units" (which would then be a requirement at first) to include at least some upgrades to the "skirmisher" line (actually starting at the slinger, stopping at the ranger), add a rifleman unit to the "infantry" line (and maybe an upgrade that is not mechanized to the "infantry" unit), and add an unit between the Knights and the Cavalry.

    For later development, Wolfdog's "Warfare Expanded" will be a great source too.


    - Fuel Consumption /Rationing

    That would be a bonus if I could include it.


    - Bug fixes

    That means testing all the above when available :)
     
    Last edited: Dec 11, 2017
  2. JonnyH13

    JonnyH13 Chieftain

    Joined:
    Dec 28, 2016
    Messages:
    2
    Gender:
    Male
    I think it would be best that you create 2 types of trade routes. Local automatic trade routes that form between cities less than a certain distance apart and can transfer all resources between them. And Actual trade routes that are created by traders and only trade finished products and luxury resources.

    An easy solution for your naval problem is to use a system of "parts" to create a ship ie iron -> Steel --> Naval Part --> Ship(A unit, not a resource) (it can be more complicated than that with more types of resources like electronics and fuel). In fact when it comes to equipment larger than personal weapons (ie chariots, tanks, siege engines.) the more advanced the equipment is, the more parts and types of parts it takes to create them.

    Also, you have already taken some steps into doing this, but how hard is it to make something like the "size matters" part of Civ 4 Caveman2Cosmos? All you need is to apply this to all units, have the appropriate strength values calculated, and the ability to change unit size manually and you basically have it.

    When it comes to promotions, Unit synergy promotions would do nicely. Personally I think you can do away with unit per tile limit if possible and implement a logistics system and promotion synergy like Civ 4 Realism Invictus. I am of the opinion that the less hard limits imposed the more opportunities there are.

    When it comes to the cost of equipment and resources, you need a standard unit. What does 1 unit of Iron equal to? A pound? A Kilogram? A ton? That is the first thing you need for all resources in order to determine what ratio of resources you need to produce this resource.

    The next thing is supply and demand and how goods are traded, which is complicated to say the least. With those units established, what does each person need? How will they get it? This then goes into the problem of what defines a person's job, what does he produce? How many produce that resource? How will they trade it for another needed resource? What is the demand for their own goods and what it is worth in relation to other resources. Bartering is complicated (Thank God for Currency!) which then means once you reach a standard unit of currency, what will that currency be based off? Gold? What if you have not discovered gold? Cocoa Seeds? Grain? A complicated system of weights and measures (needs mathematics of course!) though you can possibly abstract this part though but then you run into the problem of a lack of inflation/deflation and an accurate market economy if you have a set form of currency. There are many design choices you must make here.

    When it comes to a unit tree, it might be simpler to have a rock paper scissors sort of system between units with some units sitting in the middle of it all that are either support roles or require specific promotions to be specialized.

    There are many choices you have to make and this path is long but keep on going! I think you can take inspiration from other complex mods for past versions of civ. If they can do that for the older games and make it run, I am certain you can make your mod run here. Keep up the good work!
     
    Gedemon likes this.
  3. Knasp

    Knasp Chieftain

    Joined:
    Sep 10, 2011
    Messages:
    100
    Having every single ship as a separate naval unit will also bring problems due to the scale. It seems to me that having naval units representing fleets, is the best solution to avoid having say 300 separate ships as individual units. But maybe the option of having separate units could be added when choosing City-production?
    When you have a naval city you could choose either:
    • Build a new naval unit (single ship?)
    OR
    • Build new ship(s) for an existing naval unit
    A Civ in the classical era might have 2 naval units of Galleys and when choosing production for the naval city, you could choose between:
    • Build Galley (new unit)
    • Build Trireme (new unit)
    • Build Galley (fleet 1)
    • Build Trireme (fleet 1)
    • Build Galley (fleet 2)
    • Build Trireme (fleet 2)
    Considering that most players/AI doesn't build that many naval units and that there are few warships for each era, there shouldn't be a problem with having too many options available. Although to dissuade spamming of separate units, you could award a tiny combat strength bonus to every additional ship in a fleet (compared to having the same unit as a single ship). Or possibly reduce the building time/upkeep cost of reinforcing an existing fleet to give the player incentives.You could also add the option of merging naval units, into a single fleet, to reduce the number of naval units.

    Upgrading of naval units is tricky though. Transfering personnel and materiel to a new vessel should definitely happen. But you shouldn't be able to simply upgrade an existing bireme into a trireme, by simply paying some gold. The solution of moving the ship to harbour sounds better than gold upgrades.

    On the other hand, if ships are treated as resources then each vessel could have its own "life cycle", and fleets would need to be replaced continuously (by naval cities). Ships that aren't replaced (due to lack of resources/supply) would instead mean that the sailors (personnel) of the old ship would stay in the naval city, and wait for a new ship to be built (while working with fishing/naval trade). Maybe you could have Sailors as a specific resource and then you could have several types of sailors (representing different levels of training and experience). Ships/fleets that see a lot of battle could thus level their sailors, meaning that the crews would become more experienced and they could be "stocked" in a naval city even if you aren't building new ships.

    The wiki page on triremes illustrates the costs and labour involved, and I think it shows treating ships as resources to be a good idea:
    And also some interesting notes on naval warfare (at the time of the trireme):
    To sum up: Naval units should work the opposite way compared to land units. Constructing a naval unit should yield a ship (of a quality determined by shipbuilding tradition, tech, naval trade, presence of experienced sailors). In order to crew the ship you'd use regular personnel or possibly a new category of personnel called sailors. Sailors would represent personnel of varying experienced levels, which could be treated like weapon resources. So a ship crewed by personnel could be replaced by sailors. These experienced personnel can only be obtained by using your naval units (navigating, fighting etc) or you could obtain them by buildings in your naval city (or be gained from naval traders, fishing boats etc).

    Later eras could reduce the number of ships (or even get rid of fleets), simply due to ships being bigger, made of steel, requiring fuel, and being more costly to build and maintain. Removing fleets in a later era could leave room to allow a greater variation of individual naval vessels, like battleships, aircraft carriers etc.
     
    Last edited: Dec 13, 2017
    Gedemon likes this.
  4. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,111
    Location:
    France
    Thanks for the suggestions.

    I was referring to the "battleship" or "aircraft carrier" for "single ship" units, earlier units would represent multiple ships. Still unsure if I should represent the number of ship like for land units equipment, but I think I'll go for a triggered by gold upgrade followed by an automated transfer to an harbor to be refited.

    Specialized personnel may come later, not a priority, but it's a possibility.

    I can't do merging/splitting with the current modding tool (cf the old discussion about new actions and the problem of broadcasting them for other players in MP in the main thread, time taken by implementing a new UI for that, and finally coding the AI to use it)
     
  5. gaborpesti

    gaborpesti Chieftain

    Joined:
    Nov 1, 2014
    Messages:
    40
    I think even late game "Aircraft carrier" and "Battleship" can be a material and 2 of them compose an on map unit: Usually they operated in divisions of 2 and did not have 100% readiness anyhow.
    Probably aircraft carrier as unit should also need planes at least for CAP duty. Bombers probably better modelled as a moving airfield - though I never reached this stage of the game, therefore do not know how planes are modelled in vanilla, despite 300+ hour playtime logged on civ VI in steam....

    It would be even better if an on map ship unit (SAG - surface action group) would not only require 2 capital ship but a few escort as well.

    I dislike the idea to use "Steel" as equipment for it. A ship as it is not upgradable, its unit is.
    Though there is a merit in it as well. In RED WWII using material for repair kind of worked. But in that case it should absolutely not be upgradable....
     
  6. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,111
    Location:
    France
    Another possibility (as we're going to have units with limited "lifespan" when implementing non-standing army units) is to effectively completely remove upgrades for naval units and give them a limited lifespan (while lowering production cost, a least for earlier units)

    That or obsolescence at some techs, combined with a decay rate.

    No AI still using galley alongside submarines, no circumnavigation by a galley after a 4000 years exploration trip.

    A quick draft for a decay/obsolescence mechanism:

    - naval units require equipment or resources only during the construction phase (ie wood/steel/...)
    - active naval units lose a small bit of materiel (and so health) each turn
    - obsolete units does not receive materiel anymore from supply line (and will slowly die, personnel will be send back to nearest harbor/city on unit's death)

    Now that call another mechanism to handle experience at the personnel level, not the unit level as Knasp has started discussing.
     
  7. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,111
    Location:
    France
    Latest release should have fixed some early game breaking bugs, but my latest auto play got stuck at turn 426/750 (1830 AD)

    Seems to be an AI that can't end its turn, the game is not frozen (when it happens outside of autoplay you can still look at the UI and enter city screens or other reports) it's just that a turn never ends.

    No idea what's causing it yet, but it seems to be always triggered around this era, maybe something I've removed from the base game but that the AI is still expecting to use... If that's the case, it's a bug that would illustrate the difficulty of neutralizing vanilla features that are not needed by the mod (and explain why I want to take the time to ponder the potential transition to R&F, if we don't get the source code)
     
  8. heinous_hat

    heinous_hat Chieftain

    Joined:
    Sep 28, 2010
    Messages:
    515
    Location:
    under the weather
    I've seen this same behavior at least once. I'm not doing autoplays, but in the last game where I made it to the modern era, I did have an unending AI turn cycle. UI was still accessible, etc.

    Step through debugging would be nice, wouldn't it?
     
  9. Lacero

    Lacero Chieftain

    Joined:
    Dec 21, 2017
    Messages:
    3
    I had a look at the route finding code in github. It looks like it could be a bit faster, but you'd still need to limit the amount it runs.

    It doesn't seem to have an early out? Like if you only care if a route is shorter than one you know you can stop looking at a route once it grows bigger. Maybe I'm looking at the wrong bit.

    This looks like a one man project, but if that's something useful for you I could give it a go? Playing with the github release was pretty fun once I realised I could ignore debt :)
     
  10. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,111
    Location:
    France
    I can use help on coding, especially on optimization, but from the look of things, I don't think that the other parts I'd like to work on for the preview v.2 will be ready before the R&F expansion is out, and the first civ5 expansion was the time of the DLL source code release IIRC.

    So it may be safer to change my initial plan and wait to see if it's the same for civ6 before trying to change parts of the Lua code that would surely be converted to C++ ASAP

    On the other hand, this is just optimistic speculation, for all we know (IE nothing), the DLL could be released in two years or never, so far Firaxis has made no real promises about it.
     
  11. Lacero

    Lacero Chieftain

    Joined:
    Dec 21, 2017
    Messages:
    3
    OK. February isn't far away, and this should all be c++ you're right.
    I'll see how things look after release.
     
  12. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,111
    Location:
    France
    About the Balance on Cost/Income, I have a few suggestions that may not requires a lot of coding.

    The easiest would be to test with cost going down faster than going up, and give material a lower global cost.

    There is also the possibility to create separate budget, in a way similar to the debt: allow unlocking a military and a urban budget.

    For example a policy would reserve a percentage of your income each turn for the military, and all military expense would be taken from that budget first and from your treasury second, with a discount.

    Then there is the question on how to limit production/reinforcement (assuming we're setting a variable limit to the debt).

    With the current code, I may be able to determine the available gold for production and reinforcement (from budget + treasury + available debt), and share the part for production between cities then limit production in a city when it has reached its allowed portion of gold (that portion could be relative to the cities sizes), but that would be more difficult for units the way resources are reserved for them during cities "do turn".

    I could either do a first pass on units to get an estimation of the cost, then sort the units in a list and iterate it unit by unit and stop when the portion allowed for reinforcement has been reached (maybe with a turn timer on units to reinforce those who where not reinforced the previous turns first) or make a global estimation and reinforce units only if we have enough gold for all of them. But partial reinforcement for each units would require too many changes to the code.
     

Share This Page