Category Archives: Gaming

Deus Ex Modding

I’ve had the itch to play Deus Ex increasingly over the last few years. The first 10 years since the game was released, I repeatedly and thoroughly played it (as you can tell from my guide), and after roughly 10 full playthroughs, had kinda burned myself out on what was my favorite game. đŸ«€ So, I hadn’t touched it in the last 10 years other than for testing a few things and capturing gameplay.

But I finally gave in recently and started researching what the best mods to use were now. I liked Shifter back in the day since it made the game feel a bit fresher. But as I was craving a vanilla experience, I realized Shifter just added way too much beyond the core gameplay: new weapons, skill systems, augs, and lots of dubious or silly features. Then there’s Revision, which is all the rage right now, but again, I feel like it tries to do too much. I hear there’s a “vanilla mode”, but why would I bother with all of that to just play the original game. Maybe I’ll give it a try in the future.

HDTP (High Definition Texture Pack) hadn’t changed much since I last played with it. There are some good models here, but I really don’t like how the new character models look—they’re just too different and kinda amateur. Seems they are a polarizing feature as the creators went through the trouble of having an in-game menu to choose if you want to use the new character models or not. They state in the readme file that the new character models “were so damn contentious. Seriously, don’t get me started.”

I actually liked a lot more this little texture upscale mod that does faithful AI upscales of all the actor (anything placed in the world) textures. I wish someone would do the same for the world textures. As I realized when I did my AI upscale of the Deus Ex poster and some other classic memes, AI is quite good at maintaining the original look of the image and just adding in details.

I also tried New Vision—a high-res world texture pack—but didn’t really like it. It suffers from a combination of amateur work and being too detailed for such low-poly environments—you know when you have a giant flat wall, it’s really easy to see the texture looping over if it’s too detailed. Also, like half the filesize of this mod is taken up by high-res animated textures, they’re essentially videos but without any temporal compression, just each frame compressed on its own—extremely inefficient. Some of the signage is decent, though (although a lot of the Chinese text for Hong Kong is different and wrong—interesting choice). I starting ripping them out of the UTX files to use separately, but it’s kinda tedious to sort through.

And finally, I wanted to try a new audio renderer as well, in case I could get better sound quality from my remastered soundtrack (the Galaxy renderer is limited to 8-bit mod samples). So, I put an OpenAL renderer in for a few levels. But I found that it has several issues like the music getting stuck a lot.

Well, when I finally decided on what mods to use—partial HDTP (everything but characters), partial New Vision (signage), plus actor texture upscales and the requisite Deus Exe launcher and DirectX10 renderer—I fired up the game and was surprised to find that it still really holds up. After not playing for so long, I had forgotten a lot of the strategies that I would invariably employ in any given situation, freeing me to experiment with new ones. It’s really quite fun.

Lingering Troubles

But… there’s a few things that still bothered me (you knew it was coming). The first issue I had was the HUD UI is really friggin bright. For a game that takes place entirely at night, having an interface that’s any bit brighter than just-barely-visible is like a flashbang, especially to my old eyes. I always use the “Ninja” UI theme since it’s the darkest (and least gaudy), but even that is too much. And the default theme is even worse. I compared some screenshots from 2002 and now, and the best I can tell is that the brightness slider overly affects the HUD brightness (it really shouldn’t affect it at all). So, cranking up the brightness to see the world better also has the unintended effect of making the HUD too bright.

Then there’s the codes and logins. It’s something I’ve complained about forever. Who the heck wants to stop every time they come to a computer or keypad so that they can look up if they have the login or code in their notes, then move their hands to type in the login, realize they’re misspelling it, go back to their notes and just copy the login, then paste the login and realize they now forget what the password was. And all this in the dark by the way, because it’s a dark game. It’s an absolute chore.

And finally, the bug with Paul. I remember the first many times I played the game that Paul always died. I’d clear out the Ton and Paul would say he’ll be fine, but then next thing I know he’s dead. I thought that’s just how the game was until I tried Shifter and realized that my habit of going out the window to snipe from the roof was killing Paul every time. And now, without Shifter, I had to make the difficult choice of not sniping from the roof or killing Paul. Fine… I’ll save Paul and just walk out the front door… grumble

A Mod of My Own

So, I decided to start poking around with the game to see if I could mod it myself. I was thinking about making a system that would allow the player to automatically learn and enter codes and logins as they found them; Human Revolution does something similar as far as I can remember (dang, I should play that again, too). But to start, I needed to know with certainty every code and login in the game. This is a rather difficult proposition. It’s actually very tedious to hunt down all the keypads, computers, and ATMs in UnrealEd, so I gave up on that immediately. There are a couple package viewers for Unreal 1 packages (which includes Deus Ex map files), UTPT and UE Explorer. But they both have sizable issues for this sort of thing, and again, you have to open and search through every map, so it’s still pretty high on the tedium scale.

