[GS] Liang Level 2 title (Reinforced Materials) police card make fail. need help

Discussion in 'Mod Creation Help' started by nut7270, Mar 26, 2019.

  1. nut7270

    nut7270 Chieftain

    Joined:
    Jul 16, 2018
    Messages:
    8
    Gender:
    Male
    (Use Google translation)

    How can I do it all with the code above, but I do not get it enabled. Even though the disaster damage immunity effect is the governor's intrinsic effect, it is because of this. Even though the disaster damage immunity code is completely erased and only the gold reduction code is put in, the polis card is created and actually none is applied.I do not know why this is so I leave a question.Here is the code I used: I also posted it on the attachment.

    ----

    use code Liang Level 2 title (Reinforced Materials)

    Expansion2\Data\Expansion1_Governors.xml

    <GovernorPromotionModifiers>
    <Row>
    <GovernorPromotionType>GOVERNOR_PROMOTION_REINFORCED_INFRASTRUCTURE</GovernorPromotionType>
    <ModifierId>REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE</ModifierId>
    </Row>
    </GovernorPromotionModifiers>

    <Modifiers>
    <Row>
    <ModifierId>REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE</ModifierId>
    <ModifierType>MODIFIER_GOVERNOR_ADJUST_PREVENET_STRUCTURAL_DAMAGE</ModifierType>
    </Row>
    </Modifiers>

    <ModifierArguments>
    <Row>
    <ModifierId>REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE</ModifierId>
    <Name>Prevent</Name>
    <Value>true</Value>
    </Row>
    </ModifierArguments>

    ----

    Expansion2\Data\Expansion2_Modifiers.xml

    <Row Type="MODIFIER_GOVERNOR_ADJUST_PREVENET_STRUCTURAL_DAMAGE" Kind="KIND_MODIFIER"/>

    <Row>
    <ModifierType>MODIFIER_GOVERNOR_ADJUST_PREVENET_STRUCTURAL_DAMAGE</ModifierType>
    <CollectionType>COLLECTION_OWNER</CollectionType>
    <EffectType>EFFECT_ADJUST_PREVENT_STRUCTURAL_DAMAGE</EffectType>
    </Row>

    ----
    and unlock Ancient Era (State Workforce) - Medieval Era(Civil Service) - Industrial Era(Civil Engineering) - Atomic Era(Cold War)

    Obsoleted
    Ancient Era (State Workforce) -> Medieval Era(Civil Service)
    Medieval Era(Civil Service) -> Industrial Era(Civil Engineering)
    Industrial Era(Civil Engineering) -> Atomic Era(Cold War)

    all city has REINFORCED_INFRASTRUCTURE effect.
    but -10(Ancient) -> -20(Medieval) -> -30(Industrial Era) -> -40(Atomic) gold each city.

    ----

    make mod code (read or open upload file)


    --Types
    INSERT INTO Types
    (Type, Kind)
    VALUES --고대
    ('POLICY_REINFORCED_INFRASTRUCTURE_A', 'KIND_POLICY'),
    --중세
    ('POLICY_REINFORCED_INFRASTRUCTURE_B', 'KIND_POLICY'),
    --산업
    ('POLICY_REINFORCED_INFRASTRUCTURE_C', 'KIND_POLICY'),
    --원자
    ('POLICY_REINFORCED_INFRASTRUCTURE_D', 'KIND_POLICY');

    --Policies
    INSERT INTO Policies
    (PolicyType, Name, Description, PrereqCivic, GovernmentSlotType)
    VALUES --고대
    ('POLICY_REINFORCED_INFRASTRUCTURE_A', 'LOC_POLICY_REINFORCED_INFRASTRUCTURE_A_NAME', 'LOC_POLICY_REINFORCED_INFRASTRUCTURE_A_DESCRIPTION', 'CIVIC_STATE_WORKFORCE', 'SLOT_ECONOMIC'),
    --중세
    ('POLICY_REINFORCED_INFRASTRUCTURE_B', 'LOC_POLICY_REINFORCED_INFRASTRUCTURE_B_NAME', 'LOC_POLICY_REINFORCED_INFRASTRUCTURE_B_DESCRIPTION', 'CIVIC_CIVIL_SERVICE', 'SLOT_ECONOMIC'),
    --산업
    ('POLICY_REINFORCED_INFRASTRUCTURE_C', 'LOC_POLICY_REINFORCED_INFRASTRUCTURE_C_NAME', 'LOC_POLICY_REINFORCED_INFRASTRUCTURE_C_DESCRIPTION', 'CIVIC_CIVIL_ENGINEERING', 'SLOT_ECONOMIC'),
    --원자
    ('POLICY_REINFORCED_INFRASTRUCTURE_D', 'LOC_POLICY_REINFORCED_INFRASTRUCTURE_D_NAME', 'LOC_POLICY_REINFORCED_INFRASTRUCTURE_D_DESCRIPTION', 'CIVIC_COLD_WAR', 'SLOT_ECONOMIC');

    --ObsoletePolicies
    INSERT INTO ObsoletePolicies
    (ObsoletePolicy, PolicyType)
    VALUES --고대
    ('POLICY_REINFORCED_INFRASTRUCTURE_A', 'POLICY_REINFORCED_INFRASTRUCTURE_B'),
    --중세
    ('POLICY_REINFORCED_INFRASTRUCTURE_B', 'POLICY_REINFORCED_INFRASTRUCTURE_C'),
    --산업
    ('POLICY_REINFORCED_INFRASTRUCTURE_C', 'POLICY_REINFORCED_INFRASTRUCTURE_D');

    --PolicyModifiers
    INSERT INTO PolicyModifiers
    (PolicyType, ModifierId)
    VALUES --고대
    ('POLICY_REINFORCED_INFRASTRUCTURE_A', 'REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_A'),
    ('POLICY_REINFORCED_INFRASTRUCTURE_A', 'REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_A_GOLD'),
    --중세
    ('POLICY_REINFORCED_INFRASTRUCTURE_B', 'REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_B'),
    ('POLICY_REINFORCED_INFRASTRUCTURE_B', 'REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_B_GOLD'),
    --산업
    ('POLICY_REINFORCED_INFRASTRUCTURE_C', 'REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_C'),
    ('POLICY_REINFORCED_INFRASTRUCTURE_C', 'REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_C_GOLD'),
    --원자
    ('POLICY_REINFORCED_INFRASTRUCTURE_D', 'REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_D'),
    ('POLICY_REINFORCED_INFRASTRUCTURE_D', 'REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_D_GOLD');

    --Modifiers
    INSERT OR REPLACE INTO Modifiers
    (ModifierId, ModifierType Permanent, SubjectRequirementSetId)
    VALUES --고대
    ('REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_A', 'MODIFIER_GOVERNOR_ADJUST_PREVENET_STRUCTURAL_DAMAGE', 0, null),
    ('REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_A_GOLD', 'MODIFIER_PLAYER_CITIES_ADJUST_CITY_YIELD_CHANGE', 0, null),
    --중세
    ('REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_B', 'MODIFIER_GOVERNOR_ADJUST_PREVENET_STRUCTURAL_DAMAGE', 0, null),
    ('REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_B_GOLD', 'MODIFIER_PLAYER_CITIES_ADJUST_CITY_YIELD_CHANGE', 0, null),
    --산업
    ('REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_C', 'MODIFIER_GOVERNOR_ADJUST_PREVENET_STRUCTURAL_DAMAGE', 0, null),
    ('REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_C_GOLD', 'MODIFIER_PLAYER_CITIES_ADJUST_CITY_YIELD_CHANGE', 0, null),
    --원자
    ('REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_D', 'MODIFIER_GOVERNOR_ADJUST_PREVENET_STRUCTURAL_DAMAGE', 0, null),
    ('REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_D_GOLD', 'MODIFIER_PLAYER_CITIES_ADJUST_CITY_YIELD_CHANGE', 0, null);

    --ModifierArguments
    INSERT OR REPLACE INTO ModifierArguments
    (ModifierId, Name, Value)
    VALUES --고대
    ('REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_A', 'Prevent' true),
    ('REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_A_GOLD', 'YieldType' 'YIELD_GOLD'),
    ('REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_A_GOLD', 'Amount' -10),
    --중세
    ('REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_B', 'Prevent', true),
    ('REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_B_GOLD', 'YieldType', 'YIELD_GOLD'),
    ('REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_B_GOLD', 'Amount', -20),
    --산업
    ('REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_C', 'Prevent', true),
    ('REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_C_GOLD', 'YieldType', 'YIELD_GOLD'),
    ('REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_C_GOLD', 'Amount', -30),
    --원자
    ('REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_D', 'Prevent', true),
    ('REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_D_GOLD', 'YieldType', 'YIELD_GOLD'),
    ('REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE_D_GOLD', 'Amount', -40);
     

    Attached Files:

    Last edited: Mar 26, 2019
  2. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    7,241
    Location:
    Illinois, USA
    Code:
    INSERT OR REPLACE INTO Modifiers				
    		(ModifierId,		ModifierType	Permanent
    Missing the required comma "," character after "ModifierType".

    Needs to be
    Code:
    INSERT OR REPLACE INTO Modifiers				
    		(ModifierId,		ModifierType,	Permanent
    this is incorect:
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <Mod id="12A3CDDA-45FA-1C26-0989-10B680D1393D " version="1">
      <Properties>
        <Name>POLICY REINFORCED INFRASTRUCTURE</Name>
        <Description>aaaa</Description>
        <CustomProperties></CustomProperties>
        <Teaser>aaaa</Teaser>
        <Authors>aaaa</Authors>
        <CompatibleVersions>2.0</CompatibleVersions>
      </Properties>
      <InGameActions>
        <UpdateDatabase>
          <File>POLICY REINFORCED INFRASTRUCTURE.sql</File>
    	  <File>POLICY REINFORCED INFRASTRUCTURE TEXT.xml</File>
    	  <File>POLICY REINFORCED INFRASTRUCTURE ICON.sql</File>
        </UpdateDatabase>
      </InGameActions>
      <Files>
          <File>POLICY REINFORCED INFRASTRUCTURE.sql</File>
    	  <File>POLICY REINFORCED INFRASTRUCTURE TEXT.xml</File>
    	  <File>POLICY REINFORCED INFRASTRUCTURE ICON.sql</File>
      </Files>
    </Mod>
    Your action is missing the required designation for the "id" of the action:
    Code:
    id="ID_Name"
    And you are attempting to load into the main database files which do not belong there.

    Needs to be
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <Mod id="12A3CDDA-45FA-1C26-0989-10B680D1393D " version="1">
      <Properties>
        <Name>POLICY REINFORCED INFRASTRUCTURE</Name>
        <Description>aaaa</Description>
        <CustomProperties></CustomProperties>
        <Teaser>aaaa</Teaser>
        <Authors>aaaa</Authors>
        <CompatibleVersions>2.0</CompatibleVersions>
      </Properties>
      <InGameActions>
        <UpdateDatabase id="Policy_Database">
          <File>POLICY REINFORCED INFRASTRUCTURE.sql</File>
        </UpdateDatabase>
        <UpdateText id="Policy_Text">
          <File><File>POLICY REINFORCED INFRASTRUCTURE TEXT.xml</File></File>
        </UpdateText>
        <UpdateIcons id="Policy_Icons">
          <File>POLICY REINFORCED INFRASTRUCTURE ICON.sql</File>
        </UpdateIcons>
      </InGameActions>
      <Files>
          <File>POLICY REINFORCED INFRASTRUCTURE.sql</File>
    	  <File>POLICY REINFORCED INFRASTRUCTURE TEXT.xml</File>
    	  <File>POLICY REINFORCED INFRASTRUCTURE ICON.sql</File>
      </Files>
    </Mod>
    As general advice avoid having spaces in the names of SQL, XML, DDS files.

    An Action's "id" name cannot have spaces and must start with a letter of the English Alphabet. The starting character of an Action "id" name cannot be a number.
     
  3. nut7270

    nut7270 Chieftain

    Joined:
    Jul 16, 2018
    Messages:
    8
    Gender:
    Male
    Thank you for your kind explanation. Let's try again.
     

Share This Page