Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cursed itr [Signed 32-bit 2^32-1]
#11
character starts with 500 hp
=========================================
hit with injury: 1147483648 and then -1147483648
hp: 2000000500
dark hp: 3529978698
max hp: 500
mp: 11475147

effects:
hp and mp both decrease, their values are just high. also no hp or mp regen
F8 doesn't work
drinking milk sets mp back to 500, but hp is set to whatever the dark hp value is at the time of drinking, and character dies
=========================================
single hit with injury: -1147483648
hp: 1147484148 (positive version of injury value less 500)
dark hp: 382495049
max hp: 500
mp: 500

effects:
hp doesn't regen (and hp and dark hp are both just high, hp is higher than dark hp but no special behaviour)
drinking beer doesn't affect anything (just normal).
drinking milk resets hp and dark hp to 500
=========================================

haven't tried what i haven't listed, what do you mean by "unlimited regain"?



Azriel~
Reply
Thanks given by:
#12
(02-27-2012, 07:54 AM)Azriel Wrote:  character starts with 500 hp
=========================================
hit with injury: 1147483648 and then -1147483648

effects:
hp and mp both decrease, their values are just high. also no hp or mp regen
F8 doesn't work
drinking milk sets mp back to 500, but hp is set to whatever the dark hp value is at the time of drinking, and character dies
strange ... i didn't get a change in hp behavior with this one
also F8 drops weapons ... are you sure that one doesn't work?

(02-27-2012, 07:54 AM)Azriel Wrote:  what do you mean by "unlimited regain"?
what you explained in your previous post: above 500
Reply
Thanks given by:
#13
May the
Code:
throwinjury: -842150451
in catch-itrs have a special feature like this? I can't try it now:P..
I always wondered what that ridiculous numbers for(in catch-itrs)...

Edit: of course it has no relation with 2^xxx numbers but who knows, maybe it has a purpose:P
[Image: afro-davis.jpeg][Image: afro-davis.jpeg][Image: afro-davis.jpeg][Image: afro-davis.jpeg]
Reply
Thanks given by:
#14
(04-05-2012, 07:08 PM)xmfcx Wrote:  May the
Code:
throwinjury: -842150451
in catch-itrs have a special feature like this? I can't try it now:P..

The only specialty about this is its hex-value: CDCDCDCD. It's as if this is Marti's way of making fun of the reverse-engineers :p
Tbh, I don't know if there is actually anything special about it...
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by:
#15
(04-05-2012, 07:53 PM)Blue Phoenix Wrote:  
(04-05-2012, 07:08 PM)xmfcx Wrote:  May the
Code:
throwinjury: -842150451
in catch-itrs have a special feature like this? I can't try it now:P..

The only specialty about this is its hex-value: CDCDCDCD. It's as if this is Marti's way of making fun of the reverse-engineers :p
Tbh, I don't know if there is actually anything special about it...

I've found something interesting, so please excuse my gravedigging.

I googled "CDCDCDCD" and got some stuff that may make sense for some.

http://en.wikipedia.org/wiki/Magic_numbe...bug_values

wiki says that "CDCDCDCD" is Used by Microsoft's C/C++ debug malloc() function to mark uninitialized heap memory, usually returned from HeapAlloc()

and references to this table:

http://www.nobugs.org/developer/win32/de...html#table

No idea if this will be useful to someone ever but just wanted to share.
[Image: afro-davis.jpeg][Image: afro-davis.jpeg][Image: afro-davis.jpeg][Image: afro-davis.jpeg]
Reply
Thanks given by:
#16
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-2147483647-2147483648 = 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.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)