I actually decided to instead use AI to help me figure out the package format and write a script to search through all the maps at once. However, the documentation for Unreal 1 packages isn’t all that great anymore—this is the best I could find—so there was still an awful lot of reverse engineering and trial-and-error involved. CompactIndexes sure are an interesting thing! 😝 I uploaded some of the code and documentation I created to Github in case that aids anyone (or just simply helps preserve the information). In the end, I came up with a list of 129 unique and knowable codes from the game. (There are about 235 unique codes altogether, but you can’t find almost half of them. Also, two codes are given as partials, and I found out that one code is actually a bug.)

But then came the part where I actually had to write some new code for the game. I had toyed around with this a couple years ago to add a few console commands, but that was relatively simple and I just used UnrealEd to compile it. However, my planned changes would involve many script files and it would again be too tedious to work with these in UnrealEd’s little class hierarchy browser. Using UCC seemed like the obvious choice, although I had many issues getting it setup.

First of all, UCC won’t decompile (ucc batchexport) the Deus Ex scripts without giving an error a few scripts in. You actually have to use the “Export All” button in UnrealEd to get a clean decompile of all the scripts. You aren’t asked where UnrealEd will export to or where UCC will compile from either, everything is pooped out and then read from Deus Ex’s root with directories for each package—this makes keeping your game and development environments separate a real hassle. If you want UCC to recompile a certain package, you have to first delete the package from the System directory so it knows, you can’t otherwise choose certain packages. Also, both UnrealEd and UCC check the DeusEx.ini to know which packages ([Editor.EditorEngine] > EditPackages) and where to load from ([Core.System] > Paths). It’s important to check these in case (for example in my case), HDTP has put an overriding DeusEx.u package in a separate path that you don’t know about. Another curious thing that I stumbled on for a while is that UCC takes scripts with defaultproperties defined at the bottom while UnrealEd does not—it will error at compile if you have default properties.

But once I got all of that figured out, it was mostly smooth sailing writing the code for the  mod. The AI I was using (Claude Code Sonnet 4.5) made quick work of understanding the class inheritance hierarchy, UnrealScript’s antiquated quirks, and what any given script was doing. I just had to guide it onto what changes to actually make and how best to do them, and then proofread what it produced to make sure there wasn’t anything stupid going on (as you do generally with LLMs these days). What would have been previously too overwhelming for me with my health the way it is, instead took about four maxed out sessions with Claude. I still had to figure out the new UI textures on my own, though.

Here’s a demo video of the new code learning system:

Finishing the Mod

After all the work it was to add the new code learning system, it was refreshingly simple to change the HUD theme. You just open up one of the ColorThemeHUD_*.uc scripts and change what you like, then add it to the CreateColorThemeManager() list in DeusExPlayer.uc. So, I did a minor modification to the Ninja HUD theme to make it much darker, resulting in a 60% decrease in luminance for HUD background textures—so much easier on the eyes. I did find a little issue, though, later when I realized that the HUD themes are saved in the savegames. So, I had to add a little utility to reload the themes in the “Colors” settings menu. Otherwise, you couldn’t use the new theme in an existing save—not cool.

Here’s a comparison of the default HUD themes and my new darker one:

One of the main modding difficulties for Deus Ex is that there’s no modularity. Basically every mod needs to make changes to the DeusEx.u package because almost all the main game logic is in there and UCC needs to see all the scripts to even compile. It would be great if someone could make a mod loader that would allow different packages to be loaded and extend/override existing classes, but I don’t know if the engine or compiler could support it quite frankly.

But what I’m getting at is that if you want features from multiple mods, you have to manually merge them together. And being that I wanted a few of the fixes from Shifter, that’s what I had to do. I was fairly conservative about the fixes I included; I only wanted ones that fixed major general bugs or missions bugs. So, I left any exploits or weird glitches intact—I don’t feel like it’s my place to decide for anyone whether or not they should use an exploit. Sometimes I use the inventory overlap exploit anyways. 😄 (Don’t ask where I put that vial of ambrosia, Dowd!) Copying the fixes was a little bit cumbersome, but most of them are just in the MissionXX.uc scripts anyways.

But then I also went through the process of adding HDTP support to the mod, which was also a bit tricky. Shifter’s support for HDTP is rather complex with special functions for loading and unloading HDTP actors on-the-fly depending on if it’s enabled or not. I thought I could simplify this by just making a version with and a version without support for HDTP—only a couple of the HDTP scripts overlap with my modded ones. But it still turned out to be a bit of a chore with moving packages and scripts around so that UCC can find them all. But it does work.

I’ve tested a fair amount of the game with the mod, and although I’m sure I’ll find bugs once I play through it properly, I feel like I can release what I already have. So, you can download the mod from this page if you are so inclined. I’m merely calling it SnakeMod since I can’t think of anything clever. But if a better name comes to me, I’ll change it.

There’s another mod for Deus Ex called Transcended that has a very similar focus and is more feature-rich. But yet, it doesn’t have the same improvements my mod does and does fix lots of quirks and exploits which I don’t want to. It’s definitely a good alternative, though, and perhaps I might merge some of the changes with my own mod (or vice versa?) at some other time.

HDR

