Thalassicus
Bytes and Nibblers
I'm building a system where tooltips are automatically created from the game data files (most of them are hand-written in every language in vanilla).
In the CiV code the capability to do this is provided and partially used, but for whatever reason just wasn't finished. I've included the progress on this in Combined v4 and recent versions of the beta. This is in large part thanks to alpaca's work figuring out how to retrieve many of the individual stats for buildings. I designed a way to take this and organize it in a table, created an algorithm to loop through the table, refined it further and you have what you see now.
Once this system is fully armed and operational:
Currently this system is only active for buildings. I want to get all the bugs hammered out, then extend it to other object tooltips (mainly units and promotions), and release it as a stand-alone mod.
For modders out there, I'm attempting to design the internal workings of the code so it's easy to extend. If you wish to add stats (sql columns) to one of the game's tables and create an auto-tooltip for the new stat, you won't need to modify the core InfoTooltipInclude file at all or override it in your mod. There's two main components to do this. It relies on the LuaEvents "super global" designed to pass data between scripts:
In the CiV code the capability to do this is provided and partially used, but for whatever reason just wasn't finished. I've included the progress on this in Combined v4 and recent versions of the beta. This is in large part thanks to alpaca's work figuring out how to retrieve many of the individual stats for buildings. I designed a way to take this and organize it in a table, created an algorithm to loop through the table, refined it further and you have what you see now.
Once this system is fully armed and operational:
- Solves all current and future tooltip errors.
- Greatly reduces time required to make mods. I know that personally about a fourth of my time's been spent creating and updating tooltips.
- Automatically localizes mods for users of Español, Français, Deutsch, and other versions of Civ, once I get the core tooltip file translated. I've done some preliminary attempts to try and get basics in place for the first two languages, though I'm not a native speaker of either one so it's probably rather odd grammar. (If you might be able to help with that, please see the translations thread here.)
Currently this system is only active for buildings. I want to get all the bugs hammered out, then extend it to other object tooltips (mainly units and promotions), and release it as a stand-alone mod.
For modders out there, I'm attempting to design the internal workings of the code so it's easy to extend. If you wish to add stats (sql columns) to one of the game's tables and create an auto-tooltip for the new stat, you won't need to modify the core InfoTooltipInclude file at all or override it in your mod. There's two main components to do this. It relies on the LuaEvents "super global" designed to pass data between scripts:
- A function to call for adding new stats to the tooltip table(s).
- An event generator instructing all mods to proceed with calling this function.