Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. News

    2. GrandTheftAuto.net - Website Re-Launch

    1. GTA Online

      1. The Diamond Casino Heist
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Red Dead Online

      1. Frontier Pursuits
      2. Find Lobbies & Outlaws
      3. Help & Support
    3. Crews

      1. Events
    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA 6

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    3. Gangs

    1. Support

    2. Suggestions

Sign in to follow this  
Junior_Djjr

How to mute car engine audio?

Recommended Posts

Junior_Djjr

I'm creating a mod of car status from handling of it, and after, a mod to tuning the car (like engine and turbo)

gta_sa+2013-12-05+10-56-02-20.jpg

My idea is when you buy a new engine, the audio of it will change too, then i need to "mute" the engine audio and then recreate the audio of engine using audio files and playing with cleo (i already have ideas of how to create this) @[email protected]

Share this post


Link to post
Share on other sites
Shmoopy

This is the engine audio list made by Sanny :

 

http://sannybuilder.com/dev/enginesounds.htm

 

You'll see that each vehicle engine has two different sounds , one plays when accelerating and the other when deccelerating .

Lets say that you want to disable the Landstalker engine sound , all you have to do is get the address of the vehicle's engine sound from the list ( Memory Address v1.0 Decimal case ) wich is 8784626 and past it in this little script that i've made :

[email protected] = 8784626 // Vehicles engine sound address0A8C: write_memory [email protected] size 2 value -1 virtual_protect 0 // accl [email protected] += 20A8C: write_memory [email protected] size 2 value -1 virtual_protect 0 // decc id

-1 disables the engine sound , but if you want to give the Landstalker engine's a sound of a different vehicle ( Sanchez for exemple ) all you have to do is pick the accl/decc ids from Sanny's list wich are 48 and 47

[email protected] = 8784626 // Vehicles engine sound address0A8C: write_memory [email protected] size 2 value 48 virtual_protect 0 // accl [email protected] += 20A8C: write_memory [email protected] size 2 value 47 virtual_protect 0 // decc id
  • Like 2

Share this post


Link to post
Share on other sites
Junior_Djjr

thanks

worked, but if i have Vehicle Audio Loader (by fastman92) installed don't work :c

 

and as i expected, i have to respawn the vehicle... beyond all vehicles of the same model are affected together

 

i need any thing like 0A1C: (mute the heli engine) but in a car .-.

have something in struct of the vehicle to disable the audio of engine? (like when you put the car in underwater but you can get it of the water, the car stops the audio of engine but continues driving, i need this lol)

 

edit: have this (081D) but the car don't continues driving.....

Edited by Junior_Djjr

Share this post


Link to post
Share on other sites
fastman92

worked, but if i have Vehicle Audio Loader (by fastman92) installed don't work :c

You must use this function instead:

 

:getVehicleAudioPropertiesByModelID{ Description:     Returns address to tVehicleAudioProperties struct of vehicle by ID.        Works with or without Vehicle Audio Loader by fastman92. Type: PROPERTY   Parameters:   Passed:     [email protected] - vehicle ID        Returned:     [email protected] - pointer to tVehicleAudioProperties struct of vehicle by ID.    Example:  0AB1: call_scm_func @getVehicleAudioPropertiesByModelID 1 vehicle_ID 400 store_pointer_to [email protected]}0A8D: [email protected] = read_memory 0x004F5C26 size 4 virtual_protect false      // 0x004F5C23 + [email protected] = 0x4F5C160A8D: [email protected] = read_memory [email protected] size 1 virtual_protect [email protected] == 0x2Dthen    [email protected] += 1    0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect false    0062: [email protected] -= [email protected]  // (int) [email protected] *= 0x24      // [email protected] *= sizeof(tVehicleAudioProperties)005A: [email protected] += [email protected]  // (int) 0AB2: ret 1 [email protected]
Pass model ID to it.

 

Use GTAG SCM (v1).

 

You may find this opcode useful:

 

0441: [email protected] = car $TEMPVAR_ACTOR_CAR model
The structure:

 

00000000 tVehicleAudioProperties struc ; (sizeof=0x24)00000000 VehicleType     dw ?                    ; base 1000000002 EngineOnSound   dw ?                    ; base 1000000004 EngineOffSound  dw ?                    ; base 1000000006 field_4         dw ?                    ; base 1000000008 field_5         dd ?0000000C field_6         dd ?00000010 HornTon         db ?                    ; base 1000000011 field_8         db 3 dup(?)00000014 HornHigh        dd ?00000018 DoorSound       db ?                    ; base 1000000019 field_11        db ?0000001A RadioNum        db ?                    ; base 100000001B RadioType       db ?                    ; base 100000001C field_14        db ?                    ; base 100000001D field_15        db 3 dup(?)00000020 field_16        dd ?00000024 tVehicleAudioProperties ends
#pragma pack(push, 1)struct tVehicleAudioProperties{  __int16 VehicleType;		//	1: +  0  __int16 EngineOnSound;	//  2: +  2  __int16 EngineOffSound;	//  3: +  4  __int16 field_4;			//  4: +  6  float field_5;			//  5: +  8  float field_6;			//  6: + 12  char HornTon;				//  7: + 16  char field_8[3];			//	8: + 17, zeros  float HornHigh;			//  9: + 20  char DoorSound;			// 10: + 24  char field_11[1];			// 11: + 25, zeros  char RadioNum;			// 12: + 26  char RadioType;			// 13: + 27  char field_14;			// 14: + 28  char field_15[3];			// 15: + 29, zeros  float field_16;			// 16: + 32};#pragma pack(pop)
Edited by fastman92

Share this post


Link to post
Share on other sites
DK22Pac

It possibly won't work because tVehicleAudioProperties is copied to CVehicle struct at its initialisation (and then 'game' works with this data within CVehicle).

Share this post


Link to post
Share on other sites
Junior_Djjr

Try this.

0A97: [email protected] = car [email protected] [email protected] += 0x1F50A8C: write_memory [email protected] size 1 value true virtual_protect 0

 

you tested? here don't worked, not change

is this a address to turn of the audio of engine of car? what is this exactly?

have other address to try?

 

 

@fastman

yeah, worked, but the result is the same of:

 

[email protected] = 8784626 // Vehicles engine sound address0A8C: write_memory [email protected] size 2 value -1 virtual_protect 0 // accl [email protected] += 20A8C: write_memory [email protected] size 2 value -1 virtual_protect 0 // decc id
...but now, working in your mod

and i don't need this, 'cause this affects ALL cars with that model

Share this post


Link to post
Share on other sites
DK22Pac

 

Junior_Djjr, I got this offset from 0A1C opcode. Maybe it works only for helis then.

Share this post


Link to post
Share on other sites
fastman92

Sorry to tell it, but you won't go far without ability to reverse engineer executable code and make your own findings.

8883d7293521057.jpg

Share this post


Link to post
Share on other sites
Deissp

I'm not posting here to help because I have no idea how scripting likethis works, I just wanna say this mod is a really good idea, and I hope you keep going with it!

 

I remember going to Pay n' Spray and saying you get a new engine but nothing changed! Keep up the good work.

Share this post


Link to post
Share on other sites
fastman92

What do you exactly want? Multiple vehicle engine sounds and the active engine sound controlled by the CLEO script?

 

 

using audio files and playing with cleo
That won't work.

Only GTA SA audio files may be used - GENRL in this case.

Edited by fastman92

Share this post


Link to post
Share on other sites
Junior_Djjr

What do you exactly want? Multiple vehicle engine sounds and the active engine sound controlled by the CLEO script?

i need any thing like 0A1C: (mute the heli engine) but in a car .-.

have something in struct of the vehicle to disable the audio of engine? (like when you put the car in underwater but you can get it of the water, the car stops the audio of engine but continues driving, i need this lol)

 

edit: have this (081D) but the car don't continues driving.....

read ↑

simple... mute the engine of car, but, IN ONE CAR, the same of 081D make with helis, the audio of engine i can make after..

the problem is: i need make in ONE car, only in THIS car, and not in the model of car

 

 

btw: the gear of car changes in wrong time of we can see, like... the opcode return a new gear, and AFTER (some like 1 or 2 secs) we can see the gear changing in the car... then i need the rpm memory address (thats all i need to i start the "new" "system" of audio of engines) (i will use audios of forza)

i think the fabio3 give me a memory address to read rpm of car (the same used in imvehft?) ...but i losted the address and i losted he (stop to enter in facebook :p ) anyone can pass to me?

Share this post


Link to post
Share on other sites
Junior_Djjr
[email protected] = Actor.CurrentCar($PLAYER_ACTOR)0A97: [email protected] = car [email protected] [email protected] += 0x138 // [email protected] += 0xDC // sound 10A8C: write_memory [email protected] size 2 value 0 virtual_protect [email protected] += 0x2 // sound 20A8C: write_memory [email protected] size 2 value 0 virtual_protect 0

seemann :3

 

P.E.R.F.E.C.T. (or not?)

in value 0 the audio bugs when i get of and enter in a car... the car make the shoes sounds (lol)

then i write -1 and now is perfect of i wanted

 

 

the only last thing of i want is an address of rpm of car, in some speedometer used the gear ratio or something, but is better use the the "real" rpm... imvehft/steering used this?

then with rpm of car i can control the audios of engine

Share this post


Link to post
Share on other sites
Seemann

I might be wrong, but there's no such parameter as 'rpm'. GTA SA makes changes to the vehicle gears based on the current velocity, which is stored at [vehicleStruct+0x384]+0x2c+0x64. A copy of this value for the player car is at 0x00C1CB40.

 

This code will output a pseudo rpm number for the vehicle [email protected]:

            0A97: [email protected] = car [email protected] struct            [email protected] += 0x384 // // vehicle.pHandling            0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0            [email protected] += 0x2C // handling.transmissionData            [email protected] += 0x64 // transmission.engineAcceleration                                    0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0            [email protected] *= 10000.0            0092: [email protected] = float [email protected] to_integer             045A: draw_text_1number 320.0 155.333 GXT 'BJ_0' number [email protected]            03F0: enable_text_draw 1

Share this post


Link to post
Share on other sites
Junior_Djjr

this is pratically the same of i get the car speed .-.

this "rpm" don't returns to 0 when gear changes, and the gear changes in differents values, "6000" or "7000" for example, then is impossible to get the exact time of the gear changes

 

how the "tachometers" works? like steering mod and others speedometers mods (any good source to share?), all of i need is one value to check the "rpm" of actual gear and check to gear changes, cause the 0AB8: don't return the gear correctly...... return a value and after secs the gear changes...

Share this post


Link to post
Share on other sites
Silent

this "rpm" don't returns to 0 when gear changes

It doesn't return to 0 in real life too, unless you can't shift. Sounds like a completely valid behaviour.

Share this post


Link to post
Share on other sites
Junior_Djjr

 

this "rpm" don't returns to 0 when gear changes

It doesn't return to 0 in real life too, unless you can't shift. Sounds like a completely valid behaviour.

 

hahaha i know

i meant to say: the value don't changes when the gear changes, then is impossible to know if gear change or not, and know this is the main of i want......

(btw, in real, the rpm diminues .-. in this value no, but the only problem is to get the moment of gear changes)

Edited by Junior_Djjr

Share this post


Link to post
Share on other sites
DK22Pac

0AB8 returns the gear correctly.

 

{$CLEO}0000:while true    wait 0    if        player.Defined(0)    then        if            actor.Driving($PLAYER_ACTOR)        then            [email protected] = actor.CurrentCar($PLAYER_ACTOR)            0A97: [email protected] = car [email protected] struct            0A8E: [email protected] = [email protected] + 0x4B4            0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0            0A8E: [email protected] = [email protected] + 0x808            0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0            0AD1: show_formatted_text_highpriority "Gear %d %.3f" time 100 [email protected] [email protected]        end    endend
Edited by _DK

Share this post


Link to post
Share on other sites
Junior_Djjr

0AB8 returns the gear correctly.

{$CLEO}0000:while true    wait 0    if        player.Defined(0)    then        if            actor.Driving($PLAYER_ACTOR)        then            [email protected] = actor.CurrentCar($PLAYER_ACTOR)            0A97: [email protected] = car [email protected] struct            0A8E: [email protected] = [email protected] + 0x4B4            0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0            0A8E: [email protected] = [email protected] + 0x808            0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0            0AD1: show_formatted_text_highpriority "Gear %d %.3f" time 100 [email protected] [email protected]        end    endend

