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

Game dependent on DISTRICT_HOLY_SITE?

Discussion in 'Mod Creation Help' started by Das Capitolin, May 1, 2019.

  1. Das Capitolin

    Das Capitolin Chieftain

    Joined:
    Feb 22, 2018
    Messages:
    98
    Gender:
    Male
    LOL. You should have kept reading.
     
  2. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,074
    Location:
    Portugal
  3. Das Capitolin

    Das Capitolin Chieftain

    Joined:
    Feb 22, 2018
    Messages:
    98
    Gender:
    Male
    I tested LeaderType without success, so I went back and individually tested each TraitType. The following work, and now I am searching for leaders who do not inherit the exclusion:
    Code:
    INSERT INTO ExcludedDistricts
    (DistrictType, TraitType)
    VALUES ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_AGGRESSIVE_MILITARY'), --GORGO, SHAKA, GENGHIS_KHAN, MATTHIAS_CORVINUS, SULEIMAN*, ALEXANDER, CHANDRAGUPTA*, CYRUS*, HARDRADA*
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_CULTURAL_MAJOR_CIV'), --CATHERINE_DE_MEDICI, GORGO, MVEMBA, PEDRO, PERICLES, QIN, T_ROOSEVELT, ELEANOR_FRANCE, KRISTINA, KUPE
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_DIVINE_WIND'), --HOJO
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_ELEANOR_LOYALTY'), --ELEANOR_ENGLAND, ELEANOR_FRANCE
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_EXALTED_GODDESS'), --GITARJA
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_HOLY_ROMAN_EMPEROR'), --BARBAROSSA
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_KILLER_OF_CYRUS'), --TOMYRIS
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_LOW_CITY_STATE_PREFERENCE_WAR'), --ROBERT_THE_BRUCE, TAMAR, POUNDMAKER, KRISTINA, LAURIER, MATTHIAS_CORVINUS, JOHN_CURTIN, MONTEZUMA*
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_LOW_RELIGIOUS_PREFERENCE'), --GILGAMESH, GORGO, PERICLES, QIN, TRAJAN, T_ROOSEVELT, VICTORIA, SEONDEOK, SHAKA, LAUTARO, GENGHIS_KHAN, DIDO, LAURIER, PACHACUTI, JOHN_CURTIN
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_MEDITERRANEAN'), --CLEOPATRA
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_MELEE_COASTAL_RAIDS'), --HARDRADA
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_PURSUE_DIPLOMATIC_VICTORY'), --Redundant? PERICLES, T_ROOSEVELT
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_RELIGIOUS_MAJOR_CIV'), --PHILIP_II, PETER_GREAT, GANDHI, SALIDEN, JADWIGA, 
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_SAHEL_MERCHANTS'), --MANSA_MUSA
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_SCIENCE_MAJOR_CIV'), --Redundant? GILGAMESH, ROBERT_THE_BRUCE, SEONDEOK, JOHN_CURTIN
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_SULEIMAN_GOVERNOR'), --SULEIMAN
    ('DISTRICT_HOLY_SITE', 'TRAIT_RADIO_ORANJE'); --WILHELMINA
    @raen : I have all of the leaders working with these traits, except for MONTEZUMA, CHANDRAGUPTA, CYRUS. For whatever reason, these three are not inheriting their assigned TRAIT_LEADER_AGGRESSIVE_MILITARY. I have utilized an alternate method for excluding Holy Site for any leaders (and City-State) not inheriting the above traits.

    Version 1.9 published.
     
    Last edited: May 14, 2019
  4. Laurana Kanan

    Laurana Kanan Don’t underestimate who I am.

    Joined:
    Apr 10, 2014
    Messages:
    1,663
    Gender:
    Female
    Location:
    Near the Greatest Snow on Earth
    Nah...;)
     
  5. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,074
    Location:
    Portugal
    I don't see this leaders assigned to the agressive trait but to these ones:
    Code:
    <Row LeaderType="LEADER_HARDRADA" TraitType="TRAIT_LEADER_MELEE_COASTAL_RAIDS"/>
    <Row LeaderType="LEADER_MONTEZUMA" TraitType="TRAIT_LEADER_GIFTS_FOR_TLATOANI"/>
    <Row LeaderType="LEADER_CYRUS" TraitType="TRAIT_LEADER_FALL_BABYLON"/>
    <Row LeaderType="LEADER_CHANDRAGUPTA" TraitType="TRAIT_LEADER_ARTHASHASTRA"/>
    
     
    Das Capitolin likes this.
  6. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,074
    Location:
    Portugal
    And back to your first solution of delete of holy site, did you tried to alter the order of SQL lines? Since for me makes more sense to delete dependencies of the holy site first, like lavra and holy site project.
     
  7. Das Capitolin

    Das Capitolin Chieftain

    Joined:
    Feb 22, 2018
    Messages:
    98
    Gender:
    Male
    I searched all of the XML files for Leaders and DLC, and did not find this information. Thank you again, @raen. May I ask where you found them?
     
  8. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,074
    Location:
    Portugal
  9. Das Capitolin

    Das Capitolin Chieftain

    Joined:
    Feb 22, 2018
    Messages:
    98
    Gender:
    Male
    Yes, I did think of that, but then I recognized that if a new leader is added and I do not have an exclusion for them, then deleting the Holy Site could crash a late game. My alternate solution will address City-States and future leaders. Here is my planned release (2.0):
    Code:
    INSERT INTO ExcludedDistricts
    (DistrictType, TraitType)
    VALUES ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_AGGRESSIVE_MILITARY'), --GORGO, SHAKA, GENGHIS_KHAN, MATTHIAS_CORVINUS, ALEXANDER, SULEIMAN*, CHANDRAGUPTA*, CYRUS*, HARDRADA*
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_ARTHASHASTRA'), --CHANDRAGUPTA
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_CULTURAL_MAJOR_CIV'), --CATHERINE_DE_MEDICI, GORGO, MVEMBA, PEDRO, PERICLES, QIN, T_ROOSEVELT, ELEANOR_FRANCE, KRISTINA, KUPE
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_DIVINE_WIND'), --HOJO
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_ELEANOR_LOYALTY'), --ELEANOR_ENGLAND, ELEANOR_FRANCE
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_EXALTED_GODDESS'), --GITARJA
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_FALL_BABYLON'), --CYRUS
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_GIFTS_FOR_TLATOANI'), --MONTEZUMA
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_HOLY_ROMAN_EMPEROR'), --BARBAROSSA
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_KILLER_OF_CYRUS'), --TOMYRIS
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_LOW_CITY_STATE_PREFERENCE_WAR'), --ROBERT_THE_BRUCE, TAMAR, POUNDMAKER, KRISTINA, LAURIER, MATTHIAS_CORVINUS, JOHN_CURTIN, MONTEZUMA*
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_LOW_RELIGIOUS_PREFERENCE'), --GILGAMESH, GORGO, PERICLES, QIN, TRAJAN, T_ROOSEVELT, VICTORIA, SEONDEOK, SHAKA, LAUTARO, GENGHIS_KHAN, DIDO, LAURIER, PACHACUTI, JOHN_CURTIN
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_MEDITERRANEAN'), --CLEOPATRA
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_MELEE_COASTAL_RAIDS'), --HARDRADA
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_PURSUE_DIPLOMATIC_VICTORY'), --Redundant? PERICLES, T_ROOSEVELT
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_RELIGIOUS_MAJOR_CIV'), --PHILIP_II, PETER_GREAT, GANDHI, SALIDEN, JADWIGA,
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_SAHEL_MERCHANTS'), --MANSA_MUSA
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_SCIENCE_MAJOR_CIV'), --Redundant? GILGAMESH, ROBERT_THE_BRUCE, SEONDEOK, JOHN_CURTIN
    ('DISTRICT_HOLY_SITE', 'TRAIT_LEADER_SULEIMAN_GOVERNOR'), --SULEIMAN
    ('DISTRICT_HOLY_SITE', 'TRAIT_RADIO_ORANJE'); --WILHELMINA
    -- BREAKS NEW GAME: ('DISTRICT_HOLY_SITE', 'MINOR_CIV_BONUS_RELIGIOUS')
    
    -- Alternate exclusion for future leaders and City-States.
    INSERT INTO District_ValidTerrains
    (DistrictType, TerrainType)
    VALUES ('DISTRICT_HOLY_SITE', 'TERRAIN_SNOW_MOUNTAIN');
    
    DELETE FROM Buildings WHERE BuildingType='BUILDING_STONEHENGE';
    DELETE FROM Units WHERE UnitType='UNIT_GREAT_PROPHET';
    DELETE FROM Districts WHERE DistrictType='DISTRICT_LAVRA';
    DELETE FROM Projects WHERE ProjectType='PROJECT_ENHANCE_DISTRICT_HOLY_SITE';
    -- CRASHES LATE GAME: DELETE FROM Districts WHERE DistrictType='DISTRICT_HOLY_SITE';
     
  10. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,074
    Location:
    Portugal
  11. Das Capitolin

    Das Capitolin Chieftain

    Joined:
    Feb 22, 2018
    Messages:
    98
    Gender:
    Male
    I know. It was one of the first things we tested. If only it were as easy as @Laurana Kanan suggested. :p
    For reference, I found TRAIT_LEADER_AGGRESSIVE_MILITARY associated with LEADER_CYRUS and LEADER_ALEXANDER in Macedonia_Persia_Expansion1. CHANDRAGUPTA, SHAKA, GENGHIS_KHAN in Expansion1 DLC file Expansion1_Leaders_Major.xml. MATTHIAS_CORVINUS and SULEIMAN in Expansion2 DLC file Expansion2_Leaders_Major.xml.
     
  12. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,074
    Location:
    Portugal
    Anyway, for your last solution you only need one thing, if you want to make it compatible, let's say to whom only has the base game, you have to make some modifications to modinfo and add more files...

    Not tested once more but adding the various database updates of criteria maybe work...: (I will try when I can if you cannot follow)

    Code:
    <UpdateDatabaseid="GamePlayMACPER" criteria="MacedoniaPersia">
               <File>DisableHolySiteMACPER.sql</File>
                    <Properties>
                        <LoadOrder>101</LoadOrder>
                    </Properties>
    </UpdateDatabase>
    
    <UpdateDatabaseid="GamePlayEXP2" criteria="Expansion2">
               <File>DisableHolySiteEXP2.sql</File>
                    <Properties>
                        <LoadOrder>101</LoadOrder>
                    </Properties>
    </UpdateDatabase>
    
    <UpdateDatabaseid="GamePlayEXP1" criteria="Expansion1">
               <File>DisableHolySiteEXP1.sql</File>
                    <Properties>
                        <LoadOrder>101</LoadOrder>
                    </Properties>
    </UpdateDatabase>
    
    
     
  13. Das Capitolin

    Das Capitolin Chieftain

    Joined:
    Feb 22, 2018
    Messages:
    98
    Gender:
    Male
    I understand what you did there. Version 2.0 of my mod has all leaders included in the leader trait exclusions, and my alternate solution (TERRAIN_SNOW_MOUNTAIN) will prevent Holy Site from all future leaders yet to be named.

    Thank you @raen and @LeeS for your ongoing assistance.
     
  14. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,074
    Location:
    Portugal
    What Im saying is that without GS or R&F I get this errors (that you may solve dividing files):

    Spoiler :

    [3097666.717] [Gameplay] ERROR: Invalid Reference on ExcludedDistricts.TraitType - "TRAIT_LEADER_AGGRESSIVE_MILITARY" does not exist in Traits
    [3097666.717] [Gameplay] ERROR: Invalid Reference on ExcludedDistricts.TraitType - "TRAIT_LEADER_ELEANOR_LOYALTY" does not exist in Traits
    [3097666.717] [Gameplay] ERROR: Invalid Reference on ExcludedDistricts.TraitType - "TRAIT_LEADER_PURSUE_DIPLOMATIC_VICTORY" does not exist in Traits
    [3097666.717] [Gameplay] ERROR: Invalid Reference on ExcludedDistricts.TraitType - "TRAIT_LEADER_SAHEL_MERCHANTS" does not exist in Traits
    [3097666.717] [Gameplay] ERROR: Invalid Reference on ExcludedDistricts.TraitType - "TRAIT_LEADER_SULEIMAN_GOVERNOR" does not exist in Traits
    [3097666.717] [Gameplay] ERROR: Invalid Reference on ExcludedDistricts.TraitType - "TRAIT_RADIO_ORANJE" does not exist in Traits
     
  15. qqqbbb

    qqqbbb Chieftain

    Joined:
    Sep 25, 2010
    Messages:
    432
    Deleting anything from database is bad for mod compatability. Instead add prerequisites that can never be met to things you want to delete.
     
    Last edited: May 15, 2019
  16. Das Capitolin

    Das Capitolin Chieftain

    Joined:
    Feb 22, 2018
    Messages:
    98
    Gender:
    Male
    So then using ExcludedDistricts is a bad practice? For the time being then, I will remove them and utilize my alternate method:
    Code:
    INSERT INTO District_ValidTerrains
    (DistrictType, TerrainType)
    VALUES ('DISTRICT_HOLY_SITE', 'TERRAIN_SNOW_MOUNTAIN');
    
    DELETE FROM Buildings WHERE BuildingType='BUILDING_STONEHENGE';
    DELETE FROM Units WHERE UnitType='UNIT_GREAT_PROPHET';
    DELETE FROM Districts WHERE DistrictType='DISTRICT_LAVRA';
    DELETE FROM Projects WHERE ProjectType='PROJECT_ENHANCE_DISTRICT_HOLY_SITE';
     
  17. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,074
    Location:
    Portugal
    I think he means all deletes.

    Thinking about it, you can create a dummy trait, associate it to the objects you want but not to leader or civ. Project you cant associate trait but you dont need since no holy site can be built, no project for it.

    I created that in my portugal mod and did not remember until now, i have a trait dummy associated with some buildings and districts that I only add by lua, cant be built by any other way.
     
    Last edited: May 15, 2019
  18. Das Capitolin

    Das Capitolin Chieftain

    Joined:
    Feb 22, 2018
    Messages:
    98
    Gender:
    Male
    In retrospect, I feel like it was a waste of time chasing down TraitType associations. I have decided it is best to keep my alternate solution of assigning the Holy Site to the unavailable TERRAIN_SNOW_MOUNTAIN tile. This solution prevents the Holy Site, regardless of leader or game variety.
     
  19. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,074
    Location:
    Portugal
    Im not telling about the same solution (event talking about traittype again lol), but since I feel a little guilty, I will build that for you and you will see how simple and clean will be (this time) ;) I even will make an effort to make it with SQL to make you happier :p
     
  20. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,074
    Location:
    Portugal
    Here you go (you don´t need to delete the project as no holy site to built in, and great prophet, even if generated cant make religion anywhere)

    Code:
    INSERT INTO Types (Type, Kind) VALUES    ('TRAIT_DAS_CAPITOLIN_NO_RELIGION',    'KIND_TRAIT');
    INSERT INTO Traits (TraitType, Name, Description) VALUES    ('TRAIT_DAS_CAPITOLIN_NO_RELIGION',    '', '');
    UPDATE Districts SET TraitType = 'TRAIT_DAS_CAPITOLIN_NO_RELIGION' WHERE DistrictType = 'DISTRICT_HOLY_SITE';
    UPDATE Districts SET TraitType = 'TRAIT_DAS_CAPITOLIN_NO_RELIGION' WHERE DistrictType = 'DISTRICT_LAVRA';
    UPDATE Buildings SET TraitType = 'TRAIT_DAS_CAPITOLIN_NO_RELIGION' WHERE BuildingType = 'BUILDING_STONEHENGE';
    
     
    Das Capitolin likes this.

Share This Page