Quantcast

Jump to content

» «
Photo

[REQ|DOC|SA] Request custom opcodes

35 replies to this topic
Shmoopy
  • Shmoopy

    Lost interest in GTA

  • Members
  • Joined: 16 Jun 2009
  • None

#1

Posted 22 September 2015 - 06:48 PM Edited by Shmoopy, 04 October 2015 - 02:59 PM.

titleopco.png

 

Welcome to Opcodes Customs, the place where you can request opcodes to be made. Do you think that a certain opcode should exist ? Do you believe that your opcode can save hundreds of code lines? Then feel free to post your request below.

 

Don't forget to give credits if you're going to use any of the plugins below for your mod

Thanks

  • Seemann, OrionSR, Deji and 4 others like this

Shmoopy
  • Shmoopy

    Lost interest in GTA

  • Members
  • Joined: 16 Jun 2009
  • None

#2

Posted 04 October 2015 - 02:21 AM Edited by Shmoopy, 05 October 2015 - 07:45 PM.

Anttweakbar
anttweak.png
Download
SASCM.ini
Spoiler
Opcodes.txt
Spoiler
Sample
Spoiler

  • Bigbossbro08 and iFarbod like this

Shmoopy
  • Shmoopy

    Lost interest in GTA

  • Members
  • Joined: 16 Jun 2009
  • None

#3

Posted 05 October 2015 - 07:34 PM Edited by Shmoopy, 05 October 2015 - 08:51 PM.

Text to speech
tts.png
Download
SASCM.ini
Spoiler
Opcodes.txt
Spoiler
Sample
Spoiler

  • Ezekiel and iFarbod like this

Junior_Djjr
  • Junior_Djjr

    Modding Lover

  • Members
  • Joined: 16 Dec 2011
  • Brazil
  • Best Map 2016 [San Andreas INSANITY] [Contribution]

#4

Posted 29 October 2015 - 11:06 PM Edited by Junior_Djjr, 29 October 2015 - 11:07 PM.

Hm, interesting stuff here :)

 

My dream is return the frequencies of a song in a variable. Thus playing an MP3 music, read the current bass of spectrum and put in the movement of the speakers.

 

Here's a workaround version where when you press a button or use the mouse, increases a value and that value is the speaker vibrate:

 

 

Years ago I already tried it with my friend, but it was complicated and did not have good results:

Spoiler

 

It was necessary even not use opcodes to load and play a song, we had to use functions directly from bass.dll

So I guess I should have not only one but several opcodes

 

Or at least a .dll/.asi/.cleo with direct functions from bass.dll since opcodes may not be as useful here, what do you think?

 

If it is not asking too much, also the addition of sound effects like reverb to add effects on the environment in which it is being played such music, as well as boost the low frequencies (bass boost). That sort of thing would be very useful not only for music, but sound effects mods

 

 

Here's the documentation of bass.dll where we use for the first test:

http://www.un4seen.com/doc/


Shmoopy
  • Shmoopy

    Lost interest in GTA

  • Members
  • Joined: 16 Jun 2009
  • None

#5

Posted 30 October 2015 - 09:57 AM

Here's the documentation of bass.dll where we use for the first test:

http://www.un4seen.com/doc/

Alright, Working on a bass plugin, good thing is that it already comes with gta:sa.

  • Junior_Djjr and Bigbossbro08 like this

Junior_Djjr
  • Junior_Djjr

    Modding Lover

  • Members
  • Joined: 16 Dec 2011
  • Brazil
  • Best Map 2016 [San Andreas INSANITY] [Contribution]

#6

Posted 30 October 2015 - 10:21 AM Edited by Junior_Djjr, 30 October 2015 - 10:22 AM.

Will have some problem with not work if Cleo Library is updated? I remember that when updates, the addresses of the functions changes and so it was only possible to create for only one version of Cleo.
Perhaps it was the way we created.