I was also playing around with the DirectX 1o renderer for the game a bit as I was in the midst of modding. There’s a setting to turn off “Classic Lighting” and turn on HDR lighting. The HDR makes scenes have more contrast as well as adding some tonemapping and bloom on lights. However, the original author made some dubious choices about how the adaptive luminance should work. They gave it an absurdly long recovery time (like 30 seconds) that leaves you blinded for at least 10 seconds after looking at a bright light—basically unplayable. And also the range of the adaptation wasn’t limited at all and could get way too dark.

There’s a small mod to the HDR listed on PCGamingWiki that tries to fix these issues by just disabling the adaptive luminance altogether, but that leaves some bright scenes completely blown out and dark scenes pitch black. So, I tried to fix the original intent of the HDR by making a few more overarching changes. For one, the range of luminance levels is clamped between a high and low limit. Secondly, the speed of the adaptation is vastly reduced; it only takes about a second now. Third, the response is slightly less linear, so that both subtle changes in scene lighting have a smaller effect on adaptation, and vice versa, that bold changes have a greater effect. And finally, there is a slight preference to the center of the screen when adapting luminance, so that what you’re looking at has a greater effect than what’s in the periphery.

I think all these changes combined make the HDR effect now quite usable, and also so subtle that I’m barely noticing it most of the time—which is what the goal is, I think. Although, there are a few situations that warrant some further tweaking of the shader; sometimes white textures or brightly-lit surfaces are given a bit too much darkening. But I’m pleased enough with my changes that I am releasing the HDR shader file as well. The values to tune are pretty well labeled and documented in code comments, so I encourage others to tweak them as well, in case they prefer a slightly darker scene or faster adaptation, etc.

Final Note

I just wanted to say a little about an old friend that passed recently. He was the one that I started my original website with way back in the year 2000. And fittingly for this post, he was the one that convinced me to play Deus Ex. For weeks he was going on and on about how great the game was until I finally relented and gave it a try. He wasn’t right about many things, but he sure was with Deus Ex.

So… cheers to Loogie. He deserved better, and he will be missed.

Posted in Gaming, Modding | Tagged | Leave a comment

Perfect Accuracy Fist Fucking

Perfect Accuracy

Since my last post on the topic of Borderlands 2 modding, I did manage to finish up and release the weapons accuracy mod I was talking about. I was able to get through a whole playthrough as Maya without encountering any massive game-breaking issues, so I figured that was a good start for a beta release. The fact that the mod makes the game so much more enjoyable to play really helped me keep up the momentum with testing and making tweaks as well.

Since then, I’ve also been releasing a bunch of other, smaller mods, some using the Python SDK, some using batch text commands. You can find them all on the Borderlands 2 Mods Page. There’s really only a few more mods I’m wanting to make for the game.

One mod I’ve been investigating since the beginning is changing the vehicle controls from mouse turning to keyboard turning. It’s always baffled me why nobody else made a fuss about the mouse vehicle turning in this game (and the predecessor). I feel like on PC this was the first popular game to do this and yet everyone was just like “okay”, even though it’s obviously inferior and stupid to have both vehicle turning and vehicle weapon aiming on the mouse. Meanwhile, the keyboard left and right movement keys are just there being unused like “am I a joke to you?”. I assume it’s just a melange of console control bullshit seeping over, noobie kids that don’t know better, and non-technical PC gamers just accepting things for what they are. But I won’t stand for it! Even if I’ve been playing this way for years, it still feels wrong! I think the change is probably possible, although it will almost certainly take the Python SDK to do so. I’ve already scoured the configs and data files looking for ways to reassign the turning axis but came up fairly empty-handed. Luckily, I think I’m comfortable enough with the SDK at this point that I’ll be able to figure it out if it’s at all possible.

I’m also still tweaking the Perfect Accuracy mod, though, of course. One change I made initially with the mod was to remove the dumbass insane recoil from the first few shots of Hyperion weapons. It made the Hyperion SMGs essentially unusable as you’d waste the first fourth of a mag just hitting fuck-all. But I kept the relatively good recoil that Hyperion weapons had overall. I didn’t realize at the time, but the Hyperion SMGs and pistols also had really low hip-fire spread for some reason (the Hyperion stats are kind of a confusing mess because of this weird initial recoil they do), and this made them basically hip-fire laser-beams with lower recoil and inaccuracy. I’m toying around currently with ways to correct this, but I’m probably going to go with something where the Hyperion weapons have best-in-class recoil but worst-in-class hip-fire spread. This kind of fits with the original flavor of the Hyperion weapons anyways, without being too annoying. It just means the player will need to judge when to ADS or hip-fire differently compared to other manufacturers’ weapons.  But trust me, if it doesn’t feel good to me, it won’t go in the mod. I don’t know how something like that got into the game in the first place—maybe for a gag? Sure, for a gag, put the effect on a legendary weapon, not an entire manufacturer’s unique feature.

I also did pick up a bunch of the DLC for the game on a recent Steam sale, so it’s quite likely that I will add support for their weapons in the Perfect Accuracy mod eventually.

