www.tombraiderforums.com

Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Tomb Raider Next Generation Level Editor

Reply
 
Thread Tools
Old 18-03-18, 11:15   #11
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 30,421
Default

Ah, there's the feature I was looking for.
Thank you for explaining.

Quote:
to prevent the player from replacing the original audio files with the ones he like
Makes sense.

I better not use this feature for audio then. I'll also end up with a very large script.dat.
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.
Titak is offline   Reply With Quote
Old 18-03-18, 11:46   #12
LoreRaider
Explorer
 
LoreRaider's Avatar
 
Join Date: Jul 2016
Location: Italy
Posts: 659
Default

@TheLostSecret: Now about using .ogg files instead of wav? They're perfect for loop and they have a small size with a great sound quality

Anyway this feature sounds cool
__________________
"Don't be surprised if one day, I'm just out of here"

Last edited by LoreRaider; 18-03-18 at 11:47.
LoreRaider is offline   Reply With Quote
Old 18-03-18, 15:47   #13
TheLostSecret
Student
 
TheLostSecret's Avatar
 
Join Date: Mar 2018
Location: Tehran , Iran
Posts: 147
Thumbs up

Quote:
Originally Posted by LoreRaider View Post
@TheLostSecret: Now about using .ogg files instead of wav? They're perfect for loop and they have a small size with a great sound quality

Anyway this feature sounds cool
Thank you for this perfect suggestion ... But :

Firstly , Don't know if you would believe me but , I've found a bug in TRNG . The matter is when you use an audio file format different than WAV ( such as OGG you said , MP3 especially ) , the normal CD trigger conflicts with the files that have been imported by the engine into RAM ! . For example , we have imported an audio file with ID 7 , and when you trigger : CD : 7 , Instead of playing audio number 7 , it plays ImportFile number 7 ! I don't know maybe I've missed something or not ... But because of that , I gave up using those formats .

Secondly , playing OGG files requires VorbisOGG.dll installed on the target computer ! Because , the thing I found out is that ImportFile= command needs external DLLs to play the specified audio file ... However , the audio files stored in AUDIO folder will be played directly by the BASS.DLL and don't need any external files . Imported files in RAM will be played directly by Windows !

Because of these reasons , I decided to use the default Microsoft PCM Wave Files ( 192000 Hz ) ( *.WAV )

If you have any more tips , I would look forward to here from you !
__________________
Egypt has many secrets and mysteries yet to be discovered ...
TheLostSecret is offline   Reply With Quote
Old 18-03-18, 15:48   #14
TheLostSecret
Student
 
TheLostSecret's Avatar
 
Join Date: Mar 2018
Location: Tehran , Iran
Posts: 147
Talking

Quote:
Originally Posted by Titak View Post
Ah, there's the feature I was looking for.
Thank you for explaining.

Makes sense.

I better not use this feature for audio then. I'll also end up with a very large script.dat.
You're welcome . I'm happy that I've helped someone in the level editor !
__________________
Egypt has many secrets and mysteries yet to be discovered ...
TheLostSecret is offline   Reply With Quote
Old 18-03-18, 16:20   #15
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 30,421
Default

^
Please do not double-post like that, it is considered spam on this forum and can earn you infraction points.

If you want to use multiple quotes in a reply, you can use the "multi-quote" button. It looks like a ".

--------------------------------------------

Hmmm... I'm using OGG because of the file size reduction.
I don't think I'll use the ImportFile= feature for my audio then.
Too much hassle to reconvert all those audio files again.
And if players want to spoil themselves by checking out the audio before playing the game, well, then that's their choice.

Quote:
the normal CD trigger conflicts with the files that have been imported by the engine into RAM !
Do you have to use the normal CD trigger for imported audio? You can't use one of the flipeffects for it?
Or does that cause the same conflict?
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.
Titak is offline   Reply With Quote
Old 18-03-18, 16:49   #16
TheLostSecret
Student
 
TheLostSecret's Avatar
 
Join Date: Mar 2018
Location: Tehran , Iran
Posts: 147
Smile

Quote:
Originally Posted by Titak View Post
^
Please do not double-post like that, it is considered spam on this forum and can earn you infraction points.

If you want to use multiple quotes in a reply, you can use the "multi-quote" button. It looks like a ".

--------------------------------------------

Hmmm... I'm using OGG because of the file size reduction.
I don't think I'll use the ImportFile= feature for my audio then.
Too much hassle to reconvert all those audio files again.
And if players want to spoil themselves by checking out the audio before playing the game, well, then that's their choice.

Do you have to use the normal CD trigger for imported audio? You can't use one of the flipeffects for it?
Or does that cause the same conflict?
First of all , excuse me . It won't happen again .

Secondly , no . You don't have to use normal CD trigger for imported audio !
You use those flip effects I mentioned earlier . I mean that the formats different that WAV sometimes have conflicts with each other . Let me give you an example :

We have an audio file named "LARA_VOICE_1.ogg" , stored in audio folder . We want to import it into the SCRIPT.DAT to prevent the players from seeing or editing our voice file . We use this command :

ImportFile= 7 , AUDIO\LARA_VOICE_1.OGG , FTYPE_SOUND , IMPORT_MEMORY

After that , we compile the script , and add a trigger to somewhere in our level :

; Set Trigger Type - FLIPEFFECT 132
; Exporting: TRIGGER(263:0) for FLIPEFFECT(132){Tomb_NextGeneration}
; <#> : Sound. (CD) Play <&>Imported file in single play mode on (E)channel
; <&> : ImportFile= 7
; (E) : Channel 2 (Foreground track)
; Values to add in script command: $2000, 132, $107

When everything is in it's right place , we run TOMB4.EXE and test our level !

Unfortunately , 3 bugs have occured !

1. If we are going to use CD Trigger with ID number 7 , we can't . Because the engine plays the file we have imported instead of external audio with ID 007 !!! ( If you have used WAV format , forget about this note ! )

2. If VorbisOGG.dll is not installed on someone else's computer , problems may occur ( such as undesired sound effects , etc . ) . ( If you have used WAV format , forget about this note ! )

3. NEVER USE NUMBERS IN FILE NAMES OR ELSE ALL OF THE CD TRIGGERS IN YOUR LEVEL WILL GET BUGGY !

I mean instead of putting the name "LARA_VOICE_1" , put it "LARA_VOICE_A" . Otherwise , all of the CD triggers that contain number 1 in their <#> filed ( like 1 , 12 , 21 , etc . ) will play the imported audio file , instead of the external audio file !!!
Also , remember to rename both the file name and ImportFile= File Name argument ! Or else problems will occur during compile :

ImportFile= 7 , AUDIO\LARA_VOICE_A.OGG , FTYPE_SOUND , IMPORT_MEMORY

It is also worth noting that using the WAV format will automatically prevent the bugs number 1 & 2 from being occured ! The third bug can not be avoided !

------------------------------------------

If anything is unclear for you , let me know !
__________________
Egypt has many secrets and mysteries yet to be discovered ...

Last edited by TheLostSecret; 18-03-18 at 20:28.
TheLostSecret is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 05:34.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.