LynnaLab

From ZeldaHacking Wiki
(Redirected from Chest editing)
Jump to navigation Jump to search
LynnaLab
Author(s)Stewmat
Links
Source

LynnaLab is a level editor for Oracle of Ages and Seasons, similar to ZOLE. Instead of editing the ROM directly, it modifies files from the disassembly.

Available on github.

Features

Object placement

Warp editing

Dungeon editing

Chest placement

While on the chest tab, a purple box showing the contents of a chest becomes visible.

There can only be one chest per room. To have more, some kind of custom script would be necessary.

The chest editor shows the following fields:

Chest data
Field Description
Y/X Position of the chest. The game only uses this to replace the chest tile with an opened chest. You must still place the unopened chest tile in the same position.
ID Treasure ID, as taken from constants/common/treasure.s
SubID Treasure SubID, or the "variant" of the treasure. Determines the values for the treasure object data, explained below.

Treasures which are obtained in multiple contexts can have different variants, as represented by their different SubID values. For example, in Ages, TREASURE_BRACELET has subid $00 (for the L-1 bracelet) and subid $02 (for the power glove). (It also has subid $01 for tokay island but we'll ignore it for now.) These subids are differentiated with the treasure object data:

Treasure object data
Field Description Ages Bracelet example
Spawn mode How the treasure object spawns in. L-1 bracelet: TREASURE_SPAWN_MODE_INSTANT (always there).

L-2 bracelet: TREASURE_SPAWN_MODE_FROM_CHEST_A (because you find it in a chest).

Grab mode What animation Link does when he gets the treasure L-1 bracelet: TREASURE_GRAB_MODE_2_HAND (because he holds it over his head).

L-2 bracelet: TREASURE_GRAB_MODE_NO_CHANGE (because there is no animation when getting items from chests).

Parameter Meaning varies based on the item. Could be the item's level, or quantity of the item to receive, or other things. This is the power bracelet's level.
Text index Text to show when you get the item. Always shows TX_00XX. See text/{game}/text.yaml(ages/seasons). L-1 bracelet has value $26, corresponding to TX_0026.

L-2 bracelet has value $2f, corresponding to TX_002f.

Graphics Byte value determining the graphic to use.
Set 'Item Obtained' Flag Sets ROOMFLAG_ITEM_OBTAINED, which helps the game remember whether the treasure has been obtained or not. Basically always checked for treasures in chests, and most other items as well.

Something important to understand is that the treasure data outlined in the table above is not only used for chests. The L-1 power bracelet, after all, is not found in a chest.

Treasures which are placed in a chest without the correct "Spawn mode" will softlock the game when you attempt to pick them up. You must change the grab mode to TREASURE_SPAWN_MODE_FROM_CHEST_A or TREASURE_SPAWN_MODE_FROM_CHEST_B to prevent this.

Keep in mind, though, that if these treasure objects are used elsewhere - for example, if some in-game event spawns it - then editing the data here will also affect it in that other context. For this reason, you may prefer to create a new subID instead of editing existing subIDs, especially for commonly-used treasures such as rupees or gasha seeds.

Quickstart

Clicking on the Link icon in the toolbar will activate quickstart mode. When you click the "play" button, this will skip the normal boot-up sequence and jump directly into the game with Link at the specified position.

Save file 1 is automatically loaded. There must be valid save data in that slot for this to work. Simply creating a new file is enough - no need to do anything in it.

Caveats:

  • Dungeons are not properly initialized, meaning static objects like minecarts and magnet balls are not properly loaded, spinners don't have the correct default state, etc. You must enter the dungeon from its proper entrance to fix this for now.
  • If no save data exists in file slot 1, Weird Things will happen.

Setup

Windows

See the following video for setup instructions, or consult the readme for LynnaLab. This will set up both LynnaLab and oracles-disasm.

Ubuntu 24.04/Debian

  1. Install Dependencies:
    Install GTK and .NET Core Runtime
    sudo apt-get update
    sudo apt-get install -y libgtk-3-0 libgdiplus dotnet-runtime-8.0
    
  2. Download LynnaLab
  3. Extract LynnaLab:
    Open your terminal and navigate to your Downloads folder, then unzip the downloaded file.
    cd ~/Downloads
    unzip LynnaLab-v2.0.1-mac-linux.zip
    
  4. Launch LynnaLab:
    Navigate to the LynnaLab directory and run the application.
    cd ~/Downloads/LynnaLab-portable
    dotnet LynnaLab.dll
    

Notes

  • If you move the LynnaLab folder to a different location, adjust the paths accordingly.
  • These commands may not always be updated to use the latest version. Review as necessary.

Arch Linux

These commands will install the required dependencies, download LynnaLab and start it.

sudo pacman -Syu dotnet-runtime gtk3 wget unzip libgdiplus
mkdir ~/LynnaLab
cd ~/LynnaLab
wget https://github.com/Drenn1/LynnaLab/releases/download/v2.0.1/LynnaLab-v2.0.1-mac-linux.zip
unzip LynnaLab-v2.0.1-mac-linux.zip
sudo chmod -R a+rwx ./LynnaLab-portable
cd LynnaLab-portable
dotnet LynnaLab.dll

Then, consult setting up oracles-disasm#Mac/Linux to get the disassembly into a compileable state.

Notes

  • These commands may not always be updated to download the latest version. Review as necessary.

MacOS

  1. Install Homebrew (if not already installed):
    Open Terminal and install Homebrew with the following command.
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
  2. Install Dependencies:
    Use Homebrew to install GTK, XQuartz (provides X.Org Server), and .NET Core Runtime.
    brew install gtk+3
    brew install --cask xquartz
    brew install --cask dotnet-sdk
    
  3. Download LynnaLab
  4. Extract LynnaLab:
    Open Terminal and navigate to your Downloads folder, then unzip the downloaded file.
    cd ~/Downloads
    unzip LynnaLab-v2.0.1-mac-linux.zip
    
  5. Launch LynnaLab:
    Navigate to the LynnaLab directory and run the application.
    cd ~/Downloads/LynnaLab-portable
    dotnet LynnaLab.dll
    

Then, consult setting up oracles-disasm#Mac/Linux to get the disassembly into a compileable state.

Notes

  • If you have issues with LynnaLab crashing, ensure you have the latest version of all dependencies. Logging out and back in after installing XQuartz may be required.
  • If you move the LynnaLab folder to a different location, adjust the paths accordingly.
  • These commands may not always be updated to use the latest version. Review as necessary.