Necro-Bump and edited thread title.
Because this is a very incomplete but important tutorial.
LF2 stores numbers like your HP, MP, and the Summary/Results table at the end of each round.
These numbers are often stored as a
signed 32-bit integer: (2^32)-1 = 4,294,967,295
Signed would mean half of that huge number is dedicated to represent negative numbers(-2^31), while the other half(2^31-1) is for positive numbers(and zero).
That means the numbers between 2147483648 to 4294967295 would represent -2147483648 to -1 respectively.
That also means the maximum range of numbers you can write in LF2's .dat files is:
-2147483648 to 2147483647
The implication is that:
1) Using -2147483648 puts you on the opposite side.
eg: 500-2147483648 = -2147483148 [2147484147]
You are moved from a small positive number into a large negative number.
2) You need to use at least x2 instances of a large number to overflow back into your original side.
eg1: 500-214748364
7-214748364
8 = 500
Adjust the first number accordingly to get the result you desire.
eg2: 500-[2147483647-250]-2147483648 = 750
So how do I actually increase my own MP beyond 500 in LF2?
It is well-known that you can use mp: -xxx on the first frame of a move to increase your MP, or use state17 + beer to regenerate MP (but capped at 500).
Now with this knowledge, you can use mp: -xxx on any other frame besides the first, and therefore make continuous MP regeneration without needing beer or constant button pressing, and you can exceed 500.
However, there are several precautions you need to take to prevent bugs:
- The first -xxx number MUST be smaller than the second -xxx number.
This is due to a quirk in the way LF2 determines whether you are out of MP (and therefore force you into your hit_d frame.
- You cannot use hit_<whatever> tags while your MP is negative.
- You will want to make your character unhittable(i.e. no bdy) during the first -xxx number.
- You might want to take into account LF2's natural mp regeneration.
What about HP via injury used in YinYin's original cursed itr?
The number indicated is how much damage is done to character's red HP.
However, only 1/3 of that number(rounded down) is dealt to character's dark HP.
Hence, you may sometimes curse the enemy to be unable to regenerate HP, but other times end up blessing the enemy to be able to regenerate HP seemingly infinitely.
The other effect reported is that sometimes the enemy suddenly gets infinite MP.
This is because your natural MP regen rate will go beyond 5mp/3tu even after death for every 100hp lost.
This happens if the enemy is hit exactly on the same tu that LF2 calculates MP regen... so you can imagine just how much MP you might suddenly regain seemingly at random.