Act of War Wiki
Advertisement
Act of War Wiki

This page is a copy of the Modding Tool Guidelines document for Act of War: High Treason.

Getting started

What can be modded?

In fact, a lot of things! Depending of your time, talent, programming knowledge, you will be able to make small modifications like parameters tuning up to add new multiplayer modes for example.

Technically speaking, the following kind of data can be modified:

  • NDF files: contain script and objects descriptions.
  • PY files (Python): contain algorithm not easy to express in NDF.
  • TGA: bitmap files used in the HUD.
  • OGG: music files.
  • WMV: video for the cut-scenes in the solo missions.

Using the Mod Manager

Introduction

The Mod Manager allows you to:

  • To launch a mod.
  • To begin modding the game using the official data.
  • To test your modding while working on it.
  • To test your modding in Dev Mode.
  • To backup and restore the sources of your current mod.
  • To package your mod to be shared with others.

Game Directory

This is the installation of the game used for modding. To replace it, just run the executable of the installation you want to use.

Launching a mod

The first notebook called "Launch MOD" displays the list of all available mods. You can select one of those and run it.

Producing a new mod

The second notebook called "MOD Production" is dedicated to the creation of a mod.

If there is not any current mod available, then you have a notebook called "Start". Enter the name of your new mod, and then choose between:

  • "Create with official data": uncompress all the data files you can modify for your mod. That allows you to see how the game is done and to modify anything you want.
  • "Create empty MOD" will permit you to add only the files you want.

After creating a new mod, there are several new notebooks:

Test
There are two testing modes, the first is the one corresponding to the standard style of play whereas the other one is used to fine test the MOD in a dedicated blank map. Caution: "test MOD in Dev mod" is not compatible with Chapters (the single player campaign). Do not load a saved game from this mod.
Backup
Here you can save all your mod files. You can either save all the files, or save only the modified ones.
Restore
The “Restore MOD data” uncompress backup of the mod.
Info
Here you can change the information about your mod: its author, name, description, etc.
Package
Packing your mod allows you to launch it with the “Launch MOD” notebook, and to share it with others.
Clean
This will remove all the files of the current mod, so you can start creating a new mod.
Document
This will generate documentation about modding.

Shortcuts

In the Dev mode, there are a few development shortcuts available to ease testing:

  • DEL: kill the current selected unit if any.
  • ALT+I: cycle the ingame HUD or reload the main menu.
  • +: Accelerate the speed of the game.
  • -: Decelerate the speed of the game.
  • *: Reset the speed of the game to normal speed.
  • CTRL+F1 : Create a Consortium base.
  • CTRL+F2: Create a US base.
  • CTRL+F3: Create a Task Force base.
  • END: Inflict damage to the selected unit if any.
  • ALT+D: Launch the NDF debugger.

Preparing your modding environment

In order to ease your mod production, you should have two installations of the game in two different directories. One for your regular playing and one dedicated for your current mod production.

The first one will also be used to test your just packaged mod or enjoy the mods made by others.

Useful directories for modding

After you have created a new mod with official data, you should have a lot of files in your game directory.

Here are the most important ones:

<GameDirectory>
|
|--AOW
| |--CustomMaps                   The finalized custom maps (ready to be distributed)
| |
| |--DataLight
| | |--Interface2D                All interface elements
| | | |--Ingame
| | | |--Outgame
| | |
| | |--TypeWarrior
| | | |--_Common
| | | | |--SpecialAptidude        Skills (Competences)
| | | | | |--Unites
| | | | | | |--AOW                Lots of effects (weapons)
| | |
| | |--TypeWarriorLasy            Definition of units
| | | |--Bases Buildings
| | | |--Marine Navy units
| | | |--Unite Other units
|
|--Code Shaders
|
|--CustomData
| |--XFiles3                      Put your own models and other
data here
|
|--Data
| |--CustomMaps                   The custom maps are saved here
|
|--DataLight
| |--DefaultNDF
| | |--Unites
| | | |--ParametreSemantiques     All units parameters
| |
| |--effet
| | |--EffetIA                    AoWCheatCode.ndf :)
| | |--TestModding                Test effect with CTRL+P /
CTRL+D
|
|--Mods                           Where the mods are stored (ready to be distributed)
|
|--SDK
| |--backup                       Backup of your mods
| |--bin                          ModManager.exe
| |--Samples                      Samples mods
|
|--ZZ                             Generated files
| |--GenHLSL                      Shaders (see below)

When you remove all mod related files (with the mod manager), the directory ZZ is erased. So the first time you will test a new mod, all the files will be generated again.

If you want to save the "Shader generation" time, and only if you have not modified them (the files in <GameDirectory>\Code), you can backup the ZZ\GenHLSL directory just before to clean, and paste it after.

Final package for mod distribution

While you are working on your mod, with all official data, the game is generating a lot of files in <GameDirectory>/ZZ. If you package your mod directly, there will be too many files in it. The disadvantage is that your packed mod will be 100MB more than expected.

To make the final package properly, you have to proceed by steps:

• Backup your mod files with "Smart Backup". • Erase all the mod files: "Clean data". • Create a new mod: "Create Empty Mod". • Restore your backup mod files: Restore Mod Data. • In order to generate the only useful files: "Test MOD in normal mode". DO NOT "Test Mod in Dev mode", or too much files will be generated). • "Package Mod" and distribute it (in a .ZIP file for example).

Using the NDF Debugger

The debugger is very useful to check if the game evaluates your NDF code as you want.

  • First create a file test.ndf with the first exercise in <GameDirectory>\DataLight\effet\TestModding\.
  • launch the game with the mod manager (Test MOD in Dev Mod).
  • Open the debugger with ALT + D.
  • Open your .ndf file with "File", "Load fichier parNDF". Now select your test.ndf file.
  • Add breakpoints (click at the left of the line numbers) where you want.
  • Now Run (with F9). In the game, press CTRL+P and CTRL+D in order to launch the effect in the file.
  • When the game evaluates the line with breakpoint, it will stop.If you want the game to evaluate the next lines, click on "Step" (F8) or "Step Into" (F7).

By rolling your mouse over a variable or an accessor, you will be able to see their value.

Advertisement