[GUIDE] Basic information & tips to modding Cossacks 3.

Discussion in 'Modding' started by Ebel, Dec 19, 2016.

  1. Ebel

    Ebel Moderator Staff Member

    1. Some basic tools you may need.

    - A decent text editor. Notepad++ (free) will do the job for most things, but I strongly suggest you get a slightly more advanced editor like : Sublime text (free ), Vim or Atom . Most game files can be opened/edited with any of these tools.
    - An advanced image editor like Photoshop (free trial ), Gimp (free) , Pixlr or Paint.NET
    - 3D modelling programs : 3DS Max (free trial) , Maya , Poser , Blender (free ) , ...
    - Plugins for textures like .dds : Nvidia Texture tools , .dds Gimp Plugin, .tga/.dds thumbnail viewer,...
    - For specific tools for Cossacks 3 : check this thread.

    2. The game files/scripts are written in the Pascal language. You can find some basic syntax tutorials here .

    3. The game files can be found in your steam folder : C:\Program Files (x86)\Steam\steamapps\common\Cossacks 3\ . I strongly suggest you do not directly edit these. Instead take a copy of this folder and put it on your desktop.

    If you did manage to mess up your game, go to your steam app, select the Cossacks 3 game in your library and right click on it -> Select Properties -> Local Files -> Verify integrity of game cache. This should reset any modified files to their original state.

    4. Trouble shooting:

    4.1 Use editor.exe to initially test your mods. It will display logs with errors if any and which line number.


    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.

    4.2 Turn on logging.
    Find the cossacks.ini file in the main Cossacks 3 folder. and set LogFileEnabled to 'true'
       LogFileEnabled = true
       LogFileRoot = true
       LogFileName = cos
    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.

    4.3 Finding a specific error in a .inc/.script/.aix file:

    - start external editor, when the console window is up with the log ; right click on it
    - go to statemachine at the bottom, then select 'edit- modal', then," file - open"
    - select your file, 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.

    5. Using the modmanager.

    Once you have edited some files you can choose to use the modmanager to enable/disable your mod. You can find the modmanager.exe in the main Cossacks 3 folder.

    To make/add a new mod , start the modmanager.exe, click on the create button and give the mod a name (eg MyMod). Close the mod manager.
    Now you will find a new folder called 'MyMod' inside the Cossacks 3\mods\ folder. This is the folder where you should put your modified files.

    Note: use the same folder structure as the basegame. Eg. If you modified country.script, then create the parent folders for it in your mod directory : Cossacks 3\mods\MyMod\data\scripts\lib\country.script

    If the mod is enabled, the game should load the mod.

    6. Some general hints & tips :

    - Know your game. It will come in handy to quicker understand the relation between file's and entries. You will also better understand the consequences of your changes.
    - Read a lot. You never have enough information.
    - Try out things. Don't be shy, you will learn more from your mistakes than anything else.
    - Don't copy & paste, but write your own entries. This will make you think and understand what you are doing.
    - Don't be shy to ask questions. It is not the questions that are silly but often the answers. We all have to learn everything.
    - Don't try to run before you can walk. Do small changes at the time and test often. This will help you to narrow down possible problems and errors.
    - Play some mods. See how other people have done things, what is possible,...It is a great learning school.
    - If you make your modifications with loving care and dedication, you are bound to succeed.
    - Work on a copy of your installation to avoid having to reinstall your game(s).
    - Back up your modifications frequently. Different drives, USB sticks, dvd & cd RW's, internet sites, cloud services, anything goes...
    - Do not publish too soon, but test properly and get feedback.
    - Above all, get organized. Clean up your desktop, it is your working space, you don't need those 999 shortcuts to everything anyway. Instead put your most frequent used programs in your taskbar.

    7. More detailed guides and information


    Got more hints, tips or good advice for beginning modders? A useful tool you can't mod without? Post below!
    Last edited: Feb 22, 2018
    Johny, condor_fly, Ftoomsh and 4 others like this.
  2. Ftoomsh

    Ftoomsh Well-Known Member

    Great guides and advice, thank you Ebel.
  3. Since modding is software development, for more advanced modders, I would suggest using some VCS (e.g. most popular GIT) as a alternative for backups/working on a copy. And IMO it's just in general very usefull tool.

    The advantages are:
    -you see clearly what have you changed (until it's binary file, incl. images) - which line in which file (when GSC was still publishing updates I could easily see what exactly they have changed - line by line)
    -you can have independent changes at the same time (something like different mods) (using branches) at once
    -easy revert of broken changes
    -easy to collaborate (it's easier to work on mod by many people - there are in-built features which support that)
    -backup on online servers (gitlab, github, etc. note there is usually some size limit)
    -it's size optimized (to some extend) (the keeps the diff instead of copy of the whole cossacks folder)
    -it's great for saving some usefull small changes / findings (e.g. you found some nice variable, code block for future mod/idea - you can easily save it as stash or branch (git assumed))

    -you can't easily see binary files' changes (but you can still see the file has changed)
    -if you modify many times big binary file then it would keep history of each change (which would weight sometimes few G/MBs)
    -initial learning curve (you need to learn the tool - but hopefully there are GUI tools which work with just clicks - but still you have to understand some concepts)
    Ebel likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice