Log in to reply
 

How to create a custom audio hash for peds (HELP!)



  • @ReNNie said in How to create a custom audio hash for peds (HELP!):

    @meimeiriver hmmm then why uses the sherry ped from carface this for voice?

    <PedVoiceGroup>WFStewardess_PVG</PedVoiceGroup>

    The WFStewardess_PVG is something I found in a peds.meta for a Momiji pack. Like Lee said, though, these are voice groups, not individual voices. So, we may need to find the right voice group first. And then (at least for the vanilla peds), a flag somewhere for the white/black variation of the ped.


  • MODERATOR

    We... we? You! And there crashed my V again :P



  • @meimeiriver @FoxtrotDelta @LeeC2202 @Oskar @ReNNie @CamxxCore Is it possible to add audio to existing audio containers/hashes/whatever they're called?



  • You can't add Audio in any way
    Only thing that you can do is Replace audio files



  • @HeySlickThatsMe said in How to create a custom audio hash for peds (HELP!):

    You can't add Audio in any way
    Only thing that you can do is Replace audio files

    You can add audio files just fine. Getting them referenced is another matter, of course.



  • @meimeiriver and is that the part that no one knows how to do?



  • @nathanjamesddg151 said in How to create a custom audio hash for peds (HELP!):

    @meimeiriver and is that the part that no one knows how to do?

    It's the part that no one knows how to do yet. :P



  • @meimeiriver that's somehow encouraging.



  • @nathanjamesddg151 said in How to create a custom audio hash for peds (HELP!):

    @meimeiriver that's somehow encouraging.

    I lost some of my sense of urgency trying to figure this out when I just wrote a script to change ped voices. Still, would be awesome to have a ped spawn with the voice of your choice already (or even a new one). So I'll look into it some more.



  • @meimeiriver cool!



  • @CamxxCore @meimeiriver so I had an idea regarding custom audio for add on audio. I already floated this by @Oskar, but I wanted other people's input as well. So would it be possible to take an existing audio hash and edit it as you would if you were just replacing audio, and then take that hash, along with the custom car or ped mod, and then use a script to ensure that the game reads the right audio hash? So for example, extract Michael's voice files, edit what I want, and then use a script so that the edited hash is used with a custom ped? I know we can edit audio, but I'm not sure if this will work. Would this work?



  • @nathanjamesddg151 Hmm, I'm not sure I totally understand.. Are you suggesting cloning existing audio and adding a new entry with a different hash? I feel a little out of my depth since I haven't messed around much with ped audio stuff...



  • @CamxxCore yeah. And then using that cloned audio for an add on ped



  • @nathanjamesddg151 creating new audio hashes are a problem.



  • The problem is the audio packaging I think, the game generates the hash automatically.



  • @Oskar so cloning the audio wouldn't really solve anything?



  • This is something I wanted to learn as well and I am stuck. For research I looked at the "mpbiker" dlcpack since it added a few new ped speech files for new peds. For the speech to work you need to load this:

    <Item>
    <filename>dlc_mpBIKER:/%PLATFORM%/audio/DLCBIKER_speech.dat</filename>
    <fileType>AUDIO_SPEECHDATA</fileType>
    <overlay value="false" />
    <disabled value="true" />
    <persistent value="false" />
    </Item>
    <Item>

    But when you look into the audio folder, there is no file at all with that name or any .dat files, but instead the file is split into 3 files: dlcbiker_speech.dat4, dlcbiker_speech.dat4.nametable, and dlcbiker_speech.dat4.rel.

    The nametable file is filled with hashes and some known filenames at the bottom such as "BIKE_MECHANIC" or "BAR_PERSON" which are speech files for peds. The dat4 file is filled with gibberish that is probably archived or encrypted but you can find those names too such as: DLC_BIKER\BAR_PERSON.DLC_BIKER\BIKE_MECHANIC.DLC_BIKER\BPLES.DLC_BIKER\BPMAL

    DLC_BIKER references to the name declared in the DLC xmls.

    The BAR_PERSON for example references to BAR_PERSON.awc speech file, I made a tool that gets the file names you can use for scripting or whatever and this shows up

    alt text

    Excuse me if I talked nonsense I'm just trying to figure this out as well and I'm stuck, making the .awc is easy as copying another .awc file and replacing your own files but defining and adding your own is the hard part since those .dat4 files are encrypted, we only need a way to find to add our own entries...maybe @CamxxCore can figure this out with his tool



  • @nathanjamesddg151 said in How to create a custom audio hash for peds (HELP!):

    then take that hash, along with the custom car or ped mod, and then use a script to ensure that the game reads the right audio hash?

    If you're going to use a script, things might be easier, as you can just set a ped voice alphanumerically, like:

        Game.Player.Character.Voice = "a_f_y_bevhills_custom_white_full_01";
    

    Not sure whether the game still needs an underlying hash for that, but easily found out, methinks. :)



  • @nathanjamesddg151 yes as I have tried before as well, making an audio is easy, making a hash, that game picks up or a tag that game picks up is the hard part ,

    Jedijosh and camxxcore know a lot more and are equiped far better than people I know who are trying it.

    One should get openiv team involved as well. As this can lead to so cool possibilities!



  • @jedijosh920 then why not copy the data as well? We know we can replace the audio, so if we cloned an audio hash and then cloned its data as well, that should work, right? We just wouldn't be able to rename the hash or add audio to the hash, which is where we would need a script to make sure it reads the right audio file. @CamxxCore @Oskar



  • @nathanjamesddg151 Doesn't work like that, then the game will crash or not read the file at all because they have their own separate metadata/hashes/names, etc and it will be duplicate.



  • @jedijosh920 ah. Well, at least that's ruled out.



  • And if is done as "Audio Add-On"?
    A simple external audio add-on syncronized with facial animations. Example: Speech clip with 1 s of duration is analized and getting its time, is automatically syncronized with any facial animation with the same/near duration time or customized anim sequences. The correct sound for each action can be managed by a player/ped current status class.

    In that way we can add any audio files we want without touch the native audio data. Is just necessary stop the native ped/player speech to be plenty controlled by external script.

    For the audio, the best bet is use Windows Media libraries combinated with intelligent volume management to be increased or decreased accord to the ped/player distance to game camera, like the game native audio management.



  • @Rarefacer Sounds like a good idea, I think it's possible with BASS as seen here: http://www.un4seen.com/doc/#bass/BASS_Set3DPosition.html it would be cool if someone created a custom API to play audio and speech with scripting but this route would be more complex and harder, I think just cracking and decrypting the .dat4 files and adding your own native sound files would be easier so you can use the in-game functions without implementing your own and it would be helpful for scripters. And AFAIK there is no functions to check what the ped/player wants to say, you can stop their speech but you can't determine what they want to say so you can't play external speech.



  • @jedijosh920 That about to check what the player wants to say is true. A option can be the creation of an action status class to check for example if the player is getting damage, he says any "damn, it hurts" sentence, or if is shooting an automatic gun causing kills in npc, he says any exotic sentence like "die madafaka". That idea is based in the game natives, where if I remember correctly, some ped expresions depending on the situation, are controlled by _PLAY_AMBIENT_SPEECH1 function.

    Is a lot of different situations to check, but can be just the esential to start.


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.