# axlevest :
2.)In BB93's SLRR I have found a slight issue with the suspension, after setting it up to be full stance nation/cambergang/hellaflush/super cool my dad thinks it looks weird spec and saving the car, returning to it the wheels will have heaps more poke, then when repaired after driving it, they will return to being how I set it up before, any way to fix this?
For 2), make sure that all of your wheel javas have this in there somewhere:
public void updatevariables()
{
super.updatevariables();
setSlotPos( 1, new Vector3(f_offset/1000.0, 0, 0), null );
}
It goes in the wheel java like this:
Spoiler:
package java.game.cars;
import java.render.osd.*;
import java.io.*;
import java.util.*;
import java.util.resource.*;
import java.game.*;
import java.game.parts.rgearpart.reciprocatingrgearpart.*;
public class rim_Longchamp_XR4Z_10_0_16_chrome extends Wheel
{
float f_offset, default_offset, old_offset, diameter, width;
public rim_Longchamp_XR4Z_10_0_16_chrome ( int id )
{
name = "SSR Longchamp XR4Z wheel 10.0x16 ET-adjustable chrome";
rim_type = rtFACTORY;
diameter = 16.0;
width = 10.0;
default_offset = 20.0;
f_offset = default_offset;
SetupWheel( diameter, width, default_offset);
description = "Variable offset";
// Fix for backwards position in catalog view
catalog_view_ypr = new Ypr( -1.571, -0.7, 0.0 );
}
public void updatevariables()
{
super.updatevariables();
setSlotPos( 1, new Vector3(f_offset/1000.0, 0, 0), null );
}
public void load( File saveGame )
{
super.load( saveGame );
int save_ver = saveGame.readInt();
if (save_ver >= 1)
{
f_offset = saveGame.readFloat();
setSlotPos( 1, new Vector3(f_offset/1000.0, 0, 0), null );
}
}
public void save( File saveGame )
{
super.save( saveGame );
int save_ver = 2;
saveGame.write( save_ver );
if (save_ver >= 1)
{
saveGame.write( f_offset );
}
}
public int isTuneable()
{
return true;
}
public void buildTuningMenu( Menu m )
{
old_offset = f_offset;
m.addItem( "Offset", 1, f_offset, -105.0, 65.0, 1.1, null ).printValue(" %1.1f");
m.addItem( "Reset to factory defaults", 0); //this should always be with cmd=0
GameLogic.player.car.wakeUp();
}
public void endTuningSession( int cancelled )
{
if( cancelled )
{
f_offset = old_offset;
}
else
{
if (f_offset != old_offset)
GameLogic.spendTime(5*60);
getCar_LocalVersion();
if (the_car)
the_car.forceUpdate();
}
}
public void handleMessage( Event m )
{
if( m.cmd == 0 )
{
f_offset = default_offset;
m.gadget.osd.findGadget( this, 1 ).setValue( default_offset );
setSlotPos( 1, new Vector3(f_offset/1000.0, 0, 0), null );
}
else
if( m.cmd == 1 )
{
f_offset = ((Slider)m.gadget).value;
((Slider)m.gadget).changeVLabelText( Float.toString(f_offset, " %1.1f"));
setSlotPos( 1, new Vector3(f_offset/1000.0, 0, 0), null );
}
}
}
What this does: When you load a car from your saved game, or when you tune the wheel setup, it updates the wheel position where they're supposed to go. However, when you repair the car or when you load the car in the dealer, the wheels would reset to their stock position without this line of code. This line of code fixes that. I have it added into every adjustable rim in my game. Almost no modders do this, though.