Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cursed itr [Signed 32-bit 2^32-1]
#11
I don't have all the lf2 and datachanger stuff on my computer anymore, so I can't test it out by myselfe, but what happens if you add a mp: -2147483648 tag somewhere to a character? (not the first frame of the move)
would he actually have infinite mp?
Reply
Thanks given by:
#12
yes and no

its the right amount - but it will not work in a single mp tag, you have to split it (and possibly account for the regain; so make it a little more depending on the delay between the two tags)
Reply
Thanks given by:
#13
possible explanation for [regaining hp over the limit of 500]
tl;dr:
the dark and max hp values are stored as an unsigned ints, and when the character first dies, the dark and max hp values are "less" than the current hp value, and so is set to the hp value (but since it is an unsigned int, it is "more"). when the character revives, his hp continuously regens

Code:
Tag        | Hex            | Dec    |
--------------------------------|
HP        | 00 00 01 F4    | 500    |
Dark HP    | 00 00 01 F4    | 500    |
Max HP    | 00 00 01 F4    | 500    |

// perform first itr
injury ->    80 00 00 00    // -2147483648

// we perform the subtraction
      00 00 01 F4
    - 80 00 00 00
    = 80 00 01 F4    // -2147483148 (not the same as the itr value)

// logic: hp = hp - (unsigned int) injury; // implicit cast

>> insert crazy logic here
// hypothetical, max hp and hp must be stored as unsigned ints
if (dark hp < hp) {
    dark hp = hp;
}
if (max hp < hp) {
    max hp = hp;
}
>> done logic

HP        | 80 00 01 F4    |  -2147483148    |
Dark HP    | 00 00 01 F4    |  2147484148    |
Max HP    | 00 00 01 F4    |  2147484148    |

// perform second itr
injury ->    80 00 00 00    // -2147483648

// we perform the subtraction
      80 00 01 F4
    - 80 00 00 00
    = 00 00 01 F4

HP        | 00 00 01 F4    | 500    |    // back to normal
Dark HP    | 00 00 01 F4    | 2147484148    |
Max HP    | 00 00 01 F4    | 2147484148    |

// tada: "unlimited" hp regen

doesn't address the mp issues though, probably more crazy logic



Azriel~
Reply
Thanks given by: YinYin
#14
thanks azriel

now try to explain this one:
i have managed to isolate the infinite mp effect through an itr

first do a damage of about 1147483648 and then while the opponent is still falling revert it with -1147483648
after that his mp will be so high that you won't notice him using any - no side effect found so far (hp totally unaffected - other than drinking beer no way to turn it off again yet)
it also works perfectly well with 1147483648 and then 3147483648
just need to stop somewhere right in the negative area instead of the borderlines of positive and negative (like the previous ones)

now i only need to isolate the delete dark hp and regain effect
edit:
four hits with 2147483648 (wait: 3 vrest: 4) will rid the opponent of his dark red hp and regain
also milk becomes deadly (and sometimes mp is emptied out aswell)
if repeated it will first switch to no dark red hp and unlimited regain
and second back to normal
(third: no dark red and no regain again)
Reply
Thanks given by:
#15
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:
#16
(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:
#17
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: llqsMqz.jpg][Image: llqsMqz.jpg][Image: llqsMqz.jpg][Image: llqsMqz.jpg]
Reply
Thanks given by:
#18
(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:
#19
(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: llqsMqz.jpg][Image: llqsMqz.jpg][Image: llqsMqz.jpg][Image: llqsMqz.jpg]
Reply
Thanks given by:
#20
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.
[Image: uMSShyX.png]
~Spy_The_Man1993~
Steiner v3.00 (outdated), Challenge Stage v1.51
Luigi's Easier Data-Editor, A-Man's Sprite Mirrorer
Working on the LF2 Rebalance mod.
Avatar styled by: prince_freeza
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)