• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Discussion Changing Bandits to Skeletons in Dungeons

Jacob

Sailor
Storm Modder
Hi!

I have a question, is there still a possibility for skeletons to show up in dungeon and catacombs?

Im just....curious about that.
 
That's really helpful thank you but i got another question, is there also another possibility for death sounds after killing the enemy?

I noticed that they only appear when you killed someone with Poisoned Rapier but with normal it doesnt make any sounds
 
There must be a way.
But I'm not sure how.

I'd expect related code to hide in the Loc_ai folder.
 
//Проиграть звук
void LAi_CharacterPlaySound(aref chr, string soundname)
{
// LDH This shouldn't be happening, but it's here until we can get all the .wav sounds into the sounds_alias.ini file - 24Mar09
// the problem is mostly with pistol sounds at the moment
/*if (strRight(soundname, 4) == ".wav")
{
// KK -->
float u, v, w;
if (GetCharacterPos(chr, &u, &v, &w))
Play3DSound(soundname, u, v, w);
else
SendMessage(chr, "s", Sound_GetName(soundname));//MAXIMUS
// <-- KK
return;
}*/
if (strLeft(soundname,3) == "Gr_")
PlayVoice(chr, soundname); // LDH plays sound at voice volume - 18Mar09
else
{
if (LAi_IsDead(chr)) // LDH need this to play "body" sounds when dead character falls - 22Mar09
SendMessage(chr, "s", soundname); // LDH this plays at the right volume but the wrong location
else
PlayCharacterSound(chr, soundname); // LDH plays sound at soundFX volume - 19Mar09
}
}



Code from Lai_characters from New Horizons










void LAi_CharacterPlaySound(aref chr, string soundname)

{
SendMessage(chr, "s", soundname);
}





and that's the code European uses, got any suggestions?
 
I noticed that they only appear when you killed someone with Poisoned Rapier but with normal it doesnt make any sounds
PROGRAM\Loc_ai\LAi_events.c:
Code:
           if( CheckAttribute(weapon, "poison" ) )    // if weapon poisonous
           {
               findCh.chr_ai.poison =  300 ;   // poisons EVERY near character
               // NK play sound too 05-07-10
               if(findCh.sex == "woman") {LAi_CharacterPlaySound(findCh, "OBJECTS\Voices\dead\female\dead_wom2.wav");}   // groan
               else{LAi_CharacterPlaySound(findCh, "OBJECTS\Voices\dead\male\dead4.wav");}
           }
And:
Code:
    if( CheckAttribute(weapon, "poison" ) )    // if weapon poisonous
   {
[...]
           if(IsMainCharacter(enemy))
           {
               if(enemy.sex == "man") {PlaySound("OBJECTS\Voices\dead\male\dead4.wav");}       //JRH: was very hard to hear at all
               else{PlaySound("OBJECTS\Voices\dead\male\Death_NPC_03.wav");}
           }
           else
           {
               if(enemy.sex == "man") {PlaySound("OBJECTS\DUEL\man_hit6.wav");}       //JRH: was very hard to hear at all
               else{PlaySound("OBJECTS\Voices\dead\female\dead_wom2.wav");}
           }
[...]
   }
I think those are the responsible bits for those sounds.
 
I mixed a code in LAi_events, replaced a code from Polish version to Modded one, and it's true, it's very hard to hear it.
But the question is then, what's the way to turn the volume higher?

Code:
#event_handler("Event_ChrSnd_Body", "LAi_ChrSnd_Body");
void LAi_ChrSnd_Body()
{
    aref chr = GetEventData();
    if(CheckAttribute(chr, "sex"))
    {
        switch(chr.sex)
        {
        case "man":
            LAi_CharacterPlaySound(chr, "body");
            break;
        case "woman":
            LAi_CharacterPlaySound(chr, "body");
            break;
        case "skeleton":
            LAi_CharacterPlaySound(chr, "skeleton_body");
            break;
        case "monkey":
            LAi_CharacterPlaySound(chr, "monkey_body");
            break;
        };
    }
}

#event_handler("Event_ChrSnd_Dead", "LAi_ChrSnd_Dead");
void LAi_ChrSnd_Dead()
{
    aref chr = GetEventData();
    if(CheckAttribute(chr, "sex"))
    {
        switch(chr.sex)
        {
        case "man":
            LAi_CharacterPlaySound(chr, "dead");
            break;
        case "woman":
            LAi_CharacterPlaySound(chr, "dead_wom");
            break;
        case "skeleton":
            LAi_CharacterPlaySound(chr, "skeleton_dead");
            break;
        case "monkey":
            LAi_CharacterPlaySound(chr, "monkey_dead");
            break;
        };
    }
}

#event_handler("Event_ChrSnd_Attack", "LAi_ChrSnd_Attack");
void LAi_ChrSnd_Attack()
{
    aref chr = GetEventData();
    if(CheckAttribute(chr, "sex"))
    {
        switch(chr.sex)
        {
        case "man":
            LAi_CharacterPlaySound(chr, "man_attack");
            break;
        case "woman":
            LAi_CharacterPlaySound(chr, "woman_attack");
            break;
        case "skeleton":
            LAi_CharacterPlaySound(chr, "skeleton_attack");
            break;
        case "monkey":
            LAi_CharacterPlaySound(chr, "monkey_attack");
            break;
        };
    }
}

#event_handler("Event_ChrSnd_Hit", "LAi_ChrSnd_Hit");
void LAi_ChrSnd_Hit()
{
    aref chr = GetEventData();
    if(CheckAttribute(chr, "sex"))
    {
        switch(chr.sex)
        {
        case "man":
            LAi_CharacterPlaySound(chr, "man_hit");
            break;
        case "woman":
            LAi_CharacterPlaySound(chr, "woman_hit");
            break;
        case "skeleton":
            LAi_CharacterPlaySound(chr, "skeleton_hit");
            break;
        case "monkey":
            LAi_CharacterPlaySound(chr, "monkey_hit");
            break;
        };
    }
}
 
and it's true, it's very hard to hear it.
But the question is then, what's the way to turn the volume higher?
I didn't know that's why I changed to
PlaySound(" etc
 
I checked again, Those "Death_NPC_01 - 08" are the some quiet, so far the best solution in to tune the music down a bit just to hear the effects :rofl
 
Back
Top