Jump to content
View in the app

A better way to browse. Learn more.

RDR2Mods.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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");



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...

Recently Browsing 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.