Shout mod?

正在查看此主题的用户

Keedo420 说:
Jataklamokete 说:
all right it works for standard battlefields, and i like it ! :cool:

nowi can shout like a bear during battles ! !  :twisted:

but a lil bug appears when i do it from an horse, the player goes down trought the horse like he was at feet, then he goes up back, funny but not really realistic ^^

anyway, i'm really glad for that, thanks a lot all, now the game is perfect for me ! :mrgreen:

Yes, I have that same problem in my mod. A week or so ago I added a Warcry script to my mod so that players could do basically what you are aiming to do, but the purpose of my script was to call for reinforcements. Anyway, it did the same basic thing: played the warcry sound (or woman_hit for female players since there is no woman_warcry sounds  :sad:) and then did the cheer animation. I have looked through the module_animations, but found no cheer animation that is (based on names) used for cheering while on a horse, even though I have most definitely seen npcs cheering while on a horse. I had forgotten about that until now.

So you need to also test if the player is on horse back and run the appropriate animation.  What is the test for that?
 
jik 说:
So you need to also test if the player is on horse back and run the appropriate animation.  What is the test for that?

The problem for me is that I couldn't find an appropriate animation for cheering on horseback. The only two animations I saw with cheer in the name were:
["cheer", 0,
##  [2.5, "anim_human", 70000, 70045, arf_blend_in_5],
##  [3.0, "anim_human", 70100, 70150, arf_blend_in_5],
  [6.0, "man_cheer", 0, 185, arf_blend_in_5],
  [3.0, "man_cheer", 200, 289, arf_blend_in_5],
  [4.5, "man_cheer", 300, 437, arf_blend_in_5],
  [5.5, "man_cheer", 450, 617, arf_blend_in_5],
],

["cheer_stand", arf_cyclic,
  [31.5, "man_cheer", 650, 1597, arf_blend_in_5], 
],

The only ones related to riders (based on the names) I could find are these:
["fall_rider_head_front", acf_enforce_all|acf_lock_camera|acf_lock_camera,
  [2.2, "anim_human", blow+200, blow+275, arf_blend_in_3|arf_make_custom_sound, pack2f(0.8, 0.0), (0,0,0), 0.3],
],
["rider_fall_in_place", acf_enforce_lowerbody,
  [3.8, "anim_human", blow + 1000, blow + 1075, arf_blend_in_16|arf_make_custom_sound, pack2f(0.0, 0.0), (0,0,0), 0.5],
],
["rider_fall_right", acf_enforce_all|acf_displace_position,
  [2.5, "anim_human_02", 350, 382,  arf_blend_in_8, 0, (0.8,-1.8,0), 0.5],
],
["rider_fall_roll", acf_enforce_all|acf_displace_position,
  [2.5, "anim_human", blow+ 2000, blow+2084,  arf_blend_in_8, 0, (-0.4,0.2,0), 1.0],
],