I guess I should also mention this demonstration video I did for the Perfect Accuracy mod. I spent a while on it and it ended up being quite long—most certainly too long if we’re being honest. I just wanted to be thorough because I have a feeling a lot of people just won’t “get it” otherwise, they’ll just be blissfully ignorant of the situation and totally accept it as is. (Am I just too much of a nit-picky perfectionist or are there a lot of people these days that just accept whatever is told to them because of hype, charisma, reputation, whatever misplaced trust? Nobody challenges anything anymore.) But at over thirty minutes long, I should really find a way to distill the video down into a more succinct package that still gets the message across. Something to think about for a final release perhaps. Anyways, here’s the video in case you like watching changes instead of just reading about them.

Fist Fuck

Several years back I toyed around with Doom map making after another enjoyable full playthrough of both the original 90s games. Besides an interesting but never-finished beach-landing map and a bizarre bastardization of the noteworthy Marines map (my favorite feature of which was the zombie sergeant death sound being changed to a recording of Butthead saying “did I just score?” 😄), both that I did when I was a teen, I never made a proper Doom map. I have good ideas for maps generally, but the constant creative minutia gets to be too tedious for me after a while.

But the thing is, I did actually finish one small map and then forgot to publish it because I was anticipating finishing another much larger map just after. The smaller map in question is called Fist Fuck. It’s an apt name given that the only weapon at your disposal (practically-speaking) is your fist with the berzerk powerup. It was born from my curiosity about how useful berserk could actually be. In the base game, it’s never really clear how powerful or lasting the berzerk powerup is (it’s quite powerful and lasts the rest of the level btw), so I basically wanted to create a level to explore the possibilities of berserk.

Obviously, the range limitation of berzerk means that pitting the player against enemies with ranged attacks at range would be quite difficult. So, I mainly stuck to hoards of weaker and melee-only enemies and lots of tight corridors. Besides, one-shotting lines of weak enemies into red mist is as satisfying as gobbling the white dots in Pac-Man, arguably even moreso in fact.

Now there are many different versions of the Doom engine to target ever since the source code was released. But to give myself a challenge, I thought I’d try to make the level support the original Doom2 engine so that it could work on any of the ports (theoretically), even the original DOS one. And sometimes I think the Doom mappers go too far these days; sure, you can modify the Doom engine to add whatever features and remove whatever limits you want, but why not just use a modern engine at that rate? To be fair, the multitude of Doom engine limitations are quite cumbersome. But still, completing the challenge and saying your map can run on any version and port of Doom(2) feels the utmost fulfilling. Here’s some screenshots of Fist Fuck running on DOSBox for what it’s worth.

You can find more information, a video, screenshots, and the download for Fist Fuck on the newly-created Doom Levels Page. As I said before, I wanted to have more than just one map before I made a page specifically for Doom maps. But who knows when I’ll feel up to finishing the other map, perhaps after another complete playthrough of Doom and Doom2. 😛 I don’t know. I think the amount of pain I’m in on the regular is just too much to support such creative ventures anymore unfortunately. But I want to end with a few screenshots anyways, so we can see “and all that could have been”. They’re a mix of Chocolate Doom and ZDoom as the resolution of Choco is just too low to convey much in a mere screenshot most of the time.

Posted in Gaming, Modding | Tagged , | Leave a comment

More Mods and Modding

Epic Games Mod Music

In a continuing effort to further perfect my mod music library, I’ve been redoing my conversions of the music from several of my favorite Epic MegaGames soundtracks, specifically Unreal, Unreal Tournament, and Jazz Jackrabbit 2.

My previous efforts were all plagued with improper volume levels as I naively thought that music should just be normalized and that’s it, job done. Since then, I’ve come to understand about loudness levels and limiters that can increase the volume without clipping. To be fair, normalizing is still the most appropriate way to level audio as it doesn’t alter the dynamic range. The only problem is that normalizing alone is impractical as all other music these days is boosted to a loudness of around -10 LUFS, and you don’t want to constantly adjust your speaker volume to account for the variance in volume. It seems mod music is particularly susceptible to being problematic in this regard as well since many tracks were made to just slam up against 0dB and let the player’s Auto-Gain Control sort it out.

Unfortunately, the automated mod conversion process that I mentioned last post has one major flaw in that it just kinda makes all the tracks the same volume. -10 LUFS loudness is fine for most lively music, but for softer tracks (like that of Unreal’s ambient music), you might want the volume up to 10 LUFS quieter. You really have to listen to each track and decide on an appropriate loudness. So, that’s what I did. You can download all three game soundtracks and listen to some samples from the Epic Games Tracker Music project page.

The majority of the three soundtracks were converted in the automated way using FFmpeg’s OpenMPT library and built-in audio filters. Some of the tracks were ones that I selectively recorded/remastered and then released here back in 2008, but just with the fixed volume levels. Luckily, I still had all the wave files available to use. And a few tracks I actually remastered recently in the same way that I did for the Deus Ex Soundtrack remaster. So, it’s kind of a hodge-podge of different conversion methods, unfortunately, but I wanted to just make it available for people as-is and hopefully add more remastered tracks later. It’s still very listenable, though, as long as you don’t mind some clicking and pops from bad samples and sudden track ends.

