Results 1 to 10 of 10

Thread: Help: Assign sound to mounted_engine

  1. #1

    Default Help: Assign sound to mounted_engine

    Hi guys and girls!

    I am trying to modify a specific sound in my personal version of the Warhammer Mod BOTET. The Ratling Gunners (basically Miniguns for the non-Warhammer-guys) are respresented by an elephant model using a mounted_engine.
    My testing shows that the descr_mounted_engines.txt seems to be responsible for assigning sound. Here is the section:

    type ratling_guns
    culture all
    class rocket_launcher
    reference_points siege_engines/ratling_gun.modelReferencePoints
    missile_pos 0.0 -1.5 -1.0
    crew_animations
    fire Crew_Rear, crew_right_load_1, crew_right_load_2, crew_right_load_3, crew_right_load_4cycle, crew_right_load_5, crew_right_load_4cycle, crew_right_load_5, crew_right, crew_rear_fire_idle
    end
    normal_shots 10 ;36 for the bad boy
    shot_delay 6
    shot_pfx_front ratling_effect_set
    shot_sfx ANIM_Serpentine_Fire
    When I delete the last line the firing sounds stop altogether. When I insert other examples from the file, such as "shot_sfx Rocket_Launcher_Fire", it plays a different sound.
    So my question now is... where can I find the ANIM_Serpentine_Fire that is referenced here and how would I go about adding my own shot_sfx to the game. Any tips or hints would be appreciated.

    Cheers

  2. #2
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Help: Assign sound to mounted_engine

    descr_sounds_generic.txt - it's one of the missing Kingdoms sound files. There's a download here somewhere for them.

  3. #3

    Default Re: Help: Assign sound to mounted_engine

    Thank you! I feel stupid now.

  4. #4

    Default Re: Help: Assign sound to mounted_engine

    Hello, me again. Don't think I should open another thread for my next question.
    My goal is to have a gunner unit (regular infantry unit, no engines here) use a different individual sound (so no group based sound, I know ho to do that) from other gunner units. I also know the sound works as I replaced the vanilla gunner sounds and it played fine. I just don't want the sound for all gunners :/

    In the descr_sounds_generic.txt I find lots of events, such as:

    event ANIM_Gunner_Fire priority 110 minPitch .9 maxPitch 1.1 volume 0 mindist 5
    folder data/sounds/SFX/Individual/Gunners
    Gunner_Fire_01
    Gunner_Fire_02
    Gunner_Fire_03
    Gunner_Fire_04
    Gunner_Fire_05
    Gunner_Fire_06

    end
    Now where would this ANIM_Gunner_Fire be defined? I am guessing it has something to do with the .evt files in the date/sounds directory... but I'm drawing a blank here. No idea how these work.
    I'd be happy to hear any advice from you guys. Maybe I am going about this the wrong way.

    Thanks again!

  5. #5
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Help: Assign sound to mounted_engine

    ANIM_Gunner_Fire *is* the definition. Other files would reference it, effectively saying "for this sound use ANIM_Gunner_Fire" which in turn will be one of those Gunner_Fire_XXX sound files, chosen at random each time, from the data/sounds/SFX/Individual/Gunners folder.

  6. #6

    Default Re: Help: Assign sound to mounted_engine

    Hmmm, but I can not simply add another entry, such as "ANIM_Gunner_Fire_alternative" with other sounds and expect it to play for the unit I want it to, right? If this file is the definition, what tells the game when to play this event and the corresponding sounds? In my specific case a unit of gunners using fantasy-style weaponry that I want to have using the sound I prepared.

  7. #7
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Help: Assign sound to mounted_engine

    but I can not simply add another entry, such as "ANIM_Gunner_Fire_alternative" with other sounds and expect it to play for the unit I want it to, right?
    Yes you can but you'll also need to rebuild the events IDX and DAT files. (So I believe. Could be wrong.)

    If this file is the definition, what tells the game when to play this event and the corresponding sounds?
    The unit tells the game when to play ANIM_Gunner_Fire_alternative, in its shot_sfx entry. i.e. When it shoots, trigger the ANIM_Gunner_Fire_alternative sound effect (sfx) event. This descr_sounds_generic.txt file tells the game which actual sound files to play when that event happens.

    Again, I could be wrong. I've never coded unit sound effects before, only their voices. So I could be wrong about the shot_sfx thing. But it makes sense because that's how other game sounds work: you only trigger the sound event somehow, and elsewhere (i.e. in this file or some other sound text file) you define what sound mp3/wav files are associated with that event.

  8. #8

    Default Re: Help: Assign sound to mounted_engine

    The unit tells the game when to play ANIM_Gunner_Fire_alternative, in its shot_sfx entry
    That's definitely how it works for mounted engines. But I do similar file entries exist for infantry units? I've only found entries in descr_sounds_weapons.txt like this one:

    PHP Code:
    unit example_unit:pri

            fly
                event volume 
    -20 mindist 7 priority 100  minpitch .6 maxpitch 1.1 probability .05 fadein .25 fadeout .5 probradius 3
                    folder data
    /sounds/SFX/Individual/Missiles
                    example_sound1
                    example_sound2
                    example_sound3
                end
                
    .
                .
                . 
    When I place the name of my unit here and some sounds and then regenerate the sound files... nothing changed at all. Is this even the right file?

  9. #9
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Help: Assign sound to mounted_engine

    and then regenerate the sound files
    Which ones? SFX idx/dat would definitely need to be in this case, plus presumably events idx/dat but I'm not sure.

    This is now firmly in the realm of unfamiliarity for me. Presumably "fly" is the event for missiles flying through the air so, assuming that your example_unit's primary weapon is some kind of missile and you're testing that action and those sound files are of the correct format (don't ask me what that is) and you're correctly regenerating, then that looks correct to my novice eyes.

  10. #10

    Default Re: Help: Assign sound to mounted_engine

    I am at my wit's end for now. When I find a solution, I will post it here. And thank you Withwnar

Posting Permissions

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