megapatato
Chieftain
- Joined
- Sep 11, 2024
- Messages
- 1
Hi folks, got a small feature working, and I'd like to package it as a mod. Concretely, it adds a sort option to the listing of cities for trade routes, where cities are sorted by their foundation date, with newer cities to the top (because I like growth lol).
Originally, my caveman self edited the game files, BNW version; this only requires adding some Lua code and it works fine. Now that I'm using Enhanced User Interface, I'd like to package my mod as an add-in for EUI. I've read here that Lua context is a bit of a hot mess. The question is: what is the correct way of replacing a specific function (Assets/DLC/UI_bc1/ImproveBNW/ChooseInternationalTradeRoutePopup.lua::RefreshData() ) from a mod, without having to replace the entire contents of the file? What's the best way of adding some functions scoped to that context?
~MP
Originally, my caveman self edited the game files, BNW version; this only requires adding some Lua code and it works fine. Now that I'm using Enhanced User Interface, I'd like to package my mod as an add-in for EUI. I've read here that Lua context is a bit of a hot mess. The question is: what is the correct way of replacing a specific function (Assets/DLC/UI_bc1/ImproveBNW/ChooseInternationalTradeRoutePopup.lua::RefreshData() ) from a mod, without having to replace the entire contents of the file? What's the best way of adding some functions scoped to that context?
~MP