Ultimate Zombie Defense 2

Ultimate Zombie Defense 2

Not enough ratings
Modding Guide
By Artis
This consists of a full guide to creating mods for the game
   
Award
Favorite
Favorited
Unfavorite
Setting up a project
Step 1: Download the Modkit
  • Download the Modkit from the download location
  • Extract the Modkit folder to a location of your choice.
Note: The Modkit includes all required files to set up a Unity project for modding.

Step 2: Install Unity Hub
  • Visit Unity’s official website and download Unity Hub[unity.com](it’s free).
  • Install Unity Hub on your system.

Step 3: Add the Modkit Project to Unity Hub
  • Open Unity Hub.
  • Click “Open” or “Add Project from Disk”.
  • Navigate to the folder where you extracted the Modkit.

Step 4: Install the Correct Unity Editor Version
  • The recommended Unity version (at time of writing): 2022.3.60f1.
  • In Unity Hub, install this version if you don’t have it.
  • When installing, include:
    • Unity Editor
    • Microsoft Visual Studio (for scripting, optional but helpful)
⚠️ Versions may change over time. Always check the Modkit documentation for updated version requirements.

Step 5: Open and Load the Project
  • In Unity Hub, click on the project you added.
  • Unity will now load and compile the project—this might take some time.
  • Once loaded, you’ll have access to tools for mod creation and deployment.

Step 6: Explore the Sample Mod
  • Go to: Assets/ModContent
  • Open the ModContent file.
  • This contains a sample mod and shows modifiable aspects of the game.

Step 7: Build the Mod
  • On the top Unity toolbar, go to:
  • The mod should auto-select (only one per project is supported).
  • Set the output path (optional; otherwise, it saves inside the project folder).
  • Click “Build Mods”.
  • When prompted about addressables or build reports, you can just click No.
✅ After build completes, navigate to the output path (C:\Users\<username>\AppData\LocalLow\TerrorDogStudio\Ultimate Zombie Defense 2\Mods) to find the built mod files.

Step 8: Test Your Mod
  • Launch the actual game.
  • If placed in the correct folder, the game should automatically detect and load your mod.

Step 9: Upload to Steamworks
  • In Unity, ensure:
    • Steam is running
    • You are logged in
    • You own the game
  • Once connected, click “Build and Upload”.
  • This will rebuild and upload the mod to Steam Workshop.
  • Upload time depends on internet speed, usually just a few seconds.
✅ A success message will appear once your mod is uploaded.

Step 10: View the Uploaded Mod on Steam
  • In the same ModContent file, click the three dots again.
  • Select “Open Steam Page”.
  • Your default browser will open the workshop page for your mod.
  • Setting up project - open workshop
Updating a project
Requirements Before You Begin
  • A freshly downloaded and extracted version of the mod kit
  • Your current mod project folder
  • Basic knowledge of using Command Prompt on Windows

Step 1: Open Command Prompt
  • Press Win + R, type cmd, and hit Enter.

