Welcome to the AI Mods Club! This is the ultimate hub for enthusiasts and developers dedicated to creating and sharing mods for Age of History 2 and AOH3 in the future, with a unique twist: our mods are enhanced and often coded with the help of advanced AI technologies.
DEV UPDATE #2 - Custom Mapmodes and Map Scripting.
It has been some time since the previous update since we were primarily busy with university. That is now through. To celebrate this, we've added In-Game Custom Mapmode support, Map Scripting support, a new music framework, and databases to go along with it. We have also moved our GitHub account's URL from one of our personal contributors' accounts fully over to Confoederatio. That's right - repossessed. In addition, both the nascent 11:59 mod as well as AnalyticalEngine have been placed under CTD, or Confoederatio, Technical Division (in contrast with CRD, the research division that does actual research). The full fixes and patch notes for it are seen above.
Mapmodes now fold outwards from the Minimap. You can click the chevron at left to expand custom modded mapmodes.
The way custom mapmodes work are by specifying a .js file in your mod folder and utilising the addMapmode() scope with the following options:
/**
* addMapmode() - Adds a modded in-game mapmode to config.mapmodes.
* @param {Object} [arg0_options]
* @param {String} [arg0_options.id] - The ID of the mapmode to declare in config.mapmodes. Best practices indicate you should have a dedicated mod ID.
* @param {String} [arg0_options.name] - The in-game display name for your mapmode.
*
* @param {boolean} [arg0_options.is_editor_mapmode=false] - Whether this is an editor mapmode.
* @param {boolean} [arg0_options.is_game_mapmode=false] - Whether this is an in-game mapmode.
* @param {boolean} [arg0_options.live_update=false] - Whether this is mapmode should update live. Decreases performance at the cost of a live update loop.
* @param {boolean} [arg0_options.separate_mapmode=false] - Whether this is a fully-fledged mapmode, or a sub-mapmode of the pre-existing applied mapmode.
*
* @param {Function} [arg0_options.special_function] - Must return an RGBA value for all provinces in array format, [0-255, 0-255, 0-255, 0-1]. Passes (province_obj). Undefined assumes a fully transparent province.
*/
We provide the example of a religion mapmode in the Devlog, but this is fully customisable so long as you make sure that it returns an RGBA value that you wish from various conditions (see Documentation). There is still some level of jank with in-game mapmodes, but this can always be fixed by the end user, though we are working on it. You can see exactly how you would go about coding such a custom mapmode below:
addMapmode({
id: "11.59_religion",
name: "Religion",
is_editor_mapmode: true,
is_game_mapmode: true,
live_update: true,
separate_mapmode: true,
special_function: function (arg0_province_obj) {
//Convert from parameters
var province_obj = getProvince(arg0_province_obj);
//Initialise main
if (!main.all_religions) main.all_religions = getAllReligions();
//Declare local instance variables
var religion_obj = main.all_religions[province_obj.getReligion()];
var province_colour = undefined;
var province_religion_colour = religion_obj.Color;
//Return statement
return [province_religion_colour[0]*255, province_religion_colour[1]*255, province_religion_colour[2]*255, 0.85];
}
});
We have also added better Windows-side support. AnalyticalEngine will no longer malfunction if you do not have Steam open, and it will also work if you start AnalyticalEngine from outside the given src file. You may still have to start it twice to get it working each time your computer boots up - we are unsure why this is. There are now also options for playing custom music: playMusic() works like the Event Outcome provided by the basegame, whilst adding playMainTheme(arg0_file_path) plays a song as the main theme upon startup. It must, of course, be in a .js file within the mods/<mod_name> folder.
GDP (PPP) in 1100AD. You can now use data like this for automatically populating base province map data, assuming your projection is equirectangular.
Finally, there is economic and population scripting. Most of these instructions have been published above alongside corresponding datasets (for Base Development/Economy and Population/Province Growth Rate) for use, and you can view the full methodology for constructing these datasets here: https://github.com/Confoederatio/Eoscala-Velkscala/blob/main/Eoscala 1.0-Velkscala 0.5 - A Gridded Reconstruction of Global GDP and Population from 10000BC to the Present.pdf.
With that, 0.5b - Rhine is released. The only main missing feature left are Custom UIs, which are technically supported, but for which good tooling does not currently exist.