Guide on Creating Custom Formations.

Discussion in 'Modding' started by A. Soldier, Sep 22, 2016.

  1. A. Soldier

    A. Soldier Active Member

    Hello, about a night ago me and Kiergath looked at making custom formations, took us a few hours but at least we got it working.

    We will be looking at 3 files here, or 3 locations, whichever you prefer to call it.

    dmscript.global - located in \Steam\steamapps\common\Cossacks 3\data\scripts, dictates what limit the formation has, for example a limit is set to 55 (or around that number) men in a single line, meaning that a 3 rank line formation of 180 men (60 men per line) would bug out, soldiers would either be left on the spot and not joining the formation or continue on their marry way to where they were ordered before the order to form a line.

    formations.cfg - located in \Steam\steamapps\common\Cossacks 3\data\game\var, dictates the form of the formation, for example, the 196 man line formation had 5 ranks in it, you can make it into 3 from there, however, mind the limit of men in a single line set in the dmscript.global file or the formation will bug out. I suggest searching for the specific formations for example "196" or "120" to see how they're represented, but in general stars (*) which are made by pressing shift plus 8 at the same time on your keyboard, present the unit, be that an infantry unit, ship, or artillery, while the dot (.) represents an empty space.

    In order to make a new formation just copy and paste another one which was already done and then customize it to your liking.

    Example of a customized 4 line 400 man formation, each line consists of 50 men each -[​IMG]

    country.script - located in \Steam\steamapps\common\Cossacks 3\data\scripts\lib, the final file or location we will need in order to make custom formations.

    Search for "LINE196" in the said file to find where you need to go to list your custom formation(s). There are 2 of these parts there listing 17th and 18th Century formations separately.

    I made a custom 300 formation by adding 'LINE300', between 'LINE196', and 'LINE400',);
    Same goes for the other 2, SQUARE300 and KARE300, you get the point.
    However, you will also need to list the new option above this part.

    There are 5 options by default for infantry formations in "procedure AddOfficersFormationInf"
    Listed as m0, m1, m2, m3, m4. In order to list your new formation just add ,m5 at the back of m4. Simple as that, however, there are 2 places where you will need to add these additional listings in each century's formation so be careful as failing to do so will make the game start with a blackscreen, meaning you messed something up.

    Final product, 300 man formation in a square -[​IMG]

    TL;DR version:

    dmscript.global - Formation limits.

    formations.cfg - Formation forms, 3 ranks, 4 ranks, etc...

    country.script - Listing available formation options, the above 2 will not cause you a blackscreen, however, messing something here up will cause your game to blackscreen, so just be careful.

    Cheers.

    Another thing I wanted to do with formations was give them advanced abilities like fire by rank, fire and advance, possibly platoon fire and so forth, as well as make the first 2 lines crouch before the 3rd line fires, like in Empire and Napoleon Total War, I had an idea of using ("attaching" actually) the peasant crouch while building animation for this. Adding reload animations would be even better for full immersion. Another idea thrown at me by a friend of mine was mixed formations with pikemen and musketeers however that would probably require coding knowledge that's out of our reach for now.
     
    Last edited: Jun 17, 2019
    Fimti and Foeurdr like this.
  2. A. Soldier

    A. Soldier Active Member

    Bump, updated the topic with a full guide on how to make custom formations, enjoy!
     
  3. colonel_panic

    colonel_panic New Member

    Just took a look at this now. First of all, are the 'O' positions in formations.cfg for the officer and drummer?

    Second, is it possible to make hybrid formations? I'm specifically thinking about a 'pike and shot' one for the 17th century pikes and muskets. Although by judicious use of groups I think you might be able to replicate this in the current game.
     
  4. A. Soldier

    A. Soldier Active Member

    Yes, sorry I haven't made it more clearer, though it was obvious.

    It was a C in the old games btw, just so you know.

    And yes I am aware of the pike and shot formations, one way would probably be is to put another type of digit like ! or # for example, the system just needs to be configured, that's all.

    Or atleast I think so, a friend of mine made a flexible formation system, that's why I think it's possible.
     
  5. Erik

    Erik New Member

    I cannot seem to make this work.... I am trying to put in a new custom formation as part of the state and country mod since they lowered the troop levels for formations down to 240 and i want to get back up to 400. Perhaps screen shots would help?
     
  6. A. Soldier

    A. Soldier Active Member

    Unless they changed something I don't know how to help you. This is the method I used and even made a 1000 man formation.

    If you just wanna add back the 400 man formation just look at the default files listed in the locations I've shown here and not the mod ones, then simply copy and paste them over to the mod files.

    I'd post some screenshots but I'm sadly not my computer and I don't know when I'll get to it but I'll try to help you as best as I can from here so tell me if you got any other trouble.
     
  7. Erik

    Erik New Member

    Thanks I tried that. How high can the m# go up to? The mod has it all the way to 9 now.
     
  8. A. Soldier

    A. Soldier Active Member

    What do you mean by m#?
     
  9. Erik

    Erik New Member

    From your listing up top:
    "Listed as m0, m1, m2, m3, m4. In order to list your new formation just add ,m5 at the back of m4. Simple as that, however, there are 2 places where you will need to add these additional listings in each century's formation so be careful as failing to do so will make the game start with a blackscreen, meaning you messed something up."

    For the mod it goes to m9.
     
  10. A. Soldier

    A. Soldier Active Member

    Oh, yeah I think making your new formation, as in the 400 man one, as m10 should work. Try it but please say here if it works or not.
     
  11. Erik

    Erik New Member

    I have tried several different attempts and I cannot seem to make it work.
     
  12. A. Soldier

    A. Soldier Active Member

    That's interesting, well considering this guide was wrote about what now, 2,5 years? It's possible that an update changed something.
     
  13. Erik

    Erik New Member

    You are likely right. Any way it can be updated? I appreciate the support.
     
  14. A. Soldier

    A. Soldier Active Member

    If you mean the game/code I sadly don't think so or don't know, if you mean about the guide, again that's sadly a no from me. I'm too busy with work now compared to 2,5 years ago and the modding and writing of guides for Cossacks 3 while not complex is very time consuming for me. I mean I still mod other games from time to time but it's mostly like in my break time of about 1 or 2, maybe even 3 weeks, max a month, and then I'm gone again so to speak.

    Also here's some pictures of my 1000 man formation I was talking about earlier here:

    [​IMG]

    Without the hud at the bottom -

    [​IMG]

    And this is the kind of map glitching line formation, 4 lines and 250 men each -

    [​IMG]

    It's probably largely unpractical but was fun to see how it would look like in action.
     
    Last edited: Jun 18, 2019
  15. Erik

    Erik New Member

    Interesting and thanks.
     
  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