Category Archives: Modding

Brecourt Manor Progress

Brecourt Manor 11-17-13The gun trenches are more or less complete and work has started on the surrounding environs.  Creating realistic-looking hedgerows is a multi-step process: trees first, then the hedges themselves, bushes, and finally some scrub grass to smooth out the base.  Then repeat over and over because Normandy is nothing but hedgerows.

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

Brecourt Manor in CoH

A few months ago, I released my first singleplayer map for Company of Heroes.  I had a lot of fun scripting the scenario, which is done entirely in LUA, so I was eager for another map to work on.  And it didn’t take long until inspiration hit me in the form of re-watching Band of Brothers.  The prominent engagement in the second episode is the assault on the guns at Brecourt Manor.  The episode must have inspired others as well, since several video game recreations already exist; most notably in the first Call of Duty.

However, all the existing Brecourt Manor assault recreations have major accuracy flaws.  The CoD one has fairly accurate trenches (where the guns were located), but the context is very flawed (e.g. Easy Company did not subsequently attack the manor itself).  There is also another Brecourt map made for CoH, but being that it was made for multiplayer, balance concerns forced them to change almost all the geography other than the trenches.

So to distinguish my attempt from all the others, I decided to make what I hope is the most accurate portrayal of the battle.  To achieve this, I first gathered up as many maps as I could showing the fields and hedgerows where the battle occurred—present day Google maps, 1947 aerial map, D-Day recon map, and a map apparently provided by Maj. Winters.  I then layered and lined up the maps in an image editor to create a composite image of the most accurate map I could make.  That image appears below.

Brecourt Manor Assault Template Map

Brecourt Manor Assault Template Map

You can see on the above image that I’ve already established the playable area (red rectangle) and the map boundaries (green rectangle) for the CoH map, with the gun trenches located in the center.  But the next step is where the real magic happens in making this map as accurate as possible.  In a process I first used in my Ogledow map, I took a greyscale version of the composite image above, saved it to a bitmap, and then copied its raw bytes into a data format called a “stamp”.  The CoH WorldBuilder uses these stamps to let you copy map data between maps, but using this technique, one can also copy data from images into maps.  The result can be seen in the below images.

The result being an extremely accurate template by which to “draw” the actual map content.  This is about as far as I got when I first started working on the map since Serpent 3 was nearing the end of its life at the time.  But I just recently got back into it and I’ve made some pretty good progress, although I’m nowhere near done.  I’d say I’m to a point where it’s playable, though.  (Props to the guys at Relic that actually make these maps from scratch.  It takes forever to get them to look realistic.)

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

Removing Heartbeats from Sniper Elite v2

I finally got around to playing Sniper Elite v2 after buying it a while back and then finding out it required Windows 7.  Serpent 4 fixed that, of course.  And it’s pretty damn fun.  The multiplayer takes me back to the days of Delta Force sniper wars circa 2000.

Sniper Elite v2

Sniper Elite v2

The main problem I had with the game was the annoying—perhaps even disturbing—heartbeat sounds that play whenever you’re looking through the scope.  It really serves no gameplay purpose considering the sound just plays constantly.  And there’s naturally no way to turn the sound off through options or config tweaking.  So one must turn to modding, and that’s what I did.

A quick perusal of the installation directory for the game reveals a “Sounds” directory with three files in it, clearly archives given their size.  StreamingSounds.asr is probably music and GmSnd.en is probably speech, so that just leaves GmSnd.asr as the likely archive for the heartbeat sounds.  Opening the file in a hex editor shows no readable strings whatsoever except for the header of “AsuraZlb”.  The “Zlb” part is curious enough and could mean that the file is actually compressed using Zlib.  In fact that’s exactly what it means.

In order to do anything with this file, it first needs to be decompressed.  Googling around, I quickly found a nifty tool called offzip that can do exactly this.  It’s a command-line program, so extracting it into the Sniper Elite “Sounds” directory is the best way to work with it.  This tool has several operations but the one we’re interested in uses the -a switch to decompress any found data.  To do this, fire up a command prompt or batch file and run the following.

offzip -a GmSnd.asr . 0

This gives us a new file of larger size in the same directory.  Taking this new file back into a hex editor shows a lot of readable strings and many matches for “heartbeat”.  One match in particular is very interesting.  It has the path of a wav file heartbeat01.wav followed by a RIFF header.  Somewhere in this vicinity of the file is the start of the heartbeat sound’s waveform data.

If you decode the bytes out as I did in the screenshot below, you eventually get to a string of text that reads simply “data” and is followed by a 4-byte (32-bit) integer that is the size of the waveform data—in this case, 45920.  Immediately following that, you just pace out the 45920 bytes of data, which should end just before a “smpl” header, and you have the entirety of the sound data selected.

Modded Heartbeat Sound in GmSnd.asr

Modded Heartbeat Sound in GmSnd.asr

The thing about WAV files is that they’re uncompressed (or lightly compressed in the case of ADPCM).  So two bytes (16-bits) of zeros in the waveform data means silence for one sample in the 44100 samples per second of audio.  Using this knowledge, we can just change all the samples to zero to make the whole sound file only silence.  To do this, you’ll need to be using a hex editor that has a fill with zeros feature.

With that part done, we can now save and test our modded archive file.  Don’t forget to rename this modded file to the original filename of GmSnd.asr and backup the original file itself.  You may also be wondering why we haven’t tried to recompress the modded file with zlib; and this would be an astute observation.  Basically we’re hoping the game is smart enough to load both compressed and decompressed data.

