#Family notes
(try_begin),
(this_or_next|is_between, ":troop_no", lords_begin, kingdom_ladies_end),
(eq, ":troop_no", "trp_player"),
(neg|is_between, ":troop_no", pretenders_begin, pretenders_end),
(assign, ":num_relations", 0),
(try_begin),
(call_script, "script_troop_get_family_relation_to_troop", "trp_player", ":troop_no"),
(gt, reg0, 0),
(val_add, ":num_relations", 1),
(try_end),
(try_for_range, ":aristocrat", lords_begin, kingdom_ladies_end),
(call_script, "script_troop_get_family_relation_to_troop", ":aristocrat", ":troop_no"),
(gt, reg0, 0),
(val_add, ":num_relations", 1),
(try_end),
(try_begin),
(gt, ":num_relations", 0),
(try_begin),
(eq, ":troop_no", "trp_player"),
(str_store_string, s49, "str__family_"),
(else_try),
(troop_get_slot, reg1, ":troop_no", slot_troop_age),
(str_store_string, s49, "str__age_reg1_family_"),
(try_end),
(try_begin),
(call_script, "script_troop_get_family_relation_to_troop", "trp_player", ":troop_no"),
(gt, reg0, 0),
(str_store_troop_name_link, s12, "trp_player"),
(val_sub, ":num_relations", 1),
(try_begin),
(eq, ":num_relations", 0),
(str_store_string, s49, "str_s49_s12_s11_end"),
(else_try),
(str_store_string, s49, "str_s49_s12_s11"),
(try_end),
(try_end),
(try_for_range, ":aristocrat", lords_begin, kingdom_ladies_end),
(call_script, "script_troop_get_family_relation_to_troop", ":aristocrat", ":troop_no"),
(gt, reg0, 0),
(try_begin),
(neg|is_between, ":aristocrat", kingdom_ladies_begin, kingdom_ladies_end),
(eq, "$cheat_mode", 1),
(str_store_troop_name_link, s12, ":aristocrat"),
(call_script, "script_troop_get_relation_with_troop", ":aristocrat", ":troop_no"),
(str_store_string, s49, "str_s49_s12_s11_rel_reg0"),
(else_try),
(str_store_troop_name_link, s12, ":aristocrat"),
(val_sub, ":num_relations", 1),
(try_begin),
(eq, ":num_relations", 0),
(str_store_string, s49, "str_s49_s12_s11_end"),
(else_try),
(str_store_string, s49, "str_s49_s12_s11"),
(try_end),
(try_end),
(try_end),
(try_end),
(try_end),
I think I managed to find a solution.zakarum said:
(else_try),
(gt, ":father_of_1", -1), #necessary, as some lords do not have the father registered
(eq, ":father_of_1", ":father_of_2"),
(assign, ":relation_strength", 10),
(try_begin),
(eq, ":gender_1", 1),
(str_store_string, s11, "str_sister"),
(else_try),
(str_store_string, s11, "str_brother"),
(try_end),
(else_try),
(gt, ":father_of_1", -1), #necessary, as some lords do not have the father registered
(eq, ":father_of_1", ":father_of_2"),
(assign, ":relation_strength", 10),
(try_begin),
(eq, ":gender_1", 1),
(str_store_string, s11, "str_sister"),
(else_try),
(str_store_string, s11, "str_brother"),
(try_end),
#Sigurd brother relations
(troop_set_slot, "trp_knight_1_5", slot_troop_guardian, "trp_knight_8_14"), #Ubba
(troop_set_slot, "trp_knight_1_5", slot_troop_guardian, "trp_knight_8_2"), #Rathbarth
(troop_set_slot, "trp_knight_1_5", slot_troop_guardian, "trp_knight_8_13"), #Ivar the Boneless Ragnarsson
#Ubba brother relations
(troop_set_slot, "trp_knight_8_14", slot_troop_guardian, "trp_knight_8_2"), #Rathbarth
(troop_set_slot, "trp_knight_8_14", slot_troop_guardian, "trp_knight_8_13"), #Ivar the Boneless Ragnarsson
#Rathbarth brother relations
(troop_set_slot, "trp_knight_8_2", slot_troop_guardian, "trp_knight_8_13"), #Ivar the Boneless Ragnarsson
. There's also a slot_troop_sibling that seems deprecated and no mods uses it, so I didn't try using it.
Loading module... FAILED.
MODULE `scripts` ERROR:
Traceback (most recent call last):
File "compile.py", line 109, in <module>
from module_scripts import *
File "C:\Users\x\Desktop\VC WRECK\integrated_ms\module_scripts.py", line 15, in <module>
from module_items import items
File "C:\Users\x\Desktop\VC WRECK\integrated_ms\module_items.py", line 3714, in <module>
append_noswing_items(items)
File "C:\Users\x\Desktop\VC WRECK\integrated_ms\headers\header_items.py", line 410, in append_noswing_items
add_item = deepcopy(items)
File "C:\PYTHON26\LIB\copy.py", line 163, in deepcopy
y = copier(x, memo)
File "C:\PYTHON26\LIB\copy.py", line 230, in _deepcopy_list
y.append(deepcopy(a, memo))
File "C:\PYTHON26\LIB\copy.py", line 163, in deepcopy
y = copier(x, memo)
File "C:\PYTHON26\LIB\copy.py", line 230, in _deepcopy_list
y.append(deepcopy(a, memo))
File "C:\PYTHON26\LIB\copy.py", line 163, in deepcopy
y = copier(x, memo)
File "C:\PYTHON26\LIB\copy.py", line 230, in _deepcopy_list
y.append(deepcopy(a, memo))
File "C:\PYTHON26\LIB\copy.py", line 163, in deepcopy
y = copier(x, memo)
File "C:\PYTHON26\LIB\copy.py", line 237, in _deepcopy_tuple
y.append(deepcopy(a, memo))
File "C:\PYTHON26\LIB\copy.py", line 163, in deepcopy
y = copier(x, memo)
File "C:\PYTHON26\LIB\copy.py", line 230, in _deepcopy_list
y.append(deepcopy(a, memo))
File "C:\PYTHON26\LIB\copy.py", line 163, in deepcopy
y = copier(x, memo)
File "C:\PYTHON26\LIB\copy.py", line 237, in _deepcopy_tuple
y.append(deepcopy(a, memo))
File "C:\PYTHON26\LIB\copy.py", line 190, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "C:\PYTHON26\LIB\copy.py", line 334, in _reconstruct
state = deepcopy(state, memo)
File "C:\PYTHON26\LIB\copy.py", line 163, in deepcopy
y = copier(x, memo)
File "C:\PYTHON26\LIB\copy.py", line 257, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "C:\PYTHON26\LIB\copy.py", line 174, in deepcopy
y = copier(memo)
TypeError: __call__() takes exactly 4 arguments (2 given)
COMPILATION FAILED.
#Sigurd brother relations
(troop_set_slot, "trp_knight_1_5", slot_troop_guardian, "trp_knight_8_14"), #Ubba
(troop_set_slot, "trp_knight_8_14", slot_troop_guardian, "trp_knight_1_5"), #Ubba
(troop_set_slot, "trp_knight_1_5", slot_troop_guardian, "trp_knight_8_2"), #Rathbarth
(troop_set_slot, "trp_knight_8_2", slot_troop_guardian, "trp_knight_1_5"), #Rathbarth
(troop_set_slot, "trp_knight_1_5", slot_troop_guardian, "trp_knight_8_13"), #Ivar the Boneless Ragnarsson
(troop_set_slot, "trp_knight_8_13", slot_troop_guardian, "trp_knight_1_5"), #Ivar the Boneless Ragnarsson
#Ubba brother relations
(troop_set_slot, "trp_knight_8_14", slot_troop_guardian, "trp_knight_8_2"), #Rathbarth
(troop_set_slot, "trp_knight_8_2", slot_troop_guardian, "trp_knight_8_14"), #Rathbarth
(troop_set_slot, "trp_knight_8_14", slot_troop_guardian, "trp_knight_8_13"), #Ivar the Boneless Ragnarsson
(troop_set_slot, "trp_knight_8_13", slot_troop_guardian, "trp_knight_8_14"), #Ivar the Boneless Ragnarsson
#Rathbarth brother relations
(troop_set_slot, "trp_knight_8_2", slot_troop_guardian, "trp_knight_8_13"), #Ivar the Boneless Ragnarsson
(troop_set_slot, "trp_knight_8_13", slot_troop_guardian, "trp_knight_8_2"), #Ivar the Boneless Ragnarsson