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.

    [​IMG]

    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:

    Code:
     {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.

    [​IMG]

    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

    [​IMG]
    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)

    next:

    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!

    Daddio
     
    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:
    http://www.twcenter.net/forums/show...first-images&p=8637606&viewfull=1#post8637606

    And Youtube videos on modding the game:







     
    Last edited: Jul 15, 2018
    Johny likes this.
  9. Johny

    Johny Member

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


    [​IMG]
    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).
     
  10. 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.
    [​IMG]

    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)
    [​IMG]


    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.)
     
  11. 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.
     
  12. 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?
    [​IMG]
    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)


    [​IMG]
     
    Last edited: Jul 18, 2018
  13. Ebel

    Ebel Moderator Staff Member

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

    [​IMG]

    - 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:

    [​IMG]

    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
    Code:
       [*] : struct.begin
          id = missions
          filename = .\data\locale\en\missions\missions.lng
       struct.end
       [*] : struct.begin
          id = missionplayers
          filename = .\data\locale\en\missions\missionplayers.lng
       struct.end
    
    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.
    eg
    Code:
      
    [*] : 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
    struct.end
    
    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
    Johny likes this.
  14. 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.
     
  15. Johny

    Johny Member

    QUCIK TUTORIAL FOR CUSTOM MAP AND SCENARIO

    - solving non-wokring AI -


    This is just a quick evening summary of how to make your custom map funciotnal because:
    - scenario work only if you load map from campagin menu (in editor does not start)
    - taking out map from campain folder wipe whole campagin bookmark (for example summer 2016 will no longer be in menu) = for now I don't know hot to replace it
    - for now I don't know how to creace special bookmark in campagin menu for custom map
    - I don't have a time to go deeper in coding right now and finding a paths of structures leading to create a place for custom mission in campagin menu, but I solved it from functional way so...It just works.

    1. open external editor and make a map with inicial resouces like wood and stone (I suppose you know how to make this)

    2. press Ctrl+T and then F11, create short scenario switching on the AI
    - if you want an inspiration how to do it look at my post above or just open few campagin in editor and look inside the structure of scenario = make reverse engineering

    Now you need to put your map into folder where are the campagin missions (and where the scenario just works), so:

    3. Find some folder with saved campagin map, for example Cossacks3/dlcs/winter/data/maps/missions/celmis1.map (winter 2016 funny mission)

    4. In editor save your map as this mission = rewrite the file .map (only rewrite it, the name must be preserved)
    - make a backup of this mission or just sacrifice this file, it's not a big deal

    5. Start game (from Steam or leave map in editor), go to winter 2016 campagin folder and start a mission

    6. Play your map, the dialogs will show, the AI will start working etc.

    Quite fragile and poor solutuion and shame on me I didn't solve it better, but it covers the absolute basics that custom map need for working (initial conditions, some start dialog, working AI and victory/defeat conditions). I you want to know how to make dialogs look above in this topic. Still don't know how to rename it in camapgin menu and add proper descriptions. This will be solved lately.

    I hope it will work for you just like for me. If not, send me a message or post some feedback.

    EDIT: For testing your scenario in editor just click on "execute" in trigger in scenario menu. But it will turn on AI if you have it enable. It will also show you the created zones.
     
    Last edited: Jul 19, 2018
  16. Johny

    Johny Member

    Update: Today I have found the files holding the ingame camapagin text.

    Go to: locale/YourCurrentLanguage(en,cs,pl...)/missions and here you have two important .txt and .lng files = missions(.txt + .lng) and missionplayers(.txt + .lng)

    File "missionplayers" is holding name of the players participating the mission. I don't know why is this separated, but when you want to rename the players (we are still workong with "celmis1" files) just open it with language editor and rename @celmis1.player1 (you, red), 2 (blue) , 4 (violet) etc., and wipe those colours that are not in the game (or they will be displayed above the minimap).

    File "missions" hold the descriptions and names of campagin and missions. Inside text with code @celcam.name + @celcam.description display, as the name says, name and description of the campagin. @celmis.name + @celmis.description got the same but for the mision itself.

    Everything you want to write here just open the language editor and write it inside, then rewrite the file. It will be shown in game menu immediatley.

    (DONE - SEE LOWER) My next work will be find the way how to create the independent folder for custom maps in campagin menu. Simple adding of @text in .txt and .lng does not work. There must be some file holding the distribution of missions in camagin menu, I just did not find it yet.

    After all it should be possible to make a mod creating special place for custom missions and then adding all files you need (text, map, description) to play them. Every mission could be mod-like file in workshop that will be just added in your game files.

    Complete manual "how to create you own custom map" will be available within a month...if I find enough time for that.

    The menu is in the czech language. I'm just lazy to set EN back so don't freak out. ;)
    [​IMG]


    EDIT: The file to missions distrtibution is Cossacks3/data/game/var/campagins.cfg

    I know, it's obvious but I'm little bit slower with these type of things.

    Here I just copy-paste structure that is used for every campagin. Inside are some important names and files you need to create or write something in them.
    Paths and requirements can be everywhere you just need to set a way in code.
    Names a descriptions should be placed in missions.lng, it's better to have them together.

    (How to place text properly you will find in posts above)

    Code:
    [*] : struct.begin
          Name = cuscam
          Enabled = True
          Visible = False
          RequireToVisible =
          RequireFile = .\dlcs\NEW\data\maps\missions\cusmis.map
          LocaleName = cuscam.name
          LocaleDescr = cuscam.description
          LocalePath = .\data\locale\%lang%\missions\missions.lng
          Missions : struct.begin
             [*] : struct.begin
                Name = cusmis
                Enabled = True
                Visible = True
                RequireToVisible =
                LocaleName = cusmis.name
                LocaleDescr = cusmis.description
                MapPath = .\data\maps\missions\cusmis.map
                MapLocalePath = .\data\locale\%lang%\missions\cusmis.lng
             struct.end
          struct.end
       struct.end
    [​IMG]

    And sorry for posting so often, it's also backup for me to not forget anything.
     
    Last edited: Jul 22, 2018
  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