Hardcoding Faction Relatives

正在查看此主题的用户

Runea

Regular
Okay so what I want to know if (using the module system to edit the scripts file); it was possible to manually hardcode relations instead of relying on the script that generates the relations from the list.  A mod I'm making will have drastically different sized factions and (hopefully) historically accurate relatives.  At the moment it is automatically setting officers in a new faction to be related to others based on their order; likely around the code here:

(try_begin),
(lt, ":npc_seed", :cool:, #NPC seed is the order in the faction
(assign, ":reputation", ":npc_seed"),
(store_random_in_range, ":age", 45, 64),

(store_random_in_range, ":father", 0, 6), #six possible fathers
(val_add, ":father", ":ancestor_seed"),
(troop_set_slot, ":cur_troop", slot_troop_father, ":father"),

.
. (lots of code)
.
.
#age is father's minus 20 to 25
(store_sub, ":father", ":cur_troop", 12),
(troop_set_slot, ":cur_troop", slot_troop_father, ":father"),
(troop_get_slot, ":mother", ":father", slot_troop_spouse),
(troop_set_slot, ":cur_troop", slot_troop_mother, ":mother"),

(troop_get_slot, ":father_age", ":father", slot_troop_age),
(store_sub, ":age", ":father_age", ":father_age_at_birth"),

(try_begin), #50% chance of having father's rep
(store_random_in_range, ":reputation", 0, 16),

(gt, ":reputation", 7),
(troop_get_slot, ":reputation", ":father", slot_lord_reputation_type),
(try_end),

Is there anyway I can change this so instead it'd be something along the lines of

(troop_set_slot, "trp_knight_1_1", slot_troop_father, "trp_knight_1_2")

many times over for each instance of a father-son.  Likewise, if I wanted to do this; could I remove the entire block of code above as long as I replace it with the solution?
 
后退
顶部 底部