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

Quick Modding Questions Thread

Discussion in 'Mod Creation Help' started by Leyrann, Oct 28, 2018.

  1. lachumproyale

    lachumproyale Chieftain

    Joined:
    Apr 22, 2020
    Messages:
    23
    Gender:
    Male
    I wanted my encampments to have an airslot - so I just added it in directly to the Expansion2_Districts.xml like so:

    Code:
    <Update>
                <Where DistrictType="DISTRICT_ENCAMPMENT"/>
                <Set>
                    <Airslots>1</Airslots>
                </Set>
            </Update>
    It works correctly, my only issue is that it now displays the little airslot icon from the beginning of the game (before flight is discovered) and replaces the health bar. Is there a quick/easy way to get rid of that? I tried looking for the way it works for a city, unable to find that though.
     
  2. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,833
    Location:
    Illinois, USA
    @alknicteos
    Code:
    [1870812.551] [Gameplay] ERROR: no such column: Amount
    [1870812.551] [Gameplay]: In Query - UPDATE ModifierArguments SET "Amount" = ? WHERE "ModifierId" = ?;
    This error message was not related to any of the code you posted in your message. There is no Update command anywhere within the code you posted on message # 718

    However, the error messages are quite correct. There is no Column called "Amount" in any of the game's tables, especially none in table ModifierArguments. "Amount" is an argument value for column "Name". It is the "Value" column which needs to be changed in an Update, but only where the "Name" argument matches to "Amount" and the "ModifierId" argument matches to the correct modifier as well. Using an Update to change data in a row while only matching the "Where" conditions to a ModifierId is likely to fail with interesting results pretty much all the time.
     
  3. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,833
    Location:
    Illinois, USA
    It's going to be buried in one of the User Interface lua files.
     
  4. Fonzie_

    Fonzie_ Chieftain

    Joined:
    Jun 1, 2020
    Messages:
    1
    Gender:
    Male
    Stupid question, but I'm having trouble finding out what the modifier is for a flat increase (+5/turn) to city loyalty for a custom building, as well as how to increase a city's outgoing loyalty pressure. Any help would be appreciated!
     
  5. lachumproyale

    lachumproyale Chieftain

    Joined:
    Apr 22, 2020
    Messages:
    23
    Gender:
    Male
    yea looks like ive got bigger problems anyway, looks like it's not just removing the health bar but ranged attack capability as well. the health mechanic is still there, needs to be attacked and have its wall then health brought down before it can be occupied, but ranged attack is gone. Wish there was a nice quick and easy way to give it an airslot in the same way a city has one, just as a sort of default with no marker
     
  6. alknicteos

    alknicteos Chieftain

    Joined:
    Oct 4, 2010
    Messages:
    14
    oh, rofl. Many thanks LeeS. It's of course value, ... and I wondered why the diplomat goverment loyality malus for foreign cities hasn't changed... I felt 2 was too low, and changed it to 6. So, my database log doesn't show any error anymore. So, could you help me, again ? So, that each kind of power plant increase the regional range of power plants ( or what it is current, industrial and entertainment, my base was the mexico city bonus range ) ?
     
  7. Wolffleet

    Wolffleet Chieftain

    Joined:
    Jun 1, 2019
    Messages:
    51
    not understanding why this is not working. Specifically am I using the update or where command wrong?

    Code:
    <GameData>
        <Buildings>
            <Update>
            <!--Science-->
                <Where BuildingType = "BUILDING_LIBRARY"/>
                <Set Maintenance = "10"/>
              
                <Where BuildingType = "BUILDING_UNIVERSITY"/>
                <Set Maintenance = "20"/>
              
                <Where BuildingType = "BUILDING_MADRASA"/>
                <Set Maintenance = "20"/>
              
                <Where BuildingType = "BUILDING_RESEARCH_LAB"/>
                <Set Maintenance = "30"/>
          
            <!--CULTURE-->
                <Where BuildingType = "BUILDING_AMPHITHEATER"/>
                <Set Maintenance = "10"/>
              
                <Where BuildingType = "BUILDING_MUSEUM_ART"/>
                <Set Maintenance = "20"/>
              
                <Where BuildingType = "BUILDING_MUSEUM_ARTIFACT"/>
                <Set Maintenance = "20"/>
              
                <Where BuildingType = "BUILDING_BROADCAST_CENTER"/>
                <Set Maintenance = "30"/>
          
            <!--FAITH-->
                <Where BuildingType = "BUILDING_SHRINE"/>
                <Set Maintenance = "10"/>
              
                <Where BuildingType = "BUILDING_TEMPLE"/>
                <Set Maintenance = "20"/>
              
            </Update>
        </Buildings>
    </GameData>
    
     
  8. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,246
    Location:
    Portugal
  9. doobas

    doobas Chieftain

    Joined:
    Oct 6, 2016
    Messages:
    1
    Gender:
    Male
    Hello. I'm trying to get an effect for a Great General but am having problems.

    Does anyone know if it's possible to have a GG give a unit on retirement, but have it be a random choice of say 3 different units?

    I'm using SQL.

    Thank you in advance for any help you can give.
     
  10. Wolffleet

    Wolffleet Chieftain

    Joined:
    Jun 1, 2019
    Messages:
    51
    has anyone encountered ERROR: near "Effects": syntax error? what does it mean? I understand that this error is common for sql but i'm getting this using and xml file.
     
    Last edited: Jun 3, 2020
  11. Arstahd

    Arstahd Chieftain

    Joined:
    Apr 20, 2006
    Messages:
    72
    It means you have a syntax error near the term "Effects" in your code. Search your code for that term and check the syntax just prior to each instance.
     
  12. Wolffleet

    Wolffleet Chieftain

    Joined:
    Jun 1, 2019
    Messages:
    51
    ty. It was in my actions id. I had a space
     
  13. benjidahl

    benjidahl Chieftain

    Joined:
    Nov 27, 2016
    Messages:
    3
    Gender:
    Male
    I have tried to edit the technologies files a bit to make the game go by a bit slower in terms of the pace in which yourself and the AI gets through the tech tree.
    I am trying to edit the file found at:
    Sid Meier's Civilization VI > Base > Assets > Gameplay > Data > Technologies

    It changes the science needed for techs in the ancient, classical, medieval and information eras.
    But the science needed for techs in the Renaissance, industrial, modern and atomic eras stay the same.

    Anyone able to explain why this is the case?
    I have all the expansions, so not sure if there's another file that I am supposed to edit instead.
     
  14. alknicteos

    alknicteos Chieftain

    Joined:
    Oct 4, 2010
    Messages:
    14
    Do you edit vanilla data or a seperate mod ? If it is a mod, then it may help to change the id in the modinfo. I had a similar problem, and I believe some things are getting cached. If you change the id in the modinfo, you have to turn the mod on again. If you mod vanilla data, then there are some cost updates in dlc data area too.

    this works well for me
    Spoiler :

    Code:
    UPDATE Technologies SET Cost = Cost*1.5 WHERE EraType ='ERA_ANCIENT';
    UPDATE Technologies SET Cost = Cost*2.5 WHERE EraType ='ERA_CLASSICAL';
    UPDATE Technologies SET Cost = Cost*3 WHERE EraType ='ERA_MEDIEVAL';
    UPDATE Technologies SET Cost = Cost*3.5 WHERE EraType ='ERA_RENAISSANCE';
    UPDATE Technologies SET Cost = Cost*4 WHERE EraType ='ERA_INDUSTRIAL';
    UPDATE Technologies SET Cost = Cost*5 WHERE EraType ='ERA_MODERN';
    UPDATE Technologies SET Cost = Cost*5 WHERE EraType ='ERA_ATOMIC';
    UPDATE Technologies SET Cost = Cost*5 WHERE EraType ='ERA_INFORMATION';
    UPDATE Technologies SET Cost = Cost*5 WHERE EraType ='ERA_FUTURE';
    UPDATE TechnologyRandomCosts SET Cost=Cost*5;
    UPDATE Civics SET Cost = Cost*1.5 WHERE EraType ='ERA_ANCIENT';
    UPDATE Civics SET Cost = Cost*2.5 WHERE EraType ='ERA_CLASSICAL';
    UPDATE Civics SET Cost = Cost*3 WHERE EraType ='ERA_MEDIEVAL';
    UPDATE Civics SET Cost = Cost*3.5 WHERE EraType ='ERA_RENAISSANCE';
    UPDATE Civics SET Cost = Cost*4 WHERE EraType ='ERA_INDUSTRIAL';
    UPDATE Civics SET Cost = Cost*5 WHERE EraType ='ERA_MODERN';
    UPDATE Civics SET Cost = Cost*5 WHERE EraType ='ERA_ATOMIC';
    UPDATE Civics SET Cost = Cost*5 WHERE EraType ='ERA_INFORMATION';
    UPDATE Civics SET Cost = Cost*5 WHERE EraType ='ERA_FUTURE';
    UPDATE CivicRandomCosts SET Cost=Cost*5;
    UPDATE Eras SET GreatPersonBaseCost = GreatPersonBaseCost*1.5 WHERE EraType = 'ERA_ANCIENT';
    UPDATE Eras SET GreatPersonBaseCost = GreatPersonBaseCost*1.5 WHERE EraType = 'ERA_CLASSICAL';
    UPDATE Eras SET GreatPersonBaseCost = GreatPersonBaseCost*1.5 WHERE EraType = 'ERA_MEDIEVAL';
    UPDATE Eras SET GreatPersonBaseCost = GreatPersonBaseCost*1.5 WHERE EraType = 'ERA_RENAISSANCE';
    UPDATE Eras SET GreatPersonBaseCost = GreatPersonBaseCost*1.5 WHERE EraType = 'ERA_INDUSTRIAL';
    UPDATE Eras SET GreatPersonBaseCost = GreatPersonBaseCost*1.5 WHERE EraType = 'ERA_MODERN';
    UPDATE Eras SET GreatPersonBaseCost = GreatPersonBaseCost*1.5 WHERE EraType = 'ERA_ATOMIC';
    UPDATE Eras SET GreatPersonBaseCost = GreatPersonBaseCost*1.5 WHERE EraType = 'ERA_INFORMATION';
    UPDATE Eras SET GreatPersonBaseCost = GreatPersonBaseCost*1.5 WHERE EraType = 'ERA_FUTURE';
    UPDATE Resource_Consumption SET CO2perkWh = CO2perkWh/4;
    
    
    UPDATE GlobalParameters SET Value = Value*1.5 WHERE Name = 'CITY_GROWTH_MULTIPLIER';
    UPDATE GlobalParameters SET Value = Value*1.1 WHERE Name = 'CITY_GROWTH_EXPONENT';
    
     
  15. alknicteos

    alknicteos Chieftain

    Joined:
    Oct 4, 2010
    Messages:
    14
    does anyone know, how to change the required unit xp for level up on game speeds ? I can't find anything related to this ....
     
  16. Arstahd

    Arstahd Chieftain

    Joined:
    Apr 20, 2006
    Messages:
    72

    If you are using Gathering Storm, some tech costs were updated, they may be overwriting your changes depending on LoadOrder. Also Future tech now has variable cost and use a new table.

    This very topic was discussed recently here https://forums.civfanatics.com/threads/problem-with-increase-technology-mod.658117/
     
  17. Laurana Kanan

    Laurana Kanan Don’t underestimate who I am.

    Joined:
    Apr 10, 2014
    Messages:
    2,381
    Gender:
    Female
    Location:
    Near the Greatest Snow on Earth
    Just offhand, I know there's an "EXPERIENCE_NEEDED_FOR_NEXT_LEVEL_MULTIPLIER" in the GlobalParameters table.
     
  18. Arstahd

    Arstahd Chieftain

    Joined:
    Apr 20, 2006
    Messages:
    72

    EXPERIENCE_NEEDED_FOR_NEXT_LEVEL_MULTIPLIER found in GlobalParameters.xml can change the XP multiplier. The default value is 5, which is then multiplied by the I believe hard-coded XP value for each level.
     
  19. alknicteos

    alknicteos Chieftain

    Joined:
    Oct 4, 2010
    Messages:
    14
    I have changed it the multiplier to 3, and 27 xp for lvl 1 on marathon looks good. Even if I never play faster than epic, normally marathon, how could i tie this only to marathon speed?
     
  20. alknicteos

    alknicteos Chieftain

    Joined:
    Oct 4, 2010
    Messages:
    14
    also another issue ... I want to have a base malus for each great people from -2 . can MODIFIER_PLAYER_ADJUST_GREAT_PERSON_POINTS be negative ? this
    Code:
    <TraitModifiers>
            <Row TraitType="TRAIT_LEADER_MAJOR_CIV" ModifierId="BASE_GP_NERF_PROPHET"/>
        </TraitModifiers>
     
        <Modifiers>
            <Row>
                <ModifierId>BASE_GP_NERF_PROPHET</ModifierId>
                <ModifierType>MODIFIER_PLAYER_ADJUST_GREAT_PERSON_POINTS</ModifierType>
            </Row>
        </Modifiers>
     
        <ModifierArguments>
            <Row>
                <ModifierId>BASE_GP_NERF_PROPHET</ModifierId>
                <Name>GreatPersonClassType</Name>
                <Value>GREAT_PERSON_CLASS_PROPHET</Value>
            </Row>
        </ModifierArguments>
     
        <ModifierArguments>
            <Row>
                <ModifierId>BASE_GP_NERF_PROPHET</ModifierId>
                <Name>Amount</Name>
                <Value>-2</Value>
            </Row>
        </ModifierArguments>
    
    seems not to work. the base template is a great person policy card

    ... the longer story is, that I have changed the base cost of settlers to 200 but only +20 instead of +30 for each settler. But with this the first great persons are earned to fast. And so I would like to introduce some basic resistance of -2 to great people, except maybe artists and musicians

    edit: I guess I will look into a game with this
    Code:
    UPDATE Eras SET GreatPersonBaseCost = GreatPersonBaseCost*3 WHERE EraType = 'ERA_ANCIENT';
    UPDATE Eras SET GreatPersonBaseCost = GreatPersonBaseCost*2.5 WHERE EraType = 'ERA_CLASSICAL';
    UPDATE Eras SET GreatPersonBaseCost = GreatPersonBaseCost*2 WHERE EraType = 'ERA_MEDIEVAL';
    UPDATE Eras SET GreatPersonBaseCost = GreatPersonBaseCost*1.5 WHERE EraType = 'ERA_RENAISSANCE';
    
    and 1.5 also after renaissance
     
    Last edited: Jun 4, 2020

Share This Page