Author Topic: Spear Bracing Kit (Updated)  (Read 25931 times)

0 Members and 1 Guest are viewing this topic.

The Mercenary

  • Grandmaster Knight
  • *
  • Rest in peace, Cymro. We'll all miss you.
    • View Profile
  • Faction: Neutral
Spear Bracing Kit (Updated)
« on: April 05, 2009, 01:22:26 PM »
Woke up with a terrible headache and decided to release it.

Code: [Select]
spearwall_trigger_1 = (0.2, 0, ti_once, [], [
        (assign,"$spear_in_position",0),
        (try_for_agents,":agent"),
          (agent_set_slot,":agent",slot_agent_spearwall,0),
          (agent_set_slot,":agent",slot_agent_x,0),
          (agent_set_slot,":agent",slot_agent_y,0),
          (agent_set_slot,":agent",slot_agent_z,0),
          (agent_set_slot,":agent",slot_agent_speed,0),
        (try_end),
        ])

spearwall_trigger_2 = (0.2, 0, 0, [(eq,"$setting_use_spearwall",1)], [
        (set_fixed_point_multiplier, 100),
        (try_for_agents,":agent"),
          (agent_is_alive,":agent"),
          (agent_get_slot,":oldagentx",":agent",slot_agent_x),
          (agent_get_slot,":oldagenty",":agent",slot_agent_y),
          (agent_get_slot,":oldagentz",":agent",slot_agent_z),
          (agent_get_position, pos1, ":agent"),
          (position_get_x,":agentx",pos1),
          (position_get_y,":agenty",pos1),
          (position_get_z,":agentz",pos1),
          (position_set_x,pos2,":oldagentx"),
          (position_set_y,pos2,":oldagenty"),
          (position_set_z,pos2,":oldagentz"),
          (position_set_x,pos1,":agentx"),
          (position_set_y,pos1,":agenty"),
          (position_set_z,pos1,":agentz"),
          (get_distance_between_positions,":speed",pos1,pos2),
          (agent_set_slot,":agent",slot_agent_x,":agentx"),
          (agent_set_slot,":agent",slot_agent_y,":agenty"),
          (agent_set_slot,":agent",slot_agent_z,":agentz"),
          (agent_set_slot,":agent",slot_agent_speed,":speed"),
        (try_end),
        ])

spearwall_trigger_3 = (0, 0, 0, [(eq,"$spear_in_position",1),(this_or_next|game_key_clicked, gk_attack),
        (this_or_next|game_key_clicked, gk_defend),(this_or_next|game_key_clicked, gk_defend),
        (this_or_next|game_key_clicked, gk_move_forward),(this_or_next|game_key_clicked, gk_move_backward),
        (this_or_next|game_key_clicked, gk_move_left),(this_or_next|game_key_clicked, gk_move_right),
        (this_or_next|game_key_clicked, gk_equip_primary_weapon),(this_or_next|game_key_clicked, gk_equip_secondary_weapon),
        (this_or_next|game_key_clicked, gk_action),(game_key_clicked, gk_sheath_weapon)
        ],
       [(get_player_agent_no,":player"),
        (agent_is_alive,":player"),
        (display_message,"@Releasing spear.",0x6495ed),
        (agent_set_animation, ":player", "anim_release_thrust_staff"),
        (assign,"$spear_in_position",0),
        ])

spearwall_trigger_4 = (0.2, 0, 0, [(eq,"$setting_use_spearwall",1)], [
        (try_for_agents,":agent"),
          (agent_get_horse,":horse",":agent"),
          (neg|gt,":horse",0),
          (agent_get_slot,":speartimer",":agent",slot_agent_spearwall),
          (lt,":speartimer",10),
          (val_add,":speartimer",2),
          (agent_set_slot,":agent",slot_agent_spearwall,":speartimer"),
        (try_end),
        ])

spearwall_trigger_5 = (3, 0, 0, [(eq,"$spear_in_position",1)],[
        (get_player_agent_no,":player"),
        (agent_is_alive,":player"),
        (agent_set_animation, ":player", "anim_spearwall_hold"),
        ])

