Introduction to Mordhau Modding

As an avid Mordhau player and modder, I've spent countless hours tinkering with the game's files to create custom content. One of the most rewarding aspects of modding Mordhau is crafting unique weapons that breathe new life into the medieval combat experience. In this comprehensive guide, I'll walk you through the process of creating a custom weapon mod for Mordhau, from concept to implementation.

Mordhau's modding community is vibrant and supportive, and with the right tools and knowledge, you can contribute your own creations to this exciting ecosystem. Whether you're a seasoned modder or a complete novice, this tutorial will provide you with the step-by-step instructions needed to bring your weapon ideas to life.

Prerequisites and Tools

Before we dive into the nitty-gritty of weapon modding, let's ensure you have all the necessary tools and prerequisites:

  • Mordhau Game: Obviously, you'll need a copy of Mordhau installed on your PC.
  • Unreal Engine 4.20: Mordhau uses this version of Unreal Engine, so you'll need to download and install it from the Epic Games launcher.
  • 3D Modeling Software: I recommend Blender (free) or Maya for creating your weapon models.
  • Image Editing Software: For texture work, GIMP (free) or Adobe Photoshop will be essential.
  • Text Editor: A good text editor like Notepad++ or Visual Studio Code for editing configuration files.
  • Mordhau SDK: This is crucial for accessing the game's assets and tools. You can download it from the Mordhau Mod.io page.

Once you have all these tools installed and ready, we can begin the exciting journey of creating a custom weapon for Mordhau!

Conceptualizing Your Custom Weapon

The first step in creating any mod is to have a clear concept. For this tutorial, let's create a unique two-handed sword called the "Flamberge Zweihander." This weapon will combine the wavy blade of a flamberge with the length and heft of a zweihander, creating a visually striking and formidable weapon.

When conceptualizing your weapon, consider the following aspects:

  • Historical Accuracy: While Mordhau allows for some creative liberties, staying somewhat grounded in historical weaponry can enhance immersion.
  • Game Balance: Think about how your weapon will fit into Mordhau's existing arsenal. It shouldn't be overpowered or underperform.
  • Visual Design: Sketch out your idea or find reference images to guide your 3D modeling process.
  • Gameplay Mechanics: Consider any unique properties your weapon might have, such as reach, swing speed, or special attacks.

3D Modeling Your Weapon

With our concept in mind, it's time to bring the Flamberge Zweihander to life in 3D. I'll be using Blender for this tutorial, but the principles apply to other 3D modeling software as well.

Here's a step-by-step breakdown of the modeling process:

  1. Basic Shape: Start with a basic cylinder for the blade and cube for the handle.
  2. Blade Detailing: Use the subdivision surface modifier and careful edge loops to create the wavy flamberge pattern.
  3. Handle and Guard: Model the crossguard and pommel, paying attention to historical references for authenticity.
  4. UV Unwrapping: Properly unwrap your model's UVs to prepare for texturing.
  5. Optimization: Keep your poly count reasonable - aim for under 10,000 triangles for good performance.

Here's a snippet of Python code for Blender that can help automate the creation of the wavy blade pattern:

import bpy
import bmesh
import math

def create_wavy_blade(length, width, waves):
    # Create a new mesh and a new object
    mesh = bpy.data.meshes.new(name="Wavy Blade")
    obj = bpy.data.objects.new("Wavy Blade", mesh)

    # Link object to the scene
    bpy.context.scene.collection.objects.link(obj)

    # Create mesh from python data
    bm = bmesh.new()

    # Create vertices
    for i in range(waves * 2 + 1):
        x = i * length / (waves * 2)
        y = math.sin(i * math.pi / 2) * width / 2
        bm.verts.new((x, y, 0))

    # Create edges
    bm.verts.ensure_lookup_table()
    for i in range(len(bm.verts) - 1):
        bm.edges.new((bm.verts[i], bm.verts[i+1]))

    # Update mesh with new data
    bm.to_mesh(mesh)
    bm.free()

    # Update mesh
    mesh.update()

# Call the function
create_wavy_blade(length=2, width=0.1, waves=5)

This script creates a basic wavy blade shape that you can then modify and refine in Blender.

Texturing Your Weapon

Once your 3D model is complete, it's time to give it some color and detail through texturing. For our Flamberge Zweihander, we'll create a worn metal texture for the blade and a leather-wrapped handle.

