Cheat Engine

A 3-post collection

A programmer's ethical dilemma

Not everything is black and white, not even when it comes to software programming. Way back around April 24th I asked the following question on Q&A for coders site Stack Overflow:

Can it be morally defensible to release a program which games an MMORPG?

I had written some code for a macro framework to automate actions in an up and coming MMORPG (something I enjoy), and I wanted to see if the community could contribute any constructive purpose for it, or if it was strictly evil™. Unfortunately I had my question worded "Is it" rather than "Can it be" when 99% of the answers struck, taking several answers quite awry. Still the input on commercialization was thorough, and the overall consensus on releasing a program of this nature? Bad thing.

In fact given the newness of the MMORPG I could only conceive of one scenario that could be morally defensible: A preemptive strike, a free, public release to preclude a worse one down the road.

Of course then you realize that this has all the ethical implication of pulling the trigger yourself. You may believe with certainty that an uneven playing field is inevitable, but can that itself justify action?

It may be very prudent to operate within a system of belief to affect change. Gentle nudges, progress at the pace of prevalent perception (I'm a fan of alliteration). Nuclear disarmament before cessation. Fight to end fighting!

It's a fairly rational approach, and I wasn't sure if there could be any other, until I encountered this:

We but mirror the world. All the tendencies present in the outer world are to be found in the world of our body. If we could change ourselves, the tendencies in the world would also change. As a man changes his own nature, so does the attitude of the world change towards him. This is the divine mystery supreme. A wonderful thing it is and the source of our happiness. We need not wait to see what others do.Mahatma Gandhi, 1913

Now there's an interesting concept. Being the change, I would not harm another in any circumstance—and quite obviously if everyone shared this conviction there would be no violence. Yet everyone does not, and more than a few people would reject my idealism, respond with belligerence to my priorities. It's understandable.


Still I find this latter approach the most resonant personally, and observing history, it appears to have great strength. I'm not yet sure what to do with my code, but I chose not to release it preemptively, I chose to be the change I wished to see in the world.


Gaming the game: Cheat Engine, AutoHotkey, and Jedi Academy

Pretending to be a Jedi can be a lot of fun; it makes you feel awesome. But what's even more fun is writing code to actually be more awesome. And that, my friend, is the most awesome thing of all.

Which brings us to Jedi Academy. If you fall, you need to get up. If you're force choked, you must retaliate or be strangled to death. It's predictable, it's repetitious, and you could be a whole lot more awesome at it. Why press a combination of buttons to execute a special move when you could use only one, with complete reliability? It's like what a programmable controller did for my Mortal Kombat prowess, with an even faster reaction time.

programmable controller

This type of botting (gamer augmentation?) is a bit more like WoWGlider than an aimbot or trainer, but they're all fairly similar. It's essentially interaction with the game's memory that makes this type of coding difficult, but with the right tools and some good examples you can be on your way.

Cheat Engine

The most important tool in your arsenal is the memory scanner (and more), Cheat Engine. Knowing the circumstances of your character, opponents, and environment means reading the game's memory, and with CE you can find the appropriate memory addresses for things such as health, position, and action/animation.

I tested a lot of memory scanners, and CE was easily the most powerful and useful, capable of many advanced features. To get your foot in the door using CE try the built-in tutorial, which is also explained on the forum. Becoming truly proficient with CE is hard work, you'll need to reason about data types and arrays of structures representing characters and items, learn to master pointer scanning and pointer integrity testing, and certainly remember to save your work. You might need to break out Hex Workshop to compare memory dumps: "Ah, this value is the same for each tauntaun, and a different value is the same for each health pack. Must be entity type!"


Of course you'll need a language/program to code in. I chose AutoHotkey because it's designed for sending mouse and keyboard commands (as well as manipulating windows, controls, and plenty of other things) and I'm familiar with it. Some further information:

  • it's very lightweight (<2mB)
  • it's phenomenally well documented (in fact, the best I've seen!)
  • scripts aren't natively compiled, but should be as fast as you'll need
  • scripts can be bundled with AutoHotkey to make stand-alone executables (.exe)
  • Dll support, such as the standard Windows API, via DllCall
  • Graphical user interface (GUI) support
  • Large community

Now AutoHotkey doesn't have built-in memory management functions, but that's why I wrote my own.

Jedi Academy

Jedi kickin' ass

Current features

  • Allow you to execute a special move (lunge attack, flip attack, and cartwheel) with one keypress, while retaining your character's movement. (This was trickier than you'd think, and it's really cool.)
  • Allow you to hold down a button for mindtrick, and have your Jedi confuse whomever you look at, without wasting force if they're already tricked. (This is really fun and makes specifically mind trick level 1 quite powerful.) The already-tricked routine needs some work though, see code.
  • Automatically kill whomever you look at if you so desire.
  • Automatically retaliate with force pull if choked.
  • Automatically jump up if knocked down.

Partially implemented

  • Instantly kill an enemy with a force choke smash into the ground.
  • Perform a sideways cartwheel attack but actually fly forward, not left or right.

Easily added

  • Make dynamic doors disappear by changing their item type and walking on through!
  • Change item types so health packs give you grenades, etc.
  • Move certain level elements by changing their coordinates. (Unfortunately only works on already animating things, like the rather wickedly deadly vent fan at the intro of the prisoner rescue mission. I'm sure it's possible to make it work on any entity somehow.)

Crazy ideas

  • Perform a flip attack but spin around to actually continue facing forward.
  • Determine the most deadly attacks in the Jedi's arsenal by recording average duration of animation sequences vs. damage inflicted.
  • Automatically scan for certain nearby items, turn to face, perform an action. For example, automatically force pulling nearby health packs and grenades, without interrupting the player.
  • Automatically saber throw accurately into groups of enemies (okay, this one is another level up in complexity).

Let's have it!

Download the code files and install AutoHotkey. Then edit some configuration values at the top of the main script, and run it. After that your Jedi Academy game should be "enhanced".

If you have trouble or do anything really cool with it let me know in the comments.


The Elder Scrolls IV: Oblivion Leveling Assistant for optimal stat gain

I've been playing Oblivion recently, and it's been fun, but I was slightly irritated with the leveling system, so I fixed it.

How (power?) leveling works in Oblivion

You select 7 "major skills" and the rest become "minor". Skills advance as you use them. Major skills are no different from minor except for an initial bonus and every 10 major skillpoints gained is a new level, at which point you must sleep in a bed to level up and continue gaining skillpoints. Leveling up has you select three of your stats to increase by respective bonuses, but here's the catch: the bonus depends on your advancement in the three skills related to the stat.

This leads to a sort of reversal of priorities. Your "major skills" are more of the opposite, as you postpone them, and thus leveling, to achieve the necessary gains in "minor" skills to maximize the stat bonus when you do finally level. Selecting your least naturally used skills as major skills is in fact to your advantage. A bit strange, but not a damper on the fun—you can, after all, go all out in the 14 other skills without fear of accidentally leveling and botching your stat bonuses.

There is quite an annoyance with this approach though. Once you reach the maximum +5 bonus in a stat, skillgain in that area is no longer worth your time until you level up (you'd only be advancing a skill, instead of a skill and a stat) and aside from gratuitous number keeping, there's no way to see exactly how close you are aside from leveling up, noting the advancement screen, and then restoring to an earlier saved game. Something which becomes extremely tedious considering you must advance to just prior to leveling, save, travel to a bed, use a skill to reach the level point, sleep, level up, pick 3 stats and confirm so you can get to open the main menu, and then restore to your saved game. An annoyance until now anyways!

Enter: Oblivion Leveling Assistant

Utilizing the ever helpful and entertaining Cheat Engine, I put together a little AutoHotkey program which displays the current points you have toward a stat since your last level. It takes 2 skillpoints for a +1 stat bonus, and +5 is the maximum, so all you need to do is focus on reaching a value of 10 (or more, but don't waste too many) in the three stats you would like to apply the bonuses to before you gain that last major skillpoint, and that's it. Be sure to put those 10 required major skillpoints toward the stats you'll be selecting as well, or you'll be doing extra work!

The Elder Scrolls IV: Oblivion Leveling Assistant

The Elder Scrolls IV: Oblivion Leveling Assistant Compact Mode

Download Oblivion Leveling Assistant (exe) or Oblivion Leveling Assistant AHK Scripts (zip) (scripts require AutoHotkey, and are equal in performance).

This was a tricky update, so if clarification is needed ask me in the comments.

8 May 2008 There are at least a few mods for Oblivion which overhaul the system to something more acceptable, these might be a lot more useful so you should check them out. (Especially if you play fullscreen and/or use a single display.) Take a look at other mods as well, there's sure to be some you'll consider essential.

I also only just discovered the UESPWiki and its wealth of Oblivion and Elder Scrolls information (including much more in-depth leveling guides), so hopefully I've learned GameFAQs is no longer the one-stop-shop in this new wiki world. 8 May 2008