External Editor


Editor.exe is a fairly complex editor. It''s almost impossible to describe every function it has in detail.

I''ll just focus on some hints & tips for modding purposes here. Map making is something else entirely.


1. The Console & Trouble shooting:

Console

The first thing you will notice is the console when starting the editor. It holds vital information of what is going on. Any errors, or output from the game will log here. This is why it is important you use this editor to test your mods and not just the internal editor.
It may even tell you which line the error occured in or what the error is ( eg, badly defined material for an object, a missing file , wrongly name file, etc...)

Scripts are compiled at run time, meaning, the engine follows a specific order of files to load, so if any error line number seems oddly high, then it is because it keeps counting lines file after file, for example the first file in the sequence has 10 lines, the second file has 15, then an error in line 16 would be the 6th line in file 2. This isn''t efficient to find the error, so if an error is logged in the console, you can find out where exactly by doing following:

Aix Editor

A. Finding an error in all files. (the better method)
- Go to Module - StateMachine Collection.
- At the bottom , select lib.src , a new window will open, this is the .aix or script editor.
- On top hit 'States' -> Compile Script (ALT+C) . It will take some time while it is compiling all the scripts.
- If no errors it will show a pop up with a "compiled" message.
- If there are errors, it will show you exactly where and what. (Could be a syntax error, ...)


B. Alternate way : Finding an error in a specific .aix file ( in case you only made changes to one)
- right click on the console window
- go to statemachine at the bottom, then select 'edit- modal', then," file - open"
- select your .aix file, or you may have to select at the bottom 'all files' type
- then go to "states" at top ; and hit compile
It should tell you the error.

Logging.

Sometimes the error is so bad, that instantly after load of the console, it will show a pop up window with an acccess violation error, and you won''t be able to access the console anymore. To see what was in the console, i sugggest you turn on logging.

Find the cossacks.ini file in the main Cossacks 3 folder. and set LogFileEnabled to 'true'

section.begin
   GameSaveDirectoryPath=cossacks
   LogFileEnabled = true
   LogFileRoot = true
   LogFileName = cos
section.end

You can do the same for editor.ini
Now you will find a /log/ folder with detailed logs in your main Cossacks 3 folder next time you start up the game.
You could also send it to your documents folder if you don set LogFileRoot to false.


Play Testing

From within the editor.exe you can play the game aswell. Press Control +T to test the map, and you will be in the Main menu, where you can select random map, load game, campaign.
From here, you can obviously load the internal editor. Once in there, you can easily place units by nation. You can instantly switch back to the main editor, by pressing CTRL+T and use its options, and go back to the internal editor by again pressing CTRL+T. This seems odd at first, but really it allows you to work in both editors at the same time, which gives much more options than any previous Cossacks editors.



2. Hotkeys & Codes

Editor.exe Hotkeys

F1 - View Object Manager
F2 - Player Editor
F3 - Generate Water Fields
F4 -
F5 - Trigger Editor
F6 -
F7 - State Machines Editor (AIX)
F8 -
F9 - Cadencer Editor
F10 - Select Menu Bar (use arrow keys)
F11 - Object Manager
F12 - Save MapTerrain Data (select area)

CTRL + N : New map
CTRL + O : open map
CTRL + s : save map
CTRL + T : test map
CTRL + A : select all
CTRL + L : Lightning
CTRL + D : sediment
CTRL + F : fog effects
CTRL + C : copy (select area first)
CTRL + v : paste
CTRL + U : upscale object
CTRL + j : downscale object
CTRL + H : left rotate object
CTRL + K : right rotate object
CTRL + X : Get angle by axis X (will print in console)
CTRL + Z : Load MapTerrain Data (after using F12), for undo action


CTRL+F1 : view property editor (requires object selected)
CTRL+F2 : view actor editor
CTRL+F3 : view material editor
CTRL+F4 : view children editor
CTRL+F6 : view trackpoint editor
CTRL+F7 : catch object editor
CTRL+F8 : animation editor


CTRL+ALT+ R : reload map , refresh decals
CTRL+ALT+ T : Terrain tool
CTRL+ALT+ U : Players tool
CTRL+ALT+ C : Cameras tool
CTRL+ALT+ D : Decal tool
CTRL+ALT+ I : Collision tool
CTRL+ALT+ O : Constructor tool
CTRL+ALT+ P : Pattern tool
CTRL+ALT+F1-F12 : for manipulating the AABB boxes around units/objects.

SHIFT+CTRL+left/right arrow = rotate object
SHIFT+CTRL+up/down arrow = scale object
ALT + F4 : Exit
DEL : Clear
Space bar : Deselect current option. (ie, when placing units and wanting to stop.)

Select Objects -> Right Click : brings up context menu with various options, editors, ...
Select Console -> Right Click : brings up context menu with various options, scripts, etc...


Editor Hotkeys:

F6 Trigger Editor(from editor.exe)
F7 State Machines Editor (AIX)
F8 Animation Editor.
F10 Menu
F11 Scenario Editor
F12 Screenshot (Steam folder)

P - Nation menu
Space bar : Deselect current option. (ie, when placing units and wanting to stop.)

Keyboard 1 - X : Access Player Colours (Player 1, Player 2,...)


CTRL+W : Peace Mode
CTRL+A : Select All Units
CTRL+Arrow keys = move object.
CTRL+SHIFT+Arrow Keys= Fast move object.
CTRL+ALT+Arrow keys = rotate object.

CTRL + PGUP = Zoom In (focal)

Codes: Hit Enter & type:

fps - will show the fps above minimap.


3. Scripts

A set of useful modding & mapping scripts can be found in the Menu Bar on top under the 'scripts' section. But a lot more 'editor' scripts can be found by right clicking on the console window and going to "State Collection"
These are developper scripts: Faust, Nikolja, Sigmar, GEC are the names of developpers, and their scripts are grouped here. The use of these scripts have a wide range, some are purely for testing things, others need specific situations set up first, some will give output in the console, others will just do what they say, etc.. There are many scripts here , I can''t say I know what they all do , nor have I tried them all.

The actual code for these scripts can be found in the main /scripts folder (not /Data/scripts !) .You can add your own scripts here if you want, register them so they will appear in the editor.