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

Gedemon's Civilization, development thread

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

  1. Zegangani

    Zegangani Warlord

    Joined:
    Oct 9, 2020
    Messages:
    296
    Gender:
    Male
    Hey Gedemon!

    As you removed the Leaders completely from the Game, how are the Civs behaving in the Game? I mean in terms of Relationships and Gameplay.
    And did you remove the Agendas (that actually come with Leaders) too, or did you assign them to the Civilizations? (I want to know if you can get Agendas from Buildings/Policies... with Modifiers (since they are Modifiers) while InGame).
     
  2. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,554
    Location:
    France
    they are just neutralized/hidden (and renamed as LEADER_EGYPT in the DB for example), so they just have the hidden agenda added, I didn't tried to work on the diplomacy too much, just done a few tweak and removed a few things, but I've not coded anything new to use the game's Agenda system.

    I had a quick look at the Canada-related modifier, but still unsure if we can build a diplomacy framework on it.
     
    Zegangani likes this.
  3. Zegangani

    Zegangani Warlord

    Joined:
    Oct 9, 2020
    Messages:
    296
    Gender:
    Male
    That's a DiplomaticActionType, anything related to that can be targeted towards a specific Civilization.

    Thanks for the reply!
     
  4. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,554
    Location:
    France
    yep, and I'd need it to be dynamic, so wondered if I could use SQL to generate (automatically) (a lot of) modifiers like "MODIFIER_SUPRISE_WAR_ON_PLAYER0_FROM_PLAYER1" then assign them in game using Lua (if those could be attached/detached to/from a player with dummy buildings or something else) to control diplomacy.

    No idea if/how the game would handle so many modifiers.

    I miss the good old GameEvents.CanDeclareWar (and similar test events) available in civ5 Lua.
     
  5. Zegangani

    Zegangani Warlord

    Joined:
    Oct 9, 2020
    Messages:
    296
    Gender:
    Male
    It looks like we can only set (not) favored DiplomaticActions and ban them, either for all Civs or a targeted one, but not force a civ for a scpecific action (except maybe with lua). But we can set a whole bunch of preferences, such as with "MODIFIER_ADJUST_DIPLOMATIC_ACTION_PREFERENCE", and make requirements for them. and we can also set a Combat modifier for diplomatic actions: "EFFECT_ADD_DIPLOMATIC_COMBAT_MODIFIER", used by Chandragupta "Can declare a War of Territorial Expansion after gaining the Military Training Civic. ...+5 [ICON_Strength] Combat Strength for the first 10 turns after declaring a War of Territorial Expansion".

    It's just that no one has tried to try and use them before. I mean, for a diplomacy overhaul.

    Seems that Civ5 is much better in terms of lua coding capabilities/possibilities. I hope Firaxis will keep add some new (accessible) effects with the the NFP Packs.
     
  6. Zegangani

    Zegangani Warlord

    Joined:
    Oct 9, 2020
    Messages:
    296
    Gender:
    Male
    We have also "EFFECT_ADD_DIPLOMATIC_YIELD_MODIFIER", used for example by Australias Curtin: "+100% [ICON_PRODUCTION] Production if they have either received a declaration of war or liberated a city in the past 10 turns.". We could use it to make a city generate less food if it's under Siege.
     
  7. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,554
    Location:
    France
    I had an itch to play a Civilization game, so I updated the mod to the latest patch, and pushed it on gitHub, in case there are still people wanting to try this.

    Code:
    - updated to 1.0.8.4
    About the development, I'm still unsure about the ideal modding platform for this project.

    Humankind doesn't have enough modding capabilities from what I've seen in the latest stream by Amplitude (but to be fair those capabilities seem to be more than what I expected at first), and Old World does have better capabilities than civ6 at this point, but on the other hand the scope of the game is only 1 era, expending that to the scope of a civ game would be an enormous task (on top of converting everything and code the missing features)

    Since I've stopped modding, there have been a few methods added to control diplomacy with civ6 Lua, still not enough, but we don't miss much for a diplomacy overhaul.

    The remaining issues to restart development on civ6 would still be the inability to make a combat overhaul, and of course the massive performance hit from the migration mechanism, knowing that frontline will also require some processing time when implemented, as well as the new supply line pathfinder I'd like to add for units...

    At this point we'll see soon enough what's the end of the NFP means for civ6 future (and, indirectly, this project).
     
    CyberPhy, c4c6 and Zegangani like this.
  8. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,554
    Location:
    France
    hotfix for compatibility patch...
    Code:
    - bug fix : City Banner for other players
    - bug fix : Missing Korean city names
     
  9. c4c6

    c4c6 Prince

    Joined:
    Aug 28, 2016
    Messages:
    462
    Provided it is economically successful enough, I'd be surprised if we don't see Medieval World, Industrial World, Modern ... sequels over the next decade ... ... since the days of civ2 & AC there has been the dream to continue a game in its sucessor incarnation.
    Beggars can't be choosers. In the long run of multiplayer on consoles maybe civ7 delivers just the compressed database (ready to unpack & use) without any XML files ... and civ6 looks like the paradise of yesterday.
    :D
    Prognosis concerning the future is perturbated ... see what I wrote on 20 Oct 2016:
    :D:D:D (I saw myself already modding the complete edition in autumn & winter 2018.)

     
  10. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,554
    Location:
    France
    I've played my game in LAN controlling 2 civs (using remote desktop and Internet Cross play), I knew the free Epic version would be useful at some point.

    I hadn't tested the mod since 2 years in MP, so there was a lot of desyncs every few turns, hopefully I've added a fix, now at turn 50, no desync so far, in a new LAN game.

    And a few fixes while I was at it.

    Code:
    - multiplayer fix : in Network Multiplayer, process all players turns when the local player turn start to prevent some data to appears out of sync during the AI players (simultaneous) turn and force a reload that is maybe not needed. This fix cause the AI units and cities to update (including healing) after the AI players have processed their turn, not before, like for the human player or in SP.
    - bug fix : remove muskets from the Conscript upgrade line (they were send to conscripts Pikeman that would use them as Pikes...)
    - bug fix : add a minimal required equipment (25%) when weighting an unit type based on its equipment list, this prevent upgrade to an unit type with multiple equipment required when it has enough of an equipment type to out-weight other unit types, but none of another required equipment (fix Horseman being able to upgrade to Cuirassier for one turn without any Rifles but enough Plate Armors for example)
     
  11. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,554
    Location:
    France
    And one very important point for MP, I don't know if it's from the base game or the way the mod use Lua scripts heavily, but the Host must be the slower computer. The game desyncs every turns if it's not the case.

    I don't know what happen when trying MP on PC with similar specs.

    Edit: getting desyncs every 2-3 turns since turn 75 now.
    Edit 2 : fixed by saving/re-hosting/reloading
     
    Last edited: Jan 28, 2021
  12. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,554
    Location:
    France
    Yes, but April is not that far. By then we'll have a few answers, I mean even no news at all about modding from Firaxis at that time would be an answer by itself.

    I'll give another try until then, see how much I can optimize the migration code, that would be another answer for the future of this project.

    I've added a button on the Lenses panel and hacked (again) into the Trader Lens to get, I think, a much better visual representation of Migration Routes than my previous (and buggy) attempt:

    upload_2021-1-31_13-17-26.png
     
    c4c6 likes this.
  13. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,554
    Location:
    France
    Ok, I've implemented my first new action made from scratch, MP compatible.

    No plan to implement it for the AI, it's a test, not sure if I'll keep it for balance, we'll see.

    I wanted something quite simple for a first try, while still having an usage in the mod. If you've played it, you may have started work on an unit without having enough equipment to finish it (say those bows or swords you've looted in Barbarians encampment in early game)

    To prevent you to have an half-build unit staying in the production list with wasted resources until you could get enough equipment for it, I've added a "rush" button (replacing the "buy with gold" button) to immediately spawn an unit that is currently produced (with a lower threshold at 25% production completed), for a few gold relative to the production left.

    The unit will spawn with only the equipment already reserved for it's construction, so with less health than a completed unit.
    Spoiler Rush Production screen :
    upload_2021-2-4_1-7-53.png


    With that done and tested in a local network game for a few turns and lot of half-build units spawn, I can now start looking at more custom actions related to the mod's mechanisms.

    For example, here's what I'm trying to implement next, UI almost done.

    Spoiler City Resources Production filter :
    upload_2021-2-4_1-9-17.png


    Micromanagem... naaaan. let's call that freedom of choice instead.

    I'd like this to be seen as an option, I'll try to balance the game that way, without a need to use this kind of screen for casual play.

    I mean I'm not a minmaxer, but I want to have a logical background simulation, and the option to act on it.

    And the way it's implemented I'm afraid that yes, for someone that need to optimize everything, this will lead to micromanagement. On the other hand, the ability to control what's build to prevent high equipment cost or wasting resource was a frequent request, one that I've postponed this long because it required testing new actions without desyncs in MP first.

    And the AI ? Well the point of trying to balance things so that this kind of control level stays an option for the human player will help the AI. And that how I'll try to implement other custom actions.

    In the end, I think I've already mentioned that, I'll go for asymmetric gameplay anyway, I don't really see how it would be possible to do differently with the level of control we have on the AI, the development time and a project that will implement Historical Spawn Dates at some point.
     
    Zegangani likes this.
  14. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,554
    Location:
    France
    And finally, a new update on gitHub, let see were this goes...

    Code:
    - New feature: can rush the current unit production with gold, the unit will spawn with the equipment already reserved for its construction and relative health.
    - New feature: can toggle production of resources in each buildings of each cities
    - New feature: add lenses option to show Migration Routes
    - Change: Migration from/to cities can not reach/come directly farther than ring #3 with an open land path length <= 5, and is going through each plots on its path to correctly update the Migration Routes
    - Optimization: only the Lower Class population migration is simulated for plot-to-plot migration to reduce processing turn, Middle/High Class population migration is still simulated for city-to-city migration
    - Bug fix: some equipment were damaged during combat, but hidden and never repaired, the unit's flag show that list, and a portion of the damaged equipment is repaired each turn
    - Balance: gain a little more materiel when defeating an opponent unit
    - UI: add names in the Resources tab in the City Panel Overview for better clarity, still need to move Research Resources in their own tab
    - UI: the Tech Tree can now handle Locked Techs in a research path (not used yet, as I still need to find a correct way to lock a tech from the AI)
    - Remove or hide game elements that have no use in the mod yet: Districts/Buildings added from DLC when launching a MP game, Religious specific buildings, Unique Improvements, World Wonders
    
     
  15. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,554
    Location:
    France
    usual hotfix:
    Code:
    - bug fix : do not Divide by 0 again
    - bug fix : possible UI/gameplay desync leading to nil object selection during "CityCaptureCityAddedToMap" event chain
    - add more warning/check to handle nil city/data
     
  16. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,554
    Location:
    France
    Working on the UI to filter which equipment an unit can require from (or send back to) cities.

    I may add a "view all" / "only available" toggle...

    Spoiler :
    upload_2021-2-7_23-17-17.png
     
  17. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,554
    Location:
    France
    Good news, it seems that since the MakePeaceWith method was exposed in May 2020 we have enough methods to completely rewrite Diplomacy.

    I was missing a way to Open/Close borders, but find out that was possible since a long time, being part of methods that I had not experimented enough with.

    I'll do some tests then may start a draft for a Diplomatic rewrite.
     
  18. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,554
    Location:
    France
    I'm adding a filter to the Resource Panel in cities, it had become unusable with the addition of Research Resources
    Spoiler :

    upload_2021-2-12_1-16-49.png
     
  19. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,554
    Location:
    France
    Update to implement all the above
    Code:
    - add an Equipment Restriction settings menu to units to handle if an equipment should be used normally, used but not send from cities, or used only when there are no alternative and send back to city ASAP
    - add a category filter to the Resources Tab in City Panel
    - split the Migration Route visualization into "Historical" (full game) and "Current" (last turn)
    - add a GameEvent to handle units capture (for keeping the unit's resource stockpile)
    - add a GameEvent to handle Settlers founding cities (to transfer the Settler's resources to the new city) 
    - founding a city on a feature will give the city the feature's resources
    - bug fix : unfinished city turn error caused by a bad table initialization
    - remove Crossbows from the Skirmisher Equipment Class (no related Unit in the upgrade path)
    - tweak resources/improvements placement
    The Assets mod has been updated too, but not for the Assets part, just to clean a bit the DB and fix Peltast not being on the Recon layer for mUPT.
     
  20. DemonEmperor

    DemonEmperor Chieftain

    Joined:
    Jan 17, 2017
    Messages:
    57
    Question - is it possible to run a bunch of the more static calculations during the player turn via terminatable coroutines, and have a list of explicit changes from the turn actions applied when you press turn end? By static I mean migration, resource increments, trade routes, population growth, etc.
     

Share This Page