[Mod] Sound System

Shawak

Intermediate OT User
Joined
Sep 11, 2008
Messages
1,976
Best answers
2
Reaction score
101
Location
Germany
Hello guys,

today I want to share my sound system for OTClient, since the project it was included is dead now.

Here is an example of the config for the sound areas:
Lua:
SOUNDS_CONFIG = {
	soundChannel = SoundChannels.Music,
	checkInterval = 500,
	folder = 'music/',
	noSound = 'No sound file for this area.',
}

SOUNDS = {
	-- Rook Cave
	{fromPos = {x=879, y=803, z=8}, toPos = {x=1079, y=963, z=15}, sound = "FF VII - Main.ogg"},
	
		-- Boss
		{fromPos = {x=977, y=903, z=8}, toPos = {x=1009, y=916, z=9}, priority = 1, sound="TSFH - Black Blade.ogg"},
		{fromPos = {x=1001, y=917, z=9}, toPos = {x=1002, y=919, z=9}, priority = 1, sound="TSFH - Black Blade.ogg"},
	
	-- Main
	
		-- Dragon
		{fromPos = {x=1089, y=1110, z=8}, toPos = {x=1135, y=1142, z=8}, priority = 1, sound="Fairy Tail - Main.ogg"},
		{fromPos = {x=1102, y=1128, z=9}, toPos = {x=1131, y=1149, z=9}, priority = 1, sound="Fairy Tail - Main.ogg"},
		{fromPos = {x=1117, y=1124, z=9}, toPos = {x=1128, y=1127, z=9}, priority = 1, sound="Fairy Tail - Main.ogg"},
		{fromPos = {x=1100, y=1104, z=10}, toPos = {x=1127, y=1131, z=10}, priority = 1, sound="Fairy Tail - Main.ogg"},
		{fromPos = {x=1103, y=1108, z=9}, toPos = {x=1108, y=1112, z=9}, priority = 1, sound="Fairy Tail - Main.ogg"},

		{fromPos = {x=1096, y=1088, z=5}, toPos = {x=1110, y=1100, z=6}, priority = 1, sound="Fairy Tail - Main.ogg"},

		
		
} ----------
PS: I deleted some sound files so I can upload it here.

Lg Shawak
 

Attachments

Printer

if Printer then print("LUA") end
Premium User
Joined
Dec 27, 2009
Messages
5,733
Best answers
21
Reaction score
2,018
Location
Sweden?
Wow, great work Shawak :D
 

Fabri

The God Fabri
Joined
Dec 17, 2010
Messages
145
Best answers
0
Reaction score
15
Nice work.

I'll test when i back to home.

Thanks for sharing.
 

Muzzy

New Member
Joined
Jul 8, 2008
Messages
125
Best answers
0
Reaction score
1
How exactly do I 'install' this? I'm no good at this stuff!

~Muzzy
 

xupenba

New Member
Joined
Aug 14, 2012
Messages
4
Best answers
0
Reaction score
1
of this error:

ERROR: Unable to load module 'rc_sound': unable to load file '/mods/rcsound': the system can not find path explicit location.
startup done :]
ERROR: [streamsoundsource::update] audio buffer underrun
ERROR: Unable to send extended opcode ', extended opcodes are not enabled.]
 

elo1989

New Member
Joined
Jun 30, 2010
Messages
33
Best answers
0
Reaction score
0
Hello I have answer. How can I add music effect for a battle if I fight example with rat? Somebody knows?
 

margoh

{{ user.title }}
Joined
Apr 1, 2013
Messages
692
Best answers
9
Reaction score
230
Drop folder from attached file to your mods or modules (add it to interface if dropped into modules folder).
Next you need to configure your areas, where sound should be played.
 

Alaa Adel

Basic Mapper
Joined
Mar 2, 2014
Messages
231
Best answers
0
Reaction score
8
Excuse me, i didn't understand that quite well.
i put the downloaded folder to "my server/mods" is that correct?
it seems it doesn't work.
sorry i'm just a beginner. i appreciate your help.
 

margoh

{{ user.title }}
Joined
Apr 1, 2013
Messages
692
Best answers
9
Reaction score
230
Have you configured areas where sound will be played?
Cause if you didn't changed anything, then it could not working :)
 

Alaa Adel

Basic Mapper
Joined
Mar 2, 2014
Messages
231
Best answers
0
Reaction score
8
yup i've changed it... is the location correct?
 

margoh

{{ user.title }}
Joined
Apr 1, 2013
Messages
692
Best answers
9
Reaction score
230
If you have compiled client in visual studio, then it will not be working :d
 

margoh

{{ user.title }}
Joined
Apr 1, 2013
Messages
692
Best answers
9
Reaction score
230
The only way to make it work is compiling with CodeBlocks, to have sound working xd
Or do sth to make it possible to work after compiling with MVS.
 
Top