There’s also a bit of an issue with much of the Unreal music included as it only contains the ambient sections of each track. It wasn’t until after I had everything ready for upload that I finally figured out how to get FFmpeg to convert the other sections of the tracks. These sections are often referred to as “subsongs” (at least in contemporary mod players), but the mod formats don’t have a specific mechanism in place to define these sections. Instead, they merely use the Bxx effect command to jump to different patterns in the song. These can be used to loop different sections of the song and be programmatically switched between, e.g. in a video game. The OpenMPT library actually has a process included that can identify these sections, and it’s also available as an option in FFmpeg by utilizing the option -subsong. However, I couldn’t find a single example of how this option is used anywhere online and only later (through shear persistence… or maybe just dumb luck, I forget) discovered that the subsong option has to go before the input file is given (-i). Maybe that makes sense because it’s technically modifying what the input is…? I dunno, it seems pretty stupid to me, especially undocumented.

Regardless, I need to reconvert a lot of the Unreal soundtrack as such. I would have just gone ahead and done it, but many of the sections are rather long and perhaps need to be a separate track. Some people always complain about how I did the Deus Ex soundtrack remaster with every section included in one track, and I still think that was the right choice for Deus Ex, but it’s making me hesitant to repeat that arrangement for Unreal. It just needs further consideration.

And honestly, Unreal is probably the weaker of the three soundtracks. There’s definitely some great tracks in there, but UT and Jazz 2 just have some seriously bangin’ tracks. Alex Brandon really did some amazing mod compositions back then. I actually also realized that the versions of the Jazz 2 soundtrack that I had (from Lori Central) were slightly different from the game versions, so I converted all the Jazz 2 music a second time to see which versions I should include in my compilation. I ended up writing a whole PHP script to extract the mod format files from the j2b files that come with the game, and then found out that OpenMPT will just open the j2b files as is. 😄

Borderlands Modding

I’ve been playing a lot of Borderlands 2 recently. There’s just something about that game that makes it probably the best “looter shooter” AKA first-person action RPG—it’s probably the very satisfying visuals combined with the endlessly-humorous dialogue. Seeing damage numbers fly out of enemies as you shoot, punctuated by the occasional “CRITICAL” hit really prods those dopamine receptors. And all of the characters being just such over-the-top caricatures with the most irreverent dialogue—Scooter’s incestuousness, Moxxi’s innuendos, Brick’s insatiable bloodlust, all the bandits’ ridiculous one-liners, etc.—it always lifts my spirits.

But even for all its good qualities, the game isn’t without its faults. And I’m apparently perpetually drawn to attempting to fix such faults in the form of game modding. However, I specifically remember trying to find some BL2 modding tools several years back and coming up empty-handed. But after a recent playthrough, I looked again and was delighted to see that a modding community has sprung up around the game after a couple of different modding methods were devised.

The first modding method is quite straightforward and intrinsic to the Unreal engine that the game is built on, and thus I am surprised there weren’t more mods made for the game sooner. It relies on the console being enabled and then using two console commands to override game settings. The first being the set command, which changes any variable to some given value. And the second being the exec command, which reads a text file in and executes whatever commands it finds. These allow one to change as many game settings as necessary and then package the changes all in one convenient text file. There’s even a tool made to help format and merge multiple mods into one file called OpenBLCMM.

The other method I only started looking into recently, but it is very powerful if you have enough motivation to figure it all out. It’s of the variety of DLL-injected code wrappers that can load any number of external scripts and is called succinctly-enough PythonSDK. Unfortunately for me, I’ve been neglecting to learn Python for years (mainly because of my illness to be fair). Mostly I just find Python to only be popular because of this one gimmick it has where text indentation and line breaks also control code blocks. It is nice that all Python code looks really clean and uniform (boy, do I hate people that put beginning curlies as the only thing on a whole line in other languages), but it really doesn’t seem so groundbreaking that everyone needs to switch to it as the new hotness. But that’s probably just my uninformed and biased position as a newcomer. 😛 I also thought Half-Life 2 was overrated at first. đŸ€

Anyways, I’ve already fixed a number of small nagging issues with BL2 and have a basic framework for a larger change mostly figured out. One thing that’s always annoyed me about Borderlands games is their inclusion of an accuracy attribute on all weapons. So, you can have your crosshair directly over an enemy and the shot just plain misses or hits but isn’t a critical hit. It removes a lot of the skill from the game and replaces it with luck, which feels less satisfying.

I’ve changed the game to always be completely accurate when aiming down the sights, and to also have slightly better accuracy control when hip-firing. It’s totally revitalized the game for me, making me rely much less on sniper rifles (which were always close to 100% accurate when aiming down the sights) and experimenting more with the other types of weapons. I’ve also been tweaking some of the recoil characteristics of the guns to make them more controllable, especially for the SMGs, which I could never quite put my finger on as to why they felt so bad to spray, but have since realized that it’s because they recoil mostly only horizontally—try keeping the reticle on-target when it constantly bounces left and right randomly.

I’d like to release my BL2 mods, of course, but the weapon handling mod will need a lot more testing and tweaking until it’s to a point where I’m satisfied with the feel and game balance. I guess it does make the game easier, provided your aim and recoil control is good, so that’s something I have to look into as well. Check back later to see if it gets completed and released. 😛

