Random findings about the editor.

Discussion in 'Modding' started by Ebel, Jul 12, 2018.

  1. Ebel

    Ebel Moderator Staff Member

    Some random stuff about the editor.

    1. Animation debug tool.
    There's a 'hidden' animation debug tool. If you start up the external editor, then press CTRL+T, go to the internal editor. Place down a unit.
    Select it, Press F8, a menu with the animations will show up where you can try out the various animations of the unit.
    Usefull if you are adding a new unit and need to check on the smooth transitions of the various animations.


    There are more hotkeys for manipulating a unit but they are disabled. You should go to data\gui\menu.inc\registershortcuts.inc

    Around line 137 you will see:

     {RegisterGUIShortcutIgnoreShift(False, '.', '.', 'Shift+Ctrl+Alt', 'spiDown', 'OnShortcut', 0); // debug animation change frame
          [*] = ;   RegisterGUIShortcutIgnoreShift(False, ',', ',', 'Shift+Ctrl+Alt', 'spiDown', 'OnShortcut', 0); // debug animation change frame
          [*] = ;   RegisterGUIShortcutIgnoreShift(False, 'Shift+.', 'Shift+.', 'Shift+Ctrl+Alt', 'spiDown', 'OnShortcut', 0); // debug animation change frame
          [*] = ;   RegisterGUIShortcutIgnoreShift(False, 'Shift+,', 'Shift+,', 'Shift+Ctrl+Alt', 'spiDown', 'OnShortcut', 0); // debug animation change frame
          [*] = ;   RegisterGUIShortcutIgnoreShift(False, '/', '/', 'Shift+Ctrl+Alt', 'spiDown', 'OnShortcut', 0); // debug animation play anim}
    Just remove the {} around this section, save. Then start up the external editor, ctrl+T , internal editor, place a unit, select it and play around with the following hotkeys as listed above. Probably best to put this file in a mod , don't go altering base files.
    (eg ctrl+shift+alt + left arrow key = will rotate the unit.)

    There are a bunch of hotkeys in that file that you can use/try out both useful for both debugging as setting up scenario's. Which brings us to the next tool.

    2. Scenario editor
    The hidden scenario menu, which apparently has been there all along (F11 key) but they didnt tell us. Accidently ran into it while trying to take a screenshot.


    If you want to see samples of mission triggers:
    External editor - ctrl+T - internal editor- external editor menu-File - open & pause- select missions/ausmis1.map . CTRL+T - F11
    There appear to be hotkeys for this editor as well listed in the shortcuts file.

    Should be possible to create custom scenario's/battles with this, load them trough the campaign file & upload as a 'mod' to the workshop as a custom single player scenario.

    3. Extra 'hidden' scripts.
    - Upgrades & units stats logging

    If you are in the external editor and you right click on the console, click on state machine -> Sigmar-> Log Upgrades

    You can find the log in /data/upgrades_version.txt

    For unit stats, same thing, but click on Sigmar-> Logstatunits, it will spam the console. Then right click on console- save as, give it a name and save as .txt file.

    Can be usefull for quickly checking stats on your mods units rather than having to dig in the scripts.

    You can also add your own scripts here if you want. You'd have to look in the main cossacks 3 folder/scripts ( not data/scripts) . These are all editor scripts from the dev's which have various purposes. Some seem not to work on first glance but if you read the scripts and see what they do and think a bit, you'll realize that sometimes you need to select a unit first for it to do anything, or be in the internal editor, etc
    it all depends on the script.

    To add your own scripts, look into scripts/editor.aix to add them to the drop down menu's.(as in the image above)
    If you want to add to the top bar menu look into scripts/editor.inc/onautoruneditor

    There are many scripts in there that can be usefull for modding purposes, depending on what you are trying to achieve.
  2. Johny

    Johny Member

    Nice job! The revelation of scenario editor is a great message. But after all I still don't know why developers didn't finished in-game editor and scenario editor. I don't want bashing them for leaving disadvantageous project, but why did they do that without finishing the basic?
    Loner likes this.
  3. Ebel

    Ebel Moderator Staff Member

    I don't understand. Why you think it's unfinished? What are you missing/what is it that you can't do? Be specific.
  4. Johny

    Johny Member

    One for all - ingame map editor + scenario editor.

    In-game editor was easy-to-operate tool to make own maps for players with or without skills of programming. Very popular in CS1 and in CS2. There were many forums full of maps and scenarios filled with impresive enviroment and tasks for players. Principle is that creating map and scenario was easy without frustration of sloppy camera movements like now in external editor. (That's unfinished another thing)


    We figured out that game files contains new nations, enviroments and daylight positions (with many of them can be manipulate in external editor). We thought that those thing will be implemented in game later. But where they are? That's it, nowhere. And don't tell me it should be like this. It's like when someone finish a project and half of its content let lies in the drawer.

    "We finished the game and hided purposely big part of content in game files. Right?" Wrong...
  5. Ebel

    Ebel Moderator Staff Member

    It's there, simply start up the external editor, press control T, start internal editor and you have both active at the same time. All the stuff from the internal editor AND the external editor. There's far more in there now than there used to be in C1. You just have to get used to this idea that its split in 2, but can be used simultaneously. You don't need any programming skills for this.

    I'll agree about the forums/sites full of maps being out there for C1. I host a site with tons of maps. What was lacking for C3 was the scenario editor to make them, or so we thought, but since it's there, there's nothing left stopping anyone from making them.
    Just because it's more complex doesn't mean its unfinished. We could do with a tutorial though. I did ask bodun/ungar about it, he said he would consider it.

    The 2 traces of 'new nations' aren't really a point to say the editor is unfinished. It just means at some point they considered adding them and still might, or might not, but these arent necessary to the editors functionality.
    All the rest that isn't used, is because this isn't a new engine, everything that isn't used is from another game this engine was build for. Ever seen "castles" being referred to in the editor? Well, there are no castles in C3, there were however in the other game. Does that mean the editor isn't finished & functional? No.
    It was a mistake to think that those things would be implemented in game. It stems from the fact that not many people know this comes from another game, rather than being unfinished features.

    I hope that made sense.
    Why don't you try things out and ask specific questions when you get stuck?
    Johny likes this.
  6. Johny

    Johny Member

    It was a year ago when we tried to figure out how this practically works. There are some old strings of topics with steps we made (in case someone think we didn't try it), but after some months I moved to another own life interests (to finish my
    bachelor's degree). Now I'm getting slowly back and you just posted this topic, lucky coinsidence.

    Anyway thanks for usefull informations, I will try these things.
  7. Daddio

    Daddio Moderator Staff Member

    Angel you are a wonder!

    The community owes you much more than can ever be given!

    Last edited: Jul 13, 2018
  8. Original-Cossacks-Player

    Original-Cossacks-Player Active Member

    Theres additional information on modding which should very similar to Cossacks 3 because of the game similarities as Wraith mentioned in another thread.
    Depending what legacy assets have been left in the Cossacks 3 engine there could be a lot of possibilities to be modded.

    This thread lists a heap of info on the tools and possibilities and such:

    And Youtube videos on modding the game:

    Last edited: Jul 15, 2018 at 11:01 AM
    Johny likes this.
  9. Loner

    Loner Active Member

    Is there some reason why one of my posts has been deleted, I apologise if I have offended anybody, I was just pointing out that 'wonder' had been mis-spelt in a light hearted way.
    I always try and help people on this 'Forum', when I can, so do not take kindly to such an act.:(
  10. Ebel

    Ebel Moderator Staff Member

    I removed a few posts. They were off topic and tbh, embarrassing.
  11. Loner

    Loner Active Member

  12. Johny

    Johny Member

    I have several questions. Mabye they are quite dumb, but I can't figure them out.

    If I want to operate with terrain tool in Editor:

    1a) I there an option to choose more types of terrain at once? In CS1 it was by ctrl od shift key, it was a choise for terrain ratio (for example grass-mud 5:1) and it simplified work by choosing more types of terrain and creating more complicated surfaces.
    + Is there a way for that Mul/Mix/Add buttons will start working?

    1b) I see that I can change the colourness of surface by adding or removing some type of colour. But if I change the setting nothing will happen at all. So, for what is that and does it even work? I want to make a edge of map like in Company of Heroes. Darker terrain and enviroment without ability do move in it bounded with border stone. The all-black corner is not so natural for me.

    1c) Those little buttons in the upper cornes, does it doing something?

    2.) Does anybody know how to measure the lenght/size of map? The official CS3 site about Editor has written "The default map size is 256". 256 of what? I want to try to make a map based on real terrain and for that I need to know how to measure it. So is there some easy way how to make it or I need to think outside the box? (Wich is quite complicated.)
    Guide "How do I use editor.exe by General WVPM is unavailable (images can't be shown).
  13. Ebel

    Ebel Moderator Staff Member

    1a). I dont know. Never tried it or looked for it. Maybe some hotkey combo. As those mul.add.mix buttons are disabled, I cant do anything with them either.
    1b). I'm not sure. Can't seem to get them to work on first sight.
    There are references in the editor to 'map borders'. But i'm sure they would require extra files. Possibly low poly models of trees etc for it to be drawn on it so its not empty. Wouldn't know where to begin with it, it would probably be a mod rather than a ready to use feature for map making.
    1c). Yes
    The really small one is to setup a 'custom' brush with your own settings, so you can easily go back to it.
    Haven't used it properly, but if you click on it, a new box will show up where you can fill out the name of the brush.
    Then you can select it from the drop down menu. I'd assume you want to setup the sliders for sizes etc before naming it.

    The second button next to it (middle one) is to delete the custom brush.

    The third button on the right is to switch between selection tool (where you draw a rectangle on the map, for example to select objects to create a pattern) and the drawing brush (eg for painting the map). It's not too obvious.

    2). Yes look at the lower left bottom of the screen. If you go to the lower right corner of the map and point your mouse at the corner you will see the values x:64 y:64 (on a first run map)

    The top left has negatives (x:-64, y-64) So the 'default' map totals to 128 x 128.
    If you choose File-New you will see the the default value is 256, so in x & y that would be 128. (Twice the default one on first time run)
    Seems values are between 32x and 1024x. So the largest map is 2048x2048.
    As for values, they are either counted in pixels or tiles. Would have to look it up in the dmscript.global. I remember seeing some conversion values.

    If you are looking for 'reference points', you can also draw a grid, by going to View->Grid and choose the size. Could be helpful for setting up a map based on real terrain.

    Don't know what you mean with the 'official CS3 site about editor'. As far as 'm aware , there isn't one. Probably some wiki of fan page site.

    About the post by General WVPM where the images don't show, that wasn't so much about the mapeditor part, but more the script part of the editor, as in how to compile scripts to look for errors.
    (For reference, since the pics arent there: Module-StateMachineCollection->lib.src->States->Compile all scripts= will tell you if there are any errors and where.)
  14. Original-Cossacks-Player

    Original-Cossacks-Player Active Member

    Ebel will you be adding a Modding section for Cossacks 3 on your site? I didn't see anything listed? I fear that a lot of information on these forums will be lost when this site/forums eventually goes down, which will eventually happen. At least your site is listed on the Wayback machine, so even if the server your hosted on closes the information will be forever available on the Wayback machine.
  15. Johny

    Johny Member

    Next important question:

    How do I put actual text in dialog window in scenario editor? I understand that i need to set query (as a Action in Trigger), insert an image that must be find in "material" (under the name dialog.Num.Num.Num like dialog.1.1.1 is image of book, dialog.4.5 is soldier), insert result as answer and if it's necessary insert a result_trigger. But there is no folder that lead to write a dialouge. Trigger will show a message with image contains diffenret answers but without any text. I tried to look in some scripts in "External editor: Advanced" but sadly nothing leads to write any text. Some ideas, or am I just blind?
    EDIT: I looks like text is just written in "local" under @q. and @r. (query and result) call, but I don't know how to make them work for new mission.

    Then I tired to make short scenario only switching on the AI, but after I save it in game, leave editor, start game and load mission, the map works but script did not. And if I save it in "origin" mission data, where will be my mission diplayed? (because in game it is nowhere)

    Last edited: Jul 18, 2018 at 3:16 PM
  16. Ebel

    Ebel Moderator Staff Member

    Have a good look at this query from the ausmis.1


    - The "Lang Table" is data\locale\en\missions\ausmis1.lng & data\locale\en\missions\ausmis1.txt
    Inside data\locale\en\missions\ausmis1.txt you see following:


    All gui text in game comes from from the localized language files , for translation purposes. The keys remain the same (eg q.greetings), the words differ.

    So 2 ways of getting text in there. Either use what already exists in the various .lng files or make your own.
    I think making your own for a new scenario will be better or you will have to look for fitting lines and it will limit you.

    So how do you make these .lng files.

    2 ways:
    - from within the editor (Module - FormLocaleTable) [​IMG]
    - with the standalone language editor (get it here). I would strongly suggest this method, its just simpler. It's the same tool but with less confusing options/buttons.

    First thing you want to do maybe is copy an existing mission.txt file, rename it, clean it out except one entry so you keep the entry symbol. The line in front of the @ is important. [​IMG] . Just copy & paste the first line and adjust as needed.

    Make your own entries. Save it.
    Start up the tool.
    File - load as text - select your txt file. Save (first option) as xxx.lng

    Next have a look in data\locale\en
    and look for table.lib
    You will see that this file points to 2 mission specific entries
       [*] : struct.begin
          id = missions
          filename = .\data\locale\en\missions\missions.lng
       [*] : struct.begin
          id = missionplayers
          filename = .\data\locale\en\missions\missionplayers.lng
    So in \data\locale\en\missions\missions.lng you will see the names of the missions and their descriptions for display in the interface. You can either use these for descriptions or make your own, similar to the way you made the mission.lng file for questions and answers.

    In data\game\var\campaigns you can fill out the entry name to your .lng file use in your map.
    [*] : struct.begin
                Name = tutmis2
                Enabled = True
                Visible = True
                RequireToVisible =
                LocaleName = tutmis2.name
                LocaleDescr = tutmis2.description
                MapPath = .\data\maps\missions\tutmis2.map
                MapLocalePath = .\data\locale\%lang%\missions\tutmis2.lng
    It's entirely possible I forgot a step somewhere along the way. If you get stuck do tell.

    Edit: i forgot to say. If you change the .lng files, you will have to restart for it to load in the editor. Also, may i suggest you make a test map like this on a copy of your game in case you mess up stuff, or create a 'mod' in the mod folder and put all your new stuff in there.

    Edit2: You probably want to test the script from the game itself rather than the editor. Im not sure how to trigger the script to start from within the editor at this point. Will require you to setup your map in the campaign menu, which may require more steps. It should be possible to trigger it from the editor for testing purposes, just not sure how at this point. Never made a scenario before myself.

    There's a bit more information about the language editor here in part 3 (&4 for cyrillic). http://www.cossacks3.com/forum/index.php?threads/guide-adding-new-random-map-options.29025/
    It uses a different method, by adding the keys in the editor directly and then saving as .lng and .txt . Over time i've learned it's just faster to edit the text file.
    Last edited: Jul 18, 2018 at 4:02 PM
    Johny likes this.
  17. Ebel

    Ebel Moderator Staff Member

    I don't know. Maybe some day. Writing stuff takes time. Adding it to a site as well. I chose not to do it when C3 came out, because there was a modding section here and everyone was mostly hanging out here. So it made sense to not put anything on my site. Back when I started my site 10 years ago (woah, tempus fugit), most (fan) sites containing information about Cossacks were dying fast. Somehow I doubt this forum will vanish soon, since GSC is still out there making games. I worry more about downloads. At some point I should download what's there and upload it to a dropbox account.
  18. Loner

    Loner Active Member

    This looks interesting,
    1. Have you added a new unit.
    2. Is this the death scene where the rider is killed but the horse is not.:cool:
  19. Ebel

    Ebel Moderator Staff Member

    1. Yes
    2. Yes and no. It is the death scene, but hadn't set it up for the horse yet, it was just a test. (They are different objects)

    Horse on its own:
    StepanKryha, Johny and Loner like this.
  20. Loner

    Loner Active Member

    These are very impressive, they make my clone units look amateurish, which of course they are.:D
  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