Shmoopy
  • Shmoopy

    Lost interest in GTA

  • Members
  • Joined: 16 Jun 2009
  • None

#7

Posted 30 October 2015 - 10:03 PM Edited by Shmoopy, 30 October 2015 - 10:05 PM.

Bass plugin 90% ready, just remembered to add some sound fx opcodes (Reverb,Echo etc ... ) :colgate:

I've added what you wanted, I mean the float value of the sound spectrum. It works perfectly and I think that it will suit the speakers vibration :happy:

 

Edit: Is your sound in 3D or 2D? Because I tested with 2D sound

  • Junior_Djjr likes this

Junior_Djjr
  • Junior_Djjr

    Modding Lover

  • Members
  • Joined: 16 Dec 2011
  • Brazil
  • Best Map 2016 [San Andreas INSANITY] [Contribution]

#8

Posted 30 October 2015 - 10:38 PM Edited by Junior_Djjr, 30 October 2015 - 10:40 PM.

Thanks man, you have no idea how much people want and ask me for it.

It will also be very nice to hear music with some graphic spectrum in screen corner :D

 

And, 3D


Shmoopy
  • Shmoopy

    Lost interest in GTA

  • Members
  • Joined: 16 Jun 2009
  • None

#9

Posted 31 October 2015 - 07:08 PM Edited by Shmoopy, 01 November 2015 - 12:55 PM.


Audio Plugin *ASI file
bass.png
Download
SASCM.ini
Spoiler
Opcodes.txt
Spoiler
Sample
Spoiler
Constants
Spoiler

  • Junior_Djjr likes this

Junior_Djjr
  • Junior_Djjr

    Modding Lover

  • Members
  • Joined: 16 Dec 2011
  • Brazil
  • Best Map 2016 [San Andreas INSANITY] [Contribution]

#10

Posted 01 November 2015 - 01:22 AM Edited by Junior_Djjr, 01 November 2015 - 04:58 AM.

Audio Plugin

I think you made a mistake in the files  :bored:
 
Bass.cleo is the same file of Anttweakbar.cleo, 64512 bytes, also Bass.cleo asked for AntTweakBar.dll
 
 
It seems incredible, mainly BASS_set_FX, but you could add opcodes for attach in a car, object or pedestrian, or any type of entity? (any entity would be interesting, more dynamic than cleo 4)
Use coords have a delay in motion, if I eg add 3D sound in a car and drives, the sound will delay and stay behind.
Apparently the audio attach in cleo 4 works by simply changing the coordinate pointer or something.

 

 

edit: Also, need some 0AB9: to know if the song is playing or ended etc, an indispensable thing to create a complete MP3 mod. This?

 

edit: How BASS_set_FX works? Should not be more parameters?

I think this plugin will help a lot in this project ;)


Shmoopy
  • Shmoopy

    Lost interest in GTA

  • Members
  • Joined: 16 Jun 2009
  • None

#11

Posted 01 November 2015 - 08:43 AM

Done, as for the attach to entity ones, get the vehicle position and do set_pos in a while vehicle.exists loop. Until I find a suitable way to attach the streams to entities.
 


 

Audio Plugin

I think you made a mistake in the files  :bored:
 
Bass.cleo is the same file of Anttweakbar.cleo, 64512 bytes, also Bass.cleo asked for AntTweakBar.dll
 
 
It seems incredible, mainly BASS_set_FX, but you could add opcodes for attach in a car, object or pedestrian, or any type of entity? (any entity would be interesting, more dynamic than cleo 4)
Use coords have a delay in motion, if I eg add 3D sound in a car and drives, the sound will delay and stay behind.
Apparently the audio attach in cleo 4 works by simply changing the coordinate pointer or something.
 
 
edit: Also, need some 0AB9: to know if the song is playing or ended etc, an indispensable thing to create a complete MP3 mod. This?
 
edit: How BASS_set_FX works? Should not be more parameters?
I think this plugin will help a lot in this project ;)
 

 

