Create New Document

The title of your document (will be displayed as H1)
URL-friendly name (no spaces, use dashes)
Path where to create document (optional, use forward slashes to create subdirectories)

Move/Rename Document

Current location of the document
New path for the document (including the slug)
This only changes the document's path. It does not modify the document's title (H1 heading).

Delete Document

Are you sure you want to delete this document? This action cannot be undone.

Warning: If this is a folder, all contents including subfolders and documents will be deleted.

Message

Message content goes here.

Confirm Action

Are you sure?

Attachments

Allowed file types: jpg, jpeg, png, gif, svg, webp, txt, log, csv, zip, pdf, docx, xlsx, pptx, mp4 (Max: 10MB)

Document Files

Loading attached files...

Document History

Previous Versions

Loading versions...

Preview

Select a version to preview

Wiki Settings

Language for the user interface
Number of versions to keep per document. Set to 0 to disable versioning.
Maximum allowed file size for uploads in MB.

User Management

Add New User

Leave empty to keep current password

Import markdown files from a ZIP archive. Files will be processed and stored in the appropriate document structure. Directory structure in the ZIP (category/subcategory) will be preserved in the wiki.

Upload a ZIP file containing markdown (.md) files to import.

Add Column

Creating a Mutator

This guide will teach you basics of how to create a simple mutator.

For illustrative purposes, our task will be to write a mutator that will send a periodic message to all players connected to the server.

Prerequisites

This guide assumes that you have already installed the DarkestHourDev development environment.

What is a mutator?

Mutators are compiled code and/or asset packages that, when applied to a game server, can make modifications and additions to the base game. Mutators can be used to add weapons, vehicles, administration menus, and entirely new game types to Darkest Hour.

Creating the package

All of the code files (*.uc) for a mutator must live inside of a package. Our first job is to create that package.

To create a mutator package, we must first create a folder in the Red Orchestra directory with the name of our package.

  1. Navigate to the Red Orchestra directory (eg. C:\Program Files (x86)\Steam\SteamApps\common\Red Orchestra).
  2. Create a folder named MyMutator.
  3. Inside the MyMutator folder, create a folder called Classes.

Now your package folder is set up. Simple, right? Now we need to add some code so our mutator will do something!

Adding the code

Create a file called MyMutator.uc inside the %RODIR%/MyMutator/Classes directory. This will be the primary file for your mutator.

Once the file is created, copy and paste the the code below into MyMutator.uc and save it.

class MyMutator extends Mutator;

function PostBeginPlay()
{
    SetTimer(60.0, true);
}

function Timer()
{
    Level.Game.Broadcast(self, "Welcome to" @ Level.Game.GameReplicationInfo.ServerName $ ", enjoy your stay!");
}

Compiling the mutator

Now that we've got our mutator package created and some code to execute, we need to compile the package so that it can be executed on your server.

The first thing we need to do is to add the name of our package to a list of packages to be compiled.

The file we need to edit is %RODIR%/DarkestHourDev/System/DarkestHourDev.ini.

DarkestHourDev.ini does not exist if you have not run DarkestHourDev before. To run DarkestHourDev, use the batch file located at %RODIR%/System/DarkestHourDev.bat.

Open DarkestHourDev.ini in any text editor and search for EditPackages. You should see the following:

…
EditPackages=DH_Effects
EditPackages=DH_Engine
EditPackages=DH_Game
EditPackages=DH_Interface
EditPackages=DH_Weapons
EditPackages=DH_Vehicles
EditPackages=DH_Guns
EditPackages=DH_Equipment
EditPackages=DH_ATWeapons
EditPackages=DH_Mortars
EditPackages=DH_LevelActors
EditPackages=DH_GerPlayers
EditPackages=DH_BritishPlayers
EditPackages=DH_USPlayers

In order to compile your mutator, add the following line after the last EditPackages line in the file.

EditPackages=MyMutator

Now we're ready to compile! To compile the mutator, execute the following batch file:

%RODIR%\tools\make\make.bat

Attached Files

Loading attached files...

Comments

No comments yet. Be the first to comment!

Search Results