Forum
Questions, builds, help and the odd argument. The mods and guides are out front.
# gorgoil :
great work bro
# Outlaw_Racer :
Hey! You came back !
And that rotary sounds nice 🙂
# Lagano :
Sounds good! The idle lacks that brap brap though. 😛 Also where did you find that track?
Thanks to all 😃 You can find the track in kietekas, but you need an account.
__________________________________________________________________________________________________________
UPDATE:
To do this, I modified the Track.java, Block.java and the block java of the engine that I was using (in this case, Emer_StreetGT_block.java). I will dont share the complete files because all we have different versions, so I will share only the code parts.
Starting with parts/scripts/enginepart/src/Block.java, you need to add the following atributes:
int TRUE = 1;
int FALSE = 0;
int internalCamera = FALSE;
int hoodCamera = FALSE;
int externalCamera = TRUE;
And add the following functions too:
public void setInternalCameraSound()
{
externalCamera = FALSE;
if(internalCamera == TRUE)
{
internalCamera = FALSE;
hoodCamera = TRUE;
}
else
internalCamera = TRUE;
}
public void setExternalCameraSound()
{
internalCamera = FALSE;
hoodCamera = FALSE;
externalCamera = TRUE;
}
Now, in the block java of the engine, for example parts/engine/Baiern_Emer/scripts/src/Emer_StreetGT_block.java, You need to add the following functions (with your custom sounds):
public void setExteriorSfxTable(SfxTable tab)
{
if (tab = the_car.getSfxTable(0))//S54 on
{
tab.clear();
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x0000002Ar), 1216, 500.0, 1306, 2, 3);//on1
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x0000002Br), 1306, 1216, 1577, 3, 4);//on2
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x0000002Cr), 1577, 1306, 2831, 4, 5);//on3
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x0000002Dr), 2831, 1577, 4322, 5, 6);//on4
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x0000002Er), 4322, 2831, 5913, 6, 7);//on5
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x0000002Fr), 5913, 4322, 18000, 7, 9);//on6
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000030r), 7333, 5913, 18000, 8, 9);//on7
}
if (tab = the_car.getSfxTable(1))//S54 off
{
tab.clear();
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000023r), 1216, 500.0, 1306, 2, 3);//off1
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000024r), 1306, 1216, 1577, 1, 2);//off2
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000025r), 1577, 1306, 2831, 2, 3);//off3
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000026r), 2831, 1577, 4322, 3, 4);//off4
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000027r), 4322, 2831, 5913, 4, 5);//off5
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000028r), 5913, 4322, 7333, 5, 6);//off6
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000029r), 7333, 5913, 18000, 6, 7);//off7
}
if (tab = the_car.getSfxTable(2))
{
tab.clear();
the_car.setSfxExhaustMinVol(0.9);
}
}
public void setHoodSfxTable(SfxTable tab)
{
if (tab = the_car.getSfxTable(0))//S42 on
{
tab.clear();
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000045r), 1216, 500, 1577, 9, 9);//on1
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000046r), 1577, 1216, 2831, 9, 9);//on2
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000047r), 2831, 1577, 4322, 9, 9);//on3
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000048r), 4322, 2831, 5913, 9, 9);//on4
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000049r), 5913, 4322, 18000, 9, 9);//on5
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x0000004Ar), 7333, 5913, 18000, 9, 9);//on6
}
if (tab = the_car.getSfxTable(1))//S42 off
{
tab.clear();
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x0000003Er), 1216, 500, 1577, 1, 1);//on1
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x0000003Fr), 1577, 1216, 2831, 1, 1);//on2
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000040r), 2831, 1577, 4322, 1, 1);//on3
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000041r), 4322, 2831, 5913, 1, 1);//on4
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000042r), 5913, 4322, 7333, 1, 1);//on5
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000043r), 7333, 5913, 18000, 1, 1);//on6
}
if (tab = the_car.getSfxTable(2))
{
tab.clear();
the_car.setSfxExhaustMinVol(0.1);
}
}
public void setInteriorSfxTable(SfxTable tab)
{
if (tab = the_car.getSfxTable(0))//S42 on
{
tab.clear();
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000019r), 1216, 500, 1577, 9, 9);//on1
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x0000001Ar), 1577, 1216, 2831, 9, 9);//on2
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x0000001Br), 2831, 1577, 4322, 9, 9);//on3
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x0000001Cr), 4322, 2831, 5913, 9, 9);//on4
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x0000001Dr), 5913, 4322, 18000, 9, 9);//on5
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x0000001Er), 7333, 5913, 18000, 9, 9);//on6
}
if (tab = the_car.getSfxTable(1))//S42 off
{
tab.clear();
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000011r), 1216, 500, 1577, 1, 1);//on1
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000012r), 1577, 1216, 2831, 1, 1);//on2
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000013r), 2831, 1577, 4322, 1, 1);//on3
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000014r), 4322, 2831, 5913, 1, 1);//on4
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000015r), 5913, 4322, 7333, 1, 1);//on5
tab.addItem(new ResourceRef(addon.Sounds.PureSound.BMW:0x00000016r), 7333, 5913, 18000, 1, 1);//on6
}
if (tab = the_car.getSfxTable(2))
{
tab.clear();
the_car.setSfxExhaustMinVol(0.1);
}
}
And the "public void updatevariables()" will be like this:
public void updatevariables()
{
super.updatevariables();
if (the_car)
{
the_car.starter_torque = 20.0;
SfxTable tab;
if(internalCamera == TRUE)
setInteriorSfxTable(tab);
if(externalCamera == TRUE)
setExteriorSfxTable(tab);
if(hoodCamera == TRUE)
setHoodSfxTable(tab);
}
}
Now inside sl/scripts/game/src/Track.java You need to import the following packages:
import java.game.*;
import java.game.parts.enginepart.*;
import java.game.parts.bodypart.*;
And added the atribute:
Block engine = null;
The constructor will be like this:
public Track()
{
createNativeInstance();
player=GameLogic.player;
player2=GameLogic.player2;
int nElements = 0;
//this "while" gets the instance of the block that the car is using
while(nElements < player.car.chassis.attachedParts.size() && engine == null)
{
if(player.car.chassis.attachedParts.elementAt(nElements) instanceof Block)
engine = player.car.chassis.attachedParts.elementAt(nElements);
nElements++;
}
}
In "public void enter( GameState prev_state )" and "public void exit( GameState next_state )", the first two lines are:
engine.setExternalCameraSound();
player.car.chassis.updatevariables();
Inside "public void handleMessage( Message m )" there are two "if" statement together: "if( cmd == CMD_CHANGECAM_INT )" and "if( cmd == CMD_CHANGECAM_EXT )". You will modifiy both like this:
if( cmd == CMD_CHANGECAM_INT )
{
changeCamInternal();
engine.setInternalCameraSound();
player.car.chassis.updatevariables();
} else
if( cmd == CMD_CHANGECAM_EXT )
{
if (cameraMode != CAMMODE_FOLLOW)
{
changeCamFollow();
engine.setExternalCameraSound();
player.car.chassis.updatevariables();
}
}
And thats all. For any question comment here.
That's really nice!
int TRUE 🙂)
But that's interesting to see. I wonder if you could make it pitch the sound differently, so you wouldn't need extra banks for it, and could do it globally
Yeah you didn't have to make a variable for that, you could make the cameras boolean values or just write "camera = 1". Anyway great job with the sounds, actually i already did interior engine sounds once but i had to change the sound files everytime. 😛
# ALAN :
I wonder if you could make it pitch the sound differently, so you wouldn't need extra banks for it, and could do it globally
Probably not possible cause even FH3 uses different sounds for interior and exterior, but who knows ¯_(ツ)_/¯
Didn't AC use same banks?
# Lagano :
Yeah you didn't have to make a variable for that, you could make the cameras boolean values or just write "camera = 1". Anyway great job with the sounds, actually i already did interior engine sounds once but i had to change the sound files everytime. 😛Probably not possible cause even FH3 uses different sounds for interior and exterior, but who knows ¯_(ツ)_/¯
The java version of the game doesnt support boolean types. I made the variables for "good practices".
# ALAN :
Didn't AC use same banks?
As far as I know AC uses different sounds, someones are the same but edited with equalizer. You shouldnt change the pitch, if you do it, the loop get loss.
Plans for releasing something?
# Outlaw_Racer :
Plans for releasing something?
I want to release all my sounds and some other stuff that Im working now, but all must to be finished.
______________________________________________________________________________________
CAR MECHANIC MOD!
I was working on this mod theese days. Basically, its a job, you can win some money fixin used cars generated randomly. You can't use the "repair all the car" tool with a client's car. For now, you can do whatever you want with the car, but for get the pay, you must give back the car to his owner in "better conditions" than when it arrived to the garage. Better conditions means higher value 😛 I know, that is wrong, so I will change it for something better. Any ideas are welcome!!!
Thats actually a nice idea I like it 😃
Can't wait to try that mod, it is really a great idea! Any updates regarding it, or maybe about the release date?
@9kRPM what about the turbo spool sounds from NFS 2015? They sound pretty realistic.