Done except for the attach_to_entity ones, I need to test them first, apparently there is no other way than creating a loop which gets the entity's position while it exists, can be done both in scm and c++ but I prefer that you do it in scm until I find a solution.
 

  • Bigbossbro08 likes this

Junior_Djjr
  • Junior_Djjr

    Modding Lover

  • Members
  • Joined: 16 Dec 2011
  • Brazil
  • Best Map 2016 [San Andreas INSANITY] [Contribution]

#12

Posted 01 November 2015 - 11:51 AM Edited by Junior_Djjr, 01 November 2015 - 11:55 AM.

Audio Plugin

I think you made a mistake in the files  :bored:
 
Bass.cleo is the same file of Anttweakbar.cleo, 64512 bytes, also Bass.cleo asked for AntTweakBar.dll
 
 
It seems incredible, mainly BASS_set_FX, but you could add opcodes for attach in a car, object or pedestrian, or any type of entity? (any entity would be interesting, more dynamic than cleo 4)
Use coords have a delay in motion, if I eg add 3D sound in a car and drives, the sound will delay and stay behind.
Apparently the audio attach in cleo 4 works by simply changing the coordinate pointer or something.
 
 
edit: Also, need some 0AB9: to know if the song is playing or ended etc, an indispensable thing to create a complete MP3 mod. This?
 
edit: How BASS_set_FX works? Should not be more parameters?
I think this plugin will help a lot in this project ;)


Done except for the attach_to_entity ones, I need to test them first, apparently there is no other way than creating a loop which gets the entity's position while it exists, can be done both in scm and c++ but I prefer that you do it in scm until I find a solution.

SoundSystem.cpp in Cleo Library's source
 
Spoiler

Look at the end. This help?

Edit:
	//0AC3=2,link_3d_audiostream %1d% to_object %2d%
	OpcodeResult opcode_0AC3(CScriptThread *thread)
	{
		CAudioStream *stream; unsigned handle;
		RetrieveScriptParams(thread, stream, handle);
		stream->Link(GetObjectPool().atHandle(handle));
		return OR_CONTINUE;
	}
CustomOpcodeSystem.cpp
  • Shmoopy likes this

Junior_Djjr
  • Junior_Djjr

    Modding Lover

  • Members
  • Joined: 16 Dec 2011
  • Brazil
  • Best Map 2016 [San Andreas INSANITY] [Contribution]

#13

Posted 01 November 2015 - 12:33 PM

I tested and worked :D
Man, the vibration was perfect!

This plugin will help a lot, thanks a lot!

 

But for some reason the 3d was silent, works spectrum and everything, but even I going to the location (Grove) did not hear anything


Shmoopy
  • Shmoopy

    Lost interest in GTA

  • Members
  • Joined: 16 Jun 2009
  • None

#14

Posted 01 November 2015 - 12:37 PM Edited by Shmoopy, 01 November 2015 - 12:42 PM.

I tested and worked :D
Man, the vibration was perfect!
This plugin will help a lot, thanks a lot!
 
But for some reason the 3d was silent, works spectrum and everything, but even I going to the location (Grove) did not hear anything


Did you test with the Sample ?
Because it works for me

Hold on I made a mistake

 

Rename it to bass.asi instead of cleo and put in in the main folder.


Junior_Djjr
  • Junior_Djjr

    Modding Lover

  • Members
  • Joined: 16 Dec 2011
  • Brazil
  • Best Map 2016 [San Andreas INSANITY] [Contribution]

#15

Posted 01 November 2015 - 12:46 PM Edited by Junior_Djjr, 01 November 2015 - 12:53 PM.

Yeah, worked now, but looks like with wrong freq, I don't know why, 44100 worked for 2D, the song and my windows are also with 44100

 

So, please fix the sound continuing when the game is paused, TTS.cleo also have this problem.

Wow, It was automatically fixed  :blink:


