OSP Code Combat Shield Bash kit. Bug fixed and expanded!

Users who are viewing this thread

SEA DEMON said:
can you give a ready files with this Shield Bash? for Warband

The kit doesn't seem to work right with warband...doesn't cause any errors but doesn't function either.  I haven't taken the time to debug it though so not sure if it's my fault or an issue with the code but if it's the latter it won't work with warband without some adjustments.
 
Alec{zacool} said:
Mirethei.



You.

Are.

The.

God.

Of.

Discovering.

Neat.

Crap.

And.

Doing.

It.

'tis going to be added to my mod.

-Alec
He got the idea from Mortal Online likely, in Mortal you can hold the block and click attack to push/shield bash people. (It's an FPMMORPG)
 
Sorry. I know the thread is quite old but I hope somebody can help me:

"The following into any applicable mission template"
What does that mean? Have I to find every applicable mission template or is it equal were I post it in mission_templates?

"...note that these must be pasted over unused animations, not at the end of the file."
Is it equal which unused animations I use for them?

Thanks in anticipation.  :wink:
 
For the missions, whatever mission you want it to work in must have the code he specified. 

For example, any normal battle against bandits or lords would be the mission "lead_charge" 

Sieges have a different mission, so do duels, and such.

As for the animations, just paste them over any six unused animations, like
Code:
["unused_human_anim_12", 0, 0, [1.0, "anim_human", 0, 1, 0]],
 ["unused_human_anim_13", 0, 0, [1.0, "anim_human", 0, 1, 0]],
 ["unused_human_anim_14", 0, 0, [1.0, "anim_human", 0, 1, 0]],
 ["unused_human_anim_15", 0, 0, [1.0, "anim_human", 0, 1, 0]],
 ["unused_human_anim_16", 0, 0, [1.0, "anim_human", 0, 1, 0]],
 ["unused_human_anim_17", 0, 0, [1.0, "anim_human", 0, 1, 0]],
 
Well, for most battles it will just be called "lead_charge" and it's in module_mission_templates.  Just add it to that one for now. 
 
I'm sorry if I anoy you but:

In module_mission_templates it looks like this for example:

(
    "lead_charge",mtf_battle_mode,charge,
    "You lead your men to battle.",
    [
    (1,mtef_defenders|mtef_team_0,0,aif_start_alarmed,12,[]),
    (0,mtef_defenders|mtef_team_0,0,aif_start_alarmed,0,[]),
    (4,mtef_attackers|mtef_team_1,0,aif_start_alarmed,12,[]),
    (4,mtef_attackers|mtef_team_1,0,aif_start_alarmed,0,[]),
    ],
    [
      (ti_on_agent_spawn, 0, 0, [],
      [
        (store_trigger_param_1, ":agent_no"),
        (call_script, "script_agent_reassign_team", ":agent_no"),
        ]),

      common_battle_tab_press,

      (ti_question_answered, 0, 0, [],
      [(store_trigger_param_1,":answer"),
        (eq,":answer",0),
        (assign, "$pin_player_fallen", 0),
        (try_begin),
          (store_mission_timer_a, ":elapsed_time"),
          (gt, ":elapsed_time", 20),
          (str_store_string, s5, "str_retreat"),
          (call_script, "script_simulate_retreat", 10, 20),
        (try_end),
        (call_script, "script_count_mission_casualties_from_agents"),
        (finish_mission,0),]),

      (ti_before_mission_start, 0, 0, [],
      [
        (team_set_relation, 0, 2, 1),
        (team_set_relation, 1, 3, 1),
        (call_script, "script_place_player_banner_near_inventory_bms"),
        ]),



Then I have to post this:
(ti_before_mission_start, 0, 0, [], [(assign,"$bash_readiness",0)]),


      (0.1, 0, 0, [], [(val_add,"$bash_readiness",1),]),


      (0, 0, 0, [(game_key_is_down, gk_defend),(game_key_clicked, gk_attack),],
      [(assign,":continue",0),
        (get_player_agent_no,":player"),
        (agent_is_alive,":player"),
        (try_for_range,":shield","itm_wooden_shield","itm_heraldic_mail_with_surcoat"),
            (agent_has_item_equipped,":player",":shield"),
            (assign,":continue",1),
        (end_try),
        (eq,":continue",1),
        (agent_get_horse,":horse",":player"),
        (neg|gt,":horse",0),
        (ge,"$bash_readiness",10),
        (assign,"$bash_readiness",0),
        (call_script,"script_cf_agent_shield_bash",":player"),
        ]),

      (1.0, 0, 0, [],
      [(get_player_agent_no,":player"),
        (try_for_agents,":agent"),
          (agent_is_alive,":agent"),
          (agent_is_human,":agent"),
          (neq,":agent",":player"),
          (agent_get_class ,":class", ":agent"),
          (neq,":class",grc_cavalry),
          (assign,":continue",0),
          (try_for_range,":shield","itm_wooden_shield","itm_heraldic_mail_with_surcoat"),
              (agent_has_item_equipped,":agent",":shield"),
              (assign,":continue",1),
          (end_try),
          (eq,":continue",1),
          (assign,":chances",0),
          (agent_get_team,":team",":agent"),
          (agent_get_position,pos1,":agent"),
          (try_for_agents,":eek:ther"),
                (agent_is_alive,":eek:ther"),
                (agent_is_human,":eek:ther"),
                (agent_get_class ,":class", ":eek:ther"),
                (neq,":class",grc_cavalry),
                (agent_get_team,":eek:therteam",":eek:ther"),
                (neq,":team",":eek:therteam"),
                (agent_get_position,pos2,":eek:ther"),
                (get_distance_between_positions,":dist",pos1,pos2),
                (neg|position_is_behind_position,pos2,pos1),
                (lt,":dist",200),
                (val_add,":chances",1),
          (end_try),
          (store_agent_hit_points,":health",":agent",0),
          (val_mul,":health",-1),
          (val_add,":health",100),
          (val_div,":health",10),
          (val_mul,":chances",":health"),
          (store_random_in_range,":rand",1,25),
          (lt,":rand",":chances"),
          (call_script,"script_cf_agent_shield_bash",":agent"),
        (end_try),]),
where?
 
After  (store_trigger_param_1, ":agent_no"),
        (call_script, "script_agent_reassign_team", ":agent_no"),
        ]),

should work.  Make sure that you get the syntax correct. 
 
hi

i'm planning to install this feature on my mod but i ve a doubt.

so is there a difference between try_end (Warband code) and end_try (shield bash code) ?

i assume it's a stupid question since i'm not experienced modder :smile:

thanks  :grin:
 
michmuch said:
hi

i'm planning to install this feature on my mod but i ve a doubt.

so is there a difference between try_end (Warband code) and end_try (shield bash code) ?

i assume it's a stupid question since i'm not experienced modder :smile:

thanks  :grin:

At the moment, either will work and are considered the same by the compiler. It seems the devs are trying to phase out end_try in favor of try_end. You could do a quick replace all to change them to try_end to be the current, 'proper' format...but either will work and they do the same thing.
 
wow quick answer, nice

thank you Caba`drin

you ve left my doubt :grin:. not sure this is so english :???:

i ll replace all end_try i ll find. i'm a maniac!! :twisted:
 
Okay looks now like this:

(
    "lead_charge",mtf_battle_mode,charge,
    "You lead your men to battle.",
    [
    (1,mtef_defenders|mtef_team_0,0,aif_start_alarmed,12,[]),
    (0,mtef_defenders|mtef_team_0,0,aif_start_alarmed,0,[]),
    (4,mtef_attackers|mtef_team_1,0,aif_start_alarmed,12,[]),
    (4,mtef_attackers|mtef_team_1,0,aif_start_alarmed,0,[]),
    ],
    [
      (ti_on_agent_spawn, 0, 0, [],
      [
        (store_trigger_param_1, ":agent_no"),
        (call_script, "script_agent_reassign_team", ":agent_no"),
        ]),

(ti_before_mission_start, 0, 0, [], [(assign,"$bash_readiness",0)]),


      (0.1, 0, 0, [], [(val_add,"$bash_readiness",1),]),


      (0, 0, 0, [(game_key_is_down, gk_defend),(game_key_clicked, gk_attack),],
      [(assign,":continue",0),
        (get_player_agent_no,":player"),
        (agent_is_alive,":player"),
        (try_for_range,":shield","itm_wooden_shield","itm_heraldic_mail_with_surcoat"),
            (agent_has_item_equipped,":player",":shield"),
            (assign,":continue",1),
        (end_try),
        (eq,":continue",1),
        (agent_get_horse,":horse",":player"),
        (neg|gt,":horse",0),
        (ge,"$bash_readiness",10),
        (assign,"$bash_readiness",0),
        (call_script,"script_cf_agent_shield_bash",":player"),
        ]),

      (1.0, 0, 0, [],
      [(get_player_agent_no,":player"),
        (try_for_agents,":agent"),
          (agent_is_alive,":agent"),
          (agent_is_human,":agent"),
          (neq,":agent",":player"),
          (agent_get_class ,":class", ":agent"),
          (neq,":class",grc_cavalry),
          (assign,":continue",0),
          (try_for_range,":shield","itm_wooden_shield","itm_heraldic_mail_with_surcoat"),
              (agent_has_item_equipped,":agent",":shield"),
              (assign,":continue",1),
          (end_try),
          (eq,":continue",1),
          (assign,":chances",0),
          (agent_get_team,":team",":agent"),
          (agent_get_position,pos1,":agent"),
          (try_for_agents,":eek:ther"),
                (agent_is_alive,":eek:ther"),
                (agent_is_human,":eek:ther"),
                (agent_get_class ,":class", ":eek:ther"),
                (neq,":class",grc_cavalry),
                (agent_get_team,":eek:therteam",":eek:ther"),
                (neq,":team",":eek:therteam"),
                (agent_get_position,pos2,":eek:ther"),
                (get_distance_between_positions,":dist",pos1,pos2),
                (neg|position_is_behind_position,pos2,pos1),
                (lt,":dist",200),
                (val_add,":chances",1),
          (end_try),
          (store_agent_hit_points,":health",":agent",0),
          (val_mul,":health",-1),
          (val_add,":health",100),
          (val_div,":health",10),
          (val_mul,":chances",":health"),
          (store_random_in_range,":rand",1,25),
          (lt,":rand",":chances"),
          (call_script,"script_cf_agent_shield_bash",":agent"),
        (end_try),]),


      common_battle_tab_press,



But doesn't do anything.... :???:
 
hi,

are u playing with Warband or 1.011 ? because i ve tried to put this code on WB, and, like you, it doen't happens nothing. i think the code is too old.

BUT, go here http://forums.taleworlds.com/index.php/topic,134163.0.html

this code works with WB. i ve just tried it. but i still have got red script error. i explain my problem on the last post thread.

EDIt : i ve got successfull changed key control for bashing :smile: :smile: : i ve put right mouse button hold then push left control. in my opinion, it's better because if i bash with left mouse button, it was messed up with the regular strike. :grin: tell me if u want the code but it's very easy. but i ve still red script error when bashing :cry: :cry: :cry: HELP ME PLEASE :cry: :cry: :cry:

cheers :grin:
 
Back
Top Bottom