Rise of Nations: Extended Edition

Rise of Nations: Extended Edition

Advance to the Steam Age
Explore modified graphics, scenarios, replays, and more! Ready to share your creations with the world? Upload right from the in-game mod manager.
Anyone know how to make a script effect persistant from scenario to conquest?
Un playtesting a mod to see if it works ok with the campaigns, I ran across a script I liked and am trying to add it for use in the Campaign.

It is Snake's script that resizes units found with his Scriptmaking program.
It works well for the Quick Battles and the unit sizes remain persistant when reloading the saved game.

When I pasted the script inside the AI files i.e. Economic.bhs or a conquest script i.e, cetralruntime.bhs; the script works to resize units as usual.

However, if I save the game and return back to it in the Campaign, (or a Quick Battle as well if I add the script into AI .bhs i.e. economic.bhs; the unit scaled size has returned back to its original setting.

What im trying to do is find the secret where the unit scaling is persistent in the scenario scripts to other scripts in RON where the scaling is not , and rescales. back to the original size when their saved game is reloaded.
< >
Showing 1-1 of 1 comments
// Here is snakes script
// Works to resize / rescale units in all game scripts it has been added to
//effects remain persistent in saved games only in scenario scripts (ie quick Battle games)
//anyone know how to make effect persistent in conquest or other script types rather than reverting back to its original scaling after a save reload?

scenario {

static int DEBUG = 0;
static int sectimeoffset = 0;

run_once {
set_game_msg_color("GREEN");
print_game_msg("1.2 Unit size script loaded successfully.");
set_game_msg_color("WHITE");
}

if (time_sec() >= sectimeoffset) {
// Unit Scale Modifier v0.7 by Snake
for (n = 1; n <= 8; n++) {
for (u = 1; u <= num_units(n); u++) {
uid = find_unit(n, "");
if ((get_unit_scale(n, uid) != 1.2) && (uid != -1) && (object_type(n, uid) != "Caravan")) {
set_unit_scale(n, uid, 1.2);
}
}
}

sectimeoffset = time_sec() + 1;
}
}
Last edited by SteahmChip; 7 Mar @ 10:14pm
< >
Showing 1-1 of 1 comments
Per page: 1530 50