spearwall_trigger_6 = (0.1, 0, 0, [(eq,"$setting_use_spearwall",1)], [
        (get_player_agent_no,":player"),
        (agent_get_team,":playerteam",":player"),
        (try_for_agents,":agent"),
           (agent_is_alive,":agent"),
           (neq,":agent",":player"),
           (agent_is_human,":agent"),
           (agent_get_horse,":horse",":agent"),
           (neg|gt,":horse",0),
           (agent_get_slot,":speartimer",":agent",slot_agent_spearwall),
           (ge,":speartimer",10),
           (agent_get_simple_behavior,":state",":agent"),
           (agent_get_team,":team1",":agent"),
           (agent_get_class,":class",":agent"),
           (team_get_movement_order,":order",":team1",":class"),
           (assign,":continue",0),
           (try_begin),
              (neq,":team1",":playerteam"),
              (this_or_next|eq,":state",aisb_hold),
              (this_or_next|eq,":state",aisb_flock),
              (eq,":state",aisb_go_to_pos),
              (assign,":continue",1),
           (else_try),
              (this_or_next|eq,":order",mordr_hold),
              (eq,":order",mordr_stand_ground),
              (this_or_next|eq,":state",aisb_hold),
              (this_or_next|eq,":state",aisb_flock),
              (this_or_next|eq,":state",aisb_melee),
              (eq,":state",aisb_go_to_pos),
              (assign,":continue",1),
           (try_end),
           (eq,":continue",1),
           (assign,":continue",0),
           (try_begin),
              (eq,":team1",":playerteam"),
              (eq,"$rout",0),
              (assign,":continue",1),
           (else_try),
              (eq,"$airout",0),
              (assign,":continue",1),
           (try_end),
           (eq,":continue",1),
           (assign,":continue",0),
           (agent_get_wielded_item, ":handone", ":agent", 0),
           (agent_get_wielded_item, ":handtwo", ":agent", 1),
           (assign,":speardist",145),
           (try_for_range,":spear","itm_pitch_fork","itm_wooden_shield"),
              (this_or_next|eq,":handone",":spear"),
              (eq,":handtwo",":spear"),
              (assign,":continue",1),
              (try_begin),
                 (eq,":spear","itm_war_spear"),
                 (assign,":speardist",160),
              (else_try),
                 (eq,":spear","itm_spear_e_2-5m"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_light_lance"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_lance"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_heavy_lance"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_pike"),
                 (assign,":speardist",255),
              (else_try),
                 (eq,":spear","itm_ashwood_pike"),
                 (assign,":speardist",255),
              (else_try),
                 (eq,":spear","itm_awlpike"),
                 (assign,":speardist",170),
              (else_try),
                 (eq,":spear","itm_pitch_fork"),
                 (assign,":speardist",164),
              (else_try),
                 (eq,":spear","itm_military_fork"),
                 (assign,":speardist",145),
              (else_try),
                 (eq,":spear","itm_battle_fork"),
                 (assign,":speardist",152),
              (else_try),
                 (eq,":spear","itm_boar_spear"),
                 (assign,":speardist",167),
              (else_try),
                 (eq,":spear","itm_glaive"),
                 (assign,":speardist",167),
              (else_try),
                 (eq,":spear","itm_poleaxe"),
                 (assign,":speardist",190),
              (else_try),
                 (eq,":spear","itm_polehammer"),
                 (assign,":speardist",140),
              (else_try),
                 (eq,":spear","itm_shortened_spear"),
                 (assign,":speardist",130),
              (else_try),
                 (eq,":spear","itm_halberd"),
                 (assign,":speardist",185),
              (else_try),
                 (eq,":spear","itm_ancient_halbard"),
                 (assign,":speardist",185),
              (else_try),
                 (eq,":spear","itm_klance"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_jousting_lance"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_double_sided_lance"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_staff"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_quarter_staff"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_iron_staff"),
                 (assign,":continue",0),
              (try_end),
           (try_end),
           (eq,":continue",1),
           (assign,":victim",-1),
           (agent_get_position,pos1,":agent"),
           (try_for_agents,":possible_victim"),
              (agent_is_alive,":possible_victim"),
              (neg|agent_is_human,":possible_victim"),
              (agent_get_rider,":rider",":possible_victim"),
              (ge,":rider",0),
              (agent_get_team,":team2",":rider"),
              (teams_are_enemies,":team1",":team2"),
              (agent_get_position,pos2,":possible_victim"),
              (get_distance_between_positions,":dist",pos1,pos2),
              (lt,":dist",":speardist"),
              (neg|position_is_behind_position,pos2,pos1),
              (agent_get_slot,":speed",":possible_victim",slot_agent_speed),
              (ge,":speed",120), # Remember to change this if the timing on speed checks changes
              (assign,":victim",":possible_victim"),
           (try_end),
           (gt,":victim",-1),
           (agent_set_animation, ":agent", "anim_spearwall_hold"),
           (agent_play_sound,":victim","snd_metal_hit_high_armor_high_damage"),
           (store_agent_hit_points,":hp",":victim",0),
           (store_agent_hit_points,":oldhp",":victim",1),
           (val_div,":speed",2), # Remember to change this if the timing on speed checks changes
           (val_sub,":speed",15),
           (val_sub,":hp",":speed"),
           (val_max,":hp",0),
           (agent_set_slot,":agent",slot_agent_spearwall,0),
           (agent_get_horse,":playerhorse",":player"),           
           (agent_set_hit_points,":victim",":hp",0),
           (agent_deliver_damage_to_agent,":victim",":victim"),
           (try_begin),
              (eq,":victim",":playerhorse"),
              (store_agent_hit_points,":hp",":victim",1),
              (val_sub,":oldhp",":hp"),
              (assign,reg1,":oldhp"),
              (display_message,"@Your horse received {reg1} damage from a braced spear!",0xff4040),
           (try_end),
        (try_end),
        ])
spearwall_trigger_7 = (0.1, 0, 0, [(eq,"$spear_in_position",1)], [
        (get_player_agent_no,":player"),
        (agent_is_alive,":player"),
        (store_agent_hit_points,":hp",":player",1),
        (lt,":hp","$spear_hp"),
        (display_message,"@The injury causes your grip on the spear to slip!",0xff4040),
        (agent_set_animation, ":player", "anim_release_thrust_staff"),
        (assign,"$spear_in_position",0),
        ])

spearwall_trigger_8 = (0.1, 0, 0, [(eq,"$spear_in_position",1)], [
        (get_player_agent_no,":player"),
        (agent_is_alive,":player"),
        (agent_get_slot,":speartimer",":player",slot_agent_spearwall),
        (ge,":speartimer",10),
        (assign,":victim",-1),
        (agent_get_position,pos1,":player"),
        (try_for_agents,":possible_victim"),
           (agent_is_alive,":possible_victim"),
           (neg|agent_is_human,":possible_victim"),
           (agent_get_rider,":rider",":possible_victim"),
           (ge,":rider",0),
           (neg|agent_is_ally,":rider"),
           (agent_get_position,pos2,":possible_victim"),
           (get_distance_between_positions,":dist",pos1,pos2),
           (lt,":dist","$spear_dist"),
           (neg|position_is_behind_position,pos2,pos1),
           (agent_get_slot,":speed",":possible_victim",slot_agent_speed),
           (ge,":speed",120), # Remember to change this if the timing on speed checks changes
           (assign,":victim",":possible_victim"),
        (try_end),
        (gt,":victim",-1),
        (agent_play_sound,":victim","snd_metal_hit_high_armor_high_damage"),
        (store_agent_hit_points,":hp",":victim",0),
        (store_agent_hit_points,":oldhp",":victim",1),
        (val_div,":speed",2), # Remember to change this if the timing on speed checks changes
        (val_sub,":speed",15),
        (val_sub,":hp",":speed"),
        (val_max,":hp",0),
        (agent_set_hit_points,":victim",":hp",0),
        (agent_deliver_damage_to_agent,":victim",":victim"),
        (agent_set_slot,":player",slot_agent_spearwall,0),
        (store_agent_hit_points,":hp",":victim",1),
        (val_sub,":oldhp",":hp"),
        (assign,reg1,":oldhp"),
        (display_message,"@Spear-wall dealt {reg1} damage!"),
        ])
spearwall_trigger_9 = (0, 0, 2, [(key_clicked, key_b),(eq,"$setting_use_spearwall",1)],
       [(assign,":continue",0),
        (get_player_agent_no,":player"),
        (agent_is_alive,":player"),
        (agent_get_wielded_item, ":handone", ":player", 0),
        (agent_get_wielded_item, ":handtwo", ":player", 1),
        (assign,"$spear_dist",145),
        (try_for_range,":spear","itm_pitch_fork","itm_wooden_shield"),
            (this_or_next|eq,":handone",":spear"),
            (eq,":handtwo",":spear"),
            (assign,":continue",1),
              (try_begin),
                 (eq,":spear","itm_war_spear"),
                 (assign,"$spear_dist",160),
              (else_try),
                 (eq,":spear","itm_spear_e_2-5m"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_light_lance"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_lance"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_heavy_lance"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_pike"),
                 (assign,"$spear_dist",255),
              (else_try),
                 (eq,":spear","itm_ashwood_pike"),
                 (assign,"$spear_dist",255),
              (else_try),
                 (eq,":spear","itm_awlpike"),
                 (assign,"$spear_dist",170),
              (else_try),
                 (eq,":spear","itm_pitch_fork"),
                 (assign,"$spear_dist",164),
              (else_try),
                 (eq,":spear","itm_military_fork"),
                 (assign,"$spear_dist",145),
              (else_try),
                 (eq,":spear","itm_battle_fork"),
                 (assign,"$spear_dist",152),
              (else_try),
                 (eq,":spear","itm_boar_spear"),
                 (assign,"$spear_dist",167),
              (else_try),
                 (eq,":spear","itm_glaive"),
                 (assign,"$spear_dist",167),
              (else_try),
                 (eq,":spear","itm_poleaxe"),
                 (assign,"$spear_dist",190),
              (else_try),
                 (eq,":spear","itm_polehammer"),
                 (assign,"$spear_dist",140),
              (else_try),
                 (eq,":spear","itm_shortened_spear"),
                 (assign,"$spear_dist",130),
              (else_try),
                 (eq,":spear","itm_halberd"),
                 (assign,"$spear_dist",185),
              (else_try),
                 (eq,":spear","itm_ancient_halbard"),
                 (assign,"$spear_dist",185),
              (else_try),
                 (eq,":spear","itm_klance"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_jousting_lance"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_double_sided_lance"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_staff"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_quarter_staff"),
                 (assign,":continue",0),
              (else_try),
                 (eq,":spear","itm_iron_staff"),
                 (assign,":continue",0),
              (try_end),
        (try_end),
        (eq,":continue",1),
        (agent_get_horse,":horse",":player"),
        (neg|gt,":horse",0),
        (neq, "$spear_in_position", 1),
        (display_message,"@Bracing spear for charge.",0x6495ed),
        (agent_set_animation, ":player", "anim_spearwall_hold"),
        (assign, "$spear_in_position", 1),
        (store_agent_hit_points,"$spear_hp",":player",1),
        ])

Stick that in at the top of mission templates, with the rest of the triggers.

Code: [Select]
      spearwall_trigger_1,
      spearwall_trigger_2,
      spearwall_trigger_3,
      spearwall_trigger_4,
      spearwall_trigger_5,
      spearwall_trigger_6,
      spearwall_trigger_7,
      spearwall_trigger_8,
      spearwall_trigger_9,

Put that in in the end of the mission that you want to use bracing in (such as lead_charge) right before the final

    ],
  ),