And the only ones I could find with the word horse in the name were these:
["mount_horse", acf_enforce_all,
  [2.0, "anim_human", horse_move+1000, horse_move+1050,  arf_blend_in_1, 0, (0.0,0,0.0)],
],
["dismount_horse", acf_enforce_lowerbody|acf_displace_position,
  [2.0, "anim_human", horse_move+1100, horse_move+1150,  arf_blend_in_1, 0, (-0.5,0,0)],
],
["lancer_ride_0", acf_enforce_lowerbody,
##  [4.0, "anim_human", horse_move + 5000, horse_move + 5057, arf_lancer|arf_cyclic],
  [43.0, "stand_onhorse_staff", 0, 1300, arf_lancer|arf_cyclic],
],
["ready_slash_horseback_right", acf_right_cut|acf_parallels_for_look_slope|acf_anim_length(100),
  [ready_durn, "anim_human", combat+10100, combat+10110, blend_in_ready],
],
["release_slash_horseback_right", acf_right_cut|acf_parallels_for_look_slope|acf_anim_length(100),
  [0.6, "anim_human", combat+10110, combat+10140, blend_in_release],
],
["parry_slash_horseback_right",acf_parallels_for_look_slope|acf_anim_length(100),
  [attack_parry_duration, "anim_human", combat+10120, combat+10115, blend_in_parry],
],
["ready_slash_horseback_left", acf_left_cut|acf_parallels_for_look_slope|acf_anim_length(100),
  [ready_durn, "anim_human", combat+10400, combat+10410, blend_in_ready],
],
["release_slash_horseback_left", acf_left_cut|acf_parallels_for_look_slope|acf_anim_length(100),
  [0.6, "anim_human", combat+10410, combat+10440, blend_in_release],
],
["parry_slash_horseback_left",acf_parallels_for_look_slope|acf_anim_length(100),
  [attack_parry_duration, "anim_human", combat+10420, combat+10415, blend_in_parry],
],
["ready_bow_mounted", acf_rotate_body|acf_parallels_for_look_slope|acf_anim_length(100),
  [1.5, "anim_human", combat+800, combat+830, blend_in_ready|arf_make_custom_sound, pack2f(0.10, 0.40)],
],
["release_bow_mounted", acf_rotate_body|acf_parallels_for_look_slope|acf_anim_length(100),
  [0.3, "anim_human", combat+830, combat+832, arf_blend_in_2],
],
["reload_crossbow_horseback", 0,
  [1.6, "anim_human", combat+1800, combat+1877, arf_blend_in_8|arf_make_custom_sound, pack2f(0.27, 0.94)],
],

Then there are these, which is hard to tell what exactly they are other than being riding animations:
["ride_0", acf_enforce_lowerbody,
  ## [10.0, "anim_human", horse_move+2000, horse_move+2100, arf_cyclic],
  # [3.0, "anim_human_02", 600, 644, arf_cyclic],
##  [37.0, "stand_onhorse", 0, 1110, arf_cyclic],
##  [22.0, "stand_onhorse_sword", 0, 671, arf_cyclic],
  [15.0, "stand_onhorse", 0, 456, arf_cyclic],
  ],
["ride_1", acf_enforce_lowerbody | acf_synch_with_horse,
  [1.0, "anim_human_02", 0, 31, arf_cyclic],
],
["lancer_ride_1", acf_enforce_lowerbody | acf_synch_with_horse,
  [0.8, "anim_human", horse_move+210, horse_move+250, arf_cyclic |  arf_blend_in_16],
],
["lancer_charge_parried",acf_enforce_lowerbody,
  [1.0, "anim_human", horse_move+210, horse_move+220, arf_blend_in_32],
],
["ride_2", acf_enforce_lowerbody | acf_synch_with_horse,
  [0.8, "anim_human_02", 50, 69, arf_cyclic],
],
["ride_3", acf_enforce_lowerbody | acf_synch_with_horse,
  [0.6, "anim_human_02", 100, 116, arf_cyclic],
],
["ride_4", acf_enforce_lowerbody | acf_synch_with_horse,
  [0.5, "anim_human_02", 150, 165, arf_cyclic],
],
["lancer_ride_4", acf_enforce_lowerbody | acf_synch_with_horse | acf_parallels_for_look_slope|acf_anim_length(100),
  [0.5, "anim_human", horse_move+610, horse_move+650, arf_cyclic | arf_blend_in_128],
],

So I'm wondering if maybe it could be one of those. I think I'll test it out later unless someone knows the specific animation for cheering on horseback. Testing if the player is on horseback or not should be easy enough. Something like this should work, provided we can figure out the correct animation (mounted_cheer does not exist):
( 0, 0, 0,
[(key_clicked, key_g)], 
[
  (get_player_agent_no, ":player"),
  (try_begin),
    (troop_is_mounted, ":player"),
    (agent_play_sound, ":player", "snd_man_warcry"),
    (agent_set_animation, ":player", "anim_mounted_cheer"),
  (else_try),
    (agent_play_sound, ":player", "snd_man_warcry"),
    (agent_set_animation, ":player", "anim_cheer"),
  (end_try),
]),
 
