In custom battle, each type of troop only have 2 tiers, how can I add 1 more tier for each type of troop?
#overriding troop info for factions in quick start mode.
slot_faction_quick_battle_tier_1_infantry = 41
slot_faction_quick_battle_tier_2_infantry = 42
slot_faction_quick_battle_tier_3_infantry = 43
slot_faction_quick_battle_tier_1_cavalry = 44
slot_faction_quick_battle_tier_2_cavalry = 45
slot_faction_quick_battle_tier_3_cavalry = 46
slot_faction_quick_battle_tier_1_archer = 47
slot_faction_quick_battle_tier_2_archer = 48
slot_faction_quick_battle_tier_3_archer = 49
slot_faction_quick_battle_bearer_infantry = 50
(store_mul, ":rand_min", ":num_infantry", 15),
(val_div, ":rand_min", 100),
(store_mul, ":rand_max", ":num_infantry", 45),
(val_div, ":rand_max", 100),
(store_random_in_range, ":num_tier_2_infantry", ":rand_min", ":rand_max"),
(store_sub, ":num_tier_1_infantry", ":num_infantry", ":num_tier_2_infantry"),
(faction_get_slot, ":cur_troop", ":faction_no", slot_faction_quick_battle_tier_2_infantry),
(set_visitors, ":cur_entry_point", ":cur_troop", ":num_tier_2_infantry"),
(val_add, ":cur_entry_point", 1),
Somebody said:And after you declare them for each faction in script_game_quick_start, go down to the following:
This is where the troop ratio per tier is calculated. Do some basic math here to get the amount for your new tier. Don't forget to subtract from the total.Code:(store_mul, ":rand_min", ":num_infantry", 15), (val_div, ":rand_min", 100), (store_mul, ":rand_max", ":num_infantry", 45), (val_div, ":rand_max", 100), (store_random_in_range, ":num_tier_2_infantry", ":rand_min", ":rand_max"), (store_sub, ":num_tier_1_infantry", ":num_infantry", ":num_tier_2_infantry"),
Somebody said:You don't need to use banners_kingdoms.dds. Any banner will suffice, as long as you have the correct scene props, banner meshes, and mesh shields/projections, (map icons exist but aren't used). Those are just higher resolution than the regular banners. What you can do is modify the first 6 texture, and then make another copy, modifying the last 6 texture, and then copy the necessary meshes and make them use your new material.
You probably forgot to do this for battle mode.Panzercracker said:I have a new trouble, in siege mode, my spawn point Archers is no problem, but in open field mode, all archers both mine and enemy spawn at center of map, not original points.
(eq, ":divide_archer_entry_points", 0),
(faction_get_slot, ":cur_troop", ":faction_no", slot_faction_quick_battle_tier_3_archer),
(set_visitors, ":cur_entry_point", ":cur_troop", ":num_tier_3_archers"),
#(val_add, ":cur_entry_point", 1),
(faction_get_slot, ":cur_troop", ":faction_no", slot_faction_quick_battle_tier_3_infantry),
(set_visitors, ":cur_entry_point", ":cur_troop", ":num_tier_3_infantry"),
(val_add, ":cur_entry_point", 1),
(faction_get_slot, ":cur_troop", ":faction_no", slot_faction_quick_battle_tier_2_infantry),
(set_visitors, ":cur_entry_point", ":cur_troop", ":num_tier_2_infantry"),
(val_add, ":cur_entry_point", 1),
(faction_get_slot, ":cur_troop", ":faction_no", slot_faction_quick_battle_tier_1_infantry),
(set_visitors, ":cur_entry_point", ":cur_troop", ":num_tier_1_infantry"),
(val_add, ":cur_entry_point", 1),
(faction_get_slot, ":cur_troop", ":faction_no", slot_faction_quick_battle_tier_3_cavalry),
(set_visitors, ":cur_entry_point", ":cur_troop", ":num_tier_3_cavalry"),
(val_add, ":cur_entry_point", 1),
(faction_get_slot, ":cur_troop", ":faction_no", slot_faction_quick_battle_tier_2_cavalry),
(set_visitors, ":cur_entry_point", ":cur_troop", ":num_tier_2_cavalry"),
(val_add, ":cur_entry_point", 1),
(faction_get_slot, ":cur_troop", ":faction_no", slot_faction_quick_battle_tier_1_cavalry),
(set_visitors, ":cur_entry_point", ":cur_troop", ":num_tier_1_cavalry"),
(val_add, ":cur_entry_point", 1),
(try_begin),
(eq, ":divide_archer_entry_points", 0),
(faction_get_slot, ":cur_troop", ":faction_no", slot_faction_quick_battle_tier_3_archer),
(set_visitors, ":cur_entry_point", ":cur_troop", ":num_tier_3_archers"),
#(val_add, ":cur_entry_point", 1),
(faction_get_slot, ":cur_troop", ":faction_no", slot_faction_quick_battle_tier_2_archer),
(set_visitors, ":cur_entry_point", ":cur_troop", ":num_tier_2_archers"),
(val_add, ":cur_entry_point", 1),
(faction_get_slot, ":cur_troop", ":faction_no", slot_faction_quick_battle_tier_1_archer),
(set_visitors, ":cur_entry_point", ":cur_troop", ":num_tier_1_archers"),
(val_add, ":cur_entry_point", 1),
(else_try),
(assign, ":cur_entry_point", 40), #archer positions begin point
(store_div, ":num_tier_1_archers_ceil_8", ":num_tier_1_archers", 8),
(val_mul, ":num_tier_1_archers_ceil_8", 8),
(try_begin),
(neq, ":num_tier_1_archers_ceil_8", ":num_tier_1_archers"),
(val_div, ":num_tier_1_archers_ceil_8", 8),
(val_add, ":num_tier_1_archers_ceil_8", 1),
(val_mul, ":num_tier_1_archers_ceil_8", 8),
(try_end),
(store_div, ":num_tier_2_archers_ceil_8", ":num_tier_2_archers", 8),
(val_mul, ":num_tier_2_archers_ceil_8", 8),
(try_begin),
(neq, ":num_tier_2_archers_ceil_8", ":num_tier_2_archers"),
(val_div, ":num_tier_2_archers_ceil_8", 8),
(val_add, ":num_tier_2_archers_ceil_8", 1),
(val_mul, ":num_tier_2_archers_ceil_8", 8),
(try_end),
(store_div, ":num_tier_3_archers_ceil_8", ":num_tier_3_archers", 8),
(val_mul, ":num_tier_3_archers_ceil_8", 8),
(try_begin),
(neq, ":num_tier_3_archers_ceil_8", ":num_tier_3_archers"),
(val_div, ":num_tier_3_archers_ceil_8", 8),
(val_add, ":num_tier_3_archers_ceil_8", 1),
(val_mul, ":num_tier_3_archers_ceil_8", 8),
(try_end),
(store_add, ":num_archers_ceil_8", ":num_tier_1_archers_ceil_8", ":num_tier_2_archers_ceil_8", ":num_tier_3_archers_ceil_8"),
(store_div, ":num_archers_per_entry_point", ":num_archers_ceil_8", 8),
(assign, ":left_tier_1_archers", ":num_tier_1_archers"),
(assign, ":left_tier_2_archers", ":num_tier_2_archers"),
(assign, ":left_tier_3_archers", ":num_tier_3_archers"),
(assign, ":end_cond", 1000),
(try_for_range, ":unused", 0, ":end_cond"),
(try_begin),
(gt, ":left_tier_3_archers", 0),
(assign, ":used_tier_3_archers", ":num_archers_per_entry_point"),
(val_min, ":used_tier_3_archers", ":left_tier_3_archers"),
(faction_get_slot, ":cur_troop", ":faction_no", slot_faction_quick_battle_tier_3_archer),
(set_visitors, ":cur_entry_point", ":cur_troop", ":used_tier_3_archers"),
(val_add, ":cur_entry_point", 1),
(val_sub, ":left_tier_3_archers", ":used_tier_3_archers"),
(else_try),
(gt, ":left_tier_2_archers", 0),
(assign, ":used_tier_2_archers", ":num_archers_per_entry_point"),
(val_min, ":used_tier_2_archers", ":left_tier_2_archers"),
(faction_get_slot, ":cur_troop", ":faction_no", slot_faction_quick_battle_tier_2_archer),
(set_visitors, ":cur_entry_point", ":cur_troop", ":used_tier_2_archers"),
(val_add, ":cur_entry_point", 1),
(val_sub, ":left_tier_2_archers", ":used_tier_2_archers"),
(else_try),
(gt, ":left_tier_1_archers", 0),
(assign, ":used_tier_1_archers", ":num_archers_per_entry_point"),
(val_min, ":used_tier_1_archers", ":left_tier_1_archers"),
(faction_get_slot, ":cur_troop", ":faction_no", slot_faction_quick_battle_tier_1_archer),
(set_visitors, ":cur_entry_point", ":cur_troop", ":used_tier_1_archers"),
(val_add, ":cur_entry_point", 1),
(val_sub, ":left_tier_1_archers", ":used_tier_1_archers"),
(else_try),
(assign, ":end_cond", 0),
(try_end),
(try_end),
(try_end),
]),
Thank you times a hundred, this was just what I needed to knowSomebody said:Alright, culture setup basically allows a meta-faction of sorts to exist. For example, if the Kingdom of Swadia is wiped out, their culture (Swadian) still exists in their original villages and towns, etc. The culture is not a kingdom - just a placeholder of sorts for the basic tier1-5 troops, town walkers, etc, for now. Make sure you join the actual fac_kingdom_1-6.
Have you tried looking at it in module_scripts? Basically it resets a bunch of ai stuff, a bunch of variables relating to when you swore an oath, resets relations, rearranges center ownership, cancels quests, moves your wife around, free any companion prisoners to your new faction, etc,
I was going to use yoshiboys sound tutorial : P but the problem is, how can I assign different sounds for all factions but keeping the same keys.MadocComadrin said:Have a look at my faction chat kit for a springboard. http://forums.taleworlds.com/index.php/topic,125302.msg3023746.html#msg3023746
For sounds, check this out. http://forums.taleworlds.com/index.php/topic,94854.0.html
(try_begin),
(eq, ":faction", "fac_kingdom_3"),
(play_sound, "snd_sound1"),
(else_try),
(eq, ":faction", "fac_kingdom_4"),
(play_sound, "snd_sound2"),
(else_try),
etc
(try_end),