you tested? like i said, the number of gear returns a different number... i can see the value changing and after seconds the car changes the gear (or the car changes the gear and then the value change...)

and this is big wrong, like 1, 2 secs... for example, the gear returns "3" but the car only changed the gear one time! (what can see in movement and audio)

(is only here? impossible)

Share this post


Link to post
Share on other sites
DK22Pac

But how do you actually detect when gear is changed? With sound changing? :lol:

So that means you want to know when vehicle changes its sounds.

Edited by _DK

Share this post


Link to post
Share on other sites
Junior_Djjr

But how do you actually detect when gear is changed? With sound changing? :lol:

So that means you want to know when vehicle changes its sounds.

the sound changing and moves the suspension of car, is easy to see

i think the easily way is when vehicle moves suspension of gear change or something

 

but, whatever...

Edited by Junior_Djjr

Share this post


Link to post
Share on other sites
Shmoopy

If you want to add your customized sounds to gta vehicles including gear change sound , then the best way to do it is to make a script that adds virtual gear change , and here is a mod that may help you made by sst5416 , its a virtual manual transmission mod : http://www.gtagarage.com/mods/show.php?id=13722

 

cz as far as i know , you cant control the default gear change in gtasa .

Share this post


Link to post
Share on other sites
Silent

From what I've seen, gears 1 and 2 'share' the loop. Doesn't mean 0AB8 is not working properly.

Share this post


Link to post
Share on other sites
Junior_Djjr

If you want to add your customized sounds to gta vehicles including gear change sound , then the best way to do it is to make a script that adds virtual gear change , and here is a mod that may help you made by sst5416 , its a virtual manual transmission mod : http://www.gtagarage.com/mods/show.php?id=13722

 

cz as far as i know , you cant control the default gear change in gtasa .

no, this may "spoil" my mod .-.

 

From what I've seen, gears 1 and 2 'share' the loop. Doesn't mean 0AB8 is not working properly.

correcting what i meant: the gear of gta dont work correctly :p

the value returns wrong, try to decelerate and acelerate the car, then... not only 1 and 2, but all values of gears changes in wrong time of you can see in the movement/sound of car

 

i meant that is impossible to create my mod with this opcode or any address to get this value, i need other way, any address to get the time of car make the movement of suspension + sound change?

and even though i don't "re-create" the audio of engine, i need this to create a turbo sound of my mod .-.

Share this post


Link to post
Share on other sites
DK22Pac

I think sound doesn't change with gear changing. Looks like it just playing audio in a loop with some delay.

Edited by _DK

Share this post


Link to post
Share on other sites
Junior_Djjr

I think sound doesn't change with gear changing. Looks like it just playing audio in a loop with some delay.

yes, you may be correct

but anyway, the suspension of car moves too, some cars is a little movement, but cars like elegy is very easy to see

Share this post


Link to post
Share on other sites
Junior_Djjr

ok, if this is much difficult, i thanks to all helps and sorry for lost your times :p(If you find any way tell to us!!!!)

 

anyway, no problem, i can removes funcs of my mod, only make to change the speed and sound of engine (using sounds of original cars instead create a new "system" of sounds) ...and create a durability tire system (ideas for handling changes to make the car unstable like bad tires?) ...then the tires can deflate if drift much etc... also, you can buy new tires with more durability :B

may create others things like configure the suspension and create a possible to add parts of any model in your car by ids added in a .ini (or you type the id and load? nice?), like

video of my other mod at 2:45

i'm making new stats of car and then create a shop (trying to use transfender for that)

1486854_252756484879829_302136536_n.jpg

(acceleration, max speed, brakes, damage, and others like gears, drive type, monetary value etc, after, the tires and others)

i will release english version too ok? :p

Edited by Junior_Djjr
  • Like 1

Share this post


Link to post
Share on other sites
DK22Pac

So did you already find how to modify speed of vehicle sounds?

And about objects - you can attach them to car in way like extras are attached - create a copy of needed model as atomic and add it to vehicle clump. For me it is the best solution here,

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.