Recent content by Zur13

  1. Zur13

    ModBuddy FrontEndActions

    How to force ModBuddy to place action into <FrontEndActions> section of generated modinfo file? The image bellow shows my current setup and resulting part of modinfo file (the action is in <InGameActions> section) <InGameActions> <UpdateDatabase id="ZRTCC_Settings"> <Properties>...
  2. Zur13

    Is pulldown component broken by the Sep patch? CTD issue.

    So I have a lot of mods with the common issue: when the mod with pulldown (combobox) enabled and used in game after the you try to leave the game (exit to the main menu) the game crash happens. After a lot of debugging I've isolated the issue to this case: UI XML component: <PullDown...
  3. Zur13

    Edit map in save game with worldbuilder?

    If you are talking about offline game than you can use my mod for some ingame map customization https://steamcommunity.com/sharedfiles/filedetails/?id=1651487987
  4. Zur13

    Quick Modding Questions Thread

    Anyone knows the simple way to track unit modifier changes? I need to do some actions in my mod when the unit receives new modifier or lose existing one.
  5. Zur13

    Quick Modding Questions Thread

    You can check my Spy City Tooltip mod https://steamcommunity.com/sharedfiles/filedetails/?id=1674987878 I think the best way is to use proxy file if you want your mod to be compatible with both vanilla and expansion version of the script but only if the functions you want to overide are not...
  6. Zur13

    Quick Modding Questions Thread

    As far as I understand the expansions are using file naming to extend scripts like: orig.lua orig_exp2.lua include("orig") But if you are using it in mods: orig_mod1.lua include("orig_exp2") and orig_mod2.lua include("orig_exp2") Only one moded version will be active and code of one of...
  7. Zur13

    Quick Modding Questions Thread

    Yes this is correct. But it should be used only when replacing some script is really needed because this operation makes incompatible the mods which are replacing the same script.
  8. Zur13

    Quick Modding Questions Thread

    If you need your own UI and not replace some base game UI element you may add your own UI: <AddUserInterfaces id="UI"> <Properties> <Context>InGame</Context> <LoadOrder>99000</LoadOrder> </Properties> <File>CTE_UI.xml</File> </AddUserInterfaces> You need a...
  9. Zur13

    Quick Modding Questions Thread

    You have replaced a lot of game code which is located in file InGame.lua with few of your functions. This is bad approach in general and I'd suggest you to find a better way to integrate your mod but if you want to stick with this approach you should copy the content of InGame.lua into your...
  10. Zur13

    Quick Modding Questions Thread

    I was able to promote spy so it had all available promotion perks (i don't remember but i think it get 18 lvls) using my mod Cheat Menu for Units. So I think there is no hardcoded lvl limit or it is implemented in some unnatural way.
  11. Zur13

    Quick Modding Questions Thread

    Yes, you can use GetCities():GetCount() but if I created such modifier I would also check if city has at least 1 gold income to be able generate additional income something like: GoldPerTurn = Round( pCity:GetYield( YieldTypes.GOLD ), 1); you can check the CitySupport.lua to see if you need it.
  12. Zur13

    Quick Modding Questions Thread

    I see 2 options: you can create a simple lua code which will calculate and add additional gold on turn start but there may be problems with calculating next turn income you may need to check this thing or you can create new city modifier and bound it to new civilization ability (I don't know...
  13. Zur13

    Quick Modding Questions Thread

    I'm not sure about SQL but in lua you can look at InGametopOptionsMenu.lua local gameSeed :string = tostring( GameConfiguration.GetValue("GAME_SYNC_RANDOM_SEED") ); local mapSeed :string = tostring( MapConfiguration.GetValue("RANDOM_SEED") );
  14. Zur13

    Quick Modding Questions Thread

    Thanks, looks like it is what I'm looking for. Now I'm trying to figure out how to get localized modifier description for showing to user. I have tried to use GameEffects.GetModifierText( instID ) but it fails with the error: Runtime Error: Invalid number of arguments. Expected -...
  15. Zur13

    Quick Modding Questions Thread

    How to find out in lua code if the unit has some active effect? I mean the effects from visiting a NaturalWonder or from barracks and other buildings in the city where it was trained (like additional speed or +20% XP for example)?
Top Bottom