But At Least My Bots Use the Tank Now
By Dwip October 8, 2013, 1:30 pm Comments (0) RSS Feed for this post

From time to time in my little corner of modding, people like to gripe about the less than perfect tools we have available to us for Elder Scrolls modding. Oblivion, for example, has whole user-made interface grafted on to the Construction Set to fix the bugs, and never mind TES4Edit or the various BSA unpackers or the Construction Set Wiki. For Skyrim, we gripe about the worthlessness of the Nif scripts and how we’re all wedded to a version of Blender that’s roughly contemporary with the triceratops. And to be sure, none of that is wonderful.

Let’s talk about Battlefield Vietnam for a second, though.

As recent posts may have informed you, we’ve recently started playing this again, 10 years old though it is, because shooting bots in Hue 1968 is more fun than is legal in several states. And as part of that, I dug up some of our old maps from back in the day. And let us be clear, here, these things have some issues, since we very imperfectly understood how making maps worked in days of yore, and looked at the arcane voodoo it took to get anything done, and kind of ran screaming.

Well, we’re all older and wiser now, right? How hard could it be?

xkcd has this covered.

So, the basic problem is this: I’ve got this map, and it’s fun, but it’s got various problems. Trees pop in and out, nobody ever ran shadow generation on it, and the AI is kind of messed up in a lot of ways, including the inability of the US bots to use the tank in their base.

The rather more advanced problem is the mountain of software it takes to get anywhere in this environment:

That small mountain of programs includes:

– Battlecraft Vietnam, the official map editor on the right, which sort of gets you most of the way. Sure, it doesn’t give you the right environment settings, and the undergrowth/overgrowth editor has no facility for actually showing you your giant forest in the editor, and to move an object you have to unlock it (objects get frozen from editing immediately on placement), click the select tool, click the move tool, and then move it, and none of what I’m saying here is even the worst stuff.

– The Battlefield Singleplayer Creator in the middle, which goes a long way towards letting you add AI bots to your maps, because you’ll never guess what the official editor doesn’t even pretend to try to do.

– BGA, which is the best of several options you can use to pack and unpack RFA archives. “Best” in this case means “only has a crash bug when packing archives”, which honestly isn’t a problem but seriously guys what the hell.

– An explorer window with a utility called genpathmaps on the bottom left, because AI pathmapping is done by way of RAW files in the early Battlefield games, only they’re not RAW files anything can actually read, so if you want to edit them at all you have to run them through genpathmaps to get BMP files that all look like this:

In case you’re wondering, that’s the one for infantry. There are 6 more or so for various vehicles. And yes, cleaning these up takes a while.

– Editor42 on the right, which is a fan-made editor for Battlefield 1942, and seriously how much does your editor suck when the fan-made one is more popular, though Editor42 is not without problems. Not the least of these is hunting around on forums for 10 year old posts containing zip files with the stuff you need to make it run for Battlefield Vietnam. The nonsensical interface choices barely rate. In the event, you can see that the ground is all black and white, and that’s because I ran a pathmap RAW through BFSPC to turn it into a DDS world texture that I can then edit in Editor42 because it’s the only way to accurately path buildings and other detail.

– Not shown: the debug exe for BFV, which is how you get pathmaps in the first place, which you’ve kind of got to hunt down at this late date.

So, I mean, that’s all kind of bullshit, right? But it’s actually not that bad compared to the worst part:

So, there are these things called .con files. They’re basically text files that contain scripting for the map. If you mess around with them enough, you can even use them to modify game objects (every object in the game has about 5 of these things), but for my purposes, I just wanted to fix up my AI some.

Which isn’t a problem either, assuming you like hand editing text files with lines that may or may not make sense after you’ve read the docs 5 times, using commands that aren’t so much documented anywhere so much as some guy used them in a map once and they kind of worked so that’s how you do things now, except don’t use that one we said to use because it’s for Battlefield 1942 maps and it doesn’t work in Battlefield Vietnam.

Oh, and AI is spread out over 4 or 5 files depending on how you count it, so enjoy that, I guess. Oh, and if you mess something up, you’ve got a 50/50 chance of either crashing the game or having your bots just stand there. So that’s fun, I guess.

The good news is that it’s pretty satisfying to cook up plans for your bots to follow and have them pull it off.

But wait, you can have even more fun!

– Oh, did you want to change how many tickets each side gets, or how fast they lose them? Just change Conquest.con, Coop.con, SinglePlayerAllied.con, SingleplayerAxis.con, and don’t forget the Conquest.con and Coop.con in GameTypes too.

– Did you want your AI to recognize it can hide in the bushes? Good news, none of the available programs add that line to Init.con, and you’re never going to know unless you happen to be looking at one of the stock maps for some reason.

– Load screens are basically undocumented, and have fun digging around Menu/Init.con and Init.con for that stuff. Also don’t forget to update thumbnail.dds with an in-game screenshot taken with your HUD console commanded out, and definitely remember to delete loadcounter.dat and get it regenerated by the game because Battlecraft messes that up too.

– You can cut down your map size by about half by deleting various *8bit.raw pathmap files that the game doesn’t use. Hope you knew that.

– Fixing trees popping in is a fool’s errand. You CAN edit overGrowth.wst by hand, but if you thought, say, changing viewdistance=’150′ to more like 400 was going to fix anything, no, changing view distance actually just covers your whole map in trees.

No, I don’t know either, but seriously, between that and the whole “you can’t see overgrowth in any editor” thing, just use static trees and save yourself the trouble.

But, to reiterate:

My bots use their tank now. Turned out the pathmap was FUBAR.


Computer Games - Battlefield Series Comments (0) Trackback URL for this post RSS Feed for this post

Leave a Comment