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

[R&F] Custom Mod Help - Disable Science and Culture from Increase of Population

Discussion in 'Mod Creation Help' started by Lohit, Feb 18, 2018.

  1. Lohit

    Lohit Chieftain

    Joined:
    Nov 13, 2016
    Messages:
    41
    Gender:
    Male
    Hi Everybody,

    I took this idea from Quo's mod. I was having some discussion in that section and somebody asked me to open a new thread to get help. What I want to do is to play a vanilla rise and fall game but with one of the quo's mod functionality which is to disable the increase of science and culture when the population grows.

    Currently if you notice once your population rises, the science and culture increases with it. I want to disbale it.

    I've taken some help and coded it already but it's not working for me :(

    Can somebody please refer to the following code and let me know what's wrong with it?

    SQL File: Code.sql
    UPDATE GlobalParameters SET Value='0' WHERE Name='SCIENCE_PERCENTAGE_YIELD_PER_POP';
    UPDATE GlobalParameters SET Value='0' WHERE Name='CULTURE_PERCENTAGE_YIELD_PER_POP';

    ModFile: Changes.modinfo
    <?xml version="1.0" encoding="utf-8"?>
    <Mod id="52e9eb96-e559-4c54-b34f-b26742fb2ab5" version="1.1">
    <Properties>
    <Name>Quo's Mod</Name>
    <Teaser>Disable Science and Culture</Teaser>
    <Description>Disable Science and Culture</Description>
    <Authors>Quo</Authors>
    </Properties>
    <!-- Files included -->
    <Files>
    <File>Code.sql</File>
    </Files>
    </Mod>
     
  2. thecrazyscot

    thecrazyscot Spiffy

    Joined:
    Dec 27, 2012
    Messages:
    1,829
    In sql numbers don't go within quotes.
     
    Lohit likes this.
  3. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,459
    Location:
    Illinois, USA
    the problem is in the modinfo file. the mod has no instruction on what to do with the SQL file.

    This example mod shows the missing element needed in the modinfo file
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <Mod id="1d937889-0d2a-46a3-9792-ad82ca2aa354" version="1">
      <Properties>
        <Name>My Civ6 Changes</Name>
        <Description>Allows the inexperienced mod-maker to dump their xml or sql code into a prepackaged mod</Description>
        <Teaser>Allows the inexperienced mod-maker to dump their xml or sql code into a prepackaged mod</Teaser>
        <Authors>Lee</Authors>
      </Properties>
      <InGameActions>
    	<UpdateDatabase id="SQL_Changes">
    		<File>MyCiv6SQL_Changes.sql</File>
    	</UpdateDatabase>
    	<UpdateDatabase id="XML_GameplayChanges">
    		<File>MyCiv6XMLGameplayChanges.xml</File>
    	</UpdateDatabase>
    	<UpdateText id="XML_TextChanges">
    		<File>MyCiv6XMLTextChanges.xml</File>
    	</UpdateText>
    	<UpdateIcons id="XML_IconChanges">
    		<File>MyCiv6XMLNewIconDefinitions.xml</File>
    	</UpdateIcons>
    	<ImportFiles id="LUA_Imports">
    		<File>A.lua</File>
    	</ImportFiles>
    	<AddGameplayScripts id="GameplayTest">
    		<File>MyCiv6Changes_Gameplay.lua</File>
    	</AddGameplayScripts>
      </InGameActions>
      <Files>
        <File>MyCiv6SQL_Changes.sql</File>
        <File>MyCiv6XMLGameplayChanges.xml</File>
        <File>MyCiv6XMLNewIconDefinitions.xml</File>
        <File>MyCiv6XMLTextChanges.xml</File>
        <File>MyCiv6Changes_Gameplay.lua</File>
        <File>A.lua</File>
      </Files>
    </Mod>
    Specifically the OP is missing this bit from the example modinfo file
    Code:
      <InGameActions>
    	<UpdateDatabase id="SQL_Changes">
    		<File>MyCiv6SQL_Changes.sql</File>
    	</UpdateDatabase>
      </InGameActions>
    Note that is pre RaF but I don't believe anything would be different between "Vanilla" civ6 and RaF Civ6 for this issue.

    In Modbuddy you need to go to the mod's "Properties" and then the "InGame Actions" tab to add actions for the mod to perform with the files that are part of the mod.
     
  4. Lohit

    Lohit Chieftain

    Joined:
    Nov 13, 2016
    Messages:
    41
    Gender:
    Male
    Thanks a lot for your response.

    I actually never created any mod before and I'm totally unfamiliar with the modbuddy tool. In case you or anybody reading this got some spare time. Can you please help me fix the code I submitted above?
    It'll be a great help. I'm sure this change might be very simple for you guys but for me it'll take a lot of time to figure out.

    Thanks again :)
     

Share This Page