gaming

A 3-post collection

Coders: better gamers than you? Take FreeSpace 2

(Because we cheat!) Well that's the theory anyway. Except then we stop gaming because we're bored and we go back to coding our cheats.

So I recently dusted off the game FreeSpace 2. Still fantastic, and thanks to the FreeSpace 2 Source Code Project it has new and pretty graphics and mods. Metacritic thinks it's awesome too, scoring a 91… if that means anything.

MediaVP updated graphics screenshot, enemy ship targeted at 367 meters.

In a space combat sim, deftness and accuracy are your best friends. Unfortunately in FreeSpace it didn't seem that you could have both. With the sensitivity maxed you could pivot, bank, and pitch with maximum speed, but your target would bounce around your reticle, and you'd miss most of your shots.

Perhaps a very nice gamepad joystick would register a wider range of the slower, gentler movements. Mine certainly didn't, and that might be the most common experience. A standard computer mouse absolutely doesn't work, because there's no "center" to return to: you're constantly turning.

I of course thought, "Ha ha! I can fix this" and turned toward AutoHotkey. I was going to code an ugly hack, and have a button or joystick open the key configuration and adjust the sensitivity in a lightning quick second, preserving the state of my other buttons and ship movement.

That is until I spotted an example script in the very awesome AutoHotkey documentation for using a joystick as a mouse. Programmatically controlled sensitivity, some significant rewriting, and yeah: dominating.

I have one joystick for movement, the other to adjust the sensitivity/speed of that movement for excellent ship tracking, and a button which brings it to the absolute maximum for rapid orientation changes. Also many other intuitive combinations for interacting with enemy/friendly/escort ships such as targeting, targeting attacker, and so forth.

Here's the codez.

Discussion

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!"

AutoHotkey

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.

Discussion

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

Discussion