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

[Vanilla] Add yield to plot.

Discussion in 'Mod Creation Help' started by fb2017, Mar 19, 2018.

Tags:
  1. fb2017

    fb2017 Chieftain

    Joined:
    Oct 8, 2017
    Messages:
    53
    Gender:
    Male
    Is it possible to add yields to a plot if the player has a specific trait?

    For example add +1 food and +1 production to desert tiles.
     
    Last edited: Mar 20, 2018
  2. ITcore

    ITcore Warlord

    Joined:
    Dec 25, 2016
    Messages:
    248
    Gender:
    Male
    Location:
    127.0.0.1
    You can modify and add new yields to plots. Check the Terrains.xml file for information.
     
  3. TheLunarArmy

    TheLunarArmy Chieftain

    Joined:
    Jul 9, 2014
    Messages:
    59
    Gender:
    Male
    Location:
    South-Africa
    Code:
    INSERT INTO Terrain_YieldChanges (TerrainType, YieldType, YieldChange)
    VALUES ('TERRAIN_DESERT','YIELD_PRODUCTION','1'), ('TERRAIN_DESERT','YIELD_FOOD','1');
    Should do what you want.
     
  4. fb2017

    fb2017 Chieftain

    Joined:
    Oct 8, 2017
    Messages:
    53
    Gender:
    Male
    Thanks! I'm kind of new to SQL, so how could you make a trait that does this?
     
  5. TheLunarArmy

    TheLunarArmy Chieftain

    Joined:
    Jul 9, 2014
    Messages:
    59
    Gender:
    Male
    Location:
    South-Africa
    I would look at Peter's (Russia) Trait and go from there. I could do it for you, but give it a try and learn :)
     
  6. fb2017

    fb2017 Chieftain

    Joined:
    Oct 8, 2017
    Messages:
    53
    Gender:
    Male
    Where are the SQL files located? I can only find the .xml files and not any "code". Can you find the trait in the game files or do you have to download something from the internet?
     
  7. isau

    isau Deity

    Joined:
    Jan 15, 2007
    Messages:
    3,071
    The game data is coded in XML. SQL is the (mainly) recommended way to edit it.

    Look for my intro to modding with SQLite Studio tutorial in the tutorials section. It's a little outdated on some specifics of creating the base mod files (written before ModBuddy) but covers how SQL works at a very basic level.
     
  8. fb2017

    fb2017 Chieftain

    Joined:
    Oct 8, 2017
    Messages:
    53
    Gender:
    Male
    Ok, thx
     

Share This Page