Step 2: Locate the Update Script
  • In the mod kit folder, there should be a script named Mod_Copy.bat.
  • (Note: File extensions like .bat might be hidden — that's okay!)

Step 3: Run the Script with Parameters
  • Run the script by entering the following command:
  • First Parameter: Path to the fresh mod kit folder
  • Second Parameter: Path to your current local mod project
  • Example of this could be
  • C:\Users\Username\Downloads\Modkit\mod_copy.bat C:\Users\Username\Downloads\Modkit C:\UZD2_DeveloperMods\UZD1MusicTracks
  • (Placeholder: Replace with actual paths as examples)

Step 4: Let the Script Complete
  • Press Enter to run the script.
  • The script will automatically copy and update necessary files

Step 5: Verify Your Project
  • Open your updated project in your editor or development environment
  • Make sure everything compiles correctly after the update
  • Build the mod locally and test it
  • If everything still works, then upload the update to the workshop
  • (Placeholder: Add instructions or checklist for verifying the update)

Notes
  • The update process is usually quick unless major changes exist between versions.
  • Always back up your existing project before performing updates.
  • If you have multiple mods, then it might be worth creating a parent copy script that calls the mod_copy.bat on all the correct directories
Audio Replacement
Step 1: Open Your Project
  • Start by opening the Unity or modding project you're working on.

Step 2: Create a Folder for Mod Content
  • Navigate to the Assets/ModContent folder.
  • Inside this folder, create a new subfolder to keep your mod files organized.
  • Example name: TestAudio2 (you can name it anything you like for organization).

Step 3: Create an Audio Override File
  • Inside your new mod folder (TestAudio2), create an Audio Override file.
  • Example name: TestAudio.

Step 4: Configure the Audio Override File
  • Set the first parameter to the original audio bundle name you want to replace.
  • Example: "game_tracks" if you’re replacing background music.
  • Next, decide if you want to:
  • Clear the original bundle (replace everything)
  • Or add to it (just insert new audio)
  • ✅ In this example, select Clear to remove all existing audio and replace it with your custom audio.

Step 5: Add Replacement Audio Entries
  • Add the audio files you want to use instead of the originals.
  • Example path: audio/music/yourtrackname.

Step 6: Link Audio File to ModContent
  • Go back to your Assets/ModContent directory.
  • Add your TestAudio override file to the ModContent elements list.

Step 7: Build Your Mod
  • Once everything is set up:
  • Build your mod.
  • The system will package your audio and apply the overrides during runtime.

Audio override mod file
Database changes
Step 1: Open Your Project
  • Start by opening the Unity or modding project you're working on.

Step 2: Create a Folder for Mod Content
  • Navigate to the Assets/ModContent folder.
  • Inside this folder, create a new subfolder to keep your mod files organized.
  • Example name: Test Database 2(you can name it anything you like for organization).

Step 3: Create an Database Override file
  • Inside your new mod folder (Test Database 2), create an Mods -> Database file.

Step 4: Set Up Database Structure
  • Create a Database folder in Assets/ModContent/Test Database 2/Database.
  • Create new database entries by
    • Right clicking in Project window
    • Create > Database > (value type)

Step 5: To override
  • To override existing entries, their path should match exaclty.
  • Example path: game/build-duration

Step 6: Updating the Mod Asset list
  • The update should be done automatically during a build.
  • If not, press three dots while database file is selected
  • Select Find All Assets

Step 7: Build Your Mod
  • Once everything is set up:
  • Build your mod.
  • The system will package your database entries and apply them at runtime.

Database mod file
Game Modes
Step 1: Open Your Project
  • Start by opening the Unity or modding project you're working on.

Step 2: Create a Folder for Mod Content
  • Navigate to the Assets/ModContent folder.
  • Inside this folder, create a new subfolder to keep your mod files organized.
  • Example name: Test Game Modes 2(you can name it anything you like for organization).

Step 3: Create an Game Mode file
  • Inside your new mod folder (Test Game Modes 2), create an Mods -> Game Modes file.

Step 4: Create each new Game mode
  • Create a new Game mode
    • Right click in Project view -> Create -> Game -> Game Mode Info
    • The name should be unique as this will be a internal name for it
    • Usually in a [AuthorName]@[ModName]-[GameModeID] format, this will also be the name displayed on the server browser to the people that do not have this mod
  • Give it a Display Name - a name that will be visible in the lobby and select menu
  • Set appropriate Game Type(currently there are 2 included with the game)
  • Set different difficulties and their appropriate values

Step 5: Build Your Mod
  • Once everything is set up
  • Build your mod
  • The system will package your new game modes and will add them to the selectable list at run time

Game Mode mod file
Localisation Changes
Map Modding
Step 1: Duplicate the Sample Map
  • Copy and paste the existing sample map (e.g. “Test Map”) and rename it to “Test Map 2”.
  • Rename the scene to a unique name: e.g. Test Map 2.
  • Update the Mod Content element to match: rename “Test Map” to “Test Map 2”.
  • Expand the level, and assign it the new level asset (i.e. Test Map 2 scene).
  • Scenes must exist in a separate bundle than the mod contents.
  • Use the additional group already in the sample mod (e.g. [AuthorName]@[ModName]-[GameModeID]-scene).

Step 2: Addressable Asset Setup
  • If no group exists, go to: Window → Asset Management → Addressables → Groups
  • Create a new packed assets group.
  • Naming convention: [author]@[modname] and a unique name (e.g. Scene2).
  • Duplicate settings from existing groups:
    • Disable Asset Bundle Cache
    • Asset Bundle CRC → Disabled
    • Internal Bundle ID Mode → Group GUID Project ID Entries Hash
    • Bundle Naming → File Name
  • Select the Test Map 2 scene in the Inspector.
  • Check the [Addressable] checkbox.
  • Give it a unique path, e.g.:
    [AuthorName]@[ModName]-[GameModeID]

Step 3: Mod Element Setup
  • Change the display name to something simple like: Test Map 2 Scene.
  • Preview images:
    • Small → used in the lobby/pause menu.
    • Large → used in loading screen.
    • You can use the same image for both.
  • Supported game types:
    • Add an element and select: Just Survive.

Step 4: Map Editing
  • Open your duplicated scene.
  • Make desired edits (e.g., remove walls for simplicity).
  • Important objects:
    • Center → Contains World Manager script.
    • Make sure the directional light is assigned.
    • GameManager → Hell Spawn Manager (Server + Client)
    • Set up the ground mesh for hell dog spawn points.
    • Use NavMesh points if needed to restrict spawn area.
  • Exposure volume (on client): Defines lighting during hell dog events.

Step 5: Pathfinding
  • Location: Center → GameManager → Pathfinder
  • Supported graphs:
    • Grid Graphs
    • Layered Grid Graphs
  • Only Reachable Nodes: Removes unreachable spawn points.
  • Improves zombie behavior and performance.

Step 6: Game Modes and Waves
  • Location: Center → GameManager → GameModes
  • Delete unused game mode components if needed.
  • Focus on the Wave object (Just Survive mode).
  • World Boss Spawns → Contains valid player spawn points.
  • Spawner Controller:
    • Dictates when spawns unlock.
    • Just Survive → usually all spawns unlock at Wave 0.
  • Use:
    • Right-click script → Gather All Spawners
    • Add missing spawners to ignored list

Step 7: Minimap Renderer
  • Set Bottom Left and Top Right boundaries.
  • Right-click → Render Map
  • Ensure output texture is saved in the correct folder.
  • Update the minimap asset in your Mod Content.

Step 8: Default Camera Preview
  • Select the default camera.
  • Use scene view to position it where desired.
  • With camera selected: GameObject → Align with View
  • This becomes the default preview in-game.

Step 9: Occlusion Culling (Performance Optimization)
  • Select Perfect Culling Baking Volume.
  • Drag it to cover the playable area.
  • Smaller bounds → faster baking.
  • Click: Manage Open Renderer Selection
    • Tick: Only Occluder/Occludee Static Objects
    • Click: Map → Add Selected Renderers
  • Bake only when map is nearly complete.

Optional: Exclude Mesh Collider (Advanced Optimization)
  • Use if you have a huge map with buildings.
  • Create a collider via ProBuilder covering only the playable area.
  • Assign this collider to Perfect Culling Exclude Mesh Collider.
  • Prevents occlusion from wasting memory inside inaccessible areas.

Step 10: Room & Area Setup
  • Useful for multi-area maps with doors and locked zones.
  • Four sample areas exist: Area00 to Area03.
  • Each area:
    • Defines spawns, doors, what to enable/disable on unlock.
  • Placement Controllers → Define buildable regions.
  • Building Blockers → Prevent construction in locked areas.
  • Room Location Parent → Scans for colliders to define area boundaries.
  • Useful for:
    • Hell dog spawn logic
    • Zombie navigation

Final Tips

  • Test early and often!
  • Keep naming consistent and unique.
  • Use the sample map as a blueprint.
  • Set preview images, game modes, and occlusion only after most layout is finalized.
  • Backup your mod project regularly!

Script Modding
Step 1: Open Your Project
  • Start by opening the Unity or modding project you're working on.

Step 2: Create a Folder for Mod Content
  • Navigate to the Assets/ModContent folder.
  • Inside this folder, create a new subfolder to keep your mod files organized.
  • Example name: Test Scripts 2(you can name it anything you like for organization).

Step 3: Create an Assembly Definition
  • Right-click > Create > Assembly Definition
  • Name it something unique
  • Usually in a [AuthorName]@[ModName]-[GameModeID] format

Step 4: Create your scripts
  • Create scripts that you would use in your maps or other type of purpose

Step 5: Link the Assembly File
  • Return to your Test Scripts 2 scripting asset file.
  • Drag and drop your Assembly Definition file onto the Assembly field in the Inspector.

Step 6: Build Your Mod
  • Once everything is set up:
  • Build your mod.
  • The system will package your database entries and apply them at runtime.

Script mod file
Mod Kit release notes
This section will contain all of the public releases of the mod kit. At all times, you should have the latest release of the modkit to ensure that the built mod works with the currently released game.

Initial public release of the mod kit
Download link[drive.google.com]
  • Initial release
2 Comments
twitch: OBERON_GS 16 Jul @ 7:05am 
just create setup steam app
Unorthodox 11 Jun @ 2:38pm 
Thank you for this.