1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

change to modding from summer patch

Discussion in 'Civ6 - Creation & Customization' started by Gedemon, Jul 27, 2017.

  1. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,638
    Location:
    France
    there is no mention of modding in the patch notes, so I suppose we'll have to make our own notes...

    AFAIK, at the moment of this post, the tools were not updated.

    I'm looking at a very big diff file, but some things that I've noted:

    - the FontIcons.xml has changed, I think that we're going to be able to add our own in mods
    - adding PrereqTech to policies
    - new AI type: UNITTYPE_AIR
     

    Attached Files:

    Last edited: Jul 28, 2017
  2. Chrisy15

    Chrisy15 Limmu

    Joined:
    Jul 9, 2015
    Messages:
    1,935
    RequirementTypes REQUIREMENT_PLAYER_LEADER_TYPE_MATCHES is used by the Scenario (and REQUIREMENT_PLAYER_LEADER_TAG_MATCHES has also been readded) so hopefully these now work; don't know yet which Collections they can be used with tho.

    Things that haven't been fixed include the bug with multiple UDs of the same "DistrictClass" (to use the V term), so that's still pretty bad :/

    [EDIT] May as well list all of them, thinking about it - courtesy of Chimp
    Code:
    <Row Type="EFFECT_ADD_BELIEF" Kind="KIND_EFFECT"/> <Row Type="EFFECT_ADJUST_ALL_DISTRICTS_PRODUCTION" Kind="KIND_EFFECT"/> <Row Type="EFFECT_ADJUST_IMPROVEMENT_AMENITY" Kind="KIND_EFFECT"/> <Row Type="REQUIREMENT_CITY_HAS_ANY_WONDER" Kind="KIND_REQUIREMENT"/> <Row Type="REQUIREMENT_PLAYER_DISTRICT_THRESHOLD" Kind="KIND_REQUIREMENT"/> <Row Type="REQUIREMENT_PLAYER_HAS_AT_LEAST_NUM_BUILDINGS" Kind="KIND_REQUIREMENT"/> <Row Type="REQUIREMENT_PLAYER_IS_CLOSE_TO_VICTORY" Kind="KIND_REQUIREMENT"/> <Row Type="REQUIREMENT_PLAYER_LEADER_TYPE_MATCHES" Kind="KIND_REQUIREMENT"/> <Row Type="REQUIREMENT_PLAYER_LEADER_TAG_MATCHES" Kind="KIND_REQUIREMENT" /> <Row Type="REQUIREMENT_PLOT_ADJACENT_BUILDING_TYPE_MATCHES" Kind="KIND_REQUIREMENT"/>
    
    (Firaxis XML yay)
     
  3. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,989
    Location:
    London, UK
    Good news if this is the case!
     
  4. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,638
    Location:
    France
    they have added some new files to handle civilizations and leaders icons, all mods changing the UI files that use those icons will need to be updated i think.
     
  5. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,989
    Location:
    London, UK
    Seems like dependency handling has changed. As of now all mods that depend on DLC appear to be broken. I looks like you might need to explicit specify <Include> tags like this:

    Code:
    <UpdateArt id="PolandScenarioArt" criteria="PolandScenario">
                <Include mod_id="3809975F-263F-40A2-A747-8BFB171D821A" action_id="PolandJadwigaArt" required="1" />
                <File>PolandScenario.dep</File>
            </UpdateArt>
            <UpdateIcons id="PolandScenarioIcons" criteria="PolandScenario">
                <Include mod_id="3809975F-263F-40A2-A747-8BFB171D821A" action_id="PolandJadwigaIcons" required="1" />
                <File>Data/PolandScenario_Icons_Buildings.xml</File>
                <File>Data/PolandScenario_Icons_Civilizations.xml</File>
                <File>Data/PolandScenario_Icons_GreatWorks.xml</File>
                <File>Data/PolandScenario_Icons_Leaders.xml</File>
                <File>Data/PolandScenario_Icons_UnitPortraits.xml</File>
                <File>Data/PolandScenario_Icons_Units.xml</File>
            </UpdateIcons>
            <UpdateDatabase id="PolandScenarioGameplay" criteria="PolandScenario">
                <Include mod_id="3809975F-263F-40A2-A747-8BFB171D821A" action_id="PolandJadwigaGameplay" required="1" />
                <Properties>
                    <LoadOrder>100</LoadOrder>
                </Properties>
                <File Priority="1">Data/PolandScenario_RemoveData.xml</File>
                <File>Data/PolandScenario_AI.xml</File>
                <File>Data/PolandScenario_Barbarians.xml</File>
    ...
    Edit: Yes, I was right. Adding the <Include> tags is necessary for mods that use DLC assets.
     
    Last edited: Jul 27, 2017
  6. Chrisy15

    Chrisy15 Limmu

    Joined:
    Jul 9, 2015
    Messages:
    1,935
    They appear to have changed the TopPanel to try and make it dynamic, but they haven't been particularly clear on how this works...
    For Yields:
    Code:
    local m_YieldButtonSingleManager = InstanceManager:new( "YieldButton_SingleLabel", "Top", Controls.YieldStack ); -- Managers to handle yields; Science, Culture and Tourism use Single, while Gold and Faith use Double.
    local m_YieldButtonDoubleManager = InstanceManager:new( "YieldButton_DoubleLabel", "Top", Controls.YieldStack );
    g_ExtraYieldLoaders = {};
    include("TopPanelLoader_", true); -- Presumably you name your file "TopPanelLoader_C15_HousingAmenities" or w/e so that include picks it up; idk what the second argument does tho.
    -- snip --
    
    -- After all the Yields are defined, it then runs this
    
        for _, loader in pairs(g_ExtraYieldLoaders) do -- So you're apparently meant to insert your new Yields into this table somehow. I guess since it's global and your file's included, you can just do table.insert(g_ExtraYieldLoaders, ???) to do it...
            loader:RefreshExtraYields(m_YieldButtonSingleManager, m_YieldButtonDoubleManager); -- Yes. Guess this must be a new method.
        end
    
        Controls.YieldStack:CalculateSize(); -- Dynamically size the stack etc.
        Controls.StaticInfoStack:CalculateSize();
        Controls.InfoStack:CalculateSize();
    
    So this is at least a good sign that they're being helpful; maybe they've done the same to the LaunchBar too...
     
  7. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    3,989
    Location:
    London, UK
    The Action Reference used in mod info can now have a type: Include, Exclude, Required, ConflictsWith. Interesting.
     
  8. Chrisy15

    Chrisy15 Limmu

    Joined:
    Jul 9, 2015
    Messages:
    1,935
    Oic - this is whether there's a superscript value for the per turn. So Culture and Science are Single because their whole box is your Per Turn, whereas Gold and Faith show your respective treasuries in their box and have the per turn as a superscript at the end.
     
  9. decamatus

    decamatus Chieftain

    Joined:
    Mar 9, 2017
    Messages:
    14
    I'm pretty sure those <Include> tags already existed before today's update and they are there in any of the scenarios where the scenarios use a DLC that came out at the same time. I have been using them to get the ACoIaF content active in the scenario for a few weeks now.
     
    Last edited: Jul 27, 2017
  10. Chrisy15

    Chrisy15 Limmu

    Joined:
    Jul 9, 2015
    Messages:
    1,935
    I've used the method Firaxis used for the InGameTopOptionsMenu (in-game menu)'s Civ icon, and it's still working post-update - is this the kind of thing you're referring to
     
  11. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    5,555
    Location:
    Illinois, USA
    ProductionPanel.lua appears to have recieved changes to the Units portions of the file. I was getting the Islam icon next to all unit icons and under their name, as here:

    I cured this by grabbing the new version of ProductionPanel and re-making my changes to the file. This was relatively easy for me since I am only making changes in the 'Refresh' function to Buildings and Districts.

    For people who are making major changes to the ProductionPanel.lua file, they will have to find what lines have changed after the patch in the base file, and work accordingly.

    I did not attempt to determine what Firaxis changed in the base ProductionPanel.lua file.
     
  12. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,638
    Location:
    France
    About that, I've added the diff file for xml, lua, sql, artdef and a few other text files to the first post.
     
    IllustriousYou likes this.
  13. isau

    isau Warlord

    Joined:
    Jan 15, 2007
    Messages:
    2,750
    The load order of files in the .modinfo file is now handled differently. It temporarily broke my mod. Used to be if you had a bunch of files with the same Priority the mod would load the files in order from top to bottom in the Files list. This no longer works reliably. I fixed it by manually numbering the priority of the load value of each file (higher number = loads sooner, I learned from trial and error.)
     
  14. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    5,555
    Location:
    Illinois, USA
    There were load order issues with files before the patch. Specifically if you did not have an action <LoadOrder> then any mod that had a <Properties> entry in an action (even if it was as inoccuous as a <Name> designation) could cause your file loading order to not follow the alphanumeric pattern established within the <Files> part of the modinfo.

    Even if you did have an action <LoadOrder> but no Priority for each file within the action, you could get load order irregularities dependant upon what other mods were enabled.

    Higher-number Priority within the action indeed loads earlier.

    The best practice that I settled on within my own mods was to always have both <LoadOrder> for the action and <Priority> for each file within the action with differing numbers for each file if file loading order is at all important.

    Before I adopted this practice, for example, Magil's rather harmless-looking designation here would kill the file loading order of my files if both mods were enabled
    Code:
    <UpdateDatabase id="WondrousWonders">
    	<Properties>
    		<Name>WONDROUS_WONDERS</Name>
    	</Properties>
    	<Items>
    		<File>NationalWonders/NationalWonders.xml</File>
    		<File>NationalWonders/NationalWondersBonus.xml</File>
    		<File>WorldWonders/WorldWonders.xml</File>
    		<File>WorldWonders/ThemingBonus.xml</File>
    	</Items>
    </UpdateDatabase>
    So here where I need my DataBaseSchemaChanges.sql file to load before any other file in the action I have as this:
    Code:
      <InGameActions>
        <UpdateDatabase id="DataBaseSchemaChanges">
          <Properties>
            <LoadOrder>-1</LoadOrder>
          </Properties>
          <File priority="1">XML/BuildingModifiers.xml</File>
          <File priority="2">XML/CityYieldAntiModifiers.xml</File>
          <File priority="3">XML/PlotResourceRequirementSets.xml</File>
          <File priority="4">SQL/DataBaseSchemaChanges.sql</File>
        </UpdateDatabase>
        .....etc.....
    The load order with a -1 ensures that this code is loaded before the code for my other mod(s) that make use of the utility systems of the mod.
     
  15. MadDjinn

    MadDjinn Chieftain

    Joined:
    Jan 28, 2011
    Messages:
    4,553
    hmm, odd. I went the exact opposite way with my mod and priorities. Ie 1 loads first, 2 loads next, etc


    InGameAction order no longer matters (was flaky anyways)

    Sort by Priority then by relative filename
    If no priority given, defaults to 0 then checks by filename.
     
  16. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,638
    Location:
    France
    I'm making a new dump for Lua method, after a quick look those seem to be news and interesting for scenarios in pPlayers:GetAi_Military()

    Code:
             AddUnitToScriptedOperation
             ScriptForceUpdateTargets
             StartScriptedOperationWithTargetAndRally
             SetRival
             SetScriptedTargetAndRally
             SetScriptedOperationReady
             TypeName
             StartScriptedOperation
    previously it was only:
    Code:
             AllowUnitConstruction
             HasOperationAgainst
             CanConstructUnits
             PrepareForWarWith
     
  17. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,638
    Location:
    France
    any news about a possible update of the mod tools ?

    they were updated on steamdb 4 days ago, but not for us yet ?
     
  18. Chrisy15

    Chrisy15 Limmu

    Joined:
    Jul 9, 2015
    Messages:
    1,935
    I noticed that they modified the Tuner City panel slightly, but I suppose that'd come under the game being updated since that's where the panels are stored.
     
  19. pokiehl

    pokiehl Chieftain

    Joined:
    Mar 5, 2017
    Messages:
    240
    There's a new "AddGameplayScripts" In-Game action. No idea what to use it for
     
  20. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    5,555
    Location:
    Illinois, USA

Share This Page

Ebates: Get Paid to Shop