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

First Mod: Liberation War

Discussion in 'Mod Creation Help' started by werebearstare, Jun 9, 2021.

Tags:
  1. werebearstare

    werebearstare Chieftain

    Joined:
    Jun 9, 2021
    Messages:
    1
    First time creating a mod. Want to make the Liberation War always available. Created my SQL:

    UPDATE DiplomacyStatements_DeclareWar SET RequiresOccupiedFriendlyCity=0 WHERE KIND_WAR='LIBERATION_WAR';
    Essencially changing that Boolean value to 0 so it can always be done.

    When I build the mod though, there is no change. I followed the wiki and thought that I did everything right. Any direction or prompts to a first time modder would be appreciated.
     
  2. LeeS

    LeeS Imperator Supporter

    Joined:
    Jul 23, 2013
    Messages:
    7,205
    Location:
    Illinois, USA
    1. There is no game table called DiplomacyStatements_DeclareWar. That is the name of an XML file, but the names of the XML files have no bearing on XML or SQL code. It is the contents of the basegame files that matters. Firaxis could have called that XML file Cheeseburgers_DeclareWar.xml and so long as the contents were the same there would be no difference in how the code gets added to the game's database.
    2. SQl and XML code does not alter or add based on the names of files, but rather they alter or add directly to the game database, via the various tables within the database regardless of the name of the file wherein the XML or SQL code is contained.
    3. The needed table-name is DiplomaticActions
    4. "DIPLOACTION_DECLARE_LIBERATION_WAR" is the needed DiplomaticActionType within table DiplomaticActions
    5. So the needed code would be
      Code:
      UPDATE DiplomaticActions SET RequiresOccupiedFriendlyCity=0 WHERE DiplomaticActionType='DIPLOACTION_DECLARE_LIBERATION_WAR' ;
      Assuming this sort of a change does not require follow-on alterations to settings within other game-tables that are linked to this DiplomaticActionType and that the game will actually correctly implement this alteration to the boolean column for that DiplomaticActionType.
     

Share This Page