Jump to content

PLAY_PED_AMBIENT_SPEECH_NATIVE


Native Details

  • NamePLAY_PED_AMBIENT_SPEECH_NATIVE
  • NamespaceAUDIO
  • Native Hash0x8E04FEDD28D42462
  • TypeBOOL
  • First seen version1207

Native Parameters

DESCRIPTION

Here's a list of most of the in-game voice-lines: https://raw.githubusercontent.com/femga/rdr3_discoveries/refs/heads/master/audio/audio_banks/audio_banks.lua

speechParamHash can be found here: https://github.com/femga/rdr3_discoveries/tree/master/audio/audio_banks ("speech_params_force" seems to work best)

 

Text indented on the left such as "0008_S_F_M_ISPWORKER_01_BLACK_02" is the dictionary_name, the strings underneath is the index_name.

 

index_name with a number (E.G _01, _02, _03 etc..) are just extra voice lines, most voice lines seem to works best without the added '_01' on the end  

 

Here's the following setup I was able to create for playing voice lines through your Player (this of course can be changed to be used for other Peds)

 

struct ScriptedSpeechParams {
    const char* IndexName;
    const char* DictionaryName;
    alignas(8) int variation;
    alignas(8) Hash speechParamHash;
    alignas(8) Ped listenerPed;
    alignas(8) BOOL syncOverNetwork;
    alignas(8) int v7;
    alignas(8) int v8;
};

static_assert(sizeof(ScriptedSpeechParams) == 0x40, "incorrect ScriptedSpeechParams size"); 
       
void play_npc_voice(Entity npc, const char* dictionary_name, const char* index_name) {

    // set the ScriptedSpeechParams struct as you wish
    ScriptedSpeechParams params;
    params.IndexName = index_name;
    params.DictionaryName = dictionary_name;
    params.variation = 0;
    params.speechParamHash = RAGE_JOAAT("speech_params_force");
    params.listenerPed = PLAYER::PLAYER_PED_ID();
    params.syncOverNetwork = true;
    params.v7 = 1;
    params.v8 = 1;


    AUDIO::PLAY_PED_AMBIENT_SPEECH_NATIVE(npc, (Any*)&params);
}

 

example of use:

play_npc_voice(npc, "0405_U_M_M_RhdSheriff_01", "RE_PH_RHD_V3_AGGRO");


  • Thanks 1

User Feedback

Recommended Comments

There are no comments to display.



Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Red Dead Redemption 2 Native Database by www.mod-rdr.com, includes contributions by gudmunduro and alloc8or.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...