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. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,382
    Location:
    France
    Open CultureDiffusionParameters.sql and change back the values in those lines if you want to be able to buy plots:
    Code:
    UPDATE GlobalParameters SET Value = 999999        WHERE Name = 'CULTURE_COST_FIRST_PLOT';    -- default = 10
    UPDATE GlobalParameters SET Value = 999999        WHERE Name = 'PLOT_BUY_BASE_COST';        -- default = 50
     
    Knasp likes this.
  2. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,382
    Location:
    France
    About the wood issue (could also apply to other resources), maybe I could try to reintroduce the harvesting action for builders, but without removing the resource on the first harvest (I could add a counter before the resource is depleted)

    If the action can be coded to be performed outside owned territories, then it also fixes the issue with the currently uncontrolled territory expansion.

    It would be natural to go for a complete "renewable/non-renewable resources" mechanism including possible resources depletion even without harvesting, but that would take more development time (and can still be introduced later anyway)
     
    Knasp likes this.
  3. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,382
    Location:
    France
    And small update on gitHub
    Code:
    - bugfix: allow construction of Caravels (but still working on the implementation of the later naval units and the upgrade)
    - bugfix: restore position of Cartography (Warfare Expanded was changing it)
    - typo: fix "enemy"
    I'll start some test on the upgrades for naval units next, and I'll also try to fix the Tercio issue.
     
    Knasp likes this.
  4. heinous_hat

    heinous_hat Prince

    Joined:
    Sep 28, 2010
    Messages:
    592
    Location:
    under the weather
    In Building_YieldChanges (buildings.xml), I replaced the housing data with the following...

    Code:
           <Row BuildingType="BUILDING_ANCIENT_UPPER_HOUSING_1"    YieldType="YIELD_GOLD"            YieldChange="1"/>
           <Row BuildingType="BUILDING_ANCIENT_UPPER_HOUSING_1"    YieldType="YIELD_CULTURE"        YieldChange="1"/>
           <Row BuildingType="BUILDING_ANCIENT_UPPER_HOUSING_2"    YieldType="YIELD_GOLD"            YieldChange="1"/>
           <Row BuildingType="BUILDING_ANCIENT_UPPER_HOUSING_2"    YieldType="YIELD_CULTURE"        YieldChange="1"/>
           <Row BuildingType="BUILDING_ANCIENT_UPPER_HOUSING_3"    YieldType="YIELD_GOLD"            YieldChange="1"/>
           <Row BuildingType="BUILDING_ANCIENT_UPPER_HOUSING_3"    YieldType="YIELD_CULTURE"        YieldChange="1"/>
    
           <Row BuildingType="BUILDING_ANCIENT_MIDDLE_HOUSING_1"    YieldType="YIELD_GOLD"            YieldChange="1"/>
           <Row BuildingType="BUILDING_ANCIENT_MIDDLE_HOUSING_1"    YieldType="YIELD_PRODUCTION"    YieldChange="1"/>
           <Row BuildingType="BUILDING_ANCIENT_MIDDLE_HOUSING_2"    YieldType="YIELD_GOLD"            YieldChange="1"/>
           <Row BuildingType="BUILDING_ANCIENT_MIDDLE_HOUSING_2"    YieldType="YIELD_PRODUCTION"    YieldChange="1"/>
           <Row BuildingType="BUILDING_ANCIENT_MIDDLE_HOUSING_3"    YieldType="YIELD_GOLD"            YieldChange="1"/>
           <Row BuildingType="BUILDING_ANCIENT_MIDDLE_HOUSING_3"    YieldType="YIELD_PRODUCTION"    YieldChange="1"/>
        
           <Row BuildingType="BUILDING_ANCIENT_LOWER_HOUSING_1"    YieldType="YIELD_FOOD"            YieldChange="1"/>
           <Row BuildingType="BUILDING_ANCIENT_LOWER_HOUSING_1"    YieldType="YIELD_PRODUCTION"    YieldChange="1"/>
           <Row BuildingType="BUILDING_ANCIENT_LOWER_HOUSING_2"    YieldType="YIELD_FOOD"            YieldChange="1"/>
           <Row BuildingType="BUILDING_ANCIENT_LOWER_HOUSING_2"    YieldType="YIELD_PRODUCTION"    YieldChange="1"/>
           <Row BuildingType="BUILDING_ANCIENT_LOWER_HOUSING_3"    YieldType="YIELD_FOOD"            YieldChange="1"/>
           <Row BuildingType="BUILDING_ANCIENT_LOWER_HOUSING_3"    YieldType="YIELD_PRODUCTION"    YieldChange="1"/>
    
        
           <Row BuildingType="BUILDING_MEDIEVAL_UPPER_HOUSING_1"    YieldType="YIELD_GOLD"            YieldChange="1"/>
           <Row BuildingType="BUILDING_MEDIEVAL_UPPER_HOUSING_1"    YieldType="YIELD_CULTURE"        YieldChange="1"/>
           <Row BuildingType="BUILDING_MEDIEVAL_UPPER_HOUSING_2"    YieldType="YIELD_GOLD"            YieldChange="1"/>
           <Row BuildingType="BUILDING_MEDIEVAL_UPPER_HOUSING_2"    YieldType="YIELD_CULTURE"        YieldChange="1"/>
    
           <Row BuildingType="BUILDING_MEDIEVAL_MIDDLE_HOUSING_1"    YieldType="YIELD_GOLD"            YieldChange="1"/>
           <Row BuildingType="BUILDING_MEDIEVAL_MIDDLE_HOUSING_1"    YieldType="YIELD_PRODUCTION"    YieldChange="1"/>
           <Row BuildingType="BUILDING_MEDIEVAL_MIDDLE_HOUSING_2"    YieldType="YIELD_GOLD"            YieldChange="1"/>
           <Row BuildingType="BUILDING_MEDIEVAL_MIDDLE_HOUSING_2"    YieldType="YIELD_PRODUCTION"    YieldChange="1"/>
    
           <Row BuildingType="BUILDING_MEDIEVAL_LOWER_HOUSING_1"    YieldType="YIELD_FOOD"            YieldChange="1"/>
           <Row BuildingType="BUILDING_MEDIEVAL_LOWER_HOUSING_1"    YieldType="YIELD_PRODUCTION"    YieldChange="1"/>
           <Row BuildingType="BUILDING_MEDIEVAL_LOWER_HOUSING_2"    YieldType="YIELD_FOOD"            YieldChange="1"/>
           <Row BuildingType="BUILDING_MEDIEVAL_LOWER_HOUSING_2"    YieldType="YIELD_PRODUCTION"    YieldChange="1"/>
    
        
           <Row BuildingType="BUILDING_INDUSTRIAL_UPPER_HOUSING_1" YieldType="YIELD_GOLD"           YieldChange="1"/>
           <Row BuildingType="BUILDING_INDUSTRIAL_UPPER_HOUSING_1" YieldType="YIELD_CULTURE"       YieldChange="1"/>
           <Row BuildingType="BUILDING_INDUSTRIAL_UPPER_HOUSING_2" YieldType="YIELD_GOLD"           YieldChange="1"/>
           <Row BuildingType="BUILDING_INDUSTRIAL_UPPER_HOUSING_2" YieldType="YIELD_CULTURE"       YieldChange="1"/>
    
           <Row BuildingType="BUILDING_INDUSTRIAL_MIDDLE_HOUSING_1" YieldType="YIELD_GOLD"           YieldChange="1"/>
           <Row BuildingType="BUILDING_INDUSTRIAL_MIDDLE_HOUSING_1" YieldType="YIELD_PRODUCTION"   YieldChange="1"/>
           <Row BuildingType="BUILDING_INDUSTRIAL_MIDDLE_HOUSING_2" YieldType="YIELD_GOLD"           YieldChange="1"/>
           <Row BuildingType="BUILDING_INDUSTRIAL_MIDDLE_HOUSING_2" YieldType="YIELD_PRODUCTION"   YieldChange="1"/>        
    
           <Row BuildingType="BUILDING_INDUSTRIAL_LOWER_HOUSING_1" YieldType="YIELD_FOOD"           YieldChange="1"/>
           <Row BuildingType="BUILDING_INDUSTRIAL_LOWER_HOUSING_1" YieldType="YIELD_PRODUCTION"   YieldChange="1"/>
           <Row BuildingType="BUILDING_INDUSTRIAL_LOWER_HOUSING_2" YieldType="YIELD_FOOD"           YieldChange="1"/>
           <Row BuildingType="BUILDING_INDUSTRIAL_LOWER_HOUSING_2" YieldType="YIELD_PRODUCTION"   YieldChange="1"/>            
    
        
           <Row BuildingType="BUILDING_ATOMIC_UPPER_HOUSING_1"    YieldType="YIELD_GOLD"           YieldChange="1"/>
           <Row BuildingType="BUILDING_ATOMIC_UPPER_HOUSING_1"    YieldType="YIELD_CULTURE"       YieldChange="1"/>
           <Row BuildingType="BUILDING_ATOMIC_UPPER_HOUSING_2"    YieldType="YIELD_GOLD"           YieldChange="1"/>
           <Row BuildingType="BUILDING_ATOMIC_UPPER_HOUSING_2"    YieldType="YIELD_CULTURE"       YieldChange="1"/>    
    
           <Row BuildingType="BUILDING_ATOMIC_MIDDLE_HOUSING_1"    YieldType="YIELD_GOLD"           YieldChange="1"/>
           <Row BuildingType="BUILDING_ATOMIC_MIDDLE_HOUSING_1"    YieldType="YIELD_PRODUCTION"   YieldChange="1"/>
           <Row BuildingType="BUILDING_ATOMIC_MIDDLE_HOUSING_2"    YieldType="YIELD_GOLD"           YieldChange="1"/>
           <Row BuildingType="BUILDING_ATOMIC_MIDDLE_HOUSING_2"    YieldType="YIELD_PRODUCTION"   YieldChange="1"/>
        
           <Row BuildingType="BUILDING_ATOMIC_LOWER_HOUSING_1"    YieldType="YIELD_FOOD"           YieldChange="1"/>
           <Row BuildingType="BUILDING_ATOMIC_LOWER_HOUSING_1"    YieldType="YIELD_PRODUCTION"   YieldChange="1"/>
           <Row BuildingType="BUILDING_ATOMIC_LOWER_HOUSING_2"    YieldType="YIELD_FOOD"           YieldChange="1"/>
           <Row BuildingType="BUILDING_ATOMIC_LOWER_HOUSING_2"    YieldType="YIELD_PRODUCTION"   YieldChange="1"/>
    
    
    Complete file is attached.

    I think there are some other buildings aside from housing that might benefit from the same treatment.. have to go trough another game and see what isn't getting built often. With the mod's design shifting the importance away from terrain yields (in favor of resource conversion), these small yield bumps seem to have little impact on balance.
     

    Attached Files:

    Gedemon likes this.
  5. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,382
    Location:
    France
    Thanks, I'll include them for my next game, production may be a bit too much, I'll see.

    I'm still working on the naval upgrades, small update on gitHub
    Code:
    - bug fix: land supply line shouldn't be allowed to start on water
    - add resources to units when pillaging (need to be tested)
    - allow "full" reinforcement of equipment (ie frontline and reserve in one pass) for units on city center or some districts (Harbor, Aerodrome, Encampment), to allow naval upgrade
    Should allow Galley -> Caravel in cities with a City Shipyard, once validated I'll add the other naval units.
     
  6. heinous_hat

    heinous_hat Prince

    Joined:
    Sep 28, 2010
    Messages:
    592
    Location:
    under the weather
    I had thought about the extra production, and it's spread pretty thin at +1 per instance, while also staggered with tech development... it doesn't have much impact early, nor with new cities. You end up with +6 from fully developed Ancient/Classical housing, but that takes a while. My impression was that materiel and resource availability was more of a limiting factor than hammers, but I'll take a closer look in my next game. I guess the only way to really gauge it would be to remove it and compare results.

    One thing is certain... those city tooltip building lists are getting pretty long. I like to run the game in a window at a custom 2:1 resolution, and it's becoming a challenge to read the lists ;)
     
  7. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,382
    Location:
    France
    In some instance too much production may prevent you to start building something because you won't have enough stock of resources for the first turn of production, let me know how it play.

    Maybe alternating the yield, like below ?

    Code:
          <Row BuildingType="BUILDING_ANCIENT_UPPER_HOUSING_1"    YieldType="YIELD_GOLD"            YieldChange="1"/>
           <Row BuildingType="BUILDING_ANCIENT_UPPER_HOUSING_2"    YieldType="YIELD_CULTURE"        YieldChange="1"/>
           <Row BuildingType="BUILDING_ANCIENT_UPPER_HOUSING_3"    YieldType="YIELD_GOLD"            YieldChange="1"/>
    
          <Row BuildingType="BUILDING_ANCIENT_MIDDLE_HOUSING_1"    YieldType="YIELD_GOLD"            YieldChange="1"/>
           <Row BuildingType="BUILDING_ANCIENT_MIDDLE_HOUSING_2"    YieldType="YIELD_PRODUCTION"    YieldChange="1"/>
           <Row BuildingType="BUILDING_ANCIENT_MIDDLE_HOUSING_3"    YieldType="YIELD_GOLD"            YieldChange="1"/>
    
     
  8. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,382
    Location:
    France
    And another update, trying the alternate yield on my side, and adding a few more naval units...

    Code:
    - add support/infrastructure for Privateer, Frigate, Ironclad, Submarine, Destroyer units
    - add "Electric Devices" resource build in Factory using Cooper when Electricity is researched, used for Submarine and Destroyer construction
    - add "Electronic Components" resource build in Electronic Factory using Cooper when Computers is researched  (not used yet)
    - add yields to housing buildings based on heinous_hat proposal
    - tweak : "Electronic Factory" and "Factory" are mutually exclusive
    - tweak : some Equipment (like ships) are not affected anymore by their supply/demand (but local price can still change from their required resources/equipment cost on construction)
    - tweak : move "Seaport" to "Steam Power"
     
  9. heinous_hat

    heinous_hat Prince

    Joined:
    Sep 28, 2010
    Messages:
    592
    Location:
    under the weather
    Yes, I had good results previously when granting strictly gold as the yield to all housing levels. Changing it to food, production, etc was just an attempt to be flavorful while testing how the AI made it's valuations. I also considered trying faith, since that's zero impact, but probably still valued in the calculation.
    Is it possible to do the same thing with pseudo-yields? I'm still researching how they work, but that would seem ideal.
     
  10. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,382
    Location:
    France
    Yes, pseudo-yields would be the way to go, but as the rules are really different here, in the end we may have to hardcode the city AI.
     
  11. heinous_hat

    heinous_hat Prince

    Joined:
    Sep 28, 2010
    Messages:
    592
    Location:
    under the weather
    Sounds reasonable, the mod's resource focus really turns the whole system on it's ear anyway. And baiting with yields does nothing to promote efficiency... like prioritizing a fish market in a coastal location, a blacksmith near multiple hills or iron deposits, etc.


    Early report with the latest on Git... AI isn't going for housing at all with single yields... not one instance after 250 turns.

    In both of my experiments, I used either multiples of a single yield (gold), or multiple yield types per instance. I think that's what bumped them up the popularity scale. In the case of using strictly gold, I had to inflate the value for lower class housing, so that it was most appealing. I think I used [3,2,2] for [lower, middle, upper], which got a lot of cheap housing built early, followed by the other types. When I switched to multiple yield types, I just sort of guessed that it would favor the food/production combo for lower class, which turned out to be true.

    What about giving housing instances dummy 'housing' values from the base game? Maybe it'll like that.
     
  12. heinous_hat

    heinous_hat Prince

    Joined:
    Sep 28, 2010
    Messages:
    592
    Location:
    under the weather
    So I tried this, and it didn't make any difference in AI preference... they built no housing throughout ancient and classical periods . My additions show up in the DB, so either I committed some other oversight, or housing doesn't have any weight in the calculation like I thought it might. They do build granaries like they're going out of style in vanilla, so who knows?

    Without starting a new game, I made some small changes to yields, adding +1 production to ancient lower housing, and +1 food to only the first level of middle class. That got the ball rolling, and AI cities quickly built lower and middle housing levels, with rising populations. What was interesting here is that they continued to build the variants to which I hadn't assigned extra yields. So the early instances would seem to be a good leverage point to get things started, without inflating overall yields. Unfortunately, it makes little gameplay sense (IMHO) to hand out additional yields for only a subset of early housing. I guess if this method is to be used, it might be best to stick with food as the "carrot", since that has less balance considerations. I'll try strictly food next time... it did work for middle class.

    I also looked more at how pseudo-yields function, but there are no buildings that utilize that, nor is it in the schema for the buildings table.


    EDIT: Other notes: Tercio desync seems fixed... Naval upgrade chain to caravel is working... Knights still do that looped downgrade to Horseman and back
     
    Last edited: Apr 11, 2018
  13. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,382
    Location:
    France
    It's possible that the vanilla AI build housing only when needed, and it's not needed in the mod.

    About the knight issue, I'd like a save if possible (in the bug report section)
     
  14. heinous_hat

    heinous_hat Prince

    Joined:
    Sep 28, 2010
    Messages:
    592
    Location:
    under the weather
    Will do, as soon as I see it again. It isn't happening in my current game, so it must be situational.
     
  15. Canabrava

    Canabrava Prince

    Joined:
    Jun 7, 2007
    Messages:
    391
    Location:
    Brazil
    My game have random crash to descktop. This mod is updated to last patch?
     
  16. Rado

    Rado Chieftain

    Joined:
    Mar 14, 2017
    Messages:
    21
    Gender:
    Male
    hi, just wanted to say thanks, it looks like it's going to be a marvelous game. can't wait to play it when it's finished. firaxis designers should learn from you.
     
  17. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,382
    Location:
    France
    I've changed back a few files to restore the mod to the above update, I had made a few test that are not going anywhere, the version on GitHub should be playable again in it's current state.

    But I'm sad to announce that I'm taking a temporary break from civ6, I'm now waiting for the source code release, as it's too difficult to manage units healing and reinforcement without a better control on the available events.

    I hope to be back once it's released, if it's not, I don't want to lose the works everyone has done here, I'll look for alternatives to implement all this (other game with better modding capabilities or open source versions, civ5, civ7, ...)
     
  18. heinous_hat

    heinous_hat Prince

    Joined:
    Sep 28, 2010
    Messages:
    592
    Location:
    under the weather
    That sounds perfectly reasonable, given the scope of the project. No reason to torture yourself using inefficient methods and workarounds, or compromising design because a method doesn't exist.

    I think what I'm looking forward to most (on the tactical side, anyway) is the introduction of reactive behavior for stacked combat... preparatory and counter fire for ranged units, etc. Obviously not going to happen without the full kit.
     
  19. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,382
    Location:
    France
    Break over.

    No, still no sign of the source code, but there is still some things I can do without it, so, here is a new (very important) update on GitHub:
    Code:
    - Add Recruitment Centre building available under some conditions and that spawn a melee unit based on city stock on completion.
    - Bug fix : restore ranged attack and correct combat values to the Field Cannon
    - Add limitation on drafting based on the percentage of the total population already in the army
    - Add logistic cost to some equipment
    - Add logistic support (by PromotionClass) based on the available personnel in the cities
    - Limit units production based on available logistic for their PromotionClass
    - Restore Floating Text after combat and when healing (with new FontIcons)
    - Add population data and logistic cost information in various place of the UI
    - Change "Ready For Action" -> "Frontline", "In Camps" -> "Reserve" and "Supply Train" -> "Rear" texts in units flags at the industrial era.
    - Virtual separation between urban/rural population in cities, ATM it's only affected by the current Era
    - Added "Urban Employment" effect (percentage of activity) based on the building in the city
    - The number of Resources collected on plots (and food yield) is now relative to the size of the city
    - The number of Resource produced in cities is now relative to the percentage of activity and the city size
    Spoiler Urban Employment :
    Clipboard-10.jpg Clipboard-16.jpg


    (see also my last posts here for more screenshots)

    It's a major update, balance must be completely broken, so I'll need your feedback :D
     
    Last edited: Aug 12, 2018
    Knasp likes this.
  20. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,382
    Location:
    France
    I like when something I've coded manage to surprise me...

    I was testing the new features, when Japan declared war, good situation to test the Recruitment Center, the previous tests were good, the mod checks that there is enough resources to spawn an unit with at least half health in a city before allowing to build a recruitment center, and I had double checked myself when launching the construction, so I was a bit surprised by the look of my new swordsman the following turn in that city...
    Clipboard-2.jpg

    After examining the logs, and reloaded the previous turn a few time, I finally found out what happened, the explanation was simple, as you can see:
    Spoiler Spoils of War :
    Clipboard-1.jpg


    During the turn to build the Recruitment Centre, the 3 attacking units had pillaged some resources from the city, including all the available Materiel (you get more loot when the city has no wall, like mine here...) and even if the new unit still had enough Melee Weapons and Personnel, it had no Materiel at all, and as you know if you've played the mod, all units requires it, so my swordsman here couldn't "heal" to operational statut...

    Well, finally I do think it works as intended...

    I mean, guys, seriously, you should have build walls there !
     
    Knasp likes this.

Share This Page