kipponium
Sergeant

Hi,
I'm new to mount and blade and ive managed to add a new black knight castle with a new lord and faction and a few roaming parties, however there are a few bugs i have with them that i dont know how to solve
Bug 1
The lord i assigned the castle to adds other castles into his party.
I'm 99% certain this has something to do with the reinforcement script i made for him and i think its to do with the ' (eq, (reg0), -1),
(call_script, "script_create_kingdom_hero_party","trp_kingdom_7_lord","p_castle_49"),' part that checks if hes alive or not and spawns a new one if hes dead
Bug 2
When i sneak into the castle i spawn in the castle guards position and theres a copy of my character in a pilgrims outfit where i would normally spawn, he also has the dialog from a king. (I copied scenes from castle 41-Jameyyed castle i think its called)
Bug 3
One party of my spawned black knight parties is visible on the map no matter how far away i am, and if they die a different party will become perma-visible.
I assume this will either be down to my party template or spawning script so ill post those
The script_randomize_party_name in there is from dunde and the troop_get_name is possibly from him as well, i definetly found it somewhere on this forum
Thanks
Kip
P.S. Another set of thanks to everyone that wrote a tutorial or posted code and helped me get to this point
Woops, i seem to have posted this on the unofficial editing tools sub-board, could a mod move it please?
Just delete this topic ive made another in the forge
I'm new to mount and blade and ive managed to add a new black knight castle with a new lord and faction and a few roaming parties, however there are a few bugs i have with them that i dont know how to solve
Bug 1
The lord i assigned the castle to adds other castles into his party.
I'm 99% certain this has something to do with the reinforcement script i made for him and i think its to do with the ' (eq, (reg0), -1),
(call_script, "script_create_kingdom_hero_party","trp_kingdom_7_lord","p_castle_49"),' part that checks if hes alive or not and spawns a new one if hes dead
插入代码块:
#black lord
("black_lord",
[(call_script, "script_troop_get_party", "trp_kingdom_7_lord"),
(try_begin),
(neq, (reg0), -1),
(party_get_num_companions, ":num_companions", (reg0)),
(try_begin),
(lt, ":num_companions", 230),
(try_end),
(store_random_in_range, ":rand", 0, 100),
(try_begin),
(lt, ":rand", 50),
(assign, ":party_template", "pt_kingdom_7_reinforcements_a"),
(else_try),
(lt, ":rand", 75),
(assign, ":party_template", "pt_kingdom_7_reinforcements_b"),
(else_try),
(assign, ":party_template", "pt_kingdom_7_reinforcements_c"),
(try_end),
(party_attach_to_party, ":party_template",(reg0)),
(else_try),
(eq, (reg0), -1),
(call_script, "script_create_kingdom_hero_party","trp_kingdom_7_lord","p_castle_49"),
(try_end)
]),
#get party
("troop_get_party",
[(store_script_param_1, ":troop_id"),
(assign, ":found",0),
(assign, reg0, -1),
(try_for_parties, ":party_no"),
(eq, ":found", 0),
(party_get_num_companion_stacks, ":num_stack", ":party_no"),
(try_for_range, ":stack_no", 0, ":num_stack"),
(eq, ":found", 0),
(party_stack_get_troop_id, ":troop_no", ":party_no", ":stack_no"),
(eq, ":troop_id", ":troop_no"),
(assign, ":found", 1),
(assign, reg0, ":party_no"),
(try_end),
(try_end),
]),
Bug 2
When i sneak into the castle i spawn in the castle guards position and theres a copy of my character in a pilgrims outfit where i would normally spawn, he also has the dialog from a king. (I copied scenes from castle 41-Jameyyed castle i think its called)
Bug 3
One party of my spawned black knight parties is visible on the map no matter how far away i am, and if they die a different party will become perma-visible.
I assume this will either be down to my party template or spawning script so ill post those
插入代码块:
(try_begin),
(store_num_parties_of_template, ":num_parties", "pt_black_knights"),
(lt,":num_parties",18),
(set_spawn_radius, 25),
(spawn_around_party,"p_castle_49","pt_black_knights"),
(call_script, "script_randomize_party_name",1),
(try_end),
插入代码块:
("black_knights","Black Knights",icon_vaegir_knight,0,fac_kingdom_7,bandit_personality,[(trp_black_knight_m,5,10)]),
The script_randomize_party_name in there is from dunde and the troop_get_name is possibly from him as well, i definetly found it somewhere on this forum
Thanks
Kip
P.S. Another set of thanks to everyone that wrote a tutorial or posted code and helped me get to this point
Just delete this topic ive made another in the forge


