What Is the Code for the Chest on the Ghost Ship in "The Legend of Dragoon"?

In "The Legend of Dragoon" the code for the treasure chest in the phantom ship is randomized between games, so there is no set code. It is a puzzle that must be solved from information found elsewhere on the ship.

To crack the code, players must go to the area below the deck of the ship and speak to the four floating souls found there. Each soul will give one digit. From there, the solution to the puzzle is a matter of trial and error. The player must enter three of these digits into the chest, and if one digit is in the right place, the player will get a "..." response. If none of the digits are in the correct place, the player will be informed of how many chances are left.

The counter can be reset by speaking to the four spirits again to get four new digits. The number of attempts to open the chest changes the contents when it is opened, and the puzzle can be solved multiple times to obtain all of the possible prizes.