Creating a Weapon Mod - Kizari/Flagrum GitHub Wiki

Introduction

This guide will cover the entire process of creating a weapon mod from start-to-finish. Since this is an introductory guide, it is tailored towards beginners and will not cover more advanced aspects like gun mechanic mods. Because of this, it is highly recommended that you choose a simple weapon without any loose parts like chains, chord, or fabric. For the purpose of this guide we will cover porting Lightning’s Blazefire Saber, as a one handed sword.

Imgur

Table of Contents

Setting Up

You will need:

Once you have all the necessary tools installed, proceed to the next step.

Importing the Models

First we must import the desired models into Blender so we can modify them.

For this project we are going to need two models.

  1. A weapon we want added to the game.
  2. A sample weapon to get size and position information from.

Imgur

Start by importing both models into Blender.

If you are unsure on how to get models out of the game files and into Blender, refer to this guide.

Imgur

Fitting the Weapon

Next we need to adjust the weapon to fit on a standard sword.

Hotkeys S & R will scale and rotate the model. The goal is to get tip and base of the model as lined up as possible. A good measure for these models is that the grips are in the same position with similar width, while also noting which way the blade faces.

Imgur

Rigging the Weapon

Since the ported weapon and the Engine Blade have different armatures, we need to copy the rigging (vertex weights) from the Engine Blade to the Blazefire Saber so that it will animate correctly when used. For most weapons, including this, the only vertex group is C_Body, which should have 1.0 weight (red) across the entire mesh.

Imgur

To make sure none of weapon's original rigging interferes with the new mod, we need to do some cleanup. Go to the Modifier Properties tab, click the dropdown arrow to the right of the Armature Modifier, and click Apply.

Imgur

Go to the Object Data Properties tab, click the dropdown next to the Vertex Groups list, and select Delete all Groups. The Blazefire saber is now cleared of any armature data and rigging data from the original. We no longer need the original Blazefire armature, so delete it.

Imgur

Now to reparent the sword, first select the Blazefire Saber mesh, then hold Ctrl and select the sample sword's armature so both are selected at the same time. Hit Ctrl + P > Armature Deform.

Imgur

Finally, select the Blazefire Saber mesh. Change from Object Mode to Edit Mode from the dropdown in the top left. Select all the vertices of the Blazefire Saber if they were not atomically by hitting A. Return to the Object Data Properties tab, click the + next to the Vertex Groups. Rename the new Group to C_Body. Adjust the weight slider under the list to 1.0, and finally select Assign

Imgur

You can double check this by changing Edit Mode to Weight Paint. The Blazefire Saber should have turned from Blue to Red, and you should now see C_Body listed as the only Vertex Group.

Imgur

With the weights and positioning done, the sample sword mesh is no longer needed and can be deleted.

Assigning Flagrum Materials

Next we need to assign the Flagrum Materials that will be used to apply textures and shaders to the mod once it is put into the game.

Select the weapon, then navigate to the Material Properties tab. Under the Flagrum heading, change the Material to Basic Material. For other weapons, the material should be selected based on what is most appropriate for the selected mesh. For example, a mesh that has glass would use Glass Material.

Imgur

Flagrum sets sensible defaults for all of the material values, so we only need to fill in the texture slots. If your model already has textures assigned, you can view them by going to the Shading tab along the top menu. The orange nodes are the texture nodes, and you can see each of the textures written on the header of each of these nodes. Refer to these as you fill in the texture inputs.

Imgur

For help identifying texture types refer to this guide.

Exporting the Model

With the model now complete, we need to export it to the Flagrum Model Data format (FMD) so Flagrum can build a mod from it.

Simply go to File > Export > Flagrum (.fmd) and save this wherever you like.

Creating the Mod

The final step is to create the mod itself.

  1. Launch Flagrum, which will open to the Mod Library tab by default.

  2. Click the New Mod card.

  3. Leave the TYPE as Weapon, and change the TARGET to Sword

  4. Select the FMD file you exported in the previous section.

  5. Fill out the form to your liking.

  6. Optionally, select a preview image (Change Image button) if you don't want to use the default.

  7. Click Save at the top of the screen.

The mod is now created and automatically applied to the game. You will find it in the gear menu next time you launch the game.

⚠️ **GitHub.com Fallback** ⚠️