Common hacking questions

From ZeldaHacking Wiki
Jump to: navigation, search

This page contains answers to various questions and obstacles that hackers (new and old) may come across while hacking Oracle of Ages or Seasons.

General

Where can I find other Oracles hackers?

The most active place is the official Discord server (https://discord.gg/wCpPPNZ). Users who actively participate in or have knowledge of Oracles hacking have the "Wind Fish" role.

Should I hack Ages or Seasons?

At this time, LynnaLab does not fully support Seasons, so we recommend hacking Ages. Expect this to change in the near future though, as the Seasons disassembly is mature enough at this point.

I don't understand some of the notations used on this wiki!

You may want to read the Background information page.

Hacking with LynnaLab / Oracles-disasm

How do I set Link's spawn position at the start of the game?

There is a table named "_initialFileVariables" in "code/fileManagement.s":

; Initial values for variables in the c6xx block.
_initialFileVariables:
	.db <wTextSpeed				$02
	.db <wc608				$01
	.db <wLinkName+5			$00 ; Ensure names have null terminator
	.db <wKidName+5				$00
	.db <wObtainedTreasureFlags		1<<TREASURE_PUNCH
	.db <wMaxBombs				$10
	.db <wLinkHealth			$10 ; 4 hearts (gets overwritten in standard game)
	.db <wLinkMaxHealth			$10
.ifdef ROM_AGES
	.db <wDeathRespawnBuffer.group		$00
	.db <wDeathRespawnBuffer.room		$8a
	.db <wDeathRespawnBuffer.y		$38
	.db <wDeathRespawnBuffer.x		$48
	.db <wDeathRespawnBuffer.facingDir	$00
	.db <wJabuWaterLevel			$21
	.db <wPortalGroup			$ff
	.db <wPirateShipRoom			$b6
	.db <wPirateShipY			$48
	.db <wPirateShipX			$48
	.db <wPirateShipAngle			$02
.else
	.db <wDeathRespawnBuffer.group		$00
	.db <wDeathRespawnBuffer.room       $a7
	.db <wDeathRespawnBuffer.y          $38
	.db <wDeathRespawnBuffer.x          $48
	.db <wDeathRespawnBuffer.facingDir  $02
.endif
	.db $00

Modify the highlighted lines to set the room you spawn in (wDeathRespawnBuffer.group and wDeathRespawnBuffer.room). (Those lines are for Ages; for Seasons, see the equivalent lines after the ".else".)

By default, you spawn in group 0, room $8a. Keep in mind that the change only applies to newly created files, NOT to files that have been created already, even if you haven't done anything in them yet.

I'm using a script in a past map from $f0-$f5, but it's behaving strangely.

Maps $f0-$f5 (inclusive) in the past overworld (and past underwater) are unused because their room flags are used to remember the 6 vine sprout positions. As such, moving a vine will also change the room flags in those rooms, which can mess up your scripts.

Even if you're not using vines, their initial positions can still mess up your scripts. You can fix this by going to address $129e8 in your ROM and changing these 6 bytes all to 00:

41 22 16 35 18 53

You will need to start a new game for this change to take effect.

You can also edit these to other values to change the initial positions of the vines (although changing their rooms is more complicated, since most vine behaviour is hardcoded with "map scripts", as ZOLE calls them.)

How do I handle the Animal Companion regions?

See Room packs.

Caveats

  • Using bombable walls that go left or right in an indoor area in the past overworld/underwater will cause their corresponding room flags to be set in the present overworld/underwater. As a result, not only will it not remember that the wall was destroyed, but it may screw up the flags in the corresponding rooms in the present.
    • Bombable walls going up/down aren't affected by this issue, but those kinds don't attempt to set the "wall blown up" flag in the adjacent room (for indoors areas only; they work properly in dungeons).
    • See the "setRoomFlagsForUnlockedKeyDoor_overworldOnly" function in the disassembly.
  • See the Bug List for more.

Hardcoded things

Not all rooms are equal. Some have hardcoded behaviour.

Ages

  • Symmetry City present has a "smooth palette transition" when entering or exiting the area, but it is ignored when the global flag for restoring the tuni nut is unset.
    • See checkSymmetryCityPaletteTransition (01:4862).
  • Bombs are hardcoded to trigger a cutscene in room $0050, the place where you get the bomb upgrade, if they fall into a hazard (water, lava, or a hole).
    • See _bombUpdateThrowingAndCheckDelete (07:5530).
  • The cane of somaria doesn't work in Patch's minigame room.
    • See @checkBlockCanAppear (07:5e02).
  • In Nayru's house, Link will enter a "sleeping" state by walking into a bed at a specific position.
  • Octogon (the boss) is hardcoded to set flags in specific rooms, meaning he may not work properly if relocated.

Seasons

  • Snake's remains entrance is hardcoded to be darkened before the torches are lit.
  • The compass is hardcoded to chime in the unicorn cave's boss key room (for some reason).