Skip to content

User Guide

sornerol edited this page Apr 7, 2019 · 7 revisions

Purpose of KDL Practice Script

This practice script is used to help in learning RNG manipulation techniques for Kirby's Dream Land. I plan to add more features to assist with practicing other tricks in the game as well.

Prerequisites

To use KDL Practice Script, you'll need:

  • The latest version of BizHawk.
  • Kirby's Dream Land ROM (use your favorite search engine)

The script works with any valid Japanese or English Kirby's Dream Land ROM

Installation

  1. Navigate to the folder where BizHawk is stored on your computer.
  2. Place the kdl_practice.lua script inside the Lua subfolder along with the kdl_checkpoints.txt file.
  3. (Optional) I've included a set of savestates for use in the Gambatte core. If you wish to use them, copy the contents of the savestates folder into [BizHawk directory]\Gameboy\State.

Note: If you're using my savestates, BizHawk will only recognize them if your KDL ROM is named Kirby's Dream Land (USA, Europe). You may need to rename your KDL ROM if it's named something else.

Loading the script

  1. Open your Kirby's Dream Land ROM.
  2. In BizHawk, go to Tools > Lua Console.
  3. In the Lua Console window, click the Open icon. Choose kdl_practice.lua.

Note: Starting with v1.1.0, it is no longer necessary to load the KDL ROM before the practice script. The script will function properly regardless of what order the ROM and script are loaded in.

Working with the script

KDL Practice Script in BizHawk

The overlay will show how close you are to an RNG checkpoint (A). It also shows how many times the RNG seed has changed since the game started (B). Finally, the overlay will turn red when Kirby is able to spit. This is useful for practicing TAS spits.

The script relies on BizHawk's framecount to determine how to find the next seed in the RNG progression, so it is important to use a hard reset/core reboot when resetting to the beginning. Using a soft reset (A+B+Sel+Start) will cause the script to crash (see below for recovering from a crash).

Setting checkpoints

The script reads checkpoints from the kdl_checkpoints.txt file in BizHawk's Lua subfolder. Each checkpoint uses two lines:

<seed_number>
<checkpoint_description>

seed_number corresponds to the "RNG Seed #" displayed on the overlay. checkpoint_description is the text displayed on screen for that checkpoint.

I have included the checkpoints I use for practicing RNG manipulation. Since your playstyle is probably different than mine, you may want to find checkpoints that work within the route you already use. To set your own checkpoints, open up kdl_checkpoints.txt in your favorite text editor. Checkpoints should be entered in numerical order. After you save the checkpoints file, you'll need to reload the script (click the Reload Script button in the Lua Console). If you decide to change any checkpoints, I recommend making a backup of kdl_checkpoints.txt in case you ever need to revert to the default checkpoints.

Error recovery

BizHawk's Lua Console The practice script still contains bugs that may make it crash. These crashes usually happen as a result of using savestates or the rewind functionality of BizHawk. In most cases, you can click the Reload Script or Toggle Script icon in the Lua Console window to restart the script. If that doesn't work, hard reset the game, then reload the script as above. If that still doesn't work, restart BizHawk and reload KDL and the practice script.

If you experience problems with the script, please be sure to submit an issue so I can look into it.