It can be in SP as well: see openable gates on various castle sieges.Specialist said:I believe it has to be in MP
It can be in SP as well: see openable gates on various castle sieges.Specialist said:I believe it has to be in MP
Caba`drin said:Bayard-X said:The CanFail architecture seems interesting to me, but I seem to lack the knowledge in how to make the script then.
However, even in the current state, I am happy, because I can now do some intersting things on the ReMo.
The cf version would look like this (and would work like a normal conditional operation...if it passes, the code continues, if not it stops):
Code:("cf_check_if_one_or_more_of_these_are_factors", [ (store_script_param, ":number_to_check", 1), # I want to know of this number if the following are factors. (store_script_param, ":number_of_loops", 2), # run loops (assign, ":factors_bool",0), # initialise boolean to return (val_add, ":number_of_loops", 3), (try_for_range, ":i", 3, ":number_of_loops"), (store_script_param, ":this_factor", ":i"), (store_mod, ":check", ":number_to_check", ":this_factor"), (eq, ":check", 0), (assign, ":factors_bool",1), (assign, ":number_of_loops", ":i"), (try_end), (eq, ":factors_bool", 1), ]),
(try_begin),
(call_script, "script_cf_neg_check_if_one_or_more_of_these_are_factors", "$bayards_number", 2, 139, 67),
(call_script, "script_cf_check_if_one_or_more_of_these_are_factors", "$bayards_number", 2, 249603, 9354777),
(do something),
(else_try),
(call_script, "script_cf_check_if_one_or_more_of_these_are_factors", "$bayards_number", 3, 48887, 42997, 88939 ),
(do something),
(else_try),
(call_script, "script_cf_check_if_one_or_more_of_these_are_factors", "$bayards_number", 3, 153178, 888968523, 34694817),
(do something),
(else_try),
(call_script, "script_cf_neg_check_if_one_or_more_of_these_are_factors", "$bayards_number", 2, 151, 139),
(call_script, "script_cf_check_if_one_or_more_of_these_are_factors", "$bayards_number", 2, 1349, 817 ),
(do something),
(else_try),
(call_script, "script_cf_check_if_one_or_more_of_these_are_factors", "$bayards_number", 2, 203699, 123367 ),
(do something),
(else_try),
(call_script, "script_cf_neg_check_if_one_or_more_of_these_are_factors", "$bayards_number", 1, 139),
(call_script, "script_cf_check_if_one_or_more_of_these_are_factors", "$bayards_number", 1, 19),
(do something),
(else_try),
(call_script, "script_cf_check_if_one_or_more_of_these_are_factors", "$bayards_number", 1, 2641),
(do something),
(try_end),
It goes with first condition that is satisfied, and hence the subsequent else_try block, and skips the rest. Since you have constants there all over, it always does the same thing.Bayard-X said:Might it be that begin-try-else-end is left if one of those "script_cf_neg_" conditions is fulfilled hence making following lines inaccessible?
So this would mean it will not work even for bots or what?No, it's impossible to do in vanilla Warband (because the netcode only uses 1 bit for skin).
(
"man", 0,
"man_body", "man_calf_l", "m_handL",
"male_head", man_face_keys,
["man_hair_s","man_hair_m","man_hair_n","man_hair_o", "man_hair_y10", "man_hair_y12","man_hair_p","man_hair_r","man_hair_q","man_hair_v","man_hair_t","man_hair_y6","man_hair_y3","man_hair_y7","man_hair_y9","man_hair_y11","man_hair_u","man_hair_y","man_hair_y2","man_hair_y4"], #man_hair_meshes ,"man_hair_y5","man_hair_y8",
["beard_e","beard_d","beard_k","beard_l","beard_i","beard_j","beard_z","beard_m","beard_n","beard_y","beard_p","beard_o", "beard_v", "beard_f", "beard_b", "beard_c","beard_t","beard_u","beard_r","beard_s","beard_a","beard_h","beard_g",], #beard meshes ,"beard_q"
["hair_blonde", "hair_red", "hair_brunette", "hair_black", "hair_white"], #hair textures
["beard_blonde","beard_red","beard_brunette","beard_black","beard_white"], #beard_materials
[("manface_young_2",0xffcbe0e0,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff502a19]),
("manface_midage",0xffdfefe1,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c]),
("manface_young",0xffd0e0e0,["hair_blonde"],[0xff83301a, 0xff502a19, 0xff19100c, 0xff0c0d19]),
# ("manface_old",0xffd0d0d0,["hair_white","hair_brunette","hair_red","hair_blonde"],[0xffffcded, 0xffbbcded, 0xff99eebb]),
("manface_young_3",0xffdceded,["hair_blonde"],[0xff2f180e, 0xff171313, 0xff007080c]),
("manface_7",0xffc0c8c8,["hair_blonde"],[0xff171313, 0xff007080c]),
("manface_midage_2",0xfde4c8d8,["hair_blonde"],[0xff502a19, 0xff19100c, 0xff0c0d19]),
("manface_rugged",0xffb0aab5,["hair_blonde"],[0xff171313, 0xff007080c]),
# ("manface_young_4",0xffe0e8e8,["hair_blonde"],[0xff2f180e, 0xff171313, 0xff007080c]),
("manface_african",0xff807c8a,["hair_blonde"],[0xff120808, 0xff007080c]),
("werewolf",0xff807c8a,["hair_blonde"],[0xff120808, 0xff007080c]),
("undeadface_a_skeleton",0xff807c8a,["hair_blonde"],[0xff120808, 0xff007080c]),
("dark_elf",0xff807c8a,["hair_blonde"],[0xff120808, 0xff007080c]),
("orc_head",0xff807c8a,["hair_blonde"],[0xff120808, 0xff007080c]),
So this would mean it will not work even for bots or what?No, it's impossible to do in vanilla Warband (because the netcode only uses 1 bit for skin).
So my orc_infantry_multiplayer_ai is gonna appear with a common or buggy human face!?!
And Players cant use races/genders other then male or female even by using the respawn as bot walkarround?
(0, 0, 0, [],
[
(entry _ point _ get _ position, pos1, 16),
(entry _ point _ get _ position, pos2, 2),
(position _ set _ z _ to _ ground _ level, pos1),
(position _ set _ z _ to _ ground _ level, pos2),
(try _ for _ agents,":agent _ no"),
(agent _ is _ non _ player, ":agent _ no"),
(agent _ is _ alive, ":agent _ no"),
(agent _ get _ horse,":horse",":agent _ no"),
(ge, ":horse", 0),
(agent _ set _ position, pos1,":horse"),
(agent _ set _ scripted _ destination, ":agent _ no", pos2, 1),
(try _ end),
]
),
Ah, you're right, the limitation only applies to players. It should be possible to do it by taking control of a spawned bot then, like Somebody said earlier.Alrik der Goblin said:It's possible for bots, but not for player I think.
Bot example, without WSE
cmpxchg8b said:Ah, you're right, the limitation only applies to players. It should be possible to do it by taking control of a spawned bot then, like Somebody said earlier.Alrik der Goblin said:It's possible for bots, but not for player I think.
Bot example, without WSE
You can't separate rider and mount agents like that. You need to call agent_start_running_away on the horse first to dismount the agent, then move the horse and cause the agent to follow.LegionaireR said:An agent does not follow at pos2.
Isn't the face randomized in the first place? Does this happen with bots that you control after the player dies? If all else fails, make the face part of the helmet.Barabas said:Only problem is that the face may change back. I think it happens when you pick up weapons, but not exactly sure.
Somebody said:Isn't the face randomized in the first place? Does this happen with bots that you control after the player dies? If all else fails, make the face part of the helmet.Barabas said:Only problem is that the face may change back. I think it happens when you pick up weapons, but not exactly sure.
On first glance, actually, I think that is right. (Unless LegionaireR wanted there to be dismounting...)Somebody said:You can't separate rider and mount agents like that. You need to call agent_start_running_away on the horse first to dismount the agent, then move the horse and cause the agent to follow.LegionaireR said:An agent does not follow at pos2.
(ti _ after _ mission _ start, 0,0, [],
[
(entry _ point _ get _ position, pos1, 16),
(entry _ point _ get _ position, pos2, 2),
(position _ set _ z _ to _ ground _ level, pos1),
(position _ set _ z _ to _ ground _ level, pos2),
(try _ for _ agents,":agent _ no"),
(agent _ is _ alive, ":agent _ no"),
(agent _ set _ position, pos1,":agent _ no"),
(agent _ set _ scripted _ destination, ":agent _ no", pos2, 1),
(try_end),
]),
There are some weapon LotR weapon packs available in the OSP section. Give it a search.Tonny93 said:I am working on a mod myself but I don't have time to make weapons. Is there any mod which has elven weapons out of LotR?"
The first number is how frequently the code will run. If you only want it to run 1 time, after spawning, then ti_after_mission_start is the correct interval. (There is a mission template trigger section in the syntax thread that is linked in my signature if you want more info there)LegionaireR said:I sorted out triggers since (0,0,0,....
ti _ after _ mission _ start,
ti _ on _ agent _ spawn
Your invalid agent line 6 is still the agent_set_position command, because the arguments are still backwards. It should read: (agent_set_position, ":agent_no", pos1)LegionaireR said:but I get OPKOD Invalid_agent on a line 6. I understand verification is neededCode:(ti _ after _ mission _ start, 0,0, [], [ (entry _ point _ get _ position, pos1, 16), (entry _ point _ get _ position, pos2, 2), (position _ set _ z _ to _ ground _ level, pos1), (position _ set _ z _ to _ ground _ level, pos2), (try _ for _ agents,":agent _ no"), (agent _ is _ alive, ":agent _ no"), (agent _ set _ position, pos1,":agent _ no"), (agent _ set _ scripted _ destination, ":agent _ no", pos2, 1), (try_end), ]),
Tis just a fine place.RJA said:I was wondering if there is an easy way to see what item is used by what troops? Morgh's troop editor doesn't seem to give that option.
(try _ for _ agents,":agent _ no"),
(agent _ is _ alive, ":agent _ no"),
(agent _ get _ horse, ":agent _ horse", ":player _ agent"),
(ge, ":agent _ horse", 0),
(agent _ get _ position, ":agent", pos0),
(agent _ set _ scripted _ destination, "::agent", pos0, 1),
(entry _ point _ get _ position, pos2, 2),
(agent _ set _ scripted _ destination, "::agent", pos2, 1),
(try _ end),
yes, I know.The first number is how frequently the code will run. If you only want it to run 1 time, after spawning, then ti_after_mission_start is the correct interval.
It is useful information about delays on start counting out of time in some triggers. Thank you it is useful.(There is a mission template trigger section in the syntax thread that is linked in my signature if you want more info there)