So i have noticed lots of people since first release of Tunables by Tustin not fully understand how things works :p
ill be showing you how write them in C++/C# .
[HIDE]
void SetTunable(int index, int value)
{
int TunablesPointer= 0x1E70374; // 1.26 TunablesPointer
int TunablesTable = *(int*)TunablesPointer + 4; // Tunable Pointer Plus 4 To bring to start of Tunable Table
int TunableAddress = TunablesTable + (index * 4); // Tunable Table + (Tunable Index Multiply by 4 to get the correct tunable location to set to )
*(int*)TunableAddress = value; // Write Value to current tunable index adress
}
public static void SetTunable(int index, int value)
{
int TunablesPointer = PS3.Extension.ReadInt32(0x1E70374);
int TunablesTable = TunablesPointer + 4;
int TunableAddress = TunablesTable + (index * 4);
PS3.Extension.WriteInt32((uint)TunableAddress, value);
}
enum Tunables //1.26
{
TURN_SNOW_ON_OFF = 4715,
CARMOD_SHOP_MULTIPLIERqe = 59,
CLOTHES_SHOP_MULTIPLIER = 60,
HAIRDO_SHOP_MULTIPLIER = 61,
TATTOO_SHOP_MULTIPLIER = 62,
WEAPONS_SHOP_MULTIPLIER = 63,
CARS_WEBSITE_MULTIPLIER = 65,
PLANES_WEBSITE_MULTIPLIER = 66,
HELIS_WEBSITE_MULTIPLIER = 67,
BOATS_WEBSITE_MULTIPLIER = 68,
BIKES_WEBSITE_MULTIPLIER = 69,
IDLEKICK_WARNING1 = 73,
IDLEKICK_WARNING2 = 74,
IDLEKICK_WARNING3 = 75,
};
bool MakeSnow;
void MakeItSnow()
{
if (!MakeSnow)
{
SetTunable(TURN_SNOW_ON_OFF, 1); // Snow ON
MakeSnow = true;
}
else
{
SetTunable(TURN_SNOW_ON_OFF, 0); // Snow OFF
MakeSnow = false;
}
}
[/HIDE]
Thanks To Absolute Zero for converting SetTunable to C# for me 🙂
Credits:
Tustin for Virgin Tunables Modding solution 😀
Xelahot for Updating the indexes to 1.26 for me 🙂