Results 1 to 5 of 5

Thread: Wrong sound

  1. #1

    Default Wrong sound

    Hey guys! Trying to add chariot unit to my game, but I get the sound of elephant when they attack lol! Can someone point out to me how to fix this with the right horse sound? I've also introduce naffatun unit (launch grenade) but the sound when they throw their grenades is the same as the bows. This too I'd like to fix but I don't know how to give sound to unit animation. ^^ Thanks!

  2. #2

    Default Re: Wrong sound

    Just to be clear, my new unit use this in descr_sounds_generic.txt :

    Code:
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;   ELEPHANT
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    
    
    event ANIM_ELE_ATTACK  priority 130 mindist 10 volume -30 distancepriority 0
    folder data/sounds/Voice/Animal/Elephant
    Elephant_Attack_02
    Elephant_Attack_04
    Elephant_Attack_05
    Elephant_Attack_06
    Elephant_Attack_07
    Elephant_Attack_08
    Elephant_Attack_09
    Elephant_Attack_10
    Elephant_Attack_11
    Elephant_Attack_12
    end
    
    event ANIM_ELE_DEATH priority 130 mindist 10 distancepriority 0 probability 1
    folder data/sounds/Voice/Animal/Elephant
    Elephant_Death_01
    Elephant_Death_02
    Elephant_Death_03
    Elephant_Death_04
    Elephant_Death_05
    Elephant_Death_06
    Elephant_Death_07
    Elephant_Death_08
    end
    ... instead of this :

    Code:
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;   HORSE
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    
    ;;;; used on horse charge ;;;;
    event ANIM_HORSE_ATTACK volume -20 priority 130 probability .05
    folder data/sounds/Voice/Animal/Horse
    horse_nay_02
    horse_nay_03
    horse_nay_04
    horse_nay_05
    horse_nay_08
    horse_nay_13
    horse_nay_14
    horse_nay_16
    horse_nay_17
    horse_nay_18
    horse_nay_22
    end
    
    event ANIM_HORSE_DEATH volume -15 priority 130 probability 1
    folder data/sounds/Voice/Animal/Horse
    horse_death_01
    horse_death_03
    horse_death_05
    horse_death_06
    horse_death_07
    horse_death_08
    horse_death_09
    horse_death_10
    horse_death_11
    horse_death_12
    horse_death_13
    horse_death_14
    end
    
    ;;; this is used for horse mid attack - when general rears up ;;;
    ;;; this is used for horse jump too ;;;;
    ;;; this is used for horse refuse as well ;;;;
    event ANIM_HORSE_REGROUP volume -15 priority 120 probradius 8 probability .2
    folder data/sounds/Voice/Animal/Horse
    horse_nay_05
    horse_nay_13
    horse_nay_17
    horse_nay_08
    end
    But I don't know how to link these section to a unit. I'm not sure what is the "event_ANIM" line for. Probably animation.

  3. #3

    Default Re: Wrong sound

    In my battle_models.modeldb it reads (at the end, for animation) :

    Code:
    0 
    1 
    5 Horse 
    19 fs_warwagon_chariot 0 
    0 
    0 
    -1 0 0 0 0 0 0
    So in descr_skeleton.txt I change this :

    Code:
    type		fs_warwagon_chariot		;hussite warwagon with 2 horses
    scale		1.12
    
    anim		default				data/animations/fs_warwagon/med_elephant_default_modified.cas						-fr	-evt:data/animations/fs_chariot/med_elephant_default.evt
    anim		stand_a_idle			data/animations/fs_warwagon/med_elephant_stand_a_idle_modified.cas					-fr	-evt:data/animations/fs_chariot/med_elephant_stand_a_idle.evt
    anim		stand_a_to_walk			data/animations/fs_warwagon/med_elephant_stand_a_to_walk_modified.cas					-fr	-evt:data/animations/fs_chariot/med_elephant_stand_a_to_walk.evt
    anim		stand_a_to_run			data/animations/fs_warwagon/med_elephant_stand_a_to_run_modified.cas					-fr	-evt:data/animations/fs_chariot/med_elephant_stand_a_to_run.evt
    anim		stand_a_to_charge		data/animations/fs_warwagon/med_elephant_stand_a_to_charge_modified.cas					-fr	-evt:data/animations/fs_chariot/med_elephant_stand_a_to_charge.evt
    
    anim		stand_a_lf_idle_1		data/animations/fs_warwagon/med_elephant_stand_a_hf_idle_1_modified.cas					-fr
    anim		stand_a_lf_idle_2		data/animations/fs_warwagon/med_elephant_stand_a_hf_idle_2_modified.cas					-fr		
    anim		stand_a_lf_idle_3		data/animations/fs_warwagon/med_elephant_stand_a_hf_idle_1_modified.cas					-fr		
    
    anim		stand_a_lf_idle_1		data/animations/fs_warwagon/med_elephant_stand_a_hf_idle_3_modified.cas					-fr		
    
    
    anim		stand_a_turn_45_cw_1		data/animations/fs_warwagon/med_elephant_stand_a_turn_45_cw_1_modified.cas		-mintd:10	-maxtd:68	-evt:data/animations/fs_chariot/med_elephant_stand_a_turn_45_ccw_1.evt
    anim		stand_a_turn_45_ccw_1		data/animations/fs_warwagon/med_elephant_stand_a_turn_45_ccw_1_modified.cas		-mintd:10	-maxtd:68	-evt:data/animations/fs_chariot/med_elephant_stand_a_turn_45_ccw_1.evt
    anim		stand_a_turn_90_cw_1		data/animations/fs_warwagon/med_elephant_stand_a_turn_45_cw_1_modified.cas		-mintd:67	-maxtd:115	-evt:data/animations/fs_chariot/med_elephant_stand_a_turn_45_ccw_1.evt
    anim		stand_a_turn_90_ccw_1		data/animations/fs_warwagon/med_elephant_stand_a_turn_45_ccw_1_modified.cas		-mintd:67	-maxtd:115	-evt:data/animations/fs_chariot/med_elephant_stand_a_turn_45_ccw_1.evt
    
    ;anim		stand_a_turn_90_cw_1		data/animations/fs_warwagon/med_elephant_stand_a_to_walk_rot90_cw_move_modified.cas		-mintd:67	-maxtd:115	-evt:data/animations/fs_chariot/med_elephant_stand_a_turn_45_cw_1.evt
    ;anim		stand_a_turn_90_ccw_1		data/animations/fs_warwagon/med_elephant_stand_a_to_walk_rot90_ccw_move_modified.cas		-mintd:67	-maxtd:115	-evt:data/animations/fs_chariot/med_elephant_stand_a_turn_45_ccw_1.evt
    
    anim		walk				data/animations/fs_warwagon/med_elephant_walk_modified.cas						-fr	-evt:data/animations/fs_chariot/med_elephant_walk.evt
    anim		walk_to_run			data/animations/fs_warwagon/med_elephant_walk_to_run_modified.cas						-fr	-evt:data/animations/fs_chariot/med_elephant_walk_to_run.evt
    anim		walk_to_stand_a			data/animations/fs_warwagon/med_elephant_walk_to_stand_a_modified.cas					-fr	-evt:data/animations/fs_chariot/med_elephant_walk_to_stand_a.evt
    
    anim		run				data/animations/fs_warwagon/med_elephant_run_modified.cas							-fr	-evt:data/animations/fs_chariot/med_elephant_run.evt
    anim		run_to_walk			data/animations/fs_warwagon/med_elephant_run_to_charge_modified.cas					-fr	-evt:data/animations/fs_chariot/med_elephant_run_to_charge.evt
    anim		run_to_stand_a			data/animations/fs_warwagon/med_elephant_run_to_stand_a_modified.cas					-fr	-evt:data/animations/fs_chariot/med_elephant_run_to_stand_a.evt
    anim		run_to_charge			data/animations/fs_warwagon/med_elephant_run_to_walk_modified.cas						-fr	-evt:data/animations/fs_chariot/med_elephant_run_to_walk.evt
    
    anim		charge				data/animations/fs_warwagon/med_elephant_charge_modified.cas							-evt:data/animations/fs_chariot/med_elephant_charge.evt
    anim		charge_attack			data/animations/fs_warwagon/med_elephant_charge_modified.cas					-fr	-if:7	-evt:data/animations/fs_chariot/med_elephant_charge_attack.evt
    
    ;;no attack
    anim		attack_mid_low_1		data/animations/fs_warwagon/med_elephant_stand_a_hf_idle_1_modified.cas					-fr	-evt:data/animations/fs_chariot/med_elephant_stand_a_idle.evt
    anim		attack_mid_centre_1		data/animations/fs_warwagon/med_elephant_stand_a_hf_idle_2_modified.cas 				-fr	-evt:data/animations/fs_chariot/med_elephant_stand_a_idle.evt
    anim		attack_mid_high_1		data/animations/fs_warwagon/med_elephant_stand_a_idle_modified.cas					-fr	-evt:data/animations/fs_chariot/med_elephant_stand_a_idle.evt
    
    
    ;anim		attack_mid_low_1		data/animations/fs_warwagon/med_elephant_attack_mid_centre_1_modified.cas					-fr	-if:34, -evt:data/animations/fs_chariot/med_elephant_attack_mid_low_1.evt
    ;anim		attack_mid_centre_1		data/animations/fs_warwagon/med_elephant_attack_mid_centre_1_modified.cas					-fr	-if:13	-evt:data/animations/fs_chariot/med_elephant_attack_mid_centre_1.evt
    ;anim		attack_mid_high_1		data/animations/fs_warwagon/med_elephant_attack_mid_high_1_modified.cas					-fr	-if:21, -evt:data/animations/fs_chariot/med_elephant_attack_mid_high_1.evt
    
    anim		die_forward_1			data/animations/fs_warwagon/med_elephant_die_forward_1_modified.cas					-evt:data/animations/fs_chariot/med_elephant_die_forward_1.evt
    anim		die_backward_1			data/animations/fs_warwagon/med_elephant_die_forward_1_modified.cas					-evt:data/animations/fs_chariot/med_elephant_die_backward_1.evt
    
    anim		idle_to_swim			data/animations/fs_warwagon/med_elephant_stand_a_to_walk_modified.cas					-fr	-id -0.1, 4.75, 4.84	-if:15
    anim		swim_to_idle			data/animations/fs_warwagon/med_elephant_walk_to_stand_a_modified.cas					-fr
    anim		swim_idle			data/animations/fs_warwagon/med_elephant_stand_a_idle_modified.cas						-fr
    anim		swim				data/animations/fs_warwagon/med_elephant_walk_modified.cas						-fr
    anim		swim_attack			data/animations/fs_warwagon/med_elephant_attack_mid_centre_1_modified.cas						-fr	-id 0.0, 4.17, 5.21		-if:13
    to this :

    Code:
    type		fs_warwagon_chariot		;hussite warwagon with 2 horses
    scale		1.12
    
    anim		default				data/animations/fs_warwagon/med_elephant_default_modified.cas
    anim		stand_a_idle			data/animations/fs_warwagon/med_elephant_stand_a_idle_modified.cas					-fr
    anim		stand_a_to_walk			data/animations/fs_warwagon/med_elephant_stand_a_to_walk_modified.cas					-fr	-evt:data/animations/fs_horse_marka/fs_horse_marka_stand_a_to_walk.evt
    anim		stand_a_to_run			data/animations/fs_warwagon/med_elephant_stand_a_to_run_modified.cas					-fr	-evt:data/animations/fs_horse_marka/fs_horse_marka_stand_a_to_run.evt
    anim		stand_a_to_charge		data/animations/fs_warwagon/med_elephant_stand_a_to_charge_modified.cas					-fr	-evt:data/animations/fs_horse_marka/fs_horse_marka_stand_a_to_run.evt
    
    anim		stand_a_lf_idle_1		data/animations/fs_warwagon/med_elephant_stand_a_hf_idle_1_modified.cas					-fr
    anim		stand_a_lf_idle_2		data/animations/fs_warwagon/med_elephant_stand_a_hf_idle_2_modified.cas					-fr		
    anim		stand_a_lf_idle_3		data/animations/fs_warwagon/med_elephant_stand_a_hf_idle_1_modified.cas					-fr		
    
    anim		stand_a_lf_idle_1		data/animations/fs_warwagon/med_elephant_stand_a_hf_idle_3_modified.cas					-fr		
    
    
    anim		stand_a_turn_45_cw_1		data/animations/fs_warwagon/med_elephant_stand_a_turn_45_cw_1_modified.cas		-mintd:10	-maxtd:68	-evt:data/animations/fs_horse_marka/fs_horse_marka_stand_a_turn_90_cw_1.evt
    anim		stand_a_turn_45_ccw_1		data/animations/fs_warwagon/med_elephant_stand_a_turn_45_ccw_1_modified.cas		-mintd:10	-maxtd:68	-evt:data/animations/fs_horse_marka/fs_horse_marka_stand_a_turn_90_cw_1.evt
    anim		stand_a_turn_90_cw_1		data/animations/fs_warwagon/med_elephant_stand_a_turn_45_cw_1_modified.cas		-mintd:67	-maxtd:115	-evt:data/animations/fs_horse_marka/fs_horse_marka_stand_a_turn_90_ccw_1.evt
    anim		stand_a_turn_90_ccw_1		data/animations/fs_warwagon/med_elephant_stand_a_turn_45_ccw_1_modified.cas		-mintd:67	-maxtd:115	-evt:data/animations/fs_horse_marka/fs_horse_marka_stand_a_turn_90_ccw_1.evt
    
    ;anim		stand_a_turn_90_cw_1		data/animations/fs_warwagon/med_elephant_stand_a_to_walk_rot90_cw_move_modified.cas		-mintd:67	-maxtd:115	-evt:data/animations/fs_horse_marka/fs_horse_marka_stand_a_turn_90_ccw_1.evt
    ;anim		stand_a_turn_90_ccw_1		data/animations/fs_warwagon/med_elephant_stand_a_to_walk_rot90_ccw_move_modified.cas		-mintd:67	-maxtd:115	-evt:data/animations/fs_horse_marka/fs_horse_marka_stand_a_turn_90_ccw_1.evt
    
    anim		walk				data/animations/fs_warwagon/med_elephant_walk_modified.cas						-fr	-evt:data/animations/fs_horse_marka/fs_horse_marka_walk.evt
    anim		walk_to_run			data/animations/fs_warwagon/med_elephant_walk_to_run_modified.cas						-fr	-evt:data/animations/fs_horse_marka/fs_horse_marka_walk_to_run.evt
    anim		walk_to_stand_a			data/animations/fs_warwagon/med_elephant_walk_to_stand_a_modified.cas					-fr	-evt:data/animations/fs_horse_marka/fs_horse_marka_walk_to_stand_a.evt
    
    anim		run				data/animations/fs_warwagon/med_elephant_run_modified.cas							-fr	-evt:data/animations/fs_horse_marka/fs_horse_marka_run.evt
    anim		run_to_walk			data/animations/fs_warwagon/med_elephant_run_to_charge_modified.cas					-fr	-evt:data/animations/fs_horse_marka/fs_horse_marka_run_to_walk.evt
    anim		run_to_stand_a			data/animations/fs_warwagon/med_elephant_run_to_stand_a_modified.cas					-fr	-evt:data/animations/fs_horse_marka/fs_horse_marka_run_to_stand_a.evt
    anim		run_to_charge			data/animations/fs_warwagon/med_elephant_run_to_walk_modified.cas						-fr	-evt:data/animations/fs_horse_marka/fs_horse_marka_run_to_charge.evt
    
    anim		charge				data/animations/fs_warwagon/med_elephant_charge_modified.cas							-evt:data/animations/fs_horse_marka/fs_horse_marka_charge.evt
    anim		charge_attack			data/animations/fs_warwagon/med_elephant_charge_modified.cas					-fr	-if:7	-evt:data/animations/fs_horse_marka/fs_horse_marka_attack_mid_centre_1.evt
    
    ;;no attack
    anim		attack_mid_low_1		data/animations/fs_warwagon/med_elephant_stand_a_hf_idle_1_modified.cas					-fr	-evt:data/animations/fs_horse_marka/fs_horse_marka_attack_mid_centre_1.evt
    anim		attack_mid_centre_1		data/animations/fs_warwagon/med_elephant_stand_a_hf_idle_2_modified.cas 				-fr	-evt:data/animations/fs_horse_marka/fs_horse_marka_attack_mid_centre_1.evt
    anim		attack_mid_high_1		data/animations/fs_warwagon/med_elephant_stand_a_idle_modified.cas					-fr	-evt:data/animations/fs_horse_marka/fs_horse_marka_jump.evt
    
    
    ;anim		attack_mid_low_1		data/animations/fs_warwagon/med_elephant_attack_mid_centre_1_modified.cas					-fr	-if:34, -evt:data/animations/fs_horse_marka/fs_horse_marka_attack_mid_centre_1.evt
    ;anim		attack_mid_centre_1		data/animations/fs_warwagon/med_elephant_attack_mid_centre_1_modified.cas					-fr	-if:13	-evt:data/animations/fs_horse_marka/fs_horse_marka_attack_mid_centre_1.evt
    ;anim		attack_mid_high_1		data/animations/fs_warwagon/med_elephant_attack_mid_high_1_modified.cas					-fr	-if:21, -evt:data/animations/fs_horse_marka/fs_horse_marka_jump.evt
    
    anim		die_forward_1			data/animations/fs_warwagon/med_elephant_die_forward_1_modified.cas					-evt:data/animations/fs_horse_marka/fs_horse_marka_die_forward_1.evt
    anim		die_backward_1			data/animations/fs_warwagon/med_elephant_die_forward_1_modified.cas					-evt:data/animations/fs_horse_marka/fs_horse_marka_die_backward_1.evt
    
    anim		idle_to_swim			data/animations/fs_warwagon/med_elephant_stand_a_to_walk_modified.cas					-fr	-id -0.1, 4.75, 4.84	-if:15
    anim		swim_to_idle			data/animations/fs_warwagon/med_elephant_walk_to_stand_a_modified.cas					-fr
    anim		swim_idle			data/animations/fs_warwagon/med_elephant_stand_a_idle_modified.cas						-fr
    anim		swim				data/animations/fs_warwagon/med_elephant_walk_modified.cas						-fr
    anim		swim_attack			data/animations/fs_warwagon/med_elephant_attack_mid_centre_1_modified.cas						-fr	-id 0.0, 4.17, 5.21		-if:13
    And I have also deleted the .dat and .idx files here before testing in game :

    Code:
    steamapps\common\Medieval II Total War\mods\rotk\data\sounds
    And I still get the Elephant sound when charging with my chariots.

  4. #4

    Default Re: Wrong sound

    You're on the right track. You are correct in assuming that the sound events in descr_sounds_generic control the attack and death sounds you're hearing and that these are tied to the animations. However, you can't edit descr_skeleton and expect anything to happen. The file descr_skeleton is only used for rebuilding the animations packs from virgin animations files. It is not used at any other time.

    When working with animations, it is important to understand that the .cas files that you get when you unpack skeletons.dat and pack.dat with Modeller's Toolbox are not the same as the virgin .cas files which were originally used to make those packs. You can see this if you open the unpacked .cas files and compare them against original virgin .cas files. In Notepad++, they will both look like nonsense, but you will be able to see an obvious difference. You will also notice that virgin .cas files are accompanied by .evt files which contain the references to descr_sounds_generic as well as the frames of the animation track at which the audio events play. These .evt files are not recovered when you unpack using Toolbox. We are only just now on the cusp of being able to unpack true, virgin .cas files as well as their .evt files from the animations packs thanks to Jojo's soon to be released tool.

    In the meantime, it is still possible to 'hack' the .evt references even without the .evt files and in fact the process is somewhat easier than unpacking and rebuilding. All we need to do is unpack and repack without editing descr_skeleton at all.

    Use Modeller's Toolbox to unpack skeletons.dat and locate the skeleton file you found in bmdb: fs_warwagon_chariot. Open this file in Notepad++. In my mod, we have a chariot skeleton but it has no attack animations, presumably your mod's chariot skeleton does have attack animations, so I will use the Ents skeleton as an example. The skeleton file will look something like this:

    Spoiler Alert, click show to read: 




    I've highlighted the audio events referenced in descr_sounds_generic for the attack sounds. These are what you want to change. If the file is well formatted, the audio events will be uppercase making them easier to find among all the nonsense. When you are done changing the audio references (for attack, walk, etc.), save the file and repack skeletons.dat. That's it!

  5. #5

    Default Re: Wrong sound

    Thank you! It worked.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •