Fallout 2 - New Critters from Blender
Making a mod for Fallout 2 is not easy.
But the least documented, and probably one of the most difficult parts of making a mod for Fallout 2, is the creation of a completely new critter.
So I took a couple of months and figured out how to create a complete critter in blender, including animations, for all six directions at the same time, including converting the animations into Fallout 2's file format, then attaching it to a brand new proto file in the game.
This is a long process, but I'm betting the rest of you watching will totally find this as awesome as I did.
Ok, a couple of things need to be set up before we tackle blender:
1) the mapper needs to be installed because we'll need to capture a 640x480 image from it.
I have a video up already explaining how to install this.
2) some sort of image editor, I'll be using Gimp, but anything that can crop an image to 640x480 will work fine.
3) Frame Animator 2 by Jochua to convert what we get from Blender into the FRM format compatible with Fallout 2.
I'll cover installing it in this video.
4) and of course, we need Blender.
Just do a search for how to install blender if you don't have this already, there are a ton of videos out there covering this topic so I'm not going to cover it here.
Ok, though we use the Frame Animator software last in the process, I'm going to cover installing it first just to get it out of the way.
As usual, the download link will be in the description.
Installation is super simple, just download the program archive, open it with an archive manager, 7-zip is a good open source archive manager if you don't have one of your own, and extract the contents to a folder that's convenient for you.
I'm going to extract my copy to my Fallout 2 mod folder since I'll probably be using it on a regular basis.
Once that's done you can just run FrameAnimator.exe.
If you feel like it you can also create a shortcut for ease of access.
Ok that step is out of the way, next let's open up the Mapper and load up a map with a few characters on it already.
Ideally we're going to use these characters to get the right size for our new creatures in Blender.
There are several ways of setting up the Mapper to get the right image size, but I like using the original game resolution of 640x480 for my images, so you can either edit the ddraw.ini file and m2_res.ini files to match that resolution, or you can crop the captured image in an image editor like gimp or photoshop, as long as the scale is correct for your monitor.
Either way will work.
But first, I definitely recommend turning on Hexes in the bottom left corner here before capturing the screen.
This will give you a frame of reference if you want to create movement animations for your creature.
Generally walking is 2 hexes in 8 frames and running is 4 hexes in 10 frames, but I imagine other variations are fine.
Ok, once you've got a screen cap of the mapper with a reference critter and hexes turned on, then cropped it to 640x480 in an image editor, open Blender and let's get started setting up the basic stage for our new critters.
Delete the default cube and select the camera.
Change the camera X location to 0, and it's Z rotation to 0.
Change the camera's X angle to 64.34109 degrees.
If you're interested in where I got that random looking number, check this wiki page where one super smart modder explains how they reverse engineered the camera angle.
Now set the camera's Y location to -6.2445 and it's Z location to 3.0000.
This sets the camera view to be centered on the origin, which is by default where any creatures or items will be created.
If you want a more detailed explanation of why I chose these two numbers, I created a mathematical formula based on the angle derived earlier, to adjust the height of the camera in relation to it's distance from the origin.
The exact formula itself is:
Z = -tan(0.4478324619728982)*Y_Location
And I applied this formula by right clicking the Z_Location for the camera and selecting "Edit Driver", then setting the "Object" reference to "Camera", the "Type" to "Y Location" and naming the variable to "Y_Location".
Since Blender uses radians in it's "driver" system, I had to convert the original angle 25.65891 from degrees to radians, which is 0.4478324619728982.
You don't have to do all that complicated stuff though, I just did it to make sure I had the camera centered properly.
In fact, if we leave this formula in place for one of the later steps, stuff will start to break.
So it's probably a good idea to make it a solid number now.
From here let's make a bunch of adjustments to the camera so it renders our creatures correctly.
First, go to the camera settings (the green movie camera icon) and change the lens type from Perspective to Orthographic.
Then open the "Background Images" dropdown arrow and click "Add Image".
Click "Open" and browse to wherever you saved your reference image at and select it.
You don't have to, but I like to change the opacity setting from .5 to 1.0.
That foggy look for my reference images just doesn't work for me, and your creature will always be on top anyway.
Next, go up to the "Output Properties" (printer icon) and change the resolution to match the background image you just added.
Shoutouts to Zaphida for coming up with this solution.
Theoretically, as long as this matches the background image, you can use any size, but I feel like 640x480 strikes a reasonable balance between plenty of space to work with and file size on render, and Frame Animator will remove the alpha pixels.
Use your own judgement here, but I'm using a 640x480 image, so that's what I'll put.
Now scroll down and open the "Post Processing" dropdown arrow and set "Dither" to 0.00.
If you don't do this, when you import the rendered images into FrameAnimator you'll have an ugly mess of weird dots where the alpha space should be.
Now, in order to render an alpha channel, open the "Render Properties" tab and open the "Film" dropdown.
Check the "Transparent" box.
Ok, that should be all the weird settings wrapped up, next let's make duplicates of this camera and position them in each of the other 5 directions.
Make sure the Cursor is in the center origin by pressing Shift+S and selecting "Cursor to World Origin", then press Shift+A and add an Empty.
I like to use an empty Plain Axes, but this next step works with anything, including random shapes and objects.
Select both the Camera first and the newly added Empty object second (for me it's the Plain Axes) by holding Shift and clicking, and press CTRL+P to open the Parent menu, and select Object.
Any of these will probably work, but I'm just going with the top one.
Now if you grab the Plain Axes and move it around, you'll notice the camera follows along with it, and there's a little dotted line connecting the two indicating their depency.
Next, select both the camera and the Empty object again in that order, and press Shift+D to duplicate them.
Right click to clear the movement selection, but don't clear the object selection.
Instead, go up to the Transform tool box in the top right and change the Z Rotation to 60 degrees.
Repeat this process 4 more times, adding 60 degrees each time so we have a camera at 0, 60, 120, 180, 240, and 300 degrees.
Incidentally, while the driver formula works on one camera, it'll screw everything up on these copies we're making so you'll want to change it to a solid number before doing this.
Now select everything, right click anywhere in the canvas, go to the Parent submenu, and select "Clear and Keep Transformation".
Now you can grab all those Empty objects, you may have to move the light source out of the way, and delete them with zero repercussions.
Now that we've got our scene set up, I'm going to import a creature so I can get things oriented for the next step.
I've got a generic Deathclaw model I grabbed from Sketchfab, and with the cursor set to the origin already, going to File, Import, will place the model at the center of our scene.
Let's resize it first so it at least fits our camera.
Now if you compare the default import angle for the Deathclaw to our reference image, you'll notice it faces strait down, which isn't really a direction any of the game characters face.
My fix for this was simply to select the model, and change the Z Rotation to 90 degrees.
Now our model facing matches our reference image correctly.
If your model doesn't want to resize or change direction easily, then do this little trick:
Press Shift+A, and add an empty Cube or some other object.
Resize the new empty object and press G and Z to move it vertically just out of our scene.
Select the entire model, then hold Shift and select the empty object.
Press Ctrl+P and select "Object (Keep Transform)".
Now you can move the empty object and the model will match the direction and displacement.
Ok, we've got our scene properly set up, next rename the individual cameras in this order:
The first camera we made is looking at our model facing east, so let's rename it to "Camera_E".
The next camera to our right has our model facing South East, so we'll name this one "Camera_SE".
And we go on like this for each camera.
The model is facing Sowthwest in the next one, so "Camera_SW", then West with "Camera_W", then "Camera_NW", and finally "Camera_NE".
Move the light to directly over-head and at a suitable distance and strength to make nice shadows.
I'm not absolutely sure what settings the original artists used, but at this point it's all up to what you personally think looks good.
Alright, from top to bottom that's our scene and camera's set up, now let's render out a simple animation.
Each critter in Fallout 2 has a simple idle animation where the critter stands in place and makes a simple movement.
Let's make our own by animating this deathclaw to make a simple hand gesture.
To do this let's open up this lower animation window and start working on some keyframes.
Most idle animations in Fallout 2 hover around 12 frames, some are as low as 9 frames, others are as high as 20 frames, this is one of those settings you'll need to pick for yourself, but I'm going to use 12 frames for my animation.
Now, there are a ton of videos on youtube covering animating in Blender already, so I'm just going to fast forward through this process.
If you need help I'll do what I can, but you'll probably find more helpful information by doing a search on youtube or google for your specific problem.
Ok, we've got a nice little waving Deathclaw idle animation put together, next we need to render it.
And here's the trick, not only do we need to render this simple animation, but we need to render it in PNG format frame by frame, and separately for each camera.
To do this I had to create a python script, with the awesome help of Xeizzeth, that would cycle through each camera and render out the animation on each one, and separate them by folder based on the camera name, and in this case the cameras are named after the direction the model is facing on them.
I'm not great with python yet, but let me try and walk you through the code:
Code:
# These two add the blender python and os libraries
import bpy
import os
# This grabs the default render filepath from Blender
original_file_path = bpy.context.scene.render.filepath
# list of cameras
for cam in [obj for obj in bpy.data.objects if obj.type == 'CAMERA']:
# stores the current camera in the "cam" variable
bpy.context.scene.camera = cam
# crops the end of the camera name and stores it in the "camera_path" variable
camera_path = cam.name.replace("Camera_", "")
# sets the variable "file_path" to the default render path with the end of the camera name as a subfolder
file_path = os.path.join(path_dir, camera_path + "\\")
# set's the render filepath to the "file_path" variable we just made
bpy.context.scene.render.filepath = file_path
# the actual render command that renders our animation
bpy.ops.render.render(animation=True, write_still=True)
# changes the current filepath back to the original filepath
bpy.context.scene.render.filepath = original_file_path
Anyway, to run this, just open the "Scripting" tab at the top, Open the "Text" menu and select "New", then copy this entire python script into the empty document.
When you're ready to render your animation, click the little play arrow at the top here.
You'll probably have to give it a few minutes depending on the complexity of your model, and it's a good idea to have the destination folder open so you can see it's progress.
But once the script is finished you should see 6 different folders, one for each camera, and in each folder you should find a .PNG file for each frame of animation.
As long as everything looks good, group these 6 folders up into another folder, name it whatever you want (ideally something identifiable like the model name and the action), and create a text file inside this folder.
Copy this script into the text file and save it with a ".fas" extension:
Code:
ADD_FRAMES, 0, NE\*.PNG
ADD_FRAMES, 1, E\*.PNG
ADD_FRAMES, 2, SE\*.PNG
ADD_FRAMES, 3, SW\*.PNG
ADD_FRAMES, 4, W\*.PNG
ADD_FRAMES, 5, NW\*.PNG
SET_OPTION,AUTOCUTTING,1
SET_FRAMES_OFFSET, 0,-6,6
SET_FRAMES_OFFSET, 1,-6,6
SET_FRAMES_OFFSET, 2,-6,6
SET_FRAMES_OFFSET, 3,-6,6
SET_FRAMES_OFFSET, 4,-6,6
SET_FRAMES_OFFSET, 5,-6,6
This is a script for FrameAnimator.
The first 6 lines use each of the camera folders to create an FRM file.
The Autocutting line tells this script to re-center the model.
And the last 6 lines try to center the model on the correct hex for each direction, but we'll get into that in a moment.
Open FrameAnimator, open the File dropdown and select "Execute Script".
Browse to the folder you just saved this script in and double click it to run it.
Next open the View dropdown and select "Hexes".
You should now see your character model roughly centered on the red hex right in the middle.
But you should definitely double check each direction, because the way FrameAnimator works, it crops all the excess alpha pixels and then tries to auto-center the image by measuring the remaining image width and creating a new center point based on this width.
If you notice the model is off center in a couple of directions, there are two ways of fixing this.
You can click this little 4 way arrow symbol in the bottom left corner here and manually move the model to what looks like a good center, or you can click the Frames Offset button and type in the distance you want move the model on the X and Y axes.
I prefer to type in the numbers after getting the model close to what looks good.
Usually the Y axis will look good and the X axis will have a problem, so I'll want the Y axis to stay the same for each direction, but manually change only the X offset, and this is how you do that.
When you're satisfied with centering for each of the animations, click the little smiling Vault Boy button to create the FRM file.
Choose a folder to save it in, but here's a very important point for newcomers to Fallout 2 modding:
The name can be almost anything you want, but the last two letters must follow a specific naming convention.
Code:
AA - used for idle animations
AB - for the walk animation
AE - CLIMB
AG - WEARING/TAKING OFF ROBE (Goris ONLY)
AK - PICK UP
AL - USE
AN - DODGE
AO - HIT_FRONT
AP - HIT_BACK
AQ - PUNCH
AR - KICK
AS - THROW
AT - RUN
And many, many more.
I've got a whole list on the wiki that I'll link to in the description, just remember whichever animation you're making, and whatever you name it, all the base names must be the same for the same set of frms, and the last two letters in the name need to be one of those listed.
Once you have the frm's named correctly, it's time to add them to the critters.lst file.
Run the Fallout 2 Dat Explorer and open the critter.dat file located in your Fallout 2 game directory.
Open the "art" and "critters" subfolders, and at the very top, the very first entry on the list is critters.lst.
Extract critters.lst to your modded Fallout 2\data folder.
This should create 2 folders, \art and \critters inside that, and critters.lst should be located inside the \critters folder.
Right click on critters.lst and select Edit.
Scroll down to the very bottom of the list and add the base name of your new frm series to the end.
Technically this is all you need to add to get your new FRM to show up in the ProtoManager, but you may have noticed the comma, number, and another comma usually followed by a 1 in a lot of the other entries.
The first number represents which Aimed Shot Screen (VATS) to use for this new FRM file, and this is how it works.
Each line in the critters.lst file is numbered, starting with "reserv" at 0, and these line numbers are used to reference each FRM on this list.
Now, this number representing the Aimed Shot Screen (VATS) is actually referencing a line number in this critters.lst file.
Each critter has a line in critters.lst, but not all critters have their own Aimed Shot FRM (VATS).
Those that don't have their own VATS screen, use other critter's VATS screens by using their number on this list.
For instance at the top of this list, hapowr, the FRM name for power armor, uses the VATS screen for number 21 on this list, mamtnt, the FRM name for supermutants.
While harobe, the FRM name for robed characters such as the Children of the Cathedral or the Hubologists, uses number 11, hmjmps, the FRM name for vault dwellers with their blue jumpsuit.
As an odd sidenote, for some reason even though these two FRM's are on different models, they are duplicates of each other.
Just for fun here's an example of the deathclaw VATS screen, maclaw, number 51.
I'll cover making a new VATS screen in a future video, for now we'll use one of the common line numbers listed here, 51 for deathclaws, and let's get back to critter creation.
Once you've added this line in, save and close the text file, and open the Proto Manager.
Open the "Create Proto file" menu dropdown and select "Type: Critter".
Congratulations! We're finally at the critter creation stage
![Smile :) :)](/../../xencustomimages/smilies/icon_smile.gif)
Click the "General" tab, give your new critter a name, a description if you feel like it, and open the little dropdown box right below that orange flame guy.
At the very bottom, in the same order you placed it on the critters.lst file, you'll find your brand new FRM animation.
Select it, check out your idle animation in that little box, and click all the save buttons:
Save name, Save description, Save Pro.
Also, as a side note, you can add or change the default script for this critter by clicking the "Script ID" dropdown and selecting one from the "SCRIPTS.LST" file.
Anyway, save the proto, close the Proto Manager, and open the Mapper.
Press F2 to open the Critter art list, and press the End key to go to the end of the list.
The very last critter in the row should be your new critter.
Now you can load up a map or create a new one, then right click your critter and place it on your map.
Save your map when you're done, and if you feel like testing it out, run your modded Fallout 2 game after setting the correct map to load as first level, and start a new game.
If everything worked right, you should see your new critter right in front of you, maybe even waving at you playing it's idle animation.
That's it, or as Overseer Jacoren would say, "You've done it!", right before kicking you out of the vault
![Razz :P :P](/../../xencustomimages/smilies/icon_razz.gif)
Ladies and gentlemen, it's been a long process, but we've finally got a new critter, with all 6 facing directions, with at least an idle animation, and maybe a walk or run animation if you feel like taking the time to make them.
If you feel interested, walk animations move 2 hexes in
typically 8 frames, and run animations are usually 4 hexes in 10 frames.
For extra credit, you could open the critter.dat file and extract the FRM animations to a separate folder and check some of them for a better understanding of what your animations should look like.
Remember, there's a wiki link below with a complete list of the different animation naming conventions used in the game, and a lot of them are death animations so be prepared for a lot of wacky fun work blowing up your critter if you're into this.
https://falloutmods.fandom.com/wiki/Critter_FRM_Nomenclature_(Naming_System)
http://www.mediafire.com/file/64kbhk1ijkqrym3/Frame_Animator_270.rar/file
the above link is incorrect, this is the correct link:
https://www.mediafire.com/file/5j459iahzyus5h4/Frame_Animator_v2.70.1_by_Jochua.zip/file
https://falloutmods.fandom.com/wiki/Generating_images_in_3ds_Max
https://falloutmods.fandom.com/wiki/Category:Fallout_2_tutorials_-_art