Total War: WARHAMMER II

Total War: WARHAMMER II

04 Better Chaos Invasion (Optional)
MINOS  [developer] 19 Jun, 2018 @ 3:17am
The LUA Script pasted down here:
Edited Script Parts here to see:
(There are actually more Changes, but the Textspace here is limited)

-- the imperium values that trigger the mid and late game events
local ci_mid_game_imperium = 5;
local ci_late_game_imperium = 8;

-- turn number to force the Chaos Invasion to trigger if the player has not hit the required imperium level. Also works for autoruns where there is no player
-- values here that are non-numeric now disable the relevant timeout
local ci_mid_game_turn_timeout = 100;
local ci_late_game_turn_timeout = 150;

-- the number of hordes we want the Chaos faction to have when spawning a new wave
-- mid game | late game
-- easy, normal, hard, very hard, legendary
local ci_max_num_hordes = {{5, 6, 7, 8, 9}, {7, 8, 9, 10, 11}};

-- range of units to spawn a new horde with (min, max)
-- mid game | late game
local ci_horde_size = {{15, 17}, {16,18}};

local ci_chaos_horde_buildings = {
"wh_main_horde_chaos_settlement_5",
"wh_main_horde_chaos_warriors_3",
"wh_main_horde_chaos_forge_2",
"wh_main_horde_chaos_trolls_1",
"wh_main_horde_chaos_weapons_2",
"wh_main_horde_chaos_giants_1",
"wh_main_horde_chaos_knights_2",
"wh_main_horde_chaos_magic_2",
"wh_main_horde_chaos_marauders_3",
"wh_main_horde_chaos_dragon_ogres_2"
};

local ci_beastmen_horde_buildings = {
"wh_dlc03_horde_beastmen_herd_5",
"wh_dlc03_horde_beastmen_gors_4",
"wh_dlc03_horde_beastmen_minotaurs_3",
"wh_dlc03_horde_beastmen_arcane_2",
"wh_dlc03_horde_beastmen_centigors_3",
"wh_dlc03_horde_beastmen_creatures_3",
"wh_dlc03_horde_beastmen_giants_1",
"wh_dlc03_horde_beastmen_razorgors_2",
"wh_dlc03_horde_beastmen_ruination_2",
"wh_dlc03_horde_beastmen_weapons_2"

-- if the campaign is Very Hard or Legendary then use the hard personalities
if (difficulty == 1 or difficulty == 2 or difficulty == 3 or difficulty == 4 or difficulty == 5) and not cm:is_multiplayer() then

ram:add_mandatory_unit("chaos_1", "wh_main_chs_art_hellcannon", 1);

ram:add_unit("chaos_1", "wh_main_chs_inf_chaos_marauders_0", 2);
ram:add_unit("chaos_1", "wh_main_chs_inf_chaos_warriors_0", 5);
ram:add_unit("chaos_1", "wh_main_chs_inf_chaos_warriors_1", 3);
ram:add_unit("chaos_1", "wh_main_chs_cav_chaos_chariot", 2);
ram:add_unit("chaos_1", "wh_main_nor_cav_marauder_horsemen_0", 2);
ram:add_unit("chaos_1", "wh_main_chs_cav_chaos_knights_0", 4);
ram:add_unit("chaos_1", "wh_main_chs_mon_chaos_warhounds_0", 1);
ram:add_unit("chaos_1", "wh_main_chs_mon_chaos_spawn", 2);
ram:add_unit("chaos_1", "wh_main_chs_mon_trolls", 2);

ram:new_force("chaos_2");

ram:add_mandatory_unit("chaos_2", "wh_main_chs_art_hellcannon", 1);

ram:add_unit("chaos_2", "wh_main_chs_inf_chaos_warriors_0", 20);
ram:add_unit("chaos_2", "wh_main_chs_inf_chaos_warriors_1", 10);
ram:add_unit("chaos_2", "wh_main_chs_inf_chosen_0", 7);
ram:add_unit("chaos_2", "wh_main_chs_inf_chosen_1", 4);
ram:add_unit("chaos_2", "wh_main_chs_cav_chaos_knights_0", 15);
ram:add_unit("chaos_2", "wh_main_chs_cav_chaos_chariot", 8);
ram:add_unit("chaos_2", "wh_main_chs_mon_chaos_spawn", 8);
ram:add_unit("chaos_2", "wh_main_chs_mon_trolls", 10);
ram:add_unit("chaos_2", "wh_main_chs_mon_giant", 8);
ram:add_unit("chaos_2", "wh_main_chs_art_hellcannon", 10);

ram:new_force("beastmen_1");

ram:add_unit("beastmen_1", "wh_dlc03_bst_inf_ungor_herd_1", 26);
ram:add_unit("beastmen_1", "wh_dlc03_bst_inf_ungor_raiders_0", 18);
ram:add_unit("beastmen_1", "wh_dlc03_bst_inf_ungor_spearmen_0", 18);
ram:add_unit("beastmen_1", "wh_dlc03_bst_inf_chaos_warhounds_0", 13);
ram:add_unit("beastmen_1", "wh_dlc03_bst_inf_gor_herd_0", 10);
ram:add_unit("beastmen_1", "wh_dlc03_bst_inf_gor_herd_1", 10);
ram:add_unit("beastmen_1", "wh_dlc03_bst_inf_centigors_0", 5);

ram:new_force("beastmen_2");

ram:add_unit("beastmen_2", "wh_dlc03_bst_inf_gor_herd_0", 17);
ram:add_unit("beastmen_2", "wh_dlc03_bst_inf_gor_herd_1", 17);
ram:add_unit("beastmen_2", "wh_dlc03_bst_inf_ungor_spearmen_1", 12);
ram:add_unit("beastmen_2", "wh_dlc03_bst_inf_ungor_raiders_0", 12);
ram:add_unit("beastmen_2", "wh_dlc03_bst_inf_bestigor_herd_0", 10);
ram:add_unit("beastmen_2", "wh_dlc03_bst_inf_minotaurs_0", 8);
ram:add_unit("beastmen_2", "wh_dlc03_bst_inf_minotaurs_1", 8);
ram:add_unit("beastmen_2", "wh_dlc03_bst_inf_cygor_0", 7);
ram:add_unit("beastmen_2", "wh_dlc03_bst_mon_giant_0", 5);
ram:add_unit("beastmen_2", "wh_dlc03_bst_cav_razorgor_chariot_0", 4);
Last edited by MINOS; 19 Jun, 2018 @ 3:19am