Skip to content
cxd4 edited this page Oct 23, 2015 · 3 revisions

Significance

long_sword_hp is the game code's identifier for how many more times Link can strike with the Razor Sword until it loses its forged edge and reverts back to the Kokiri Sword.

Syntax

  • zs $filepath -R -- Prints the current value from the file data.
  • zs $filepath -R (int16_t) -- Interprets the extra string parameter as a whole number (any base) and stores the resulting integer to the relevant bits, if said integer falls within the range of values representable by a sign-extended halfword in MIPS (-32768 <= x <= +32767).

Example Inputs

zs $filepath -R 100 # starting health of the Razor Sword

Notes

This probably is a remnant of the SRAM save file format for The Legend of Zelda: Ocarina of Time, in which Link could buy a Giant's Knife for 500 rupees, which had the strength of the Biggoron's Sword but eventually broke into something less useful than the Master Sword.

It has not yet been confirmed whether this is a 16-bit signed or unsigned integer.

The game seems to maintain this value through something like the loop below:

if (long_sword_hp != 0) {
    long_sword_hp -= 1;
    if (long_sword_hp == 0)
        break_Razor_Sword_into_Kokiri_Sword();

Therefore, in effect, it seems that simply writing 0 with this save editor gives Link an immortal Razor Sword which never breaks, if this algorithm has been estimated correctly enough.

Relevant Bits

file[0x003C:0x003D]15..0

Derived Cheat Codes

GameShark ROM Version
JAP (1.0)
JAP (1.1)
JAP (GC)
USA (preview)
USA
USA (GC)
EUR (1.0)
EUR (1.1)
EUR (GC)
EUR (debug)
Clone this wiki locally