Here's the texturing process:

  1. Export UV Map: Export your UV map from Blender to use as a guide in your image editing software.
  2. Create Texture Layers: In GIMP or Photoshop, create separate layers for base color, metallic properties, roughness, and normal maps.
  3. Base Color: Paint the basic colors of your weapon - silver for the blade, brown for the handle.
  4. Metallic Map: Create a black and white image where white represents metallic areas (the blade) and black represents non-metallic areas (the handle).
  5. Roughness Map: Another black and white image where black is smooth and white is rough. This will give your blade a polished look while making the handle appear more worn.
  6. Normal Map: Generate a normal map to add fine surface details like scratches on the blade or leather grain on the handle.

Remember to save your textures in a format compatible with Unreal Engine 4.20, such as PNG or TGA.

Importing Your Weapon into Unreal Engine

With your 3D model and textures ready, it's time to bring your creation into Unreal Engine 4.20. This is where we'll set up the weapon's properties and prepare it for use in Mordhau.

Follow these steps to import your weapon:

  1. Create a New Project: Open Unreal Engine and create a new project using the Mordhau SDK template.
  2. Import 3D Model: Drag and drop your FBX file into the Content Browser.
  3. Import Textures: Similarly, import all your texture files.
  4. Create Material: Right-click in the Content Browser, select Material, and name it "M_FlambergeZweihander".
  5. Set Up Material: Open the material and connect your textures to the appropriate nodes (Base Color, Metallic, Roughness, Normal).
  6. Apply Material: Drag your new material onto your imported 3D model in the viewport.

Here's a basic material setup in Unreal Engine material editor:

Setting Up Weapon Properties

Now that your weapon is in Unreal Engine, we need to set up its properties to define how it behaves in-game. This involves creating a new Weapon Blueprint and configuring various parameters.

  1. Create Weapon Blueprint: Right-click in the Content Browser, select Blueprint Class, and choose "BP_MordhauWeapon" as the parent class.
  2. Open Blueprint: Double-click your new Blueprint to open it.
  3. Set Mesh: In the Components tab, find the Weapon Mesh component and set its Static Mesh to your imported 3D model.
  4. Configure Properties: In the Details panel, you'll find numerous properties to adjust. Here are some key ones:
  • Weapon Type: Set to "Two Handed Sword"
  • Base Damage: Adjust based on your weapon's intended power (e.g., 70)
  • Swing Speed: Set a value that balances with the weapon's size (e.g., 1.3)
  • Stamina Drain: How much stamina each swing uses (e.g., 20)
  • Reach: The weapon's range (e.g., 190 for a long zweihander)

Here's a snippet of Blueprint script that you might use to define a special attack for your Flamberge Zweihander:

Testing Your Weapon

Before we package our mod, it's crucial to test the weapon thoroughly to ensure it functions as intended and is balanced within the game.

  1. Play in Editor: Use the "Play" button in Unreal Engine to test your weapon in a controlled environment.
  2. Check Animations: Ensure all attack animations work correctly with your weapon's model.
  3. Test Damage: Verify that your weapon deals the intended amount of damage.
  4. Balance Check: Compare your weapon's performance against existing Mordhau weapons to ensure it's not overpowered or underpowered.

Make adjustments to your weapon's properties as needed based on your testing results.

Packaging Your Mod

Once you're satisfied with your weapon's performance, it's time to package your mod for distribution.

  1. Create a Mod Info File: Create a new text file named "modinfo.ini" in your project folder with the following content:
  1. Package the Mod: In Unreal Engine, go to File > Package Project > Windows (64-bit).
  2. Locate Output: Find your packaged mod in the output directory specified during packaging.
  3. Create Mod Folder: In your Mordhau installation directory, create a new folder in the Mods directory named "FlambergeZweihander".
  4. Copy Files: Copy your packaged mod files and modinfo.ini into this new folder.

Sharing Your Mod

With your mod packaged and ready, it's time to share your creation with the Mordhau community!

  1. Mod.io: Create an account on mod.io and upload your mod, providing a detailed description and screenshots.
  2. Mordhau Forums: Share your mod on the official Mordhau forums to get feedback from other players and modders.
  3. Video Showcase: Consider creating a short video demonstrating your weapon in action to attract more users.

Conclusion

Creating a custom weapon mod for Mordhau is a rewarding experience that allows you to contribute to the game's diverse arsenal. By following this guide, you've learned how to conceptualize, model, texture, and implement a new weapon in Mordhau. Remember that modding is an iterative process - don't be afraid to revisit and refine your creation based on community feedback.

As you continue your modding journey, consider exploring more advanced techniques like creating custom animations or even entire weapon classes. The Mordhau modding community is always eager to see new and innovative creations, so let your creativity run wild!

Happy modding, and may your Flamberge Zweihander strike fear into the hearts of your enemies on the medieval battlefield!

Share

Lukasz Jedrak

Content AI Powered

Leave a Reply

Your email address will not be published.*