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

Kael's Guide help

Discussion in 'Civ5 - Creation & Customization' started by Ferraus, May 10, 2020.

  1. Ferraus

    Ferraus Chieftain

    Joined:
    Apr 29, 2020
    Messages:
    4
    Gender:
    Male
    Hello All,

    I am currently making my way through Kael's guide and I've got to making the unit icon invisible using Lua. However, I cant find the way to activate the script. For xml its easy, I go to properties, actions and add OnModActivated.

    From my reading for other tutorials the UI lua code should be activated by going to properties, content and adding InGameUIAddin. Unfortunately the only files I can choose are the xml ones, my lua files do not appear. The code i'm editing ends in .lua "UnitFlagManager.lua". And it was added straight from the <Civilization V>\assets\UI\InGame> directory.

    Is the process for activating Lua script now different or am I missing something?

    Cheers
     
  2. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,743
    Location:
    Illinois, USA
    whoward69's what ModBuddy setting for what file types tutorial

    Since you are replacing one of the game's existing lua files for the User Interface ("UnitFlagManager.lua"), in this specific case you want to literally replace the original game file with the one in your mod, so all that is generally necessary is to set the property of the file's ImportIntoVFS as "true". The whole file of your altered version is required -- you cannot just add a new function or alter a single function. You have to copy the original file to your mod, make your desired changes or additions to the copy in your mod, save your work, and then use the "Import" method to replace the game's original version of the file when your mod is running.

    You are not actually affecting the game's original lua file --> you are overwriting the version of the file that is loaded into the game's Virtual File System when the game executes your mod.

    -------------------------------------

    Kael's guided is outdated in many respects on how modders must accomplish certain things, but it is still an excellent introductory on how adding or altering stuff in the game's SQL/XML database is conducted. But you should always refer to William Howard's tutorial on what steps are needed for what types of files since it is up to date (Firaxis has not made any changes to Modbuddy or how the game executes mod instructions since the last time William updated the thread).
     
    Last edited: May 10, 2020
  3. Ferraus

    Ferraus Chieftain

    Joined:
    Apr 29, 2020
    Messages:
    4
    Gender:
    Male
    Cheers Lee, I think I understand now. Unfortunately it seems Kael's guide is a little out dated when I compare the lua code he references to what I see with BNW files. Never the less, Howard's post was very enlightening, thanks for pointing it out. I also found your tutorials on building in xml invaluable, really great stuff so thank you for putting the effort into those as well.
     

Share This Page