New SFX

Josan12

Vault Senior Citizen
Im throwing this out to anyone who knows about SFX:

I'd like to add a few subtle SFX to the movement
of the hero in FO2-

1) When hero is wearing leather - a 'creaking leather'
sound when he walks. I think this would compliment the
famous swagger the leather jacket hero model walks
with perfectly!

2) When hero is wearing metal armour - a subtle
metal 'clank' when he walks - you know - something like a
medieval knight.

3) and so on for other armours - maybe a slight
'ker-chunk, ker-chunk' in power armour, for example.

Does anyone know how to re-code such stuff?
what do people think? good/bad idea?
 
I know it can be done with other critters in the game (this was a feature of the roaches that I added from the FO XP mod), but I don't know if the code would work for the player. Also, I don't know if the code to add these sounds for the player would play over the city music or if they would play simultaneously. If it played over the other city sounds instead of being an additional background sound, then I'd rather hear the city music and other ambient sounds. I might have to add this to my 'to do' list in order to find out.
 
Here is a sample from the roach critter. In this case, the sound plays when the critter moves from one place to another during combat only.

procedure critter_p_proc
begin
if (op_obj_can_see_obj(op_self_obj(), op_dude_obj())) then
op_attack(op_dude_obj(), 0, 1, 0, 0, 30000, 0, 0);
else if (not op_anim_busy(op_self_obj())) then
begin
if (op_obj_on_screen(op_self_obj())) then
begin
if (op_tile_distance(op_tile_num(op_self_obj()), op_tile_num(op_dude_obj())) < 11) then
begin
chance := op_random(1, 100);
if (chance < 2) then
begin
op_reg_anim_func(2, op_self_obj());
if (op_random(1, 10) < 6) then
begin
if (op_obj_pid(op_self_obj()) == 16777755) then
op_play_sfx("zmarch1ab");
else
op_play_sfx("zmarch2ab");
end
else if (op_obj_pid(op_self_obj()) == 16777755) then
op_play_sfx("zmarch1aa");
else
op_play_sfx("zmarch2aa");
end
end
op_reg_anim_func(1, 1);
op_animate_move_obj_to_tile(op_self_obj(), op_tile_num_in_direction(starttile, op_random(0, 5), op_random(3, 10)), 0);
op_reg_anim_func(3, 0);
end
end
end
 
Mr.Wolna said:
only during combat? it sounds bad!

Yes, in this case, it is only during combat. I never tried to make it occur all the time while they are walking normally. This is the sound they are making as they are preparing to fight (or run away).
 
...maybe a script that check if dude is walking,
ANIM_walk like this: #define dude_is_walking (art_anim(obj_art_fid(dude_obj)) == ANIM_walk)
or Dude running:
#define dude_is_running (art_anim(obj_art_fid(dude_obj)) == ANIM_running)

NPC walking:
#define self_is_walking (art_anim(obj_art_fid(self_obj)) == ANIM_walk)
NPC running:
#define self_is_running (art_anim(obj_art_fid(self_obj)) == ANIM_running)

This could help, i think, for start. What do YOU think?:scratch:
 
Yeah, it might work. Like I said, though, the biggest problem I think is whether or not you will still hear background noises on the maps while the walking/running sounds are playing.
 
Ok, this is what i wrote:

Critter procedure plays one sound few times in a second, so you can hear a lot of echo...
Code:
procedure critter_p_proc 
begin 
     if(dude_is_walking)then 
      begin
         play_sfx("ILCNTNRB"); 
      end
   if(dude_is_running)then 
      begin
         play_sfx("ILCNTNRB"); 
   end 
end


...while this one plays the sound every 1 second (in this case,game_ticks(1)), so you can get better results when you use this code
Code:
procedure timed_event_p_proc
begin
   if(combat_is_initialized == false) then 
      begin 
         if(dude_is_walking)then 
            begin
               play_sfx("ILCNTNRB"); 
            end
         if(dude_is_running)then 
            begin
               play_sfx("ILCNTNRB"); 
            end
      end
   add_timer_event(Self_obj,game_ticks(1),0); 
end

ILCNTNRB- from sound.lst (locker sound example)...
 
Yeah, i agree with MIB88: the key concern
is the overlap with the main music.

Im in the process of hunting for good quality
sounds listed above - does anyone know
some good sites or even have an SFX archive?
 
@Forgotten Knight: Looks good, but are you sure about putting it in on a timer? Or, at least as only 1 second/game tick? Remember, a tick isn't really 1 second... A decent computer will go through a lot of ticks in one second.
 
MIB88 said:
A decent computer will go through a lot of ticks in one second.

I haven't noticed this,played it on:
1. P4 cel 1,7ghz 400FSB 256 DDR
2.(current configuration) P4 3,0ghz 800FSB 512DDR WinXP SP2
as i see it, on my comp game_ticks really does stick to that 1 sec... I don't know for other configs. Sound length can be adjusted, but wouldn't make any difference because only map sounds in MAPS.txt have that "waiting for loop" order. If time is going too fast, put 2sec instead of 1 :mrgreen:
I guess, testing game_ticks on other cpus (AMD,CoreDuo...) can help to solve this"issue", others can post their experiment results. :ok:
 
I been able to see the roaches sound and i hate it. Totally doesnt fit the game or even MegaMod. The frm should also be a bit rendered because they're too shiny, looks like metal/plastic.

A bit offtopic but i had to say that.
 
Forgotten Knight said:
Ok, this is what i wrote:

Critter procedure plays one sound few times in a second, so you can hear a lot of echo...
Code:
procedure critter_p_proc 
begin 
     if(dude_is_walking)then 
      begin
         play_sfx("ILCNTNRB"); 
      end
   if(dude_is_running)then 
      begin
         play_sfx("ILCNTNRB"); 
   end 
end


...while this one plays the sound every 1 second (in this case,game_ticks(1)), so you can get better results when you use this code
Code:
procedure timed_event_p_proc
begin
   if(combat_is_initialized == false) then 
      begin 
         if(dude_is_walking)then 
            begin
               play_sfx("ILCNTNRB"); 
            end
         if(dude_is_running)then 
            begin
               play_sfx("ILCNTNRB"); 
            end
      end
   add_timer_event(Self_obj,game_ticks(1),0); 
end

ILCNTNRB- from sound.lst (locker sound example)...

@ Forgotten Knight:

I'm trying to implement the code you wrote above. Which script should i add it to? - do i insert it into the dude_obj script in the 'Main' folder?

Also, do i insert it as its own timed_event_p_proc or does it have to be part of the existing timed_event_p_proc??

Thanks
 
Yes, this would go into the obj_dude script. All timed events go in the same procedure. The only thing is that each even has its own number assigned.
 
Elitech said:
This sounds gr8 :-)

Anyways... is this possible?

I'm having a little difficulty, but it seems like it should. But for me, the key question is: can different SFX be set for different armours?
 
Back
Top