(02-01-2016, 11:01 PM)mysteryman141 Wrote: I have an audio file but I am lost on what to do next. I tried to look at how Frictional did it but it seems like it's a never-ending rabbit hole. I would seriously appreciate some help, thanks!
First, you need to create a .voice file, titled MYMAPNAME.voice. The contents should look something like this:
<?xml version="1.0" encoding="utf-16"?>
<VoiceData>
<Characters>
<Character ID="0" Name="DATAMINESUBJECT" DisplayName="DEAD GUY" Actor="" AutoGenVoice="False" AutoGenVoiceFile="" AutoGenVoiceSoundFreq="1" WorldSpace="True" AffectedByReverb="True" TextToSpeechVoice="IVONA 2 Joey" DefaultCriteria="" EntryType="GUI" Volume="2" ReverbVolume="0.875" SpeakerSpread="40" EntitySource="" MinDist="0" MaxDist="0" MinFreq="22000" MaxFreq="22000" MaxListeningDist="-1" FrequencyFilter="None" />
</Characters>
<Effects>
<Effect ID="0" Name="General" GlobalStartEffectFile="" GlobalEndEffectFile="" GlobalVoiceOffset="1.2" />
</Effects>
<Scenes>
<Scene ID="0" Name="General" FocusPrio="0" DefaultCriteria="" Volume="1" ReverbVolume="1" />
</Scenes>
<Subjects>
<Subject Name="DATAMINESUBJECTNAME" UseSingleRandomLine="False" SceneId="0" EffectId="-1">
<Line CharacterId="0" Prio="0">
<Sound Text="Dude, check out this landmine! I wonder what happens if I... BOOM" VoiceOffset="1.5" Volume="0.75" FileName="VOICEFILENAME" Timestamp="2013-11-05 04:37" />
</Line>
</Subject>
</Subjects>
</VoiceData>
After adding this to your map folder, create a datamine area at the body you intend to datamine, as well as a trigger area around it, to signify where the player must be to continue hearing the datamine. Then, go to the datamine's properties, set RangeArea in Datamine_General to be the trigger area that you made around the body, then go down to Datamine_Page_1 and type in the name of the voice subject you want to play. If you follow all those steps, you should be able to datamine the corpse now.
In order to have the voice file actually play, you'll need to put the file into MyStory/lang/eng/voices as an .ogg file (unless Soma allows different formats, idk), then replace VOICEFILENAME with the name of the voice file you put in.
Also, add <Directory Path="/lang" AddSubDirs="true"/> to the end of your resources.config file, so that the story loads your voice file folder.