Wizardry 1 TAS by TaoTao

Wizardry is very interesting game. Of course, it is also true for TASers!

Essentials

  • Emulator used: FCEU 0.98.28
  • Aims for fastest time.
  • Manipulates luck.
Note: The enormous re-record count mainly comes from my bots' trial and error. I think the count of re-records made by me (not my bots) is about 1000 at most.

About the game

Wizardry, a good old RPG-style game, is so popular that it won't need many explanation. The goal of the game is to recover an amulet from an evil wizard, Werdna. You create various characters, choosing a race, an alignment, a job, etc. And you organize a party. The party will explore Werdna's maze many times, and they will gain more skills, and more powerful items. Finally, they will beat Werdna and be rewarded for recovering the amulet. But be careful, as there are evil monsters and traps in the maze.

About the run

For TASers, this game is *extreme* luck-manipulating game. It is indeed a fight against random numbers and lags.

Run overview

  • I reset the game to skip a logo. And I start the game.
  • I create a Thief who has 18 Strength.
  • I pick up the Thief and the Cleric who exists from the start of the game. and organize a party.
  • I go to an elevator on B1F, and go down to B4F.
  • I go to a room and beat a monster, and open a chest to trigger a Teleporter trap. The Teleporter brings me to the second elevator. I go down to B9F with the elevator.
  • I encounter a group of monsters, because I was obliged to raise an alarm on B4F. But they are friendly, so I just leave without fighting.
  • I go to a room and beat a monster by Cleric's dispell, and open a chest. A trap is Mage's Misery and it doesn't affect my party at all. I find a Epee of Excellence, a Ring of Movement, a Dagger of Thieves from the chest.
  • The Thief equips the Epee of Excellence, and invokes the special power of Dagger of Thieves. Now, the Thief is a Ninja.
  • The Cleric equips the Ring of Movement.
  • I turn to south and encounter a group of monsters. I use Ring of Movement and teleport my party to the front of Werdna's room.
  • I break into Werdna's room and surprise Werdna and his guests. The Ninja attacks Werdna and decapitates him. The Cleric dispells a Vampire Lord. And, at the next turn, the Cleric dispells a Vampire. Now, Werdna and his guests are beaten. I find the amulet!
  • I use the amulet and teleport up 10 floors, and return to the castle. The Ninja is honored for recovering the amulet. The Cleric... oh, he is drowned in the castle moat :)

Run detail

Of course, luck manipulation is mandatory to achieve a fast run in this game. The 16-bit random number $40 controls over the luck. The random number increases every frame, and it is affected a little by the player's input. So, I made a number of bots with Lua scripting to find optimal solutions. And I analyzed some assembly codes to understand the game.
Basically, I manipulate luck by trial-and-error method. I let my bots generate random inputs, and bots continue the trials until they find the optimal solutions.
Lags often occur in this game because the random number affects the flow of codes. For example, when you go up/down to another floor, some lags can occur (probably, they are caused by the code initializing floor data). I tried avoiding lag as possible as I can, using bots.
In NES version, we can't create a Ninja/Lord at the start of the game. When we create a new character, we can get at most 29 extra points.
Teleporter never changes the floor. So I need a Ring of Movement to teleport to B10F.
The Ninja needs Epee of Excellence to hit Werdna. There is roughly a 2% chance that he decapitates Werdna with the weapon.
There is roughly a 5% chance that the Cleric dispells Vampire Lord or Vampire.
The Thief who exists from the start of the game is useless. To hit Werdna, the Ninja (changed from the Thief) must have 17 or 18 Strength and Epee of Excellence.
I don't touch the game switches. I think the wire-frame display would not be familiar to the users of NES version. And disabling music or sound would make the run tasteless.

luck manipulation

The random number is changed by the routines which interact with the random number. Furthermore, the random number continues to be incremented while the game are waiting for NMI at every frame. So, the clock cycles needed by the codes executed at every frame affect the random number. (note: The NMI routine doesn't use RTI to return. It returns with RTS, restoring stack pointer from memory)
That's why player's inputs affect the random number. Inputs of direction keys are processed in the NMI routine, and the needed clock cycles depend on whether a player made inputs or not. So the random number changes by player's inputs. But, the random number changes only a little by a input at one frame, so we often need to make inputs for a certain period to manipulate luck.

Possible improvements

Probably, this run could be improved. But more thorough analysis may be needed to achieve it. I used bots to manipulate luck, but the method is still elementary. So, there may be some rooms for a little improvement here and there.
Especially, I wasted about 60 frames when I get items from the chest on B9F. I had to wait for some time to get a Dagger of Thieves. And I wanted the Thief to have a Ring of Movement, but I could not help giving up it to get a Dagger of Thieves without a large loss. So an equipment takes time a bit more. In this scene, luck maniputation is so difficult that more precise planning would be required.
I considered a new strategy that I pick up a Sword of Slicing on B4F and a Scroll of Darkness on B9F. With Scroll of Darkness, there is roughly a 0.05% chance that a Ninja decapitate Werdna even if he has only 15 or fewer Strength. So, with this strategy, we no longer need to create any character. But for now, I can't tell whether this strategy really saves time. Thief can't equip Sword of Slicing, so we have to equip twice and it takes time unexpectedly. And it takes time a bit more to beat Werdna's party.
Enjoy!

mmbossman: I personally don't think this movie is entertaining, but it seems I am in the minority. Accepting for publication.
ShinyDoofy: Processing...