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

Change VP Options

Discussion in 'Mods Repository' started by Sub6, Jul 18, 2017.

  1. Sub6

    Sub6 Chieftain

    Joined:
    Aug 26, 2015
    Messages:
    73
    Location:
    Japan
    This is a simple mod to change the VP game options by default.
    You don't have to check / uncheck checkboxes everytime you start a new game.
    Although this mod only enables "Transparent Diplomacy", you can manually add other changes as below.
    Spoiler sample1 :
    /* Community Patch and Community Balance Overhaul */
    -- uncheck "Enable Events System" by default
    UPDATE GameOptions SET "Default" = 0 WHERE Type = 'GAMEOPTION_EVENTS';

    -- check "No Good Events" by default
    UPDATE GameOptions SET "Default" = 1 WHERE Type = 'GAMEOPTION_GOOD_EVENTS_OFF';

    -- check "No Neutral Events" by default
    UPDATE GameOptions SET "Default" = 1 WHERE Type = 'GAMEOPTION_NEUTRAL_EVENTS_OFF';

    -- check "No Bad Events" by default
    UPDATE GameOptions SET "Default" = 1 WHERE Type = 'GAMEOPTION_BAD_EVENTS_OFF';

    -- check "No Trade Events" by default
    UPDATE GameOptions SET "Default" = 1 WHERE Type = 'GAMEOPTION_TRADE_EVENTS_OFF';

    -- check "No Civ-Specific Events" by default
    UPDATE GameOptions SET "Default" = 1 WHERE Type = 'GAMEOPTION_CIV_SPECIFIC_EVENTS_OFF';

    -- check "Chill Barbarians" by default
    UPDATE GameOptions SET "Default" = 1 WHERE Type = 'GAMEOPTION_CHILL_BARBARIANS';

    -- check "Randomized Victories" by default
    UPDATE GameOptions SET "Default" = 1 WHERE Type = 'GAMEOPTION_RANDOM_VICTORY';

    -- check "Barbarian GG/GA Points" by default
    UPDATE GameOptions SET "Default" = 1 WHERE Type = 'GAMEOPTION_BARB_GG_GA_POINTS';

    /* Civ 4 Diplomacy Features */

    -- check "Enable Research Agreements" by default
    UPDATE GameOptions SET "Default" = 1 WHERE Type = 'GAMEOPTION_RESEARCH_AGREEMENTS';

    -- check "No Tech Trading" by default
    UPDATE GameOptions SET "Default" = 1 WHERE Type = 'GAMEOPTION_NO_TECH_TRADING';

    -- check "No Vassalage" by default
    UPDATE GameOptions SET "Default" = 1 WHERE Type = 'GAMEOPTION_NO_VASSALAGE';

    -- check "Allow Human Vassalage" by default
    UPDATE GameOptions SET "Default" = 1 WHERE Type = 'GAMEOPTION_HUMAN_VASSALS';

    -- uncheck "No Tech Brokering" by default
    UPDATE GameOptions SET "Default" = 0 WHERE Type = 'GAMEOPTION_NO_TECH_BROKERING';

    -- check "Transparent Diplomacy" by default (Already included)
    UPDATE GameOptions SET "Default" = 1 WHERE Type = 'GAMEOPTION_ADVANCED_DIPLOMACY';

    Also, you can use this mod to change various VP values.
    Spoiler sample2 :

    /* Update: 2019.10.15 */

    -- Increase the number of spies. (Default value is "10")
    -- e.g. In this setting, Standard map size (16 City States) grants 2 spies and Large map size (20 City States) grants 3 spies.
    UPDATE Defines SET Value = '15' WHERE Name = 'BALANCE_SPY_TO_MINOR_RATIO';

    -- Remove maintenance on Walls and Walls of Babylon. (Default value is "1")
    UPDATE Buildings SET GoldMaintenance = '0' WHERE Type = 'BUILDING_WALLS';
    UPDATE Buildings SET GoldMaintenance = '0' WHERE Type = 'BUILDING_WALLS_OF_BABYLON';

    -- Move "Removing a Forest" to Mining. (Default is Bronze Working)
    UPDATE Builds SET PrereqTech = 'TECH_MINING' WHERE Type = 'BUILD_REMOVE_FOREST';
    UPDATE BuildFeatures SET PrereqTech = 'TECH_MINING' WHERE FeatureType = 'FEATURE_FOREST';

    -- Move "Removing a Marsh" to Construction. (Default is Iron Working)
    UPDATE Builds SET PrereqTech = 'TECH_MASONRY' WHERE Type = 'BUILD_REMOVE_MARSH';
    UPDATE BuildFeatures SET PrereqTech = 'TECH_MASONRY' WHERE FeatureType = 'FEATURE_MARSH';

    -- Reduce unit upgrade cost. (Default value is "2")
    UPDATE Defines SET Value = '1.8' WHERE Name = 'UNIT_UPGRADE_COST_PER_PRODUCTION';

    -- Increase the max number of religion by 1.
    UPDATE Worlds SET MaxActiveReligions = '4' WHERE Type = 'WORLDSIZE_TINY';
    UPDATE Worlds SET MaxActiveReligions = '5' WHERE Type = 'WORLDSIZE_SMALL';
    UPDATE Worlds SET MaxActiveReligions = '6' WHERE Type = 'WORLDSIZE_STANDARD';
    UPDATE Worlds SET MaxActiveReligions = '7' WHERE Type = 'WORLDSIZE_LARGE';
    UPDATE Worlds SET MaxActiveReligions = '8' WHERE Type = 'WORLDSIZE_HUGE';

    -- Reduce the number of followers required for Religious National Wonders by about 20%.
    UPDATE Worlds SET ReformationPercentRequired = '200' WHERE Type = 'WORLDSIZE_DUEL';
    UPDATE Worlds SET ReformationPercentRequired = '160' WHERE Type = 'WORLDSIZE_TINY';
    UPDATE Worlds SET ReformationPercentRequired = '120' WHERE Type = 'WORLDSIZE_SMALL';
    UPDATE Worlds SET ReformationPercentRequired = '80' WHERE Type = 'WORLDSIZE_STANDARD';
    UPDATE Worlds SET ReformationPercentRequired = '60' WHERE Type = 'WORLDSIZE_LARGE';
    UPDATE Worlds SET ReformationPercentRequired = '50' WHERE Type = 'WORLDSIZE_HUGE';

    -- Increase the amount of tourism required for the Cultural Victory by 20%. (Default value is "100")
    UPDATE Defines SET Value = '120' WHERE Name = 'CULTURE_LEVEL_INFLUENTIAL';

    -- Reveal Bonus resources on the first turn.
    UPDATE Resources SET TechReveal = NULL WHERE ResourceClassType = 'RESOURCECLASS_BONUS';

    -- Remove Venice from the random pool.
    UPDATE Civilizations SET AIPlayable = 'false' Where Type = 'CIVILIZATION_VENICE';

    -- Remove Barbarian Zeppelins
    INSERT INTO Civilization_UnitClassOverrides
    (CivilizationType, UnitClassType, UnitType)
    VALUES
    ('CIVILIZATION_BARBARIAN', 'UNITCLASS_ZEPPELIN', NULL);


    I added a mapscript called "Communitas (rev)".
    It guarantees Horse, Iron and Oil resources by default.
    Except for that, it uses the original values.
    communitas_code.jpg
    Copy "Communitas_rev.lua" to ...\My Games\Sid Meier's Civilization 5\Maps\
     

    Attached Files:

    Last edited: Oct 14, 2019
  2. ryanmusante

    ryanmusante Regular Supporter

    Joined:
    Jan 4, 2018
    Messages:
    1,047
    I'm a bit confused of the check vs. uncheck option. For example, the first option "uncheck" for GameOptions SET "Default" = 0 WHERE Type = 'GAMEOPTION_EVENTS';. Does that disable all events? I want to disable all events by default.
     
  3. ThirstQuencher

    ThirstQuencher Chieftain

    Joined:
    Oct 24, 2016
    Messages:
    39
    Gender:
    Male
    I think this means the game options you choose before loading the game ... not sure I will test later
     
  4. Sub6

    Sub6 Chieftain

    Joined:
    Aug 26, 2015
    Messages:
    73
    Location:
    Japan
    That's right.
    It disables all events.
     
    Last edited: Jan 20, 2018
    ryanmusante likes this.
  5. ryanmusante

    ryanmusante Regular Supporter

    Joined:
    Jan 4, 2018
    Messages:
    1,047
    Are there any other options you could add to the samples.txt for changing gameplay values? This is a very helpful mod for me.
     
    vyyt likes this.
  6. Sub6

    Sub6 Chieftain

    Joined:
    Aug 26, 2015
    Messages:
    73
    Location:
    Japan
    Yeah, you can change various VP values.
    Here is my setting.
    Spoiler sample :

    -- Increase the number of spies. (Default value is "10")
    -- e.g. In this setting, Standard map size (16 City States) grants 2 spies and Large map size (20 City States) grants 3 spies.
    UPDATE Defines SET Value = '15' WHERE Name = 'BALANCE_SPY_TO_MINOR_RATIO';

    -- Remove maintenance on Walls and Walls of Babylon. (Default value is "1")
    UPDATE Buildings SET GoldMaintenance = '0' WHERE Type = 'BUILDING_WALLS';
    UPDATE Buildings SET GoldMaintenance = '0' WHERE Type = 'BUILDING_WALLS_OF_BABYLON';

    -- "Mining" unlocks Removing a Forest.
    UPDATE Builds SET PrereqTech = 'TECH_MINING' WHERE Type = 'BUILD_REMOVE_FOREST';
    UPDATE BuildFeatures SET PrereqTech = 'TECH_MINING' WHERE FeatureType = 'FEATURE_FOREST';

    -- "Bronze Working" unlocks Removing a Jungle.
    UPDATE Builds SET PrereqTech = 'TECH_BRONZE_WORKING' WHERE Type = 'BUILD_REMOVE_JUNGLE';
    UPDATE BuildFeatures SET PrereqTech = 'TECH_BRONZE_WORKING' WHERE FeatureType = 'FEATURE_JUNGLE';

    -- "Construction" unlocks Removing a Marsh.
    UPDATE Builds SET PrereqTech = 'TECH_MASONRY' WHERE Type = 'BUILD_REMOVE_MARSH';
    UPDATE BuildFeatures SET PrereqTech = 'TECH_MASONRY' WHERE FeatureType = 'FEATURE_MARSH';

    -- Increase the max number of religion by 3.
    UPDATE Worlds SET MaxActiveReligions = '5' WHERE Type = 'WORLDSIZE_TINY';
    UPDATE Worlds SET MaxActiveReligions = '6' WHERE Type = 'WORLDSIZE_SMALL';
    UPDATE Worlds SET MaxActiveReligions = '7' WHERE Type = 'WORLDSIZE_STANDARD';
    UPDATE Worlds SET MaxActiveReligions = '8' WHERE Type = 'WORLDSIZE_LARGE';
    UPDATE Worlds SET MaxActiveReligions = '9' WHERE Type = 'WORLDSIZE_HUGE';

    -- Reduce unit upgrade cost. (Default value is "2")
    UPDATE Defines SET Value = '1.8' WHERE Name = 'UNIT_UPGRADE_COST_PER_PRODUCTION';

    -- Remove Barbarian Zeppelins
    INSERT INTO Civilization_UnitClassOverrides
    (CivilizationType, UnitClassType, UnitType)
    VALUES
    ('CIVILIZATION_BARBARIAN', 'UNITCLASS_ZEPPELIN', NULL);
     
    vyyt, LukaSlovenia29 and ryanmusante like this.
  7. ryanmusante

    ryanmusante Regular Supporter

    Joined:
    Jan 4, 2018
    Messages:
    1,047
    Oh, very nice. Which files are these pulled from? Are they inside \Core Files\ within the mods directory?
     
  8. Sub6

    Sub6 Chieftain

    Joined:
    Aug 26, 2015
    Messages:
    73
    Location:
    Japan
    under the (2) Community Balance Overhaul\Balance Changes directory.
     
  9. Ziad

    Ziad Emperor

    Joined:
    Nov 11, 2013
    Messages:
    1,792
    Location:
    Lebanon
    Check out Really Advanced Setup. Already does this with a lot of other options too.
     
  10. ryanmusante

    ryanmusante Regular Supporter

    Joined:
    Jan 4, 2018
    Messages:
    1,047
    I just prefer it to be set permanently so I don't need to use setup tab each time.
     
    vyyt and LukaSlovenia29 like this.
  11. Deadstarre

    Deadstarre Expert

    Joined:
    Nov 1, 2015
    Messages:
    960
    Location:
    New York
    does this work for the vanilla options as well?

    for example to check promotion saving would it be UPDATE GameOptions SET "Default" = 1 WHERE Type = 'GAMEOPTION_ALLOW_PROMOTION_SAVING'; ?

    I went through the vanilla install files but couldn't find the names of code for those options. for some reason file search never works the same in C: as it does My Documents
     
  12. Sub6

    Sub6 Chieftain

    Joined:
    Aug 26, 2015
    Messages:
    73
    Location:
    Japan
    This code works for me.
    cf. Vanilla options
    \Steam\steamapps\common\Sid Meier's Civilization V\Assets\Gameplay\XML\GameInfo\CIV5GameOptions.xml
     
    ryanmusante and Deadstarre like this.
  13. Deadstarre

    Deadstarre Expert

    Joined:
    Nov 1, 2015
    Messages:
    960
    Location:
    New York
    Thank you for that, and a great mod =) simple or no it is very useful to anyone who likes to make tweaks

    last question, I noticed in the modinfo file this references cpp, cbp, CSD and c4df, but not (5) Moreluxuries or (6a) compatibility files. I assume that means I couldnt use it to edit any numbers in those files right, was there a reason theyre excluded?
     
  14. Sub6

    Sub6 Chieftain

    Joined:
    Aug 26, 2015
    Messages:
    73
    Location:
    Japan
    No particular reason.
    I've just added those references.
     
    Deadstarre likes this.
  15. Deadstarre

    Deadstarre Expert

    Joined:
    Nov 1, 2015
    Messages:
    960
    Location:
    New York

    Spoiler :



    Thank you!
     
  16. ryanmusante

    ryanmusante Regular Supporter

    Joined:
    Jan 4, 2018
    Messages:
    1,047
    I want to disable in-game interface sounds from the interface, I don't particularly like the clicking noise the menus make. I found a file listed under (Sid Meier's Civilization V\assets\Sounds\XML\Audio2DScripts.xml). I'll need to test to find the appropriate setting, for example:
    Code:
        <Script2DSound>
          <ScriptID>AS2D_INTERFACE_NOTIFICATION</ScriptID>
          <SoundID>SND_INTERFACE_NOTIFICATION</SoundID>
          <SoundType>GAME_SFX</SoundType>
          <iMaxVolume>35</iMaxVolume>
          <iMinVolume>35</iMinVolume>
        </Script2DSound>
    How do I add this to the mod so I can leave original files intact?
     
    Last edited: Feb 3, 2018
  17. Infixo

    Infixo Deity

    Joined:
    Jan 9, 2016
    Messages:
    3,436
    Gender:
    Male
    Location:
    Warsaw
  18. Sub6

    Sub6 Chieftain

    Joined:
    Aug 26, 2015
    Messages:
    73
    Location:
    Japan
    I tweaked some codes from Faerun for BNW.
    This sample code mutes SND_SELECT_WORKER and SND_SELECT_SETTLER.
    Code:
    INSERT INTO  Audio_2DSounds (ScriptID,            SoundID,                        SoundType,        MaxVolume,    MinVolume)
    SELECT 'AS2D_SELECT_WORKER',                    'SND_SELECT_WORKER',            'GAME_SFX',        0,            0 UNION ALL
    SELECT 'AS2D_SELECT_SETTLER',                    'SND_SELECT_SETTLER',            'GAME_SFX',        0,            0;
    In your case, please try this one.
    Code:
    INSERT INTO  Audio_2DSounds (ScriptID,            SoundID,                        SoundType,        MaxVolume,    MinVolume)
    SELECT 'AS2D_INTERFACE_NOTIFICATION',                    'SND_INTERFACE_NOTIFICATION',            'GAME_SFX',        0,            0;
     
  19. ryanmusante

    ryanmusante Regular Supporter

    Joined:
    Jan 4, 2018
    Messages:
    1,047
    As shown below? The script files seem to be tables inside of tables.

    I tried the above but it didn't work.

    The layout of the file beginning and end of the file is:
    <Script2DFile>
    </Script2DFile>

    The values begin with:

    Code:
    <Script2DSounds>
    
        <Script2DSound>
          <ScriptID>AS2D_INTERFACE_NOTIFICATION</ScriptID>
          <SoundID>SND_INTERFACE_NOTIFICATION</SoundID>
          <SoundType>GAME_SFX</SoundType>
          <iMaxVolume>35</iMaxVolume>
          <iMinVolume>35</iMinVolume>
    So, do I include the first portion or leave it empty?

    Code:
    INSERT INTO Script2DSounds (Script2DSound,         ScriptID,        SoundID,         SoundType,         iMaxVolume,         iMinVolume)
    SELECT                        '',         'AS2D_INTERFACE_NOTIFICATION',     'SND_INTERFACE_NOTIFICATION',     'GAME_SFX',    0,    0;
    The reason for why I use " right after SELECT is because Script2DSound is the beginning underneath Script2DSounds or perhaps that is wrong.
     
    Last edited: Feb 3, 2018
  20. Sub6

    Sub6 Chieftain

    Joined:
    Aug 26, 2015
    Messages:
    73
    Location:
    Japan
    This style didn't work for me.
    Just ignore Script2DFile.

    My sample code actually works for some other sounds such as SND_INTERFACE_ANCIENT_RUINS, SND_INTERFACE_BARBARIAN_NOTIFY and SND_INTERFACE_BUY_TILE.
    SND_INTERFACE_NOTIFICATION should be muted as well.
    How about SND_INTERFACE_SELECT?
    Code:
    INSERT INTO  Audio_2DSounds (ScriptID,            SoundID,                        SoundType,        MaxVolume,    MinVolume)
    SELECT 'AS2D_IF_SELECT',                    'SND_INTERFACE_SELECT',            'GAME_SFX',        0,            0;
     
    glider1 likes this.

Share This Page