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

Civ 6 Modding Tools & Basics

Make a new civ or alter something in existent one

  1. Rajendran_P

    Rajendran_P Warlord

    Joined:
    Mar 10, 2017
    Messages:
    143
    Gender:
    Male
    Screenshot 2020-06-02 at 11.19.08 AM.png

    Raen, I read Gedemon's recommendation. I'm relatively new to modding and am not sure as to the follow-up action required to Gedemon's recommendation. In the "Combat And Stacking" mod, I did not see a "UnitFlagManager.lua" file. Or where is the "UnitFlagManager.lua" located. Appreciate your guidance
     
  2. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,445
    Location:
    Portugal
    I never used it but you can add something like this in your .modinfo:
    Code:
    <ReplaceUIScript id="MyMod_UnitFlagManager">
                <Properties>
                    <LuaContext>UnitFlagManager</LuaContext>
                    <LuaReplace>UnitFlagManager_MyMod.lua</LuaReplace>
                </Properties>
     </ReplaceUIScript>
    
    You find UnitFlagManager.lua at base game files: (...)common\Sid Meier's Civilization VI\Base\Assets\UI. You make a copy and rename to your name: something like UnitFlagManager_MyMod.lua

    Then you alter CreateUnitFlag function´s "IF part" with Gedemon code.
     
    Last edited: Jun 2, 2020
  3. Rajendran_P

    Rajendran_P Warlord

    Joined:
    Mar 10, 2017
    Messages:
    143
    Gender:
    Male
    Raen, thank you very much. Will try it.
     
  4. hazard_memetic

    hazard_memetic Chieftain

    Joined:
    Jun 3, 2020
    Messages:
    4
    Thanks guys, this is much appreciated. One quick question: do I need to put the new UnitFlagManager file in the mod folder or leave it in the Assets/UI folder?
     
  5. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,445
    Location:
    Portugal
  6. hazard_memetic

    hazard_memetic Chieftain

    Joined:
    Jun 3, 2020
    Messages:
    4
    Thanks so much raen, I'm happy to see it working by editing the base file directly, but couldn't get it to load a copy through ReplaceUIScript. I had put your above snippet above <Files> in modinfo, perhaps it needs to be in a different place? I'm very new to modding Civ, so my apologies is this is a dumb question.

    I'm just very happy this works, even if I didn't package it nicely. I'll play around and once I get it working I'll upload for others to use.

    Thanks again guys!
     
    raen likes this.
  7. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,445
    Location:
    Portugal
  8. Rajendran_P

    Rajendran_P Warlord

    Joined:
    Mar 10, 2017
    Messages:
    143
    Gender:
    Male
    Raen, I duplicated the UnitFlagManager.lua at base game files and thereafter included the additional code line (UnitFlag:new( playerID, unitID, FLAGTYPE_UNIT, FLAGSTYLE_MILITARY). I then Included this duplicated UnitFlagManager.lua in the 'Combat and Stacking' as well as modified the .modinfo file as per your stated "ReplaceUIScript". But it did not correct the unit's icon issue. The unit icon was still not visible when I loaded the mod with a new game. Nevertheless, I tried editing the base game UnitFlagManager.lua and it worked well. Now I am into 269 turns and everything seems ok. Thank you again for your support. I will update again once the modifications are successful.
     
  9. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,445
    Location:
    Portugal
    Investigating further I think is a question of configuration, we need to insert inside <InGameActions> (did not try it yet, leave that to you).


    Code:
    (...)
    <InGameActions>
     (...)
     <ReplaceUIScript id="MyMod_UnitFlagManager">
               <Properties>
                    <LuaContext>UnitFlagManager</LuaContext>
                    <LuaReplace>UnitFlagManager_MyMod.lua</LuaReplace>
                </Properties>
     </ReplaceUIScript>
     <ImportFiles id="MyModChangeScript_Files">
               <File>UnitFlagManager_MyMod.lua</File>
     </ImportFiles>
     (...)
    </InGameActions>
    (...)
    <File>UnitFlagManager_MyMod.lua</File>
    (...)
    
     
    Last edited: Jun 4, 2020
  10. Rajendran_P

    Rajendran_P Warlord

    Joined:
    Mar 10, 2017
    Messages:
    143
    Gender:
    Male
    Thanks Raen
     
  11. Rajendran_P

    Rajendran_P Warlord

    Joined:
    Mar 10, 2017
    Messages:
    143
    Gender:
    Male
    Raen,
    I am creating a new Civilization and Leader using your Civ 6 Modding Tool and Basic lesson. I managed to create the Indus Civilization and it runs well. I used India Civilization's and Leader's ICON. However, I wanted to create my own Civilization and Leader's ICON / Portrait. Can I create and add the '.dds' file manually under the Texture / Icons folder or do I have to use ModBuddy to insert them. Appreciate your guidance. Thank You.
     
    raen likes this.
  12. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,445
    Location:
    Portugal
    Hi, nice going :) You can create your DDS files outside modbuddy, but for creating textures (.tex) you have to use modbuddy asset manager. Any modification at a DDS you have to regenerate tex files to that modified DDS. In modbuddy you also have to fill up an XLP file (example icons.xlp) with your new icons, to appear in-game.
     
  13. Rajendran_P

    Rajendran_P Warlord

    Joined:
    Mar 10, 2017
    Messages:
    143
    Gender:
    Male
    Raen, Thank you for your quick response. I understand the portion of using mod buddy to create the textures (.tex) and filling up the XLP file with my new icons. Thereafter, do I need to copy these files (.tex & XLP) to my Mod folder (Folder name 'Textures) and create my mod manually without using modbuddy or do I have to continue from Modbuddy to create the final Mod. Thank you
     
  14. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,445
    Location:
    Portugal
    You have to continue from Modbuddy to create the final Mod, since XLP/icons bundle is created in ModBuddy.

    PS: You can have DDS only and no textures, but does not work fully for leaders. I started only with DDS´s with my Portugal mod, then migrated to Modbuddy and continued from there.
     
  15. Rajendran_P

    Rajendran_P Warlord

    Joined:
    Mar 10, 2017
    Messages:
    143
    Gender:
    Male
    .
    Thank You Raen, I understand. Will continue from modbuddy.
     
    raen likes this.
  16. Rajendran_P

    Rajendran_P Warlord

    Joined:
    Mar 10, 2017
    Messages:
    143
    Gender:
    Male
    Raen, one query. In modbuddy, for the new Civilization and Leader Icons to function and appear correctly, what "Files" and "Type" should I add in the FrontEnd and In-Game Actions. Thank You
     
  17. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,445
    Location:
    Portugal
    See modinfo example here: Civ 6 Modding Tools & Basics
     
  18. Rajendran_P

    Rajendran_P Warlord

    Joined:
    Mar 10, 2017
    Messages:
    143
    Gender:
    Male
  19. Rajendran_P

    Rajendran_P Warlord

    Joined:
    Mar 10, 2017
    Messages:
    143
    Gender:
    Male
    Raen, I have query. Is there any programs which convert SQL code to XML code format automatically. I am progressing on the Civ Mod buildup adding units and abilities. I am using some references from other mods. However, some of the codes are in SQL format. A SQL code to XML code format converter would definitely be helpful to reduce time.
     
  20. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,445
    Location:
    Portugal

Share This Page