Deus Ex Soundtrack Videos

One thing I like to do these days when I’m feeling only-slightly crappy is edit videos. It requires only a modest level of thought and creativity while being mostly an engaging yet repetitive task—make a small timeline tweak, rewatch to see how it looks, repeat. My CPU is over 10 years old now, so it chugs a lot when editing HD video, but it’s bearable I suppose.

One project to come out of this video editing recently has been a series of music videos to accompany my remastered versions of the Deus Ex Soundtrack. I really wanted to expose a wider potential audience to the remasters, and I thought YouTube was a good platform for that, being so open and also having a huge library of music already. I thought about just putting a static image, the cover image, for the video portion (as so many people do for music videos on YouTube), but that seemed too lame and uninteresting for someone that was watching on anything with a screen. But I also didn’t want to have a lot of fast-moving gameplay captures since that would massively increase the file-size (for variable bit-rate video compression at least, which is what YouTube uses) for users only listening. So I decided on a compromise of in-game capture with a stationary camera to keep the motion down.

I ended up creating a little library of shortcuts and console commands to help simplify the process. Luckily, Deus Ex has all its scripts easily editable from inside UnrealEd (the original one still runs if you have all the ActiveX library files installed) unlike Borderlands 2. Here are the edits I made to the “DeusExPlayer” class.

var bool bToggleHud;
var bool bToggleGhost;
var bool bToggleInvisible;

// ----------------------------------------------------------------------
// ToggleHud - Snake Modification
// ----------------------------------------------------------------------

exec function ToggleHud()
{
    if (!bToggleHud)
        ShowHud(false);
    else
        ShowHud(true);
        
    bToggleHud = !bToggleHud;
}

// ----------------------------------------------------------------------
// ToggleGhost - Snake Modification
// ----------------------------------------------------------------------

exec function ToggleGhost()
{
    if (!bToggleGhost) {
        Ghost();
    } else {
        Walk();
        ClientMessage("Walking");
    }
        
    bToggleGhost = !bToggleGhost;
}

// ----------------------------------------------------------------------
// ToggleInvisible - Snake Modification
// ----------------------------------------------------------------------

exec function ToggleInvisible()
{
    bToggleInvisible = !bToggleInvisible;
    Invisible(bToggleInvisible);
}

// ----------------------------------------------------------------------
// SpawnMassPawn - Snake Modification
//
// Spawns a bunch of pawns around the player with an optional number, alliances, and weapons
// ----------------------------------------------------------------------