Shmoopy
  • Shmoopy

    Lost interest in GTA

  • Members
  • Joined: 16 Jun 2009
  • None

#16

Posted 01 November 2015 - 12:52 PM Edited by Shmoopy, 01 November 2015 - 12:56 PM.

Yeah, worked now, but looks like with wrong freq, I don't know why, 44100 worked for 2D, the song and my windows are also with 44100

 

So, please fix the sound continuing when the game is paused, TTS.cleo also have this problem.

Plugin is now an asi file, test the 3d sound now, everything works for me, the sound pauses when in Mainmenu, as for tts.cleo i will fix it later.


Junior_Djjr
  • Junior_Djjr

    Modding Lover

  • Members
  • Joined: 16 Dec 2011
  • Brazil
  • Best Map 2016 [San Andreas INSANITY] [Contribution]

#17

Posted 01 November 2015 - 12:55 PM

I understand now, only .asi the sound pauses with the game, .cleo not.


Shmoopy
  • Shmoopy

    Lost interest in GTA

  • Members
  • Joined: 16 Jun 2009
  • None

#18

Posted 01 November 2015 - 12:59 PM

I understand now, only .asi the sound pauses with the game, .cleo not.

Does the 3D sound work?


Junior_Djjr
  • Junior_Djjr

    Modding Lover

  • Members
  • Joined: 16 Dec 2011
  • Brazil
  • Best Map 2016 [San Andreas INSANITY] [Contribution]

#19

Posted 01 November 2015 - 01:11 PM Edited by Junior_Djjr, 01 November 2015 - 01:15 PM.

With .asi worked but bugged, like wrong freq

Remember me a bug when I played Prototype with 192000 hz, then I changed to 44100 hz and worked, but not now.

 

For some reason, when I minimize the game and come back, when leaving the pause sound becomes normal during half a second and then bugs again.

 

Chopped sounds as if the music was cut off.

 

btw: I'm using the latest version of bass.dll, 110.207 bytes


Shmoopy
  • Shmoopy

    Lost interest in GTA

  • Members
  • Joined: 16 Jun 2009
  • None

#20

Posted 01 November 2015 - 01:27 PM Edited by Shmoopy, 01 November 2015 - 01:28 PM.

With .asi worked but bugged, like wrong freq

Remember me a bug when I played Prototype with 192000 hz, then I changed to 44100 hz and worked, but not now.

 

For some reason, when I minimize the game and come back, when leaving the pause sound becomes normal during half a second and then bugs again.

 

Chopped sounds as if the music was cut off.

 

btw: I'm using the latest version of bass.dll, 110.207 bytes

Send me the sound file you play

my bass version is 2.4.10.0, the one which comes with GTA:SA

  • Bigbossbro08 likes this

Junior_Djjr
  • Junior_Djjr

    Modding Lover

  • Members
  • Joined: 16 Dec 2011
  • Brazil
  • Best Map 2016 [San Andreas INSANITY] [Contribution]

#21

Posted 01 November 2015 - 01:42 PM

I put 2.4.10.0, and the same...

 

Any file, eg this test sound: https://drive.google...Ek0X0JQYlE/view

  • Bigbossbro08 likes this

Junior_Djjr
  • Junior_Djjr

    Modding Lover

  • Members
  • Joined: 16 Dec 2011
  • Brazil
  • Best Map 2016 [San Andreas INSANITY] [Contribution]

#22

Posted 01 November 2015 - 07:12 PM Edited by Junior_Djjr, 01 November 2015 - 07:12 PM.

:D :D

(watch in 720p60 for 60 FPS)

The result is becoming incredible

  • Shmoopy and Bigbossbro08 like this

Shmoopy
  • Shmoopy

    Lost interest in GTA

  • Members
  • Joined: 16 Jun 2009
  • None

#23

Posted 01 November 2015 - 07:34 PM Edited by Shmoopy, 01 November 2015 - 07:35 PM.