just map all of them to a different key, then you can test them in one go, shouldn't take too long to figure out which one it is.
 
Hmmm. Well, I tested out the ride_0 through ride_4 animations, but all they did was make my character twitch slightly. I'll test out some of the other animations in the morning, but for now I realized the mini-warcry script I posted above could be simplified slightly by removing the redundant agent_play_sound and moving the other one out of the try like so:
( 0, 0, 0,
[(key_clicked, key_g)], 
[
  (get_player_agent_no, ":player"),
  (agent_play_sound, ":player", "snd_man_warcry"),
  (try_begin),
    (troop_is_mounted, "trp_player"),
    (agent_set_animation, ":player", "anim_mounted_cheer"), #Note: there is no animation with this name.
  (else_try),
    (agent_set_animation, ":player", "anim_cheer"),
  (end_try),
]),
I also realized that troop_is_mounted requires a troop id not an agent id so I fixed that little part too.
 
keep fighting the good fight!

A troop rally warcry or a demorilizing warcry are good additions to the game.  I want specific warriors to be noticed in my game.  I want renown to mean people know of your battle prowess.  Slaying many, against bad odds will move your renown up.  Slaughtering villagers and defeating very small parties (less than 1/2 your size) will reduce your renown.  Based on renown, I can increase or decrease the affect of the warcry in battle.
 
Is it really that hard? Can you just insert your own sound bite to take the place of the cheering or make your own animation for it?
 
passivechicken 说:
Is it really that hard? Can you just insert your own sound bite to take the place of the cheering or make your own animation for it?

The sound is not the problem. That is easy. Creating custom animations however is a little trickier. The real problem here is that the animation already exists, but the one for cheering while mounted is not named in a way to be easily identified.
 
I have just one question. What if I instead of pressing the G-key would assign it to the F3 key (Charge key) to make them actually charge when I shout to.
Would this screw up something in-game. I mean, can you assign a key to both order your troops and play a sound at the same time?


-EDIT-

Oh, i just saw that this thread has been quite dead for some time now. I didn't mean to dig it up again, I just got caught in this.
 
Keedo420 说:
Creating custom animations however is a little trickier.
I thought this was impossible due to limitations with Thorgrim's BRF editor. I've heard (or, rather, read) tales of someone who could make custom animations by a means not thoroughly understood. I don't think that likely, as such a person would have shared his secrets, unless he was a very selfish sort.
 
NaglFaar 说:
I have just one question. What if I instead of pressing the G-key would assign it to the F3 key (Charge key) to make them actually charge when I shout to.
Works. Just change key_g to key_f3. The animation immobilizes you for a bit though, so I don't know if you'd really want it in battle. You could comment out the animation line leave the sound.
 
MountainBlade 说:
NaglFaar 说:
I have just one question. What if I instead of pressing the G-key would assign it to the F3 key (Charge key) to make them actually charge when I shout to.
Works. Just change key_g to key_f3. The animation immobilizes you for a bit though, so I don't know if you'd really want it in battle. You could comment out the animation line leave the sound.

Thanks dude. I will try that. If I find that it works I'll change the whole game and insert Slawomir's script.
I think I'll make a small personal mod with the sounds from MTW 2. I don't think I can release something like that publicly... Or is that alowed?
 
what do you write without the ModuleSystem
and how i add Naval battles without ModuleSystem
 
hvordan adder jeg shout til characteren min.
hvordan adder sjø slag til mods.

uten ModuleSystem
 
