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

Gedemon's Civilization, development thread

Discussion in 'Gedemon's Civilization, a total overhaul project' started by Gedemon, May 7, 2017.

  1. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,119
    Location:
    France
    Update on gitHub, with an important bugfix for your treasury:
    Code:
    - bug fix : because of a careless "replace all", the export function was not using the foreign city list since a few updates, but the internal transfer list, causing a massive loss of income
    - bug fix : remove some warning/error notifications causing by a city capture (and the city key not yet updated in the tables)
    - try to fix synchronization between core/mod data for units when possible (still output an error message)
    - optimization : save trade routes with the game instead of recalculating each routes on load (which was causing 10+ minutes of loading time on Giant Earth with 63 civs at turn 250, and using more than 20GB of memory...)
    - separate function to check blocked path for supply line to unit (requires open border in foreign territory) and trade routes (only blocked by enemy units and enemy territory)
    - balance : raise City Center HP to 300 (was 200)
    - fix the debug logging function
    - remove table serialization at the start of the local player turn, add auto-saving at the end of that player turn
     
  2. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,119
    Location:
    France
    With the first expansion for Civ6 announced earlier than anyone had anticipated, I'm going to have to make the decision between coding for vanilla or moving to Rise and Fall.

    Pro:
    - new stuff to play with (units, buildings, districts, natural wonders ...)
    - new mechanisms to hook to (but see also cons)

    Cons:
    - new mechanisms to neutralize if we can't hook on them (depending of the methods exposed to Lua)
    - less accessible for players (need base game + expansion while the base game alone could be available at a very low price in the future)
    - require more work to convert the actual overriden UI files to the expansion UI files (at this point in the mod development, it's not a big issue, the early expansion is welcome if we decide to switch, and the more features I add before switching, the harder it gets)

    The list of features in Rise and Fall match some of what's planned in the mod, so on a first look it would seems very interesting to adapt those for the mod, but, if the new features aren't exposed to Lua and if we don't get the source code, it's more difficult to neutralize a feature from the core engine then rewrite it differently in Lua than directly write your own from the start in Lua.

    Just to use an example, the "free" state for a city that is under a revolution in R&F is similar to the state of the fake City State I was using in my Revolution mod for civ5 (and i'm planning to use in this mod) : that city is totally independant, it affect stability in nearby cities, you can't do diplomacy with it, you can (re)conquer it before it flip, and finally it can potentially flip to a new owner (or back to the initial owner) after a few turns post-revolution.

    But the trigger is very different, in one case it's the new "loyalty" mechanism of R&F, in the mod case it's a stability value that will be dependant of the population needs and culture groups relations, and the outcome (joining a civilization) would not use the same data.

    If Firaxis give us Lua methods to trigger the flip to/from "free city" and/or to change the loyalty value by whatever we define using our own data, then it's perfect and it saves a lot of coding time, else I'll have to completely neutralize the R&F loyalty mechanism before I could use my own, which could be trickier that it sounds (neutralizing the base healing mechanism for units before replacing it by the mod mechanism was not easy, and parts of my actual code about that is more hacky than I'd like it to be...)
     
    Last edited: Nov 30, 2017
    Knasp and Amom like this.
  3. gaborpesti

    gaborpesti Chieftain

    Joined:
    Nov 1, 2014
    Messages:
    40
    Omitting the expansion parts and focusing on bringing the rest to betaish?
     
    Knasp likes this.
  4. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,119
    Location:
    France
    Short term goal is still to bring a preview .2 showing the "smooth" upgrade path for units, yes :D
     
  5. dunkleosteus

    dunkleosteus Lieutenant Commander

    Joined:
    Aug 17, 2015
    Messages:
    402
    Location:
    Toronto, Canada
    Probably the best approach might be to wait after the expansion is released and see what happens. There will inevitably be a lot of bugs and the first post-expansion patch might fix some of these.
     
  6. kris159

    kris159 Kris P Bacon

    Joined:
    Oct 24, 2009
    Messages:
    99
    Gender:
    Male
    Location:
    Sheffield, United Kingdom
    Played about five hours of this mod, liking the direction so far. Just one thing that would be handy for UX, is to know what's the bottleneck for a unit healing. Is it materiel? Personnel? Weapons? Something on the tooltip of each unit or something would be helpful.
     
  7. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,119
    Location:
    France
    A kind of color-coding to show which components are missing in reserve?
     
  8. kris159

    kris159 Kris P Bacon

    Joined:
    Oct 24, 2009
    Messages:
    99
    Gender:
    Male
    Location:
    Sheffield, United Kingdom
    Possibly, or just a new line somewhere to say "Unit will not heal at full rate, shortage of x" if you can spare the real estate in the tooltip.
     
  9. heinous_hat

    heinous_hat Chieftain

    Joined:
    Sep 28, 2010
    Messages:
    520
    Location:
    under the weather
    I'd suggest going into "maintenance mode" until February... no new features. Try to fix the script desyncs, and polish up what you have so far.

    The new expansion looks like it's going to be really popular, based on the feature set. I'd think you'd want to stay with the crowd, in that regard. I think you have a superior combat and economic system, and there doesn't appear to be any overlap there. Last time around, source code was released simultaneously for the base game and the first expansion (G&K), was it not? If they follow that procedure again, you could be migrating a lot of functionality to C++ sooner, rather than later, while also being in sync with latest game version. Best case scenario, of course... fingers crossed.


    Biggest areas of concern, imho, from recent games:

    - Cities going out of sync ("error: cities turn unfinished for turn x..." sometimes displayed by UI, sometimes only in the log). I always restart, as it never rectifies. My most recent game is free of this error, for whatever reason... trying to find out what I may have done differently in setup.

    - Performance gets pretty ugly around mid-game, depending on map size, settings, hardware, etc; DLL migration will no doubt help a lot.

    - Difficult to micromanage unit supply cost, which is a highly frequent money siphon; maybe just a cost balance issue... I really like this mechanic, along with debt

    - Difficult to gauge when units are going to upgrade/downgrade based on resource supply. What is the threshold, given mixed equipment supply? Again, another really nice mechanic that just needs clarity.

    - Still a bit difficult to rectify food needs vs housing needs when trying to solve lack of growth. I generally look at housing first... if it's adequate, I make improvements and/or manually assign tiles. The awfulness of the civ6 citizen management UI really stands out here... too many clicks to make a manual assignment, or to simply view worked tiles.

    Apologies if any of these have been heavily covered in this thread or elsewhere. We just finished the long and arduous process of buying a house and moving, so more time to play and give feedback. And read the thread. I think... :shifty:
     
    Knasp likes this.
  10. kris159

    kris159 Kris P Bacon

    Joined:
    Oct 24, 2009
    Messages:
    99
    Gender:
    Male
    Location:
    Sheffield, United Kingdom
    I'm not convinced based on the feature set announced so far that it's worth the price for me. I'd at least want to know more details and be assured the snowball issue is fixed (on the narrative-vs-balance scale, there's quite a big gap between what I want and what Civ is), so selfishly I'd say to Gedemon please don't upgrade to the new expansion.

    Unfortunately though helinous_hat, I think you're right – it will probably be popular with everyone else, and the features do seem like solid additions. I'd say if the mod tools are there on release of the expansion, it's better to make the mod compatible and get that out the way while the mod is relatively small compared to later down the line. An upgrade to DLC is pretty much inevitable after all.
     
  11. Knasp

    Knasp Chieftain

    Joined:
    Sep 10, 2011
    Messages:
    101
    I'd say that moving on to the expansion should be the first choice, because the new features of Governors and City loyalty seem quite solid (as @heinous_hat said) and I think those features will add a lot to the mod's current design (if they are possible to implement). Also, I'd say that it is likely most Civ 6 players will acquire the expansion and some players will return to playing the game only because of the expansion.

    I wonder if it is possible that the new features could open new possibilities of changing City mechanics, even without the source code? Maybe they had to modify or add new functions to get Governors and loyalty working?

    Overall I agree with @gaborpesti that it makes sense to focus on parts of Civ6 that are likely not to be much affected.
     
  12. gaborpesti

    gaborpesti Chieftain

    Joined:
    Nov 1, 2014
    Messages:
    40
    I have a totally not related question (I have to admit I have yet to try out alpha but what I saw so far here I love it): How will game speed managed? I am pretty sure gamespeed mods will not work with it but due to the sheer size of Giant Earth and time a turn might take probably more speed is necessary to allow proper tradeoffs between realistic unit speed and reaching at least the medieval era without having 10+min turns.

    Also personally I liked to play Civ with those mods that only slow down era progression but not the build speeds to let actually enjoy what has been researched. I am pretty sure those mods will not be compatible with this one. Will it have some internal speed setting allowing something resembling a standard game, a marathon game and one where only era progression is marathon but industry feels like in standard?
     
  13. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,119
    Location:
    France
    Thanks all, we're on a debugging phase now.

    That's a possibility.

    While fixing core desyncs is a priority, the event's order may change with each patch, and the probability raise with an expansion, so I don't want to put too much work in it. ATM I'm adding correction functions as it seems that I can't prevent all cases.

    technically those are caused by some error in my code, most likely because an object has been destroyed (think captured city/killed unit) linked to the city making its turn and ending it prematurely (the way I handle city/unit functions, they can fail without outputing error messages, that why I've added a check to output an error if a city has not finished to call all functions required during its turn)

    I'd like the log when it happens to try to pinpoint the cause(s), in a new thread in the bug report forum with the beginning of the error message in the title if possible.

    I've done two long test games in the past weeks, and yes, mid-game the mod is massively slowing down any system, there is also an important memory leak to the point that 16GB are not enough to play more than a few turns per session.

    I've added some tools to output the process time of some functions when they take more than 0.5 seconds, the main issue is still the trade network.

    I plan to limit the number of automated trade routes going out of a city, and limit the distance of those route too, numbers may raise with eras/techs/buildings/policies, but we'll have to keep it relatively low, the trader units will then be the link between "local" trade networks.

    Maybe we could use 2-3 policy cards to allow the player to fix some limit, a kind of "budget" ?

    like "do not allow debt from unit reinforcement", "x gold/turn max for unit reinforcement", etc...

    no cards used meaning no limit.

    same for city construction/healing.

    The highest % of an equipment class type (Swords, Spears, ...) is the threshold, I'll need to put the total number for each group in the UI (ATM you have to add the % for each type like Iron Swords + Bronze Swords + Steel Swords = Swords class type)

    Specific UI is planned, but no massive UI work before the expansion, and (re)designing the population class is a pre-requisite anyway (see population thread)

    They have to if they need to control it in a scenario, else they'll do it in the source only, and only write the corresponding Lua methods for us if they have the time to do it (during civ5 development, some methods were added later, with patches)

    ATM the mod use the "Epic" timeline for the calendar (750 turns), "Standard" speed for production (with a small reduction in cost for military units), and Techs/Civics cost are raised by Era like this:
    Code:
    -- Reduce boost
    UPDATE Boosts SET Boost = 30; -- Default = 50 %
    
    -- Technology cost
    UPDATE Technologies SET Cost = Cost*1.00 WHERE EraType ='ERA_ANCIENT';
    UPDATE Technologies SET Cost = Cost*1.10 WHERE EraType ='ERA_CLASSICAL';
    UPDATE Technologies SET Cost = Cost*1.20 WHERE EraType ='ERA_MEDIEVAL';
    UPDATE Technologies SET Cost = Cost*1.30 WHERE EraType ='ERA_RENAISSANCE';
    UPDATE Technologies SET Cost = Cost*1.45 WHERE EraType ='ERA_INDUSTRIAL';
    UPDATE Technologies SET Cost = Cost*1.60 WHERE EraType ='ERA_MODERN';
    UPDATE Technologies SET Cost = Cost*1.80 WHERE EraType ='ERA_ATOMIC';
    UPDATE Technologies SET Cost = Cost*2.00 WHERE EraType ='ERA_INFORMATION';
    
    -- Civics cost
    UPDATE Civics SET Cost = Cost*1.20 WHERE EraType ='ERA_ANCIENT';
    UPDATE Civics SET Cost = Cost*1.50 WHERE EraType ='ERA_CLASSICAL';
    UPDATE Civics SET Cost = Cost*1.60 WHERE EraType ='ERA_MEDIEVAL';
    UPDATE Civics SET Cost = Cost*1.70 WHERE EraType ='ERA_RENAISSANCE';
    UPDATE Civics SET Cost = Cost*1.80 WHERE EraType ='ERA_INDUSTRIAL';
    UPDATE Civics SET Cost = Cost*2.00 WHERE EraType ='ERA_MODERN';
    UPDATE Civics SET Cost = Cost*2.20 WHERE EraType ='ERA_ATOMIC';
    UPDATE Civics SET Cost = Cost*2.40 WHERE EraType ='ERA_INFORMATION';
     
    gaborpesti likes this.
  14. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,119
    Location:
    France
    Let's try a quick list of requirements for a preview v.2

    - include equipment supply chain for air units
    - how to handle naval upgrades ?
    - removing promotion or auto-promote unit (handling "levels" requires a complete new feature has its not open to modding)
    - try to fix mid-game massive slowdown (limit the number/range of automated trade routes per city)
    - investigate mid game freeze
    - rough balance on cost/income
    - more basic UI informations
    - convert some policies to match the mod's mechanisms

    what's missing ? what should be prioritized ?
     
    gaborpesti, Amom and dunkleosteus like this.
  15. gaborpesti

    gaborpesti Chieftain

    Joined:
    Nov 1, 2014
    Messages:
    40
    I am not sure it is needed for a v2. By 1900 it probably slows down anyhow. Of course nice to support last eras but probably early eras count more in impact.
    The upgrade used by mod do not really fit if 1 unit models a single ship. In classical era 100 ship battles did happen, therefore in theory till 1850 the same approach should work as with the land. Problem is later when a single dreadnought is a force to be reaconed with. MAybe 2 ship divisions. Hovewer due to size probably not a must.
    A bug. Some workaround/ fix would be nice. You are a seasoned modder with significant track record and huge customer impact. Is there absolutely no chance to ask devs to make it moddable a bit more and return to it?
    If you have some solution in mind go for it. This is my secret worry of the feasibility of this mod - performance.
    See above.
    Some workaround would be nice.
    Good to have. My worry in the tooltip centric that size of real estate on tooltips limits introduction of new material types (Or how you call swords etc) A dedicated page would be awesome but I guess not implementable.
    Would be nice to start. At least the design.
    My personal ask is more speed option. It is something probably easier to build in than add later. Ideally 3 variant: Standard (Something that is faster yet not breaking mechanisms of upgrade - I would not use it but I hardly ever reached planes in a civ game. And probably at developement/balancing can speed up development/feedback cycles. ) Epic (What you have right now - optimise for it) Marathon (For ones like me - basically mostly Civics/Technologies/Calendar slowed down further. Probably weapon production is needed to be slowed down to keep the gradual update feature relevant.)
     
    Gedemon likes this.
  16. Knasp

    Knasp Chieftain

    Joined:
    Sep 10, 2011
    Messages:
    101
    Sounds good!

    Naval units is tricky, since ships are the basis for naval warfare and transports. I'm not an expert in this field so I'd be glad if someone could correct me on this but I have some ideas below:

    An easy solution to naval upgrades would be to simply keep the standard upgrade system of paying "gold", but require naval units to be in a Naval city/Harbour to do it.
    Ships require expertise and resources to construct and maintain. And rowyers were usually (in ancient Greece) free men who were payed wages to row the battleships. Another reason to keep a standard system of "upgrading" is that I guess you usually needed to build new ship designs from scratch.

    A possible design for naval units?

    Ideally you would handle naval units and naval battles different from land units. For example you could represent ships as a resource like personnel/chariots/weapons. Meaning that you'd build a "Fleet" unit in your naval city/harbor and within each unit (fleet) you could have varying numbers of ships, ship types (Biremes, Triremes, Quinquiremes), sailors and marines etc.

    The biggest difference to a land unit would obviously be that the number of personnel (perhaps being split into sailors/marines) are based on the vessel. Obviously, a ship can be boarded and captured, it can be rammed/damaged or it could simply flee / get lost.

    If a ship is sunk, some of the crew of that ship could possibly swim to friendly ships, they can get captured or else drown. (I think I have some data on this in my Google sheets "Naval battles").
    Though a ship can also be captured intact and the crew could be captured as well (and made to row the enemies ship?).

    A sunken ship would generally mean a loss of the related crew, while a captured ship could directly increase the power of the enemy navy.

    If you really want to go for it you could assign each ship a HP /durability that would be initially determined by level of craftsmanship, resources, tech, and then this would be lowered by storms, collisions by accidents, collisions in warfare, catapults, etc.

    Damaged ships can "only" be repaired when in port (Naval city/Harbour district). But new ships could be replenished through supply routes (like personnel and equipment on land).

    But how big should a fleet/naval unit be?
    One way to keep it flexible would be to allow indefinite stacking of naval units. So you could have as many of them as you can support.
    About fleets and ship composition I think it makes sense to use a somewhat different system. Unlike other resources, maybe the naval warship resources could require the player to actively build them through City production or a City project.
    If the player isn't actively building warships, the City will use its wood and personnel resources to construct fishing and trading vessels more or less automatically.

    Though one problem would be deciding how big a fleet should be?

    I don't know to what degree fleets in war spent time fishing or raiding coastal villages in order to restock their rations.

    Overall it makes sense to me to limit the size of the fleet to the amount of food that your naval Cities can supply them. Meaning that fleets of warships would require a more constant supply line. So there wouldn't be an upper cap of ships that you could have in your fleet, but getting more ships would require a good food supply and actively constructing those ships.

    A bonus of having a large fleet should be more/longer/intensified naval trade routes. Maybe even increased fishing?

    But what about embarked units?

    The only problem with the above mentioned design is the problem that is already present in Civ 5-6, which is that you can embark your land units.

    Maybe embarking land units should require having the ship resource in that unit. But since it would be weird to see random land units running around with a warship in their Camp. Perhaps a better solution would be to only allow embarking of land units from a Naval city/Harbour. The embarking land unit would take ships and personnel from the City's stock if available. Since there might not be ships for all soldiers, you could split the land unit and create a new embarked unit, just leaving the land unit drained of personnel and weapons.

    The embarked unit could then disembark on another shore, leaving the ship resource on the tile of the landing. Alternatively the ship resource along with sailors could stay on the water tile, and only the soldiers/marines would disembark.
    If the ship resource is left on the land tile then any unit going to that tile would capture that resource and be able to use it to embark into the adjacent water tiles.

    Although a ship resource for a land unit would also make sense when you want to cross a river or go up-/down-stream.

    So an alternative would be to remove thes early era naval units and instead replace them with ship resources that land units can appropriate. But I'm not very fond of that idea myself.
     
    Last edited: Dec 6, 2017
    Gedemon likes this.
  17. Leyrann

    Leyrann Warlord

    Joined:
    Jan 11, 2015
    Messages:
    2,841
    Gender:
    Male
    Location:
    Netherlands
    Just jumping in because of the vanilla vs expansion, I personally think that moving on to the expansion is preferable (though I may be biased because I'm buying it myself) as the mod is shaping up to be really complex, and I believe that it will therefore mostly be played by people who look for complexity - the same people who will buy the expansions because they want more features.
     
  18. gaborpesti

    gaborpesti Chieftain

    Joined:
    Nov 1, 2014
    Messages:
    40
    MY concern is which features are to be kept, which are to be modified, rewritten, and which are purged (therefore we do not benefit despite being awesome). For example the governor concept is something that might be fun in vanilla, however too unrealistic, aradic to use in this mod so unless totally repurposed, probably best to disable.
     
  19. heinous_hat

    heinous_hat Chieftain

    Joined:
    Sep 28, 2010
    Messages:
    520
    Location:
    under the weather
    1. Barring a permanent desync (which I've not encountered at all lately), the performance drop is what's causing me to abandon games that I'd otherwise like to finish.
    Haven't been able to evaluate late game as a result. So I'd make that a top priority, if others are having the same experience. I've encountered only one outright "freeze" (AI turn process gets hung... no irregularities in the log).

    2. The upgrade system is a little rough, but certainly a fun feature. Aside from UI clarity, there are some loose ends on the data side... a) there's no early recon, and later recon (rangers) evolve from ranged (I think?). b) lances aren't associated with any building, thus, no knights c) The past several games, I can't produce mounted units at all, despite being able to do so in prior games. I don't lack required equipment or resources... It's odd... mod build is identical. Not sure what I'm missing... d) Naval... upgrading one type of ship to another makes little sense. I'd suggest providing equipment/crew upgrades, but EOLing the unit itself.

    2.5 Promotions... maybe you could substitute "experienced personnel" for levels, and scrap the vanilla system. These veterans could accumulate from combat victories, like morale and such. Barracks and other military buildings could store surplus, or even slowly produce their own (to some limit).

    3. Cost/Income balance seems to have little consequence at the moment, because debt is basically a stub feature (waiting for instability, etc). You can go into massive debt with no problem (which is fine). However, something is causing a low turnout of AI military units in my games. AI players at war might have 8-10 units (mixed land & sea), while others have very few. There's definitely room for more, given stacking allowances. So, just speculating that (true) net income might be influencing vanilla AI build behavior. Just started looking at AI treasuries and GPT... not sure how this interacts with the mod script. My other thought here is that AI players might be getting hung up building housing (instead of units), due to the abundance of housing levels and types.

    4. Policies... I sort of have the impression that indirectly neutering policies, by removing their related game hooks (e.g. adjacency bonuses, city states etc) has actually balanced science and culture progression. Looking at my own progression along with AI players, it's been very reasonable and even, relative to the game calendar (and what happens with vanilla). No one is jumping out to huge leads, nor falling too far behind. AI expansion has generally been excellent, so I presume they're getting adequate science/culture yields from buildings. I'd be conservative with policy bonuses with regard to sci/cul.

    5. Housing... population seems to not be limited by housing, at the moment. I'm guessing you're going to go with "overpopulation" as a feature, and then implement consequences via instabilty, rebellion, etc. Is this correct?

    I have a pile of other notes that have been accumulating... I'll try to direct them to the related threads.
     
    Gedemon likes this.
  20. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,119
    Location:
    France
    small update
    Code:
    - the Builders can construct Forts
    - bug fix: no yield from removing features (could finish an unit with desynchronized data this way, to be replaced by another mechanism)
    - allow limited water ownership when a tile is adjacent to 3 land tiles of a Civilization (allow placement for Harbors district)
     

Share This Page