[Mod] True Culture Location and Territory Naming for the Giant Earth Map

Discussion in 'Humankind - Creation and Customization' started by Gedemon, Sep 6, 2021.

  1. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    10,305
    Location:
    France
    v1.0.2.5 available on mod.io

    Changelog
    Spoiler :

    v1.0.2.5
    • feature: implement loading of .json files embedded in the "Resources" folder of an assetbundle of another mod or placed in the "Community" (or "Maps") folders and subfolders to add or update data for this mod
    • feature: add a "core" territory list with less territory per Empire when evolving, activated by the "Keep only Core Empire" choice in the territory loss option, thanks to FoxFox
    • balance: do not destroy immediately districts on minor faction decay
    • balance: restore trade routes from city loss after adopting a new Culture
    • balance: restore trade routes lost after the destruction of an Independent People faction's settlements on the end of its lifespan
    • balance: updating Civics statuses of a new Empire (unlocked/enacted) based on the statuses of the ancient Empire
    • balance: add Edo Japan to the noCapitalTerritory list
    • bug fix: do not prevent Empires from the "reserve" pool to settle new territories
    • bug fix: allow major Empire to spawn from a minor faction that only own the capital territory of that Empire's Culture (but doesn't have a city)
    • bug fix: don't unlock culture from a territory that is owned but not fully settled yet
    • bug fix: don't resurrect a player that doesn't have any army or city, but still has at least one city occupied by another Empire
    • bug fix: build the map territory hash with 256 entries, not 255.
    • logging: add all loaded faction definition names (including mods) to the log when starting a game

    v1.0.1.0

    All type of game:
    • up to 16 major Empires in game (10 slots from the setup menu + 6 AI "random" slots) for generated maps or the Giant Earth Map, even without using the TCL option (in that case you'll need AOM mod to allow duplicate cultures, or mods to add enough Cultures to the Ancient Era)
    • add option to start with an outpost on the spawn point (preventing AI players to settle in territories that won't unlock an ancient Culture)
    • add alternate starting positions options for the Giant Earth Map with closer spawn point matching the initial ancient Cultures positions
    • add option to set the maximum width of the Empire icons list on the top left panel

    True Culture Location only:
    • add TCL for minor factions (thanks @SeelingCat), with "strict" or "adjacent territories" options
    • one major Empires and multiple independent people can spawn from the territories lost by an Empire when adopting a new Culture
    • add an option to limit the number of Neolithic spawns, setting a pool of "reserved" Empires that will spawn later during the game, either when an Empire lost territories on adopting a new Culture, or evolving from independent people cities on their historical location
    • show a list of the lost territories before selecting a new Culture
    • add an option to set the level of compensation (in influence, money, science and production in Capital) per territory lost when adopting a new Culture
    • update Districts graphics for all historical territories of a faction when adopting a new Culture, spawning from the territories lost by an old Empire or evolving from an independent people city.
    • add an option to allow dead players to respawn as a new Empire when the "reserved" pool is empty
    v1.0.0.0
    • rename mod (and project files again, sorry)
    • use in game options
    • clean up the code to call the UI layer showing the territory names on the map

    Alpha 7
    • reorganize project files
    • add andrew's game option framework (not used yet)
    • add full list of (Latin) territory names thanks to SeelingCat
    • update starting territories list

    Alpha 6.1
    • fix a check that wasn't preventing multi-empire culture from being locked by first selection
    Alpha 6
    • converted to BepInEx module
    • add configuration options
    • unlock Olmec for slots 9 and 10
    Alpha 5
    • updated to patch [1.0.3.253]
    Alpha 4
    • update territory list.
    • add Phoenicia to the Culture list allowed for multiple Empire.
    • add Liberation/Freeing of territories that does not belong to the territory list of the new Culture

    Alpha 3
    • Fix backup Culture (Assyria ATM) not available for an AI once selected by another AI
    • Set Goths, Norse, Celts as Cultures available for multiple players
    Alpha 2
    • Build for patch [1.2.139]
    • Add a check for the Giant Earth Map, the code will not run on other maps, no need to swap the DLL
    • Unlock Assyria for slots 7 and 8 when using the 8 players version of the map
    Alpha 1
    • Initial release with unlocking Territories set for all Cultures

    source (gitHub)

    Installation instructions, descriptions and credits/thanks are on mod.io

    See the posts below for "How to use a .json file for mods or maps compatibility" and "How to get the diagnostic file for a bug report"
     
    Last edited: Dec 4, 2021 at 4:34 AM
  2. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    10,305
    Location:
    France
    How to use a .json file for mods or maps compatibility


    The .json file name must end with "TCL" or "tcl" for example "MyMapTCL.json"

    You can create the .json file in the "Resources" folder of a humankind mod project, it will be embedded in the assetbundle when you build it and can be read by the mod.

    You can also directly place it in your "\Documents\Humankind\Community" or "\Documents\Humankind\Maps" folders and subfolders

    Spoiler .json example :

    Code:
    [
        {
            "LoadOrder": 1,
            "MapTerritoryHash": [ -819807177, -288044546 ],
            "MajorEmpireTerritories":
                {
                    "Civilization_Era1_Phoenicia": [ 188, 190, 106, 127, 95, 100, 99, 22 ],
                    "Civilization_Era1_EgyptianKingdom": [ 128 ]
                },
            "MajorEmpireCoreTerritories":
                {
                    "Civilization_Era1_Phoenicia": [ 188, 190 ],
                    "Civilization_Era1_EgyptianKingdom": [ 128 ]
                },
            "MinorFactionTerritories":
                {
                    "IndependentPeople_Era1_Peaceful_Akkadians": [ 142, 123 ],
                    "IndependentPeople_Era1_Peaceful_Elamites": [ 243 ],
                    "IndependentPeople_Era1_Peaceful_Noks": [ 220 ],
                    "IndependentPeople_Era1_Peaceful_SC_Dilmun": [ 0, 1 ],
                    "IndependentPeople_Era1_Peaceful_SC_Dmt": [ 2, 3, 4 ]
                },
            "ExtraPositions":
                {
                    "0": { "Column": 32, "Row": 41},
                    "1": { "Column": 40, "Row": 51},
                    "2": { "Column": 56, "Row": 55}
                },
            "ContinentNames": { "0": "Oceans", "1": "Americas", "2": "Eurasiafrica" },
            "TerritoryNames": { "202": "Pampa", },
            "NomadCultures": [ "Civilization_Era2_CelticCivilization", "Civilization_Era2_Goths" ],
        },
    ]


    The only mandatory section is the "MapTerritoryHash", used to identify the map to use the data with, the mod output it in the log when starting a game, in the example above "-288044546" is the Giant Earth Map 1.1.1.1 and "-819807177" is the Giant Earth Map 1.1.1.0.

    This section is a list, as you the hash will change if territory sizes change, but the content (TCL, names, etc) may still be valid for small variations of the same map.

    If a map is updated and its hash changes, the content of the .json file will not be loaded with that map until it's updated to use the new hash.

    Here is how the current hash is displayed in the diagnostic log (found in "\Documents\Humankind\Temporary Files")




    The other optional sections:
    • LoadOrder : data from the file with the higher value will overwrite data from files with a lower value
    • MajorEmpireTerritories : the default list of territory indexes used for TCL, representing a Major Empire territories, the Capital being the first entry
    • MajorEmpireCoreTerritories : a reduced list of territories, activated with the "Keep only Core Empire" option
    • MinorFactionTerritories : TCL for independent people
    • ContinentNames : pairs of Continent index - name
    • TerritoryNames : pairs of Territory index - name
    • ExtraPositions : allows to set a list of alternate start positions, used when there are more than 10 player slots in a game (described as "old world only" in the options)
    • ExtraPositionsNewWorld : alternate start positions, full map
    • NoCapital : list of Cultures without capital (any territory from the list will unlock them, and they can be adopted by more than one empire)
    • NomadCultures : list of Cultures that never need a city to unlock a new culture
    When there is a default entry set directly in the mod (all vanilla cultures and all territory/continent names for the Giant Earth Map), any entry with the same "key" (faction name, territory/continent/slot index) will replace it's value, and when it does not exists it's added.

    For example that section in the example above
    Code:
            "MajorEmpireCoreTerritories":
                {
                    "Civilization_Era1_Phoenicia": [ 188, 190 ],
                    "Civilization_Era1_EgyptianKingdom": [ 128 ]
                },
    means that the existing list of "core" territories of Phoenicia and Egypt will be replaced by the territories listed here.

    You can provide support for multiple maps in one file, for example
    Spoiler .json example :

    Code:
    [
        {
            "LoadOrder": 1,
            "MapTerritoryHash": [-819807177,],
            "MajorEmpireTerritories":
                {
                    "Civilization_Era1_Phoenicia": [ 188, 189, 190, ],
                    "Civilization_Era1_EgyptianKingdom": [ 127 ]
                },
            "MajorEmpireCoreTerritories":
                {
                    "Civilization_Era1_Phoenicia": [ 180, 189 ],
                    "Civilization_Era1_EgyptianKingdom": [ 127]
                },
        },
        {
            "LoadOrder": 1,
            "MapTerritoryHash": [ -288044546, ],
            "MajorEmpireTerritories":
                {
                    "Civilization_Era1_Phoenicia": [ 188, 190, 106, 127, 95, 100, 99, 22 ],
                    "Civilization_Era1_EgyptianKingdom": [ 128 ]
                },
            "MajorEmpireCoreTerritories":
                {
                    "Civilization_Era1_Phoenicia": [ 188, 190 ],
                    "Civilization_Era1_EgyptianKingdom": [ 128 ]
                },
        },
    ]


    The full territory names and indexes for the Giant Earth Map can be found in the first post of the map's thread.
     
    Last edited: Nov 29, 2021
  3. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    10,305
    Location:
    France
    How to get the diagnostic file for a bug report


    You'll find the log in the Temporary folder of Humankind in Document, sort them by date and zip then attach the last one to your post



    To check if the mod is causing the issue, you can open them in your web browser, and check the first (by time stamp) "critical" line near the end of the file



    if you click on "stack" it gives more details, please note that a text copy of a log without details can't help to diagnostic a bug.



    If one of the white lines in the detail start with something like "Gedemon.TrueCultureLocation" instead of "Amplitude.", then the mod may be the issue, and I'd really like to see the full log.

    Note that there are also a lot of colored lines tagged with [Gedemon], those are the mod's "normal" log line, grey, yellow or even red when I want to find them quicker.
     
    Last edited: Dec 4, 2021 at 4:32 AM
  4. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    10,305
    Location:
    France
    Spoiler Original post :
    There have been a lot of discussion about the Culture change each era and how players are either confused by it and/or find it immersion breaking.

    But, as for civ6 AI, when you ask about it almost everyone would say that it should be "fixed", once you start actually debating about "how to fix it ?", you'll find out that there are almost as many different opinion as there are people playing the game...

    So, some kind of Culture Tree as an option or a mod, there is a demand for that, okay.

    But how to implement it ?

    Well at this moment, I've not seen anyone coming with an answer that is not almost as immersion breaking at some point than the current implementation.

    So I've been working on a mod for the Giant Earth Map that offer a potential alternative, but is dependent on fixed maps, which is unlocking Cultures depending on the territory you're owning.

    I'll release a first simple version ASAP, working on the 4th era Cultures territories at this moment.

    That version would be simple: if you own the territory of the Capital of a new Culture (or one of the initial territories of a Culture in some cases, like the Huns, Goths, Celts, Norse...), you can evolve into that culture.

    I'd like to discuss a bit further the concept, as currently it allows an African/Asian Culture to set an outpost on France, Germany, Scandinavia and upgrade to Frank, Teutons or Norse while most of its territories are still in Africa/Middle East/Asia.

    My idea would be to still unlock the Culture based on the Capital's territory, BUT when evolving you'll only keep the territories related to the new culture and all the other would be liberated.

    Thoughts ?
     
  5. Tigranes

    Tigranes Armenian

    Joined:
    Sep 11, 2008
    Messages:
    9,827
    Civ and HK offer two extremes of the real history. In Civ you are Ancient Egypt for 6000 years, and no one finds it weird or immersion breaking. In HK you can go Egypt > Greece/Rome/Persia > Umayyad > Ottomans > British > Egypt (so silly they have 2 cultures named Egypt, btw). But of course you can start as Egypt and all "historically plausible" next era culture can be taken so one will end up selecting Mayans and it will break the immersion, while creating 1.5 mln possible civilizations, if you do some combinatorics.

    Capitals can be moved without penalty in HK, so instead of focusing on it I suggest to focus on the loosely defined "historically plausible" cultural connections. Generate the list of historical connections between every single culture across the 6 eras. If you can think of any connection associated with your current culture with the next era culture -- you can pick it while changing eras. Otherwise you will have to transcend. Here is some examples:

    Mycenaeans, Celts/Romans, Franks, Spanish, French, Americans
    Mycenaeans, Romans/Goths, Umayyads, Spanish, French/Mexicans, Americans
    Olmecs, Mayas, Aztecs, Haudonesanee/Spanish, British, Americans
    Zhou, Huns, Mongols, Ming, British/French/Siamese, Chinese
    Hittites, Huns, Mongols, Poles, Russians, Soviets
    Hittites, Achaemenid Persians/Greeks/Romans, Byzantines, Ottomans, Persians, Turks
    Mycenaeans, Celts, English, Spanish, British, Americans
    Mycenaeans, Goths, Norsemen, Poles, Russians, Swedish
    Mycenaeans, Goths, Teutons, Spanish, Germans, Americans/Swedish/Soviets
    Harappans, Mauryans, Khmers, Mughals, British, Indians
    Zhou, Huns, Mongols/Khmers, Edo Japanese, Siamese/Russians, Japanese
     
    Meluhhan likes this.
  6. gunnergoz

    gunnergoz Cat Herder

    Joined:
    Jul 16, 2002
    Messages:
    2,307
    Gender:
    Male
    Location:
    Southern California
    I was one of the loudest whiners about how I found Humankind's cultural transitions jarring. TBH, it still is but less so the more I play and enjoy the game.
    What I complain about now is the idea of being limited in my next choice of culture - though, now that I think about it, given the concept that this is tied to history and global locations, it makes absolute sense. I suppose this game is bound to give rise to confusion to people like me who like to identify with certain cultures. Having them change underfoot takes some getting used to.
    Anyway, I'm curious to see how it works out as described here, it is intriguing. Carry on.

    Moderator Action: Changed a word without changing context. Please use appropriate language on the forum. Thanks. leif
     
    Last edited by a moderator: Sep 6, 2021
  7. UncivilizedGuy

    UncivilizedGuy The Village Idiot

    Joined:
    May 24, 2012
    Messages:
    878
    Location:
    Land of the Lost
    I'm impressed that this is possible without any modding tools. It's a fantastic idea. Hopefully it translates to more interesting gameplay. I know sometimes things look better on paper before they're actually implemented.

    After evolving to a new culture do we retain the territories of the earlier culture? I'm still trying to visualize how this progression will work. I'm assuming culture selection will still occur at the beginning of every era.
     
  8. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    10,305
    Location:
    France
    Currently yes, but that's what I'm pondering to change.
    Yes, with the selection based on your territories at that time.
     
  9. UncivilizedGuy

    UncivilizedGuy The Village Idiot

    Joined:
    May 24, 2012
    Messages:
    878
    Location:
    Land of the Lost
    I suggest creating two versions so that we can give some feedback. It seems that having my empire shrink in size after an era change might feel penalizing. A lot of time and effort wasted. Do you have a real world example to back up your idea?
     
  10. Siptah

    Siptah Eternal Chieftain

    Joined:
    Jul 24, 2016
    Messages:
    5,461
    Location:
    Lucerne
    I think the up and down from switching cultures is a great idea. Can‘t wait to give it a try.
     
  11. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    10,305
    Location:
    France
    Yes, as I'll release the simple version first, the second would need additional coding.

    Yes, but there are a lot of people complaining about snowballing ATM, you can't counter that in an exponentially growing Empire without any sort of slow down somewhere in the process. I get that most people don't like penalties in gaming now, but I prefer some kind of limitation to infinite growth.

    Now, to balance you also need to slow down Empire that keep their previous culture. A sort of decadence mechanism. Keep (or even raise) the bonus in fame in that case, but slowly lower the other yields (gold, influence, science, production, stability)

    No, as the game use Fame to determine the winner. And there are multiple way of doing that, the fast coded version could use "liberation" of previous territories, giving the new Empire an advantage over the other for its relation with the new independent factions, and could integrate back some territories this way.

    Long-term version could use Stability as the main factor for example, you would have the choice to keep the previous territories, but the Capital location would move and be locked to the new Culture location, and Stability would be relative to the distance to the capital, the further away, the lower.

    Of course, some locations on the map would be much more interesting than some others, but as long as there are more than one, it's fine IMO.

    British Empire -> U.S.A.
    Either you stay the "British Empire", or you become the "U.S.A" in America, but you don't become the "U.S.A" while keeping control of the whole "British Empire"

    Franks -> France, Holy Roman Empire
    Either you stay "Franks" with the whole territory, either you become France or Holy Roman Empire with a portion of the territory.

    And Rome before that of course.

    edit: If possible, I'd like to spawn new Empire as the game progress, ie instead of giving the old empire to independent people, give it to a new major player. Or spawn them from splitting the territory of a decadent AI empire.
     
    UncivilizedGuy likes this.
  12. UncivilizedGuy

    UncivilizedGuy The Village Idiot

    Joined:
    May 24, 2012
    Messages:
    878
    Location:
    Land of the Lost
    Interesting way to look at it. The fact that we can remain the original culture makes this an acceptable approach, IMO. Thanks for the thorough response.
     
  13. fortydayweekend

    fortydayweekend Warlord

    Joined:
    Nov 20, 2009
    Messages:
    239
    I can imagine the epic struggle between the Zhou and Mauryans to control Cambodia in every game :) Maybe the Huns too, or even an enterprising Greek.

    I like the idea of it still being more or less in the players control rather than dictating what cultures you can have. It is an alternate history after all. It would be good to have 2-3 options on average each Era, even if you have to do some conquest to get there.

    I like the idea of colonies gaining independence, but not so sure it would be a good mechanic for eg the Franks splitting into France/HRE. You might be giving up all but one of your cities, which is possibly a bad AI city you just captured. Maybe if it's possible, only split if your new capital is on another continent? (Or similarly if youre using a stability penalty, add a major penalty for being on a different continent to the cap).
     
  14. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    10,305
    Location:
    France
    what about a fame bonus for every territory/city you lose on Culture change ?
     
  15. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    10,305
    Location:
    France
    Alpha 1.0.0 released, see OP for instructions.
     
    fortydayweekend likes this.
  16. fortydayweekend

    fortydayweekend Warlord

    Joined:
    Nov 20, 2009
    Messages:
    239
    Is fame much of an incentive for players? I know I don't really care about it any more than trying to be just ahead when the game ends.

    What if every other player got a grievance against you for every territory that you should have given up but didn't? That could be fun. And it's sort of similar to the situation where you expand too aggressively with outposts in the early game and end up in 3 wars at the same time.

    I like the stability idea too, that seems to be what stability is for as a game mechanic, though currently it's too easy to get around with lux manufactories and a couple of extra CQs.
     
  17. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    10,305
    Location:
    France
    I'd use a percentage of Stability yield loss based on distance, it's one thing to loss 75 stability points when you have +400, it's another to loss 75% of the +400 points.
     
    fortydayweekend likes this.
  18. fortydayweekend

    fortydayweekend Warlord

    Joined:
    Nov 20, 2009
    Messages:
    239
    That's awesome (and how the base game should work...)
     
  19. Siptah

    Siptah Eternal Chieftain

    Joined:
    Jul 24, 2016
    Messages:
    5,461
    Location:
    Lucerne
    Any plans to put this on the steam workshop as well?
     
  20. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    10,305
    Location:
    France
    on mod.io ? (no worshop atm)

    when it's beta, it's a bit too "rough" IMO for a larger release. I've advertised it a bit to try to gather feedback, but on the other hand I'd want users that are not comfortable with manual installation/removal to stay away from it. I'd need at least a map check in the code to avoid the necessity of swapping DLLs when you want to play a normal map.
     

Share This Page