I'm creating a new faction that emerges for my personal, practice mod.
The 20 "Barons" of my kingdom emerge as expected, but the ruler doesn't appear. In the notes, no line appears, not his name, title, renown, controversy, or lack of fiefs, just "click links to see info". I'm also setting the faction to active the same time (or else they get "defeated" within a few days). I got rid of my active set, and it allowed the faction leader to appear, but the faction never appeared in the notes, and never got declared war on, and only did my scripted declaration of war.
I'm using the 4.0 module system of Sword of Damocles as a base to go off of, here's the code:
Also, people keep defecting before they are even present, and I'd like to prevent that.
The 20 "Barons" of my kingdom emerge as expected, but the ruler doesn't appear. In the notes, no line appears, not his name, title, renown, controversy, or lack of fiefs, just "click links to see info". I'm also setting the faction to active the same time (or else they get "defeated" within a few days). I got rid of my active set, and it allowed the faction leader to appear, but the faction never appeared in the notes, and never got declared war on, and only did my scripted declaration of war.
I'm using the 4.0 module system of Sword of Damocles as a base to go off of, here's the code:
插入代码块:
(24,
[
(store_current_day, ":cur_day"),
(eq, ":cur_day", 2),
(call_script, "script_create_kingdom_hero_party", "trp_kingdom_7_lord", "p_town_1"),
(troop_set_slot, "trp_kingdom_7_lord", slot_troop_wealth, 50000),
(store_random_in_range, ":faction_no", "fac_kingdom_1", "fac_kingdom_6"),
(call_script, "script_diplomacy_start_war_between_kingdoms", "fac_kingdom_7", ":faction_no", 1),
(try_for_range, ":troop_no", "trp_knight_7_1", "trp_knight_7_20"),
(troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero),
#(troop_slot_eq, ":troop_no", slot_troop_is_prisoner, 0),
(neg|troop_slot_ge, ":troop_no", slot_troop_prisoner_of_party, 0),
(neg|troop_slot_ge, ":troop_no", slot_troop_leaded_party, 1),
(call_script, "script_create_kingdom_hero_party", ":troop_no", "p_town_1"),
(troop_set_slot, ":troop_no", slot_troop_wealth, 20000),
(try_end),
(faction_set_slot, "fac_kingdom_7", slot_faction_state, sfs_active),
]),
Also, people keep defecting before they are even present, and I'd like to prevent that.


