Skip to content

Assigning custom sounds to creatures

chimericchimeric Member Posts: 1,163
I'm making an NPC, not a joinable NPC, just someone with a couple of right-click and select sounds. I'm doing this in Near Infinity. So how do I assign new sound files to the different slots? And do I have to attach them to strings in the tlk as well? How is this done in Weidu?

Comments

  • AstroBryGuyAstroBryGuy Member Posts: 3,437
    edited January 2017
    The sounds are stored as strrefs in the CRE file. So, you add them to the CRE with SAY commands.

    For example:

    COPY ~mymod/the_dude.cre~ ~override~ SAY NAME1 @1 SAY NAME2 @1 SAY MORALE @2 SAY BATTLE_CRY1 @3 SAY ATTACK1 @4 SAY DAMAGE @5 SAY DYING @6 SAY HURT @7 SAY SELECT_COMMON1 @8 SAY SELECT_COMMON2 @9 SAY SELECT_ACTION1 @10 SAY SELECT_ACTION2 @11

    The names of the sound slots are in SOUNDOFF.IDS (BG1) or SNDSLOT.IDS (BG2)

    http://gibberlings3.net/iesdp/files/ids/bg1/soundoff.htm
    http://gibberlings3.net/iesdp/files/ids/bg2/sndslot.htm

    Then, put all your strings in the .tra file. To connect .wav file to the string, format it like this:

    @1 = ~The Dude~ @2 = ~I am the walrus.~ [DUDE01] @3 = ~Yeah, well. The Dude abides.~ [DUDE02]

    Where the wav files are DUDE01.wav, DUDE02.wav, etc..
  • chimericchimeric Member Posts: 1,163
    Thanks, that gives me enough to go on. I already use a tra file for journal entries, though. Do I need another one or any special formatting to set aside space for sound strings?
  • AstroBryGuyAstroBryGuy Member Posts: 3,437
    You can use the same .tra file. The only special formatting for sound strings is putting the sound file name in square brackets after the text string (without the .wav extension).
  • chimericchimeric Member Posts: 1,163
    edited January 2017
    Okay. Another thing: within the same tp2 format, how do I assign a dialogue file? I can pick it by hand in Near Infinity and then re-export the creature with all of the settings and inventory to the mod folder, so it's installed whole-cloth, but for dialogue I'd rather specify the file in the tp2 itself.

    Oh, and this NPC is supposed to be killable without other neutrals in the area getting alarmed. How do I do that? Change its allegiance? Better to take away the shout override file.
  • AstroBryGuyAstroBryGuy Member Posts: 3,437
    As part of the same COPY command:

    WRITE_ASCII DIALOG ~THEDUDE~ #8 // dialog

    Where THEDUDE.DLG is the name of the compiled dialog file.

    Don't change the allegiance. Just get rid of the SHOUT script and make sure the class is not INNOCENT.
  • chimericchimeric Member Posts: 1,163
    edited January 2017
    Yes, that's certainly easier. Thank you. By the way, what determines the reputation loss when an innocent is killed?
    Post edited by chimeric on
  • chimericchimeric Member Posts: 1,163
    A lot of the entries aren't used, I see.
Sign In or Register to comment.