NaglFaar 说:
[Thanks dude. I will try that. If I find that it works I'll change the whole game and insert Slawomir's script.
I think I'll make a small personal mod with the sounds from MTW 2. I don't think I can release something like that publicly... Or is that alowed?
Unlikely. You could always try asking the CA people but I don't think they'd allow it. You could release it with placeholder sound files and a txt explaining what files to copy and what to name them so that people that have MTW2 could do it themselves.

Swadii 说:
What you write without ModuleSystem
I don't know, but why don't you want to use the module system? It's a lot easier that way.
 
Well, i didn't get Slawomirs script to work. I probably did something wrong. Any way i got the voice commands to work through multiple
  (0, 0, 0, [(key_clicked,key_f1)],
    [(get_player_agent_no, ":player"),
      (agent_play_sound, ":player", "snd_order_halt_male"),
      ##(agent_set_animation, ":player", "anim_cheer"),
  ]),
 
  (0, 0, 0, [(key_clicked,key_f3)],
    [(get_player_agent_no, ":player"),
      (agent_play_sound, ":player", "snd_order_charge_male"),
      ##(agent_set_animation, ":player", "anim_cheer"),
  ]),
 
  (0, 0, 0, [(key_clicked,key_f5)],
    [(get_player_agent_no, ":player"),
      (agent_play_sound, ":player", "snd_order_hold_fire_male"),
      ##(agent_set_animation, ":player", "anim_cheer"),
  ]),
 
  (0, 0, 0, [(key_clicked,key_f6)],
    [(get_player_agent_no, ":player"),
      (agent_play_sound, ":player", "snd_order_advance_male"),
      ##(agent_set_animation, ":player", "anim_cheer"),
  ]),
 
  (0, 0, 0, [(key_clicked,key_f7)],
    [(get_player_agent_no, ":player"),
      (agent_play_sound, ":player", "snd_order_fall_back_male"),
      ##(agent_set_animation, ":player", "anim_cheer"),
  ]),
 
  (0, 0, 0, [(key_clicked,key_f:cool:],
    [(get_player_agent_no, ":player"),
      (agent_play_sound, ":player", "snd_order_stand_closer_male"),
      ##(agent_set_animation, ":player", "anim_cheer"),
  ]),
 
  (0, 0, 0, [(key_clicked,key_f9)],
    [(get_player_agent_no, ":player"),
      (agent_play_sound, ":player", "snd_order_spread_out_male"),
      ##(agent_set_animation, ":player", "anim_cheer"),
  ]),
 
    (0, 0, 0, [(key_clicked,key_2)],
    [(get_player_agent_no, ":player"),
      (agent_play_sound, ":player", "snd_order_infantry_male"),
      ##(agent_set_animation, ":player", "anim_cheer"),
  ]),
 
      (0, 0, 0, [(key_clicked,key_3)],
    [(get_player_agent_no, ":player"),
      (agent_play_sound, ":player", "snd_order_archers_male"),
      ##(agent_set_animation, ":player", "anim_cheer"),
  ]),
 
    (0, 0, 0, [(key_clicked,key_4)],
    [(get_player_agent_no, ":player"),
      (agent_play_sound, ":player", "snd_order_cavalry_male"),
      ##(agent_set_animation, ":player", "anim_cheer"),
  ]),
 
    (0, 0, 0, [(key_clicked,key_g)],
    [(get_player_agent_no, ":player"),
      (agent_play_sound, ":player", "snd_taunt_male"),
      ##(agent_set_animation, ":player", "anim_cheer"),
  ]),
 
    (0, 0, 0, [(key_clicked,key_v)],
    [(get_player_agent_no, ":player"),
      (agent_play_sound, ":player", "snd_taunt_male_2"),
      ##(agent_set_animation, ":player", "anim_cheer"),
  ]),

  (0, 0, 0, [(key_clicked,key_h)],
    [(get_player_agent_no, ":player"),
      (agent_play_sound, ":player", "snd_battle_horn"),
      ##(agent_set_animation, ":player", "anim_cheer"),
  ]),
 

Keedo. Did you have any luck in finding an appropriate anim for the horse cheer anim?

Then I wonder if it's possible to maybe boost (attribute/ skill) for player or troops when I press, for example the H key (battle horn)?
If so... Could anyone show me an example of how to do this.
 
NaglFaar 说:
Keedo. Did you have any luck in finding an appropriate anim for the horse cheer anim?

Oh umm.....  :oops: I kinda forgot about that. I'll look into it again soon. :wink:
 
后退
顶部 底部