Now with Sniper Elite loaded up, we can start a new game and then look through the scope of a rifle to test our mod.  You’ll notice that the heartbeat sound still plays but it pauses every four beats.  Apparently there is more than one sound file that makes up the heartbeat sound effect, but we’re on the right track since one of them is now silent.  We just have to go back into the hex editor and change the four more sounds that follow the one we’ve already done.

And that’s it.  No more listening to that droning heartbeat sound while you’re sniping.  Luckily, this mod doesn’t lock us out of multiplayer either.  Happy sniping!

UPDATE 9/9/13

It’s been said around the webs that merely changing the name of the sound files is enough to disable them.  This would make zeroing out the sound data unnecessary.  However, I have not tested this method.  And one still needs to decompress the archive as detailed above.

Posted in Gaming, Modding | Tagged , | 6 Comments

Freedom Snake

For several reasons much too personal for the internet, I decided to leave my job at Longwood a couple weeks ago.  But I will say that the pay was way too low, and good luck to them finding someone with my skill level willing to work for so little.  The only reason I settled on that job was that it was 2009, when the economy was quite lousy.

But now with my rediscovered freedom, I have copious amounts of free time and thus time for video games.  As happens on occasion, I’ve been going nostalgic with my gaming choices lately.

Darwinia is a cute and clever real-time strategy game where you help a fictitious researcher regain control of a simulated cyber-world from a malware infestation.  It has just the right balance of puzzles and blowing shit up to make it incredibly fun.  The only problem is that it ends too quickly.

Black Mesa is a community remake of the original Half-Life using the newer Source Engine.  I’ve mentioned this mod years ago, but it only just got released recently.  Obviously, it’s a little too ambitious to remake a whole game when no one is getting paid; hell, Valve didn’t even want to do a proper job with Half-Life: Source.  And it shows as there are places where the quality is noticeably amateur.  Regardless, I applaud their efforts as it’s definitely fun and action-packed.

Given the recent SimCity debacle that’s been in the news, I (and it seems many other players) have given the previous SimCity game a whirl.  It’s been a while since I loaded up SimCity 4, but I was quite surprised to find its graphics were still mainly sprite-based, which is a bit jarring after playing so many 3D games with freely-moving cameras.  It’s definitely interesting to see your city take shape and how your choices affect that.  But I find the low-action gameplay to be sleep-inducing, and it makes me wonder how long the game will stay interesting.  Although I haven’t been playing it lately, the inadequacies of SimCity are making me consider going back to Tropico—it just seems like the right balance of macro- and micro-management in a city-builder game.

Going back even farther, I’ve also been enjoying some of the late 90s classics Age of Empires and Age of Kings.  I was pleasantly surprised to find that both of these games still install and run on Windows XP, granted XP is pretty old itself.  I was also surprised at how difficult these games got and really quickly.  It’s no wonder that I cheated so much back in the day.

I also found out that I actually made a campaign for AOE called Time of the Phoenicians.  You can amazingly enough still download it from AOE Heaven.  The story and writing is pretty awful and the gameplay buggy (I was 15), but the maps were still pretty detailed as you can see below.

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

New Website for SnakeByte Studios

SnakeByte Studios 2012

Heeeey…I have a new website.  It’s very much a work in progress, but I needed to make it live now because it’d probably have been another year before I finished completely.  As I mentioned a couple posts ago, the new site is powered by WordPress.  However, I mostly scrapped the theme I was working on in favor of a heavily modified Twenty-Ten and Nivo Slider for a homepage header.  The theme is not too unlike an idea I’ve been playing around with on my work blog, which itself was inspired by another theme called Dusk to Dawn.

Besides the other reasons I gave for switching to WordPress in the aforementioned post, which in summary were:

  1. Visitor commenting
  2. Full-featured backend
  3. Familiarity from using at work

I also just don’t have time to code my own site from scratch anymore.  And this is fine—I get enough coding websites at work—and will allow me to focus more on posting and other projects.  Speaking of other projects, I finished another map for Company of Heroes over winter break.  It’s a remake of a map from the original Red Orchestra.  It’s also on FileFront.

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

Tis the Season for Blog Updates

Fa la la la la…

It’s been a mixed enjoyment holiday season this year. I won’t get into all the personal details, but here’s some things that were delightful recently.

I finally released my little map for Company of Heroes: Opposing Fronts earlier in the month. As mentioned in previous postings, I decided to call it “Hurtgen Forest”. I’ve only published it on two sites other than my own for the moment, trying to get some initial feedback in case tweaks need to be made. So far, the lurkers on my RelicNews thread have been rather useless douchebags (I think they feel threatened), but the review on Filefront both praised my map while giving helpful feedback to consider. More info and download for Hurtgen Forest.

I also did a snazzy trailer video to promote the map (and because I LOVE editing video). Although I’ve embedded it everywhere the map is, here’s the video again:

I did another video to demonstrate how to use my program, File Lister, as well. It shows how to use it to do batch renaming. To limit the number of videos I have embedded in one post, just see the File Lister page to watch. I’m quite surprised by how often I end up needing File Lister at work and at home. I think it’s almost as essential as Regex Buddy for any geek. I’m also finding more and more sites publishing or linking to File Lister since it’s naturally the most advanced and feature-rich program of its kind.

And finally, the obligatory 100% completion screenshot for Lego Harry Potter. The girlfriend and I just finished it last weekend. Also, 100% completion for all the other lego games we’ve played. Can’t wait for Lego Pirates of the Caribbean so we can continue our addiction. Actually, co-oping with your girlfriend is probably half the fun.

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