Battlezone 98 Redux

Battlezone 98 Redux

Not enough ratings
Creating a Unit Texture Variant
By Bobcat Betty
Intended for those new to modding who are looking to do a little more than just make a map. This tutorial will help you create a new unit based off an existing one, something every modder should know how to do before going on to create new units from scratch.
   
Award
Favorite
Favorited
Unfavorite
Creating a Unit Texture Variant
This tutorial is for those looking to create a variation of an existing vehicle that can be used in tandem with the original. Simply swapping textures is easy, but making your new tank its own entity will really set it above the rest. BZR has some major advantages over older versions of the game in this regard, and the higher resolution textures certainly make for some beautiful tanks.


What you will need:
• Hex Editor of your choice
• Battlezone's MakeZFS utility (Found in the Edit folder)
• Image Editor of your choice (Make sure it supports DDS format!)
• The vehicle’s texture files (DDS and Material)
• The vehicle’s model files (VDF and Mesh)
• The vehicle’s game files (ODF, INF, and DES)

The texture files and mesh file should all be available in the BZ_ASSETS folder in your main Battlezone directory. The other files you will want to acquire through using the MakeZFS utility to extract the necessary files from bzone.zfs, located in your main Battlezone directory. This is a command line utility and I recommend that you create a separate folder to dump its contents.
Step 1: Creating Your Texture
This step will be entirely up to you: your vision and artistic ability are your own. Though some technical information will certainly help get you started. The game’s texture files are stored in DDS format and linked together using a Material script. To start, you’ll want to open the diffuse texture in your image editor (I’ll be using GIMP) and begin creating your new texture. For mine, I will be recreating the CCA tank from the “Red Wolves” user-made campaign from the older version of the game.
The diffuse is the most important texture you’ll want to change, as it dictates the general look of the vehicle. The other 3 textures the game uses define texture (Normal), reflectivity (Specular), and glow (Emissive). I heartily recommend experimenting with all 3 to get the look you want, but it isn’t always necessary. This new tank required only edits to the diffuse and specular textures since those are the only ones that affect the vehicle’s “paint job”.
Once you’re satisfied with the texture’s you’ve made, be sure to save them using DXT5 compression and under a different name than the original. This tank’s file name is “svtank”, so I will change it to “svrwtk”. Be careful when changing the first two letters in the name, they define the faction (Soviet) and type of object (Vehicle) and should be consistent with this new tank’s other files. Open the material script for the original tank, add in the new texture names, and save it under the new vehicle name. Since I only edited the diffuse and specular textures, those are the only two I need to change.
Step 2: Creating the New Model
Now that you have the texture finished, it’s time to create the new model. This step is fairly simple, all it requires is a simple hex edit of the existing tank Mesh we based it on. All units in the game consist of three components: the ODF, the VDF, and the Mesh. The Mesh is arguably the most important, as it defines the vehicle’s physical appearance in the game. Open the Mesh in your hex editor and change its name and the following line:
Simple, right?

The VDF is even simpler, all you need to do is change it to the appropriate name, but it is still very important as it defines the vehicle’s physical collision and various other elements, and is actually the original model file that older versions of the game used.

The ODF is the final step in creating the new model. The ODF defines the vehicle’s properties within the game, such as how much ammo it has, what weapons it uses, whether or not it’s a turret, etc. To start you will simply want to create a carbon-copy of the existing vehicle ODF with your vehicle’s new name and the addition of a single line.

At the beginning of the ODF, right after the header [GameObjectClass] you will want to add the base name of your new tank to the file like so:
Doing this is really more of a precaution than anything, as the game will be able to find your tank just fine if you only change the ODF’s name. Adding a base name is still useful, though, as it allows you to have multiple different versions of your new tank that all use the same model file. The purpose of the base name is to tell the game “No matter what the ODF name is, use this model”. So be sure that the name and capitalization match exactly, or else the game might not be able to find your tank!
Step 3: Testing Your Tank
Once you have all the necessary files, place them in the Addon folder in your main Battlezone directory and get ready to test your new vehicle. In order to test the tank, we need to spawn it on a map, there are multiple ways to do this but by far the easiest method is to modify the ODF file “b_amcmbt”. Unlike other ODF files, this file doesn’t define an object but instead a list of objects, specifically the list that appears in the game’s editor. You will want to find this file and add your tank to it, then launch the game in edit mode using a desktop shortcut with /startedit in the target line.
I have edited my target line to also start me on the Playground map, “play01.bzn” and I recommend doing so for testing purposes.

Having done this, launch the game and…
Voilà! If everything was done correctly you should now be looking at your brand-spankin’-new tank, ready to go on and make even more. If your model is invisible at first or lacks collision the most likely culprit is a misnamed file, if you can’t place it at all you likely have an error in the ODF you used, and if it crashes the game when placed then you may have accidentally done something to the Mesh that broke it.
Step 4: Other Files (Optional)
There are several files you can also use to add some extra flavor to your new tank, these are the INF and DES files mentioned in the beginning. Both are simple text files and are neither necessary for your tank to work nor do they require any special tools. The INF file is what displays when you point at the tank and press the “I” key, for mine I wrote:

Dominik - Medium Tank
Armed with an SP-Stabber,
Pop Gun and Prox Mine.
Standard equipment for
Red Wolf battalions.

COST: 9
BUILDER: MUF



You will want to restrict lines to about 24 characters long, as this is the length the game uses, but this is not a hard rule and for aesthetic reasons you can break it if you like, the box will stretch to accomodate any length of text.

The DES file is the text that displays for the vehicle in the multiplayer menu, for mine I wrote:

HULL: 3250
AMMO: 1500
SP-Stabber
Pop Gun
Proximity Mine



This follows the game’s convention, but if you want to be more descriptive there is no rule against it and I heartily encourage it.

I hope this tutorial helped you in your efforts to create your own units and factions, dear reader. If you are interested in testing my Red Wolf Czar for yourself I have uploaded the files here. Happy Modding!
14 Comments
GrizzlyOne95 5 May, 2023 @ 9:40am 
This is a great guide, I've been modding enough now I think I actually understand all of it. Most painful part will be navigating around my terrible image editing skills. Thanks!
Ender 28 Jun, 2017 @ 9:29am 
Where are the ODF and VDF files located?
Madexi 6 Aug, 2016 @ 11:53am 
Now didn't think of that. :D Good idea.
Bobcat Betty  [author] 6 Aug, 2016 @ 11:46am 
Move the tug to the recycler. : P
Madexi 6 Aug, 2016 @ 6:38am 
I mean there are only 9 building options, if I add a variant I would have to overwrite an existing unit right?
Madexi 6 Aug, 2016 @ 6:28am 
If I make a variant like this, is it possible to build the original and the variant with the unit factory in the same round without overwriting any existing models?
Bobcat Betty  [author] 6 Jul, 2016 @ 1:00pm 
Oh shoosh, the original unzfs tool no longer works on BZR zfs files, this is the only way to access the data. It'd be nice if someone just had all the files up for download instead, though.
Nielk1 6 Jul, 2016 @ 10:41am 
Deus, ya know that unzfs I made has some features that probably shouldn't be public right? :cgrazz:
Bobcat Betty  [author] 22 Apr, 2016 @ 3:23pm 
I've updated the link, the new version of UnZFS should work without issue. It is a drag-and-drop utility and you shouldn't need to bother with opening a command line.
Rocket3497 22 Apr, 2016 @ 12:24am 
hey, i get to the point where i have to -u or -i the file i want to look at, but it just says that it is not an internal or external command, what do i do?