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*)¶ms);
}
example of use:
play_npc_voice(npc, "0405_U_M_M_RhdSheriff_01", "RE_PH_RHD_V3_AGGRO");
- 1
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.