Agents you need:

Code: [Select]
slot_agent_spearwall = 142
slot_agent_x = 143
slot_agent_y = 144
slot_agent_z = 145
slot_agent_speed = 146

Toss in module_constants.

Animations:
Code: [Select]
["spearwall_hold", acf_thrust|acf_enforce_all|acf_align_with_ground,
   [4.0, "anim_human", combat+7310, combat+7310, blend_in_ready],
 ],

In module_animations, overwriting one of the unused. (That was just for you, jik)

I believe that's all of it. Now, for your own mod, you have to change parts.

Find this:            (try_for_range,":spear","itm_pitch_fork","itm_wooden_shield"),

and change the first item to the beginning of where the spears are in your mod and the "item_wooden_shield" to the end.

Next, scroll down a small bit to see the area where it starts with:
                 (try_begin),
                 (eq,":spear","itm_war_spear"),
                 (assign,":speardist",160),

and ends with:

              (else_try),
                 (eq,":spear","itm_iron_staff"),
                 (assign,":continue",0),
              (try_end),

You need to change it. Each "itm_somethinghere" needs to become an spear in your mod. For items that you don't want braced (iron staff is an example here), set it to ":continue",0. The other values are the length of the spear when braced. So, the war spear can kill horses from 160 M&B distance units away. This part of the code enables the AI to brace their spears.



