New Terrain Mod (NTM) - Beta Test Version

Discussion in 'Modding' started by Ebel, Jan 3, 2018.

  1. Loner

    Loner Active Member

    This Mod is 'that good' it should be incorporated into the official game so that other Mods can be built around it, also Ebel has done such an amazing job that she should be on the payroll.;):cool:
    Ftoomsh and Daddio like this.
  2. Ebel

    Ebel Moderator Staff Member

    Updated mod to latest Game Version: GSC's recent patch broke the mod. It works again now.
    Loner and HUNRex like this.
  3. Ftoomsh

    Ftoomsh Well-Known Member

    I'm looking at file conflicts between Terrain Mod and OCMOD3. The ideal would be to be able to run them both at the same time. That is to say they would need to be compatible. If they were compatible, I imagine loading Terrain Mod first (first in the mod's queue) and OCMOD3 second in the queue would work. I think Terrain Mod should be left pristine and conflicts with it should be corrected in OCMOD3 if possible. I am looking at this and will try it if it doesn't look too hard.

    The conflicts are;
    locale en (English) (some text)
    and several files in scripts/lib

    If terrain mod is mainly additive in these files, then the changes can be merged into the OCMOD3 files. If there are direct code conflicts then Terrain Mod's settings would prevail in OCMOD3.

    Not saying for sure I will try it though. Just tossing up the idea. I am burnt out with modding C3 ATM.
  4. Ebel

    Ebel Moderator Staff Member

    I strongly doubt they are 'compatible'. I've seen reports from other players trying it with other larger mods who modify the same scripts and it fails every time if this mod isn't the last active mod in the load order. The reason for that is that little fix GSC did for me for the terrain generation issue I had earlier.
    It's in scripts\\
          [*] = ;begin
          [*] = ;   bTGA := True;
          [*] = ;   randkey0 := gMap.settings.gen.randkey0;
          [*] = ;   randkey1 := gMap.settings.gen.randkey1;
          [*] = ;   var pRecordManager : Integer = ParserSelectRecordManager;
          [*] = ;   var bGenRecordManager : Boolean = (ParserGetCountByHandle(pRecordManager)>0);
          [*] = ;   if (bGenRecordManager) then
          [*] = ;   begin
          [*] = ;      var pGen : Integer = ParserSelectByHandleByKey(pRecordManager, 'Generator');
          [*] = ;      if (pGen<>0) then
          [*] = ;      begin
          [*] = ;         folderpath := ParserGetValueByKeyByHandle(pGen, 'maskpath');
          [*] = ;         inputbitmap := ParserGetValueByKeyByHandle(pGen, 'maskname');
          [*] = ;      end
          [*] = ;      else
          [*] = ;      bGenRecordManager := False;
          [*] = ;   end;
          [*] = ;   if (not bGenRecordManager) then
          [*] = ;   begin
          [*] = ;      var plcount : Integer;
          [*] = ;      var i : Integer;
          [*] = ;      for i:=0 to gc_MaxPlayerCount-1 do
          [*] = ;      if (gMap.players[i].bexists) and (gMap.players[i].cid<>gc_spectator_countryid) then
          [*] = ;      plcount := plcount+1;
          [*] = ;
          [*] = ;      if (plcount>=gc_MaxPlayerCount) then
          [*] = ;      begin
          [*] = ;         ErrorLog('8th player not yet supported');
          [*] = ;         plcount := gc_MaxPlayerCount-1;
          [*] = ;      end;
          [*] = ;
          [*] = ;      var tag, dir, last, tit, ownid, desc, tags, url, note : String;
          [*] = ;      var numf, vis : Integer;
          [*] = ;      var dis, acc, ban, root : Boolean;
          [*] = ;      // in case we've got multiple mods
          [*] = ;      var lastmodindex : Integer = ModLibraryGetCount()-1;
          [*] = ;      if (lastmodindex<0) then
          [*] = ;         lastmodindex := 0;
          [*] = ;      ModLibraryGetData(lastmodindex, tag, dir, last, tit, ownid, desc, tags, url, note, numf, vis, dis, acc, ban, root);
          [*] = ;      folderpath := dir+StringRegister0;
          [*] = ;      Log(folderpath);
          [*] = ;      var pFileList : Integer = _parser_ParserTemporary(True);
          [*] = ;      ParserGetFilesInRoot(folderpath+'\*.tga');
          [*] = ;      var count : Integer = ParserGetCountByHandle(pFileList);
          [*] = ;      if (count=0) then
          [*] = ;      begin
          [*] = ;         ParserClearByHandle(pFileList);
          [*] = ;         folderpath := StringRegister0;
          [*] = ;         Log(folderpath);
          [*] = ;         //var temppath : String = SubStr(folderpath, 0, 7);
          [*] = ;         //var temppath2 : String = SubStr(folderpath, 9, StrLength(folderpath));
          [*] = ;         //folderpath := dir+folderpath;
          [*] = ;         //Log('final'+dir+folderpath);
          [*] = ;         pFileList := _parser_ParserTemporary(True);
          [*] = ;         ParserGetFilesInRoot(folderpath+'\*.tga');
          [*] = ;         count := ParserGetCountByHandle(pFileList);
          [*] = ;         if (count=0) then
          [*] = ;         exit;
          [*] = ;      end;
          [*] = ;      ParserClearByHandle(pFileList);
          [*] = ;      Log('count!=0');
          [*] = ;      for i:=plcount to gc_MaxPlayerCount-1 do
          [*] = ;      begin
          [*] = ;         ParserGetFilesInRoot(folderpath+'\'+IntToStr(i)+'pl*.tga');
          [*] = ;         count := ParserGetCountByHandle(pFileList);
          [*] = ;         if (count>0) then
          [*] = ;         break
          [*] = ;         else
          [*] = ;         ParserClearByHandle(pFileList);
          [*] = ;      end;
          [*] = ;      if (count=0) then
          [*] = ;      exit;
          [*] = ;      var rndind : Integer = floor(RandomExt*count);
          [*] = ;      log('rndind=');
          [*] = ;      _misc_logint(rndind);
          [*] = ;      inputbitmap := ParserGetValueByIndexByHandle(pFileList, rndind);
          [*] = ;      log(inputbitmap+' randkey='+IntToStr(gMap.settings.gen.randkey1));
          [*] = ;
          [*] = ;      var pRMGenerator : Integer = _misc_SelectRecordManagerGeneratorParser(True);
          [*] = ;      if (pRMGenerator<>0) then
          [*] = ;      begin
          [*] = ;         ParserSetValueByKeyByHandle(pRMGenerator, 'maskpath', folderpath);
          [*] = ;         ParserSetValueByKeyByHandle(pRMGenerator, 'maskname', inputbitmap);
          [*] = ;      end;
          [*] = ;   end;
          [*] = ;
          [*] = ;   srcbitmappath := folderpath+'\'+inputbitmap;
          [*] = ;   if (not IsFileExists(srcbitmappath)) then
          [*] = ;   begin
          [*] = ;      ErrorLog('not exist '+srcbitmappath);
          [*] = ;      exit;
          [*] = ;   end;
          [*] = ;end;
          [*] = ;
          [*] = ;if (mapwidth<>mapheight) then
          [*] = ;begin
          [*] = ;   ErrorLog('mapwidth<>mapheight');
          [*] = ;   //exit;
          [*] = ;end;
          [*] = ;
          [*] = ;SetRandomExtKey64(randkey0, randkey1);
    It has to be the last active mod going by this and that has consequences for compatibility ofcourse. I couldn't think of a better way of doing it atm. If anyone does, do step up :)

    The only way would be to make a 'merged' mod to have them be compatible, although as long as my mod is in beta and being polished and things get added, I feel it's premature for that. It doesn't hurt to explore compatibility options though, but I haven't had time for that, all my free time is being spent on working on the mod, rather than looking whether it's compatible with other mods.

    Sidenote: Surprised is in there, it's from a test, and didn't think i'd left it in the steam version. I enabled the 'patrol' mode, which sorta works, but isn't how it should be. Units will patrol, but won't attack anyone coming nearby, which only makes them good for a no balloon game to cover some ground to show whats going on. It lacks code I guess for making them attack enemies coming nearby. I should take it out in next version.
  5. Wralth

    Wralth Active Member

    Patrol as it is right now is an abomination and has no reason to exist until its properly coded.
    Ebel likes this.
  6. Ftoomsh

    Ftoomsh Well-Known Member

    I have done some AI tests and some real game tests of New Terrain Mod by itself. I have by no means done a full set of tests. I can report;

    (1) Land, Rivers and Mediterranean maps all seem to work well. I had Warships off though for all tests.
    (2) Default vegetation is fine. No bugs noticed.
    (3) Black Forest seems to take a long time to load on 2x maps. Is this mod meant for 2x maps I wonder?
    (4) Against the AI, Black Forest worked after loading but against a person with a slow PC in multiplayer the game hung at the start.
    (My clock stopped at 1 second into game. Opponent said his game clock was running but he could not select and use his peasants.)
    (There could have been another cause for this like opponent's PC just not being able to cope with Black Forest on 2X map.)

    General observations:

    (a) It's fun to have new maps to try and these are better balanced in territory terms than some vanilla maps.
    (b) The Rivers and Mediterranean maps have good shapes for water.
    (c) I don't like 1v1 maps lacking mines in the unused corners. This is a personal viewpoint as it is sometimes game enhancing to fight over the extra mines I think.
    (d) Some positions feel like they are too close even on 2x maps.
    (e) Mines are still too spread out but again this is a personal preference on my part.

    My personal bias is for games on 2x maps and to have four mine groupings even in 1v1 games (as it would be for 2v2). I also would like one more option (if possible) which nominated Default Bases or "Compact bases." "Compact Bases" would have all home mines closer to the starting position and would have the starting positions closer to map corners, for up to 4 players, and closer to sides for players over 4. Again this is a personal preference thing. Of course this does make the map more defensive. Not everyone would like that of course but it helps the game become a little less tactical and little bit more strategic.
  7. Ebel

    Ebel Moderator Staff Member

    (3-4). I know the "black forest" option is terrible for loading/generation times. I will try to improve this and put it in the next update with animals. Even on my pc it just takes too long to be reasonable ( some combinations of options with black forest lead to 2:30-3:00 generation time)

    (c&e). I haven't touched mine generation yet. It's on my to do list. I believe in options: some players like mines close by base (defensive), others like them spread out, giving a reason to come out of base & fight over far lands with mines (offensive). Possibly some conditional statements could be created which , based on map size, player count and perhaps extra mine density options (spread out/compact) , bring more variety. This might be a bit of a cluster fuck of conditional statements, in which a cat couldn't find her kittens back and would need thorough testing to make sure all cases are covered.
    I always liked the extra 1-2 gold mines you used to get in Cossacks 1 on large maps. It gave a reason to get out of your base and go get them. I don't remember if they were generated through (random) placement of patterns or just code. Sometimes you had 1, sometimes up to 3 extra gold mines on larger maps.

    (d) Take a screenshot of the minimap from the maps where you think the start positions are too close so I know which one you talk about.

    (compact bases). Entirely possible to create a new terrain option which has .tga's with such start positions. I was already thinking about making a new one with mixed terrain (eg rivers+continent, lakes+rivers, mediterranean+lakes, etc). Might as well add a compact bases option to the to do list.

  8. Ftoomsh

    Ftoomsh Well-Known Member

    Yeah, I don't want to ask for too much. The Terrain Mod is already amazing. I agree it needs to get to its full potential before even considering making other big mods compatible with it.

    I tried to balance OCMOD3 for the 2x land maps and then a while back the devs seemed to move outlying mines even further out. These sort of changes do affect a mod if it is trying to achieve a certain form of balance. Having base compactness adjustable (2 settings anyway) would help but I know that's a long way down the track.
  9. Ebel

    Ebel Moderator Staff Member

    Updated to Version

    - Improved the generation time for the 'black forest' option. Reduced the amount of trees/patterns that were being generated. Still one of the 'longest' generation times, but managed to reduce it by up to 30 seconds. I''ll try to improve more in the next version.

    - Added a 'transport only' option for the 'warships' option. Usefull for river/lake maps if you do not want fishboats/warships, but only ferries.

    - Added a 'union' additional start option. On choosing a nation it will be paired with one other nation.
    (Austria - Hungary; Turkey - Algeria; Spain - Portugal; Venice - Piemonte; Sweden - Denmark; France - Switzerland; Ukraine - Russia; Poland - Prussia; Bavaria - Saxony.
    On choosing England you will be paired with Netherlands because not everyone has the scotland dlc, but if you have and you choose Scotland you will be paired with England.

    - Added an 'expensive mercenaries' option. They will cost 3 times as much as normal when this option is enabled.

    - Added animals: Farm animals (cow, goose, hen, pig, sheep) & wild animals (bear, deer, fox, wild pigs, wolf). You''l find farm animals on the 'country side' maps, and wild animals in forests & plains on the various maps. These bring variety and make the maps more lively.


  10. Ftoomsh

    Ftoomsh Well-Known Member

    These models are amazing. How you did them is probably a trade secret. :)

    Does this mean you could make a Bedouin unit like the Bedouin in C1? Algeria and Turkey really need such a unit to become more interesting, IMO. A Tuareg shooter (17th C musket) in blue clothes for Algeria would be awesome too: a re-skin of say the Hungarian shooter in blue would do it. You know if you ever feel like making such units they would be welcome additions to any Mod.
  11. Ebel

    Ebel Moderator Staff Member

    I'm mostly focussed on terrain/random map options with this mod. I don't think i'll look into units, but if you want to reskin the hungarian shooter to make a tuareg unit, then just do it, it's not that hard. Just need photoshop and the nvidia texture exporter tools. Look at how wralth implemented reskinned units in his annihilation mod if you need some guidance. I think there's some details on the forums too about the .dds format (--> here )
    Last edited: Jan 20, 2018
  12. Ebel

    Ebel Moderator Staff Member

    Updated mod to Version

    - Added flying birds (falcon, generic bird, stork) to the random maps who will fly around randomly. You''ll find them on the various maps (except desert).
    - Added more decoration patterns on the country side map ('churches with graveyards, castles, rubbled buildings')
    - Added 2 new map size options (Medium & Very large) : current options now are : tiny (256), normal(320), medium (400), large (480), very large (560), huge (640).
    - Added winter textures to the 'farmhouses' you see on the country side maps.
    - Replaced 3 bad new road textures with better one''s matching the buildings decals better, for later use.

    Loner and Burak Damgac─▒ like this.
  13. Loner

    Loner Active Member

    Once again impressive stuff, we are not worthy.:cool:
  14. Ftoomsh

    Ftoomsh Well-Known Member

    Loner likes this.
  15. Loner

    Loner Active Member

    This has started happening again, no other Mods involved.:(
  16. Ebel

    Ebel Moderator Staff Member

    Go to Program Files (x86)\Steam\steamapps\common\Cossacks 3\cossacks.ini and open it with any text editor and change LogFileEnabled = False to LogFileEnabled = True. Save.
    Then try again to play, and after trying, go to your documents folder : (C:\Users\YourName\Documents\Cossacks\log) and open the latest log file from the match and post the content here pls.
  17. Loner

    Loner Active Member

    TIMER| 0 |[00:00:332] TOTAL[00:00:332] LoadFromStreamProject start
    TIMER| 1 |[00:00:001] TOTAL[00:00:333] ResetProject
    LOG| 2 | :: STEAM LOG :: SteamPrepareWorkshop(true, false) return true
    ERROR| 3 |FileStreamExists: C:\Users\Andrew\Documents\cossacks\mods.restore
    TIMER| 4 |[00:04:555] TOTAL[00:04:888] LoadFromStreamProject end
    ERROR| 5 |FileStreamExists: galaxy.dll
    LOG| 6 | :: STEAM LOG :: _steam_load()
    LOG| 7 |...DoCreate started...
    TIM| 8 |[00:00:168] TOTAL[00:00:168] ...InitMap finished...
    LOG| 9 |OnResize : x=1280 y=1024 mode=2 bestKoef=1.25 curKoef=1.25
    LOG| 10 |focal=400
    LOG| 11 | :: STEAM LOG :: SteamwrapRequestCurrentStats()
    LOG| 12 |...DoCreate started...
    TIM| 13 |[00:00:229] TOTAL[00:00:229] ...InitMap finished...
    LOG| 14 |OnResize : x=1280 y=1024 mode=2 bestKoef=1.25 curKoef=1.25
    LOG| 15 |focal=400
    LOG| 16 | :: STEAM CALLBACK :: _steam_callbacks_OnUserStatsReceived
    LOG| 17 | :: STEAM CALLBACK :: SteamwrapGetNumAchievements()=103
    LOG| 18 |--- DoNewGame --- start
    LOG| 19 |_profile_LoadAdviser
    LOG| 20 |--- DoNewGame --- finish
    TIMER| 21 |[00:11:870] TOTAL[00:12:099] Adding patterns
    TIMER| 22 |[00:00:030] TOTAL[00:12:129] Updating horizon texture
    TIMER| 23 |[00:00:067] TOTAL[00:12:196] Generation finished
    LOG| 24 |..\..\workshop\content\333420\888686042.\data\gen\terrainmasks\rivers
    LOG| 25 |.\data\gen\terrainmasks\rivers
    TIM| 26 |[00:09:017] TOTAL[00:09:017] Generation finished. EbelsTestv1.4.2.5 - Seasontype=0 relieftype=1 minesdensity=0 foreststype=3 terraintype=8
    LOG| 27 |...InitMapGen finished...
    LOG| 28 |...MapNextUniqId = 143...
    LOG| 29 |...DoCreate started...
    LOG| 30 |OnResize : x=1280 y=1024 mode=2 bestKoef=1.25 curKoef=1.25
    LOG| 31 |focal=400
    LOG| 32 |Music Switch To Battle : time = 8.04357147216797
    LOG| 33 |_misc_LanServerSendResults _net_IsServer = False
    LOG| 34 |_misc_CheckEndGame : bchanges
    LOG| 35 |_misc_LanServerSendResults _net_IsServer = False
    LOG| 36 |_misc_LanCloseSessionSetScores : start _net_IsServer = False
    ERR| 37 |_gui_CreatePaperWindow unsupported size iwidth>946
    LOG| 38 |...DoCreate started...
    TIM| 39 |[00:00:225] TOTAL[00:00:225] ...InitMap finished...
    LOG| 40 |OnResize : x=1280 y=1024 mode=2 bestKoef=1.25 curKoef=1.25
    LOG| 41 |focal=400
  18. Ebel

    Ebel Moderator Staff Member

    Thats not the steam id of my mod. It is 1255766623. So you have another mod in your mod manager, and mine isn't at the bottom of the load order. It may be disactivated the other mod, but mine because of it isn't at the bottom of the load order.
  19. Loner

    Loner Active Member

    Not at my computer at the moment, it may not have updated after your last update, I'll check tomorrow.;)
  20. Ebel

    Ebel Moderator Staff Member

    No no, you have another mod in your mod manager or it wouldn't even show me that number in the log. You just need to move my mod down in the load order in the mod manager.
    If i look up the number 888686042 , its the OCMod3.
  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