exec function SpawnMassPawn(Name ClassName, optional int TotalCount, optional Name Allies, optional Name Enemies, optional string WeaponPackage)
{
    local ScriptedPawn spawnee;
    local vector       spawnPos;
    local vector       center;
    local rotator      direction;
    local int          maxTries;
    local int          count;
    local int          numTries;
    local float        maxRange;
    local float        range;
    local float        angle;
    local class        spawnClass;
    local string       holdName;
    local float        rnd;
    local int          i;

    if (!bCheatsEnabled)
        return;

    if (!bAdmin && (Level.Netmode != NM_Standalone))
        return;

    if (instr(ClassName, ".") == -1)
        holdName = "DeusEx." $ ClassName;
    else
        holdName = "" $ ClassName;  // barf

    spawnClass = class(DynamicLoadObject(holdName, class'Class'));
    if (spawnClass == None)
    {
        ClientMessage("Illegal pawn actor name "$GetItemName(String(ClassName)));
        return;
    }

    if (totalCount <= 0) totalCount = 10; if (totalCount > 250)
        totalCount = 250;
    maxTries = totalCount*2;
    count = 0;
    numTries = 0;
    maxRange = sqrt(totalCount/3.1416)*4*SpawnClass.Default.CollisionRadius;

    direction = ViewRotation;
    direction.pitch = 0;
    direction.roll  = 0;
    center = Location + Vector(direction)*(maxRange+SpawnClass.Default.CollisionRadius+CollisionRadius+20);
    while ((count < totalCount) && (numTries < maxTries))
    {
        angle = FRand()*3.14159265359*2;
        range = sqrt(FRand())*maxRange;
        spawnPos.X = sin(angle)*range;
        spawnPos.Y = cos(angle)*range;
        spawnPos.Z = 0;
        spawnee = spawn(SpawnClass,,,center+spawnPos, Rotation);
        if (spawnee != None) {
            if (WeaponPackage != "") {
                //clear the default inventory
                for (i=0; i<8; i++) {
                    spawnee.InitialInventory[i].Inventory = None;
                    spawnee.InitialInventory[i].Count = 0;
                }
                switch (Caps(WeaponPackage)) {
                    case "PISTOL":
                        spawnee.AddInitialInventory(Class'DeusEx.WeaponPistol');
                        spawnee.AddInitialInventory(Class'DeusEx.Ammo10mm', 2);
                        spawnee.AddInitialInventory(Class'DeusEx.WeaponCrowbar');
                        break;
                    case "MELEE":
                        rnd = Rand(3);
                        if (rnd == 0)
                            spawnee.AddInitialInventory(Class'DeusEx.WeaponCrowbar');
                        else if (rnd == 1)
                            spawnee.AddInitialInventory(Class'DeusEx.WeaponCombatKnife');
                        else
                            spawnee.AddInitialInventory(Class'DeusEx.WeaponBaton');
                        break;
                    case "ASSAULT":
                        spawnee.AddInitialInventory(Class'DeusEx.WeaponAssaultGun');
                        spawnee.AddInitialInventory(Class'DeusEx.Ammo762mm', 12);
                        spawnee.AddInitialInventory(Class'DeusEx.WeaponAssaultShotgun');
                        spawnee.AddInitialInventory(Class'DeusEx.AmmoShell', 12);
                        spawnee.AddInitialInventory(Class'DeusEx.WeaponCombatKnife');
                        break;
                    case "FLAME":
                        spawnee.AddInitialInventory(Class'DeusEx.WeaponFlamethrower');
                        spawnee.AddInitialInventory(Class'DeusEx.AmmoNapalm', 8);
                        spawnee.AddInitialInventory(Class'DeusEx.WeaponCombatKnife');
                        break;
                    case "NONLETHAL":
                        spawnee.AddInitialInventory(Class'DeusEx.WeaponProd');
                        spawnee.AddInitialInventory(Class'DeusEx.AmmoBattery', 6);
                        spawnee.AddInitialInventory(Class'DeusEx.WeaponPepperGun');
                        spawnee.AddInitialInventory(Class'DeusEx.AmmoPepper', 2);
                        spawnee.AddInitialInventory(Class'DeusEx.WeaponBaton');
                        break;
                    case "PLASMA":
                        spawnee.AddInitialInventory(Class'DeusEx.WeaponPlasmaRifle');
                        spawnee.AddInitialInventory(Class'DeusEx.AmmoPlasma', 20);
                        spawnee.AddInitialInventory(Class'DeusEx.WeaponNanoSword');
                        break;
                    case "SWORD":
                        spawnee.AddInitialInventory(Class'DeusEx.WeaponNanoSword');
                        break;
                    case "STUN":
                        spawnee.AddInitialInventory(Class'DeusEx.WeaponProd');
                        spawnee.AddInitialInventory(Class'DeusEx.AmmoBattery', 50);
                        break; 
                }
            }
            spawnee.InitializePawn();
            if (Allies != '')
                spawnee.SetAlliance(Allies);
                spawnee.ChangeAlly(Allies, 1, True);
            if (Enemies != '')
                spawnee.ChangeAlly(Enemies, -1, True);
            count++;
        }
        numTries++;
    }

    ClientMessage(count$" actor(s) spawned");

}

The first three functions just allow you to have a single key for each of the commands by toggling them. The last function is a modification of an existing function that lets you spawn a bunch of objects around the player, but I’ve expanded it so you can set alliances and give them weapons. This was handy for spawning two groups of characters and then having them fight so I could record it. 😄

To use all of these functions, you need to make some modifications to your Deus Ex keybinds in the User.ini file. Find the section [Engine.Input] and add the following commands to some keys.

L=legend
K=set deusex.jcdentonmale bcheatsenabled false
J=set deusex.jcdentonmale bcheatsenabled true
I=ToggleInvisible
H=ToggleHud
G=ToggleGhost
Tilde=type

As for what these keybinds all do: J will turn cheats (and the type command) on, K turns cheats back off. The game puts a “cheats enabled” watermark on save game screenshots to make you feel bad about cheating, so it’s helpful to be able to turn it back off. Tilde (~) opens the command line so you can type in commands like the SpawnMassPawn() defined above. H toggles hiding the HUD, useful, of course, for getting clean screenshots or video captures. G toggles “ghost mode”, which is basically just noclip plus fly, so you can position the camera wherever you need to get the best shot. I toggles invisibility, which is useful for making actors not respond to you. You’d think ghost would be enough, but they’ll still target you if not invisible. And L opens the in-game debug / “secret” menu. It’s useful for switching maps without having to type in the open console command. See the screenshots below.

So, utilizing all of these tools was how I was able to record all the b-roll footage for the YouTube videos. I guess it’s nothing special, but maybe it helps give people the nostalgia berries even more, really putting them into the levels, plus some silly fight scenes for the lulz. The response from YouTube comments and views has certainly been positive, at least. For the record, I only did videos for the tracks that I redid in the recent soundtrack update. I’m hoping to do the rest of the videos when I do the rest of the remasters.

What Else I’m Up To

As I spend most of my days feeling unwell, I end up watching a lot of gaming streams. I’m quite thankful that such lengthy forms of entertainment exist these days. There are three streamers that I watch pretty much exclusively. I got into ChocoTaco from my PUBG addiction, and I think he best mirrors what my playstyle would be if I weren’t sick–extremely calculated and with good instincts. Unfortunately, Choco’s sense of humor is a bit lacking, so for a dose of levity, I like to watch a British streamer called Platform32. I also discovered him through PUBG, but he plays a fair amount of other games that I enjoy as well, all laced with copious amounts of witty and raunchy banter. Finally, and this is bit of an odd one, but I really enjoy watching Felicia Day for some reason. She’s not the greatest of gamers, but she does okay, and the arc of her failing repeatedly before finally overcoming challenges is entertaining somehow—Felicia can be quite bombastic. That, and she talks a lot and is generally insightful enough to keep it interesting.

Like I said earlier, I’m doing a fair bit of video and audio editing. I’ve become rather decent at it, frankly. I’m also doing a lot of home improvement since it allows me to not have to think so much. Plumbing, electrical, woodworking, HVAC repair, painting—I’ve been dabbling in it all. Getting people to come out on my schedule and fix things has become quite inconvenient and expensive these days, so DIY almost seems like a necessity as long as it’s not an emergency repair.

And I’m still playing some video games, though not for as long or as wide a variety as I would like. I played a lot of Vampire Survivors and Ooblets last year. And, of course, I have my yearly replay of Slime Rancher and Stardew Valley to occupy me.

Well, this is an epicly-long post, so I better end it already. I do appreciate the comments everyone leaves; sometimes they do encourage me to poke around with a project again.

Posted in Gaming, Media, Modding, Programming | Tagged , , , , , , , , , , | Leave a comment

Using Cursor Lock with Steam Games in 2021

The instructions given for using Cursor Lock in games launched through Steam in a previous post were rather out of date. But I’ve become aware of a new and perhaps better method for using the two together. I say better because it doesn’t require creating shortcuts; however, there is still some command line tomfoolery to mess with.

Here’s what to do:

  1. Open the Cursor Lock Setup.
  2. Setup the options for Cursor Lock how you would normally, except put %command% in the Open Program field.  The field will turn red, but that’s okay, we’re not actually going to create a shortcut. (See the first image below.)
  3. Go to your Steam library and right-click on the game in question and select Properties.  Your should see a “Launch Options” field.
  4. Find the path to Cursor Lock.  The quickest way is probably to go to your Start Menu (or whatever Microsoft is passing off as a start menu these days) and find the Start User Mode shortcut. Right-click this shortcut and go to Properties.  You’ll find the path to Cursor Lock in the Target field under the Shortcut tab. Copy the part in quotes, including the quotes.
  5. Paste the path to Cursor Lock into the Launch Options field in Steam.  Then go back to Cursor Lock Setup and copy the command line options at the bottom.  Paste what you’ve copied at the end of that same Launch Options field.  (See the second image below.)
  6. You’re done. Just X out of the dialog and play your game.  Cursor Lock will open and close in tandem with your game. You’ll need to do this for every Steam game you wish to use with Cursor Lock, though.

As you may have guessed, the %command% pattern is replaced by Steam automatically with the path to the game. This useful feature allows us to wrap any commands we would want around our game command.  If you’re already making use of the Launch Options field for other commands, you can put those into the Open Program Args field (/P) for Cursor Lock to pass them along to your game—see the screenshots above for an example.

Posted in Gaming, Software | Tagged , | 4 Comments

Rise of Nations Script Maker 2.0 Preview

Rise of Nations Script Maker 2.0

Rise of Nations Script Maker 2.0

I’ve been working on a new version of my Script Maker for Rise of Nations since the release of the Extended Edition a few months ago.  I naively thought it just was going to be a matter of converting the code to .Net and updating a few routines to support EE.  However, once I saw the state of the code, I decided it was going to have to be completely rewritten.  After all, it was ten year old code written in VB6.  And I was really appalled by the “hackiness” of so much of the code—mostly because VB6 had so few built-in functions and relied on the Windows API so much.

So since I was rewriting the whole program anyways, I took the opportunity to make numerous improvements.  I won’t post the whole changelog, but here are some of the highlights:

  • Streamlined the interface significantly
  • Stat tables now support filtering, sorting, and better change highlighting
  • Broke the stat tables up by units, buildings, and techs while combining disabling and researching with stats
  • Scripts can now have descriptions
  • All data is loaded from the games now
  • Changed the script save format to XML
  • Dropped the use of the MSXML library in favor of .Net’s XML library

At this point, I’m mainly just doing testing and documentation. So, expect release within the next couple of weeks.  I may put a call out for beta testers before then, but I haven’t decided yet.

Posted in Gaming, Modding | Tagged , | Leave a comment

Brecourt Video Update

I’ve still been putting a lot of work into my Brecourt Manor map lately, and it feels like it’s over half complete.  I’ve got a lot of the hedgerows placed, so it’s mostly a matter now of filling in the fields and making everything look natural.  The map’s script has also come a long way (at over 700 lines so far) but still has a lot of tweaking left to go.  However, I’m feeling a lot more comfortable with LUA and the SCAR functions, so it should go quickly.

A couple weeks ago, I dabbled briefly with the Unity engine to see if it was viable for another project I’ve been longing to make.  There’s a lot to learn up-front about Unity before you can get anything even playable (take Quaternions for example), but then things start to come together.  In only a few days, I made from scratch a basic tank that drives around and shoots with (mostly) realistic physics.  I must say, though, that this is the most math I’ve done since college.  😕

Posted in Gaming, Modding | Tagged , , , | 1 Comment