Now scroll down to the second:                                       (try_for_range,":spear","itm_pitch_fork","itm_wooden_shield"),


Change it again.


Then scroll down a tiny bit and change it (the spear lengths) again.

This part enables the player to brace spears.


I think that's all. I'm going to go get some coffee.

Remember to credit the development team of NE if you use this.

EDIT: Oh yeah, I forgot. You need to copy the code part into mission templates, any mission where you feel that you need to be able to skewer horses.

Here's an added bonus thingie:

Code: [Select]
call_horse_trigger_1 = (0, 0, 3, [(key_clicked, key_m)], [
      (get_player_agent_no,":agent"),
      (agent_get_horse,":horse",":agent"),
      (neg|gt,":horse",0),
      (troop_get_slot,":horse",":agent",slot_troop_horse),
      (agent_play_sound,":agent","snd_whistle"),
      (display_message,"@You whistle for your horse."),
      (gt,":horse",0),
      (agent_is_alive,":horse"),
      (agent_get_position, pos1, ":agent"),
      (agent_set_scripted_destination, ":horse", pos1, 0),
    ])

call_horse_trigger_2 = (0.2, 0, ti_once, [], [
      (get_player_agent_no,":agent"),
      (agent_get_horse,":horse",":agent"),
      (troop_set_slot,":agent",slot_troop_horse,":horse"),
    ])

Yes, it lets you whistle for your horse to come to you. Assuming it's alive, that is. It also goes into module_mission_templates.



Forgot a second thing. You hit B to brace in this version. Or maybe it's G.

Hit your keyboard randomly. You'll find it eventually.

Llew

  • Cheap ass bum
  • Grandmaster Knight
  • *
    • View Profile
  • Faction: Vaegir
  • MP nick: nK_Llew
  • M&BWB
Re: Spear Bracing
« Reply #1 on: April 05, 2009, 01:50:35 PM »
Sounds quite awesome. Do characters actually hold the spear properly, or...?

FrisianDude

  • Coitus non Awesome
  • Grandmaster Knight
  • *
  • Zis is Tshörman tärritorie!
    • View Profile
  • Faction: Neutral
  • MP nick: OLL_SirAndelot/Liudulf Ward
  • M&BWB
Re: Spear Bracing
« Reply #2 on: April 05, 2009, 02:30:18 PM »
Sounds very nice. Once I evened out some bugs with a new town, I'll try this. Thanks alot. :)
Nords ruled by King Ragnar, Khergits ruled by Sanjar Khan, Rhodoks ruled by King Graveth, Swadians ruled by King Harlaus, Vaegirs ruled by King Yaroglek. All those peoples live, fight, and die in the continent of Calradia. The Nords and Rhodoks field solely infantry and archers, the Swadians and Vaegirs have infantry, archers and cavalry and the Khergit field almost exclusively cavalry. No such things as "infarty" or "calvary" exist. Play Vikingr!

The Mercenary

  • Grandmaster Knight
  • *
  • Rest in peace, Cymro. We'll all miss you.
    • View Profile
  • Faction: Neutral
Re: Spear Bracing
« Reply #3 on: April 05, 2009, 02:33:45 PM »
Sounds quite awesome. Do characters actually hold the spear properly, or...?

Currently, the code there uses the animation that you have when you prepare to thrust with a spear. You could create a new one and place it in in place of the animation we have in place. So, no, they don't really hold it properly. :P

Sounds very nice. Once I evened out some bugs with a new town, I'll try this. Thanks alot. :)

There's still a couple bugs, such as being able to brace mid-swing or kill horsemen behind you. Aside from that, it should work fine.

jik

  • Knight
  • *
    • View Profile
  • Faction: Neutral
Re: Spear Bracing
« Reply #4 on: April 05, 2009, 06:30:02 PM »
Quick request,

Can you add "KIT" to the end of your subject for this?  Easier to search for.

Mordachai

  • Squire
  • *
    • View Profile
  • Faction: Neutral
Re: Spear Bracing
« Reply #5 on: April 05, 2009, 06:53:47 PM »
Very cool!  Thanks for taking the time to package this in a form that others can use.  Much Appreciated! :)

bjorne.

  • Sergeant Knight
  • *
  • I'm a nerd... deal with it..
    • View Profile
    • Age of Blackpowder - Realm of Revolution
  • Faction: Swadian
Re: Spear Bracing
« Reply #6 on: April 05, 2009, 06:54:41 PM »
without trying to sound to nooby. What exactly does it do.

Blankin

  • Squire
  • *
    • View Profile
  • Faction: Rhodok
  • WB
Re: Spear Bracing
« Reply #7 on: April 05, 2009, 07:30:38 PM »
It lets spearman brace the spear, killing or giving quite a hit in a horse. And the second code let you call your horse.

Lord Leoric of Wercheg

  • Grandmaster Knight
  • *
  • Self-interest above all else.
    • View Profile
  • Faction: Neutral
Re: Spear Bracing Kit
« Reply #8 on: April 06, 2009, 01:21:50 AM »
Oh thanks The Mercenary! I've been waiting for ages for you to release this! :D
You willingly live in Japan, your opinion is invaid.

You can't spell, your opinion also is invalid.
Don't like it? Suck my dick. Like it? Suck my dick. So-so? Harder!

NaglFaar

  • Grandmaster Knight
  • *
    • View Profile
  • Faction: Nord
  • MP nick: NaglFaar
  • M&BWBNW
Re: Spear Bracing Kit
« Reply #9 on: April 06, 2009, 01:26:21 AM »
B = brace

M = Call Horse
Mæli þarft eða þegi


the thread is in Alpha stages and when all the ideas have been put together and implemented the taleworlds post shall be completed.

Berserker Pride

  • Grandmaster Knight
  • *
  • Fearless Scripter of the Berserk Mod
    • View Profile
  • Faction: Vaegir
  • MP nick: CoR_Berserker
  • WB
Re: Spear Bracing Kit
« Reply #10 on: April 06, 2009, 07:06:47 AM »
Thank you very much for releasing this kit mercenary. I played your mod and it did wonders to curb the "I have a horse I can't die syndrome". I am having trouble implementing it though it keeps throwing out a syntax error here: with an arrow pointing at that first = sign
(click to show/hide)
I don't know why the compiler doesn't like the first "=" symbol.  The code is copied in right where the triggers in the lead_charge mission template begins.
« Last Edit: April 06, 2009, 07:08:54 AM by Berserker Pride »

Lord Leoric of Wercheg

  • Grandmaster Knight
  • *
  • Self-interest above all else.
    • View Profile
  • Faction: Neutral
Re: Spear Bracing Kit
« Reply #11 on: April 06, 2009, 02:18:08 PM »
Sorry but I'm not very good at coding yet, I know that you have to place the code in module_mission templates and place it in the lead the charge part, but where do I put it exactly? When I try to put it in the Ai triggers for the mission template it just gives me syntax errors. Can someone post the code with some references like what's on top of it and what's below? :|Please....? :(
You willingly live in Japan, your opinion is invaid.

You can't spell, your opinion also is invalid.
Don't like it? Suck my dick. Like it? Suck my dick. So-so? Harder!

jik

  • Knight
  • *
    • View Profile
  • Faction: Neutral
Re: Spear Bracing Kit
« Reply #12 on: April 06, 2009, 03:01:32 PM »
hmmm...  Looking over the code, it may be that TheMercenary might have added some new agent slots. looking at the agent slots, I see this:

(click to show/hide)

In the first trigger alone there are 4 slot calls that don't exist in native:

          (agent_set_slot,":agent",slot_agent_x,0),
          (agent_set_slot,":agent",slot_agent_y,0),
          (agent_set_slot,":agent",slot_agent_z,0),
          (agent_set_slot,":agent",slot_agent_speed,0),

I guess you could go through the code and find all the agent slot calls, but it would be easier if TheMercenary would include the slot defs too.

(Maybe some brief code documenation too?)

WarlordG

  • Sergeant
  • *
  • Permanently Banned
  • Playing and Owning Since .751
    • View Profile
    • Workin on It
  • Faction: Vaegir
Re: Spear Bracing Kit
« Reply #13 on: April 06, 2009, 05:35:39 PM »
Sorry but I'm not very good at coding yet, I know that you have to place the code in module_mission templates and place it in the lead the charge part, but where do I put it exactly? When I try to put it in the Ai triggers for the mission template it just gives me syntax errors. Can someone post the code with some references like what's on top of it and what's below? :|Please....? :(

I want to know too >_>

The Mercenary

  • Grandmaster Knight
  • *
  • Rest in peace, Cymro. We'll all miss you.
    • View Profile
  • Faction: Neutral
Re: Spear Bracing Kit
« Reply #14 on: April 07, 2009, 10:31:13 PM »
Yeah, I'll do that as soon as I find which file the agent defs are in and which folder has the current module stuff.