Chris Shinnimin

Final Fantasy Bot Project Journal

Final Fantasy Bot Project Journal

A fun personal project to learn LLMs and React, and rekindle my love of a favourite childhood game.

September 2, 2025

Prev | Project Journal Entries | Github | Next

A Mission to Learn

It is the fall of 2025 and I am currently on a job search. I've spent the past 6 years of my career in the Salesforce ecosystem. Many of the skills I have built are general and transferrable to working with any technology. I built skills in leadership, people management, Agile project management, scalable design and architecture, mentorship, conflict resolution, project planning, thorough documentation, reusability patterns and more. But a large portion of my time and energy was also spent learning skills very specific to Salesforce. Because that energy was not available for other pursuits, it's time to brush up on some other widely accepted cloud / SaaS technologies. I've identified two areas of learning that I want to target first with this project. First, I want to learn more about LLMs and how to leverage them in specific applications - I want to build an agent. Second, I want to increase my comfort level with React. Although there are many similar frameworks out there, React is widely used and a good starting point for me to brush up on the more common web development tools.

The Vision

I wanted to bring these two learning objectives together with something fun to kindle the passion for development I've had since I was ten years old. My love for childhood video games was likely a precursor to my love of computer science, so I am going right back to the start. My favourite childhood game was Final Fantasy for the Nintendo Entertainment System (NES). My vision is to have the ability to play the game on the open source FCEUX emulator (legally of course, by dumping the ROM from my physical cartridge) with a second "Final Fantasy Bot" application (I'll call it the "bot app" for convenience going forward) open on another screen. The bot app will have full context on what is happening in the game and will interact with an LLM that has been trained on Final Fantasy NES guides available for free on the internet. The bot app will provide a few services described next.

Bot Service 1: Tips

The bot app will provide advice on what to do next based on what is happening in the game. This might mean advice on where the player should explore next, or if the player is in a battle, advice on how to best defeat the enemies.

Bot Service 2: Automate Monotonous Tasks

Final Fantasy has some annoying, monotonous, time consuming tasks that detract from the game experience. Two notable examples:

  • Every time a character gets poisoned, the game always reorders the party so that the poisioned members are in the back. The player must navigate through the menu to use potions to cure the poison, then also manually reorder the party members back to their original positions. This happens hundreds of times in a playthrough. Sure would be nice if a bot could just do all this for us! This could be accomplished by finding the memory locations that store potion counts, decrementing the potion count so as not to cheat, zeroing the poison flag in memory for that character, and putting the characters back in the original order.
  • Heal potions only give a character 30 HP (Hit Points) back. Later in the game when characters have hundreds of hit points, dozens of potions need to be used to heal characters back to a stable level, and the original NES game makes you do that one potion at a time. Brutal! Another great task for the bot - use of multiple potions instantaneously!

Bot Service 3: Cheat

For a little fun, let's see what else we can get the bot to do for us. Maybe ask for stronger weapons and armor than we should normally be allowed early in the game, change a characters class dynamically (normally a characters class is set at the beginning of a playthrough and is unchangeable thereafter), or just make ourselves invincible. Who knows what we might be able to figure out how to do.

The How

In order to accomplish all of this, the bot app will need the following.

The ability to read and write from the NES memory

  • This will be accomplished with LUA scripts. FCEUX has the capability of allowing LUA scripts to read and write from game memory. For the bot app to read memory, the script will need to dump the RAM. For the bot app to write to memory, the LUA script will need to "listen" for additonal LUA scripts to process. The LLM will create the scripts required to update the memory when given a task.

Knowledge of what memory values at certain addresses mean

  • I'm not sure yet how I will best give the LLM the required context on this. I will have to do some reverse engineering of the game to find and document important memory addresses with which to train the LLM.

General, broad knowledge of how to play through the game

  • For this task I will need to train the LLM on as many free online walkthroughs as I can find. In addition I plan to fill in any gaps with my own knowledge of this game (I think I played it at least a hundred times when I was younger!).

Project Journal

Prev | Github | Next