Password generator and decoder for NES Faxanadu
This project is a barebones password codec for the NES game Faxanadu. To create a password, call encode with the following parameters:
- Starting town (0-7) The town furthest from start whose priest you have visited
- title (0-15) The latest title (level) conferred on you
- elfring (0 or 1) Do you have the Ring of Elf?
- rubyring (0 or 1) Do you have the Ruby Ring?
- dworfring (0 or 1) Do you have the Ring of Dworf?
- demonring (0 or 1) Do you have the Demons Ring?
- elixir (0 or 1) Do you have an elixir?
- magicrod (0 or 1) Do you have the rod that increases magic power?
- pendant (0 or 1) Do you have the pendant that nerfs your sword?
- blackonyx (0 or 1) Do you have the Black Onyx shield?
- events (A list of accomplished feats). Each value should be 0 or 1.
- (unknown)
- (unknown)
- Pushed rock
- Killed Dworf
- Killed Rock Vaulter
- Activated Third Spring
- Activated Second Spring
- Activated First Spring
- weapon (0 to 3 or None) Equipped weapon
- 0 Hand dagger
- 1 Long sword
- 2 Giant blade
- 3 Dragon slayer
- armor (0 to 3 or None) Equipped armor
- 0 Leather armor
- 1 Studded mail
- 2 Full plate
- 3 Battle suit
- shield (0 to 3 or None) Equipped shield
- 0 Small shield
- 1 Large shield
- 2 Magic shield
- 3 Battle helmet
- magic (0 to 4 or None) Equipped magic
- 0 Deluge
- 1 Fire
- 2 Thunder
- 3 Death
- 4 Tilte
- item (0 to 31 or None) Readied item
- 0 Ring of Elf (cannot be used)
- 1 Ruby Ring (cannot be used)
- 2 Ring of Dworf (cannot be used)
- 3 Demons Ring (cannot be used)
- 4 Ace Key
- 5 King Key
- 6 Queen Key
- 7 Jack Key
- 8 Joker Key
- 9 Mattock
- 10 Rod (cannot be used)
- 11 Crystal (cannot be used)
- 12 Lamp (cannot be used)
- 13 Hour Glass
- 14 Book (cannot be used)
- 15 Wing Boots
- 16 Red Potion
- 17 Black Potion (cannot be used)
- 18 Elixir (cannot be used as an item)
- 19 Pendant (cannot be used)
- 20 Black Onyx (cannot be used)
- 21 Fire Crystal (cannot be used)
- 22-31 are not defined
- weapons List of weapons
- List is up to 4 integers between 0 and 3. See equipped weapon for values
- armors List of armors
- List is up to 4 integers between 0 and 3. See equipped armor for values
- shields List of shields
- List is up to 4 integers between 0 and 3. See equipped shield for values
- magics List of magics
- List is up to 4 integers between 0 and 4. See equipped magic for values
- items List of items
- List is up to 8 integers between 0 and 31. See equipped item for values
Example:
print encode(
0, # Starting town
15, # Lord
1, # Elf
1, # Ruby
1, # Dworf
1, # Demons
1, # Elixir
1, # Rod
0, # No pendant
1, # Black Onyx
[0,0,1,0,1,1,1,1], # Pushed rock, killed rock vaulter, opened all springs
3, # Dragon Slayer
3, # Battle Suit
3, # Battle Helmet
4, # Tilte
None, # No item
[0,1,2], # Three weaker swords
[0,1,2], # Three weaker armors
[0,1,2], # Three weaker shields
[0,1,2,3], # 4 previous magics
[6,7,16]) # Queen key, Jack key, Red potion
A given password may also be decoded by calling decode(password_string, descriptive_tag).
Example:
decode("tqz8Mv?9zsZjMaAqI0yTg", "Black Onyx")