Automate Steam Games

Full Onion Equipments With Two-Sword Full Onion Equipments With Two-Sword

Applcable Automation For All Steam Games Based on X11 Systems

The approach is based on X11, so it means ALL games should be able to be automated in a similar way as long as they are rendered in X11 systems.

This post talks about the automation for the Steam pixel remaster (PR) version of FF3 (Finaly Fantasy III). The solution could be used to collect experience credits of level and onion equipments. I used this approach to help me get ALL onion equipments and 4 characters Lv. 99.

If you already know what is X11, you may refer to this gist directly for the solution.

Does Your System is a X11-based System?

Because this solution only works for X11-based systems, you may want to know if your system is a X11 system. By default Ubuntu is a system supporting X11. See the corresponding wikipedia of X11 or say X Window System.

In short, a X window system uses a client-server model: an X server communicates with various X client programs. On Ubuntu, Steam renders the game as an X client (which is a part of the whole X window system). It means that tools supporting the manipulation of the corresponding X server e.g. xdotool should help automate.

If you are a Mac user, it depends on which version of OS X you are currently using. 10.02 (Jaguar), 10.07 (Lion), and 10.8 (Mountain Lion) support X11 in different extends separately. You may refer to this wikipedia page to see the compatibility. Theoretically, 10.5, 10.6, and 10.7 could adapt this xdotool solution directly, and the other versioins of OS X may possiblly work with big or minor issues. I did not try them practically. It will be great if you don't mind to share your experience with the community.

If you are a Windows user, theoretically you can have this approach if you install the corresponding X server in your system, and try to "cheat" Steam to render the games on your X client window. I did not try this approach. I will appreciate if you have some experience willing to share with us.

For Linux users, I launch the game, FF III, with the compatibility layer of Proton-GE (version Proton-6.21-GE-2), to make it run on my Linux system. The xdotool works like a charm.

xdotool and Ubuntu as Example

This gist is the code snippet based on xdotool and I have used it with my Ubuntu Mate 18.04. Most of modern Linux desktop distributions support X11 by default, e.g. Debian, Fedora, and more. That being said, the same code snippet and approach could be applicable to those distributions directly.

The Good, the Bad, and the Ugly - Some Usage Tips

When apply the automation to FF III, here are some tips worthy noticing:

Share Your Automation for Different Scenarios

The automation I used for FF III is still plain, simple and specific to FF III. In theory a similar xdotool approach should automate every possible scenarios of games because it emulates every possible inputs as yours. It only needs to be customized according to different inputs of games. You are more than welcome to share your automation for different scenarios of FF III, or for other games with others by creating a pull request or sending patches to me.

Happy automation!!

Onion Knight With Lv. 99 Onion Knight With Lv. 99