Tutorial How to mod fixed values

DaRealPanDa

Co-Administrator
Original poster
Staff member
Supporting-Team
Global Moderator
Social Media
Mar 12, 2018
6,737
15,582
2,120
27
Skyrim
Hey,

i will show you guys in a little Tutorial how to mod Fixed Values.

A little description from fixed values:

Here is detailed memory layout of how fixed floating point number are stored in memory. Suppose we want to represent the number 23.7. In hex representation 23 is represented as 0017. While 7 is represented as 0007, so hex value stored in 4 bytes allocated for fixed float would be 0017 0007. Also if you convert back number which is represented as hex representation in memory 0023 0070. As upper two bytes have value 0023, its decimal representation is 35, while lower two bytes are 0070, which has decimal representation as 112. So the real number in decimal system is 35.112.

In computing, fixed float describes a method of representing real numbers in a way that number and decimal point value is stored at different location or bytes in a memory allocated to variable unlike floating point. In a typical 4 byte (on little endian platform) fixed float number lower(lsb) 2 bytes are used to store the decimal part of the number just like integer value. While upper 2 bytes are used to store the part of number before the decimal point. Floating point numbers are, in general, represented approximately to a fixed number of significant digits and scaled using an exponent. The base for the scaling is normally 2, 10 or 16. The typical number that can be represented exactly is of the form:

So how to mod them?

I know two ways how to do that. Maybe it exist easier ways, but i know only these two:

1. You have as example this Method:


// Token: 0x1700021E RID: 542
// (get) Token: 0x06000CE7 RID: 3303 RVA: 0x00024B5B File Offset: 0x00022D5B
public FixedFloat CommandPointGrowthRate
{
get
{
return this._commandPointScale * BattleCommandPoints.BaseCommandPointGrowthRate;
}
}
You edit it so that it looks like that:

// Token: 0x1700021E RID: 542
// (get) Token: 0x06000CE7 RID: 3303 RVA: 0x00024B5B File Offset: 0x00022D5B
public FixedFloat CommandPointGrowthRate
{
get
{
return this._commandPointScale * BattleCommandPoints.BaseCommandPointGrowthRate * FixedFloat.FromIntValue(Your Number);
}
}
How you can see, you simple add a
FixedFloat.FromIntValue(Your Number);
This is way one, to multiplicate.

2. You have as example this Field:

// Token: 0x04000E26 RID: 3622
public FixedFloat DamageMultiplier = FixedFloat.One;
you change it to that:

// Token: 0x04000EF0 RID: 3824
public FixedFloat DamageMultiplier = FixedFloat.Maximum;
Now it's extreme high multiplicated

The chance that you will meet a Fixed data type is very low, only have 1 Game which have this from 1000, but when you get a Game with that, you know now how to mod it.