Seriously I have no idea how you did those bass vibrations, Thats wicked sick! How did you make them move like that in a game like Gta:sa?

 

Edit: I also noticed that chopping bug and the noise when playing 6.mp3 in 3D, altough it plays fine in 2D without bugs. I'll try to fix it tonight


Junior_Djjr
  • Junior_Djjr

    Modding Lover

  • Members
  • Joined: 16 Dec 2011
  • Brazil
  • Best Map 2016 [San Andreas INSANITY] [Contribution]

#24

Posted 01 November 2015 - 08:03 PM Edited by Junior_Djjr, 01 November 2015 - 08:05 PM.



Seriously I have no idea how you did those bass vibrations, Thats wicked sick! How did you make them move like that in a game like Gta:sa?

There is not much mystery:
The speaker is a separate mesh with the axis in front, when we decrease the Y size, the part behind gives the feeling of going forward, then immediately (in the next frame) we increase the Y size to make the speaker go back.
Small and simple rules. It is basically the same as occur in real life :)
  • Bigbossbro08 likes this

Junior_Djjr
  • Junior_Djjr

    Modding Lover

  • Members
  • Joined: 16 Dec 2011
  • Brazil
  • Best Map 2016 [San Andreas INSANITY] [Contribution]

#25

Posted 01 November 2015 - 09:20 PM Edited by Junior_Djjr, 01 November 2015 - 09:22 PM.

About the bug, try to set your FPS limit in "1" or other low value

Compare with high FPS, like 60

 

If you set "1" apparently it's okay, but pay close attention, the cut is exactly in the process the game. While the game is not being processed (stopped) the audio is running, and that millisecond's process, the audio will take a quick break, thus creating the chop effect at high FPS.

Something is making the audio will not be processed while the game is being.

  • Shmoopy and Bigbossbro08 like this

Junior_Djjr
  • Junior_Djjr

    Modding Lover

  • Members
  • Joined: 16 Dec 2011
  • Brazil
  • Best Map 2016 [San Andreas INSANITY] [Contribution]

#26

Posted 07 November 2015 - 12:18 PM Edited by Junior_Djjr, 07 November 2015 - 12:33 PM.

Any progress?
Others also had problems with the 3D sound
 
And....... your bass plugin make all other cleo's audiostreams don't work
  • Bigbossbro08 likes this

Shmoopy
  • Shmoopy

    Lost interest in GTA

  • Members
  • Joined: 16 Jun 2009
  • None

#27

Posted 07 November 2015 - 01:21 PM Edited by Shmoopy, 07 November 2015 - 01:21 PM.

 

Any progress?
Others also had problems with the 3D sound
 
And....... your bass plugin make all other cleo's audiostreams don't work

 

I couldn't find a solution so I stopped trying, I'll send you the source code when I get home so you can work on it, maybe you'll have more success than me


Junior_Djjr
  • Junior_Djjr

    Modding Lover

  • Members
  • Joined: 16 Dec 2011
  • Brazil
  • Best Map 2016 [San Andreas INSANITY] [Contribution]

#28

Posted 08 November 2015 - 03:58 PM

I couldn't find a solution so I stopped trying, I'll send you the source code when I get home so you can work on it, maybe you'll have more success than me

Nop, but my friend :p he has worked with it previously.


Bigbossbro08
  • Bigbossbro08

    Trick

  • Members
  • Joined: 12 Jul 2013

#29

Posted 26 June 2016 - 08:39 AM

GTA VC needs to open custom IFPs loading opcode system like GTA SA. Can you make one for VC?


Shmoopy
  • Shmoopy

    Lost interest in GTA

  • Members
  • Joined: 16 Jun 2009
  • None

#30

Posted 26 June 2016 - 10:38 PM

GTA VC needs to open custom IFPs loading opcode system like GTA SA. Can you make one for VC?

I'm not familiar with GTA VC in terms of scripting. On the other hand if you need anything GTA SA related then feel free to ask.

  • Bigbossbro08 likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users