Statistics

Users
2807
Articles
156
Articles View Hits
1639974

Re: Building a map, start of a project, help will be needed

2 years 2 months ago - 2 years 2 months ago #91 by Crikey

  • Regimental Commander
  • Regimental Commander

  • Posts: 442
  • Thank you received: 574

  • Gender: Unknown
  • Birthdate: Unknown
  • It,s a value applied to a grayscale as desired in the mapname.csv look at the columns ....think there’s one for turning off/on transparency of vegetation too. And one for cannot deploy. You could switch this on for the grayscale you used for the ocean, if not already.
    Last edit: 2 years 2 months ago by Crikey.

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago #92 by Marching Thru Georgia

  • SOW General
  • SOW General
  • Secession Is Futile

  • Posts: 1737
  • Thank you received: 433

  • Gender: Male
  • Birthdate: Unknown
  • Units follow route 1 to B, would prefer route 2 of course, but lets not be unrealistically optimistic

    A glass half empty kind of guy?

    I can make this march and I will make Georgia howl.

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago - 2 years 2 months ago #93 by 52ndOx

  • Junior Member
  • Junior Member

  • Posts: 120
  • Thank you received: 92

  • Gender: Unknown
  • Birthdate: Unknown
  • Units follow route 1 to B, would prefer route 2 of course, but lets not be unrealistically optimistic

    A glass half empty kind of guy?


    Ha Ha. Expecting things to be perfect is a bit like seceding.
    I will be very happy if my maps even kind of work like I hoped.

    It,s a value applied to a grayscale as desired in the mapname.csv look at the columns ....think there’s one for turning off/on transparency of vegetation too. And one for cannot deploy. You could switch this on for the grayscale you used for the ocean, if not already.


    You mean "Unit Can't Halt"?
    0 already has that set but it doesn't stop units deploying there in sandbox.
    Last edit: 2 years 2 months ago by 52ndOx.

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago - 2 years 2 months ago #94 by Crikey

  • Regimental Commander
  • Regimental Commander

  • Posts: 442
  • Thank you received: 574

  • Gender: Unknown
  • Birthdate: Unknown
  • Does it have 1 in that column?

    It stops them initially deploying there when the game launches. It doesn’t stop them moving there, once battle commenced. At that stage they just can’t halt. I used it to stop troops spawning on unwanted terrain like oceans..... may help, but not much. B)
    Last edit: 2 years 2 months ago by Crikey.

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago #95 by 52ndOx

  • Junior Member
  • Junior Member

  • Posts: 120
  • Thank you received: 92

  • Gender: Unknown
  • Birthdate: Unknown
  • Does it have 1 in that column?


    Yes. They deploy anyway.
    Nevermind, thanks, I must be missing something. I'll investigate further.

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago - 2 years 2 months ago #96 by 52ndOx

  • Junior Member
  • Junior Member

  • Posts: 120
  • Thank you received: 92

  • Gender: Unknown
  • Birthdate: Unknown
  • New question now I am looking at roads. :whistle:

    In map.csv, do the IDS_ names have any relevance, or is it just the csv values themselves that are important.

    I saw some maps with:
    IDS_MAP_COBBLESTONE100
    IDS_MAP_COBBLESTONE105
    IDS_MAP_ROAD110
    IDS_MAP_ROAD115

    The only difference is movement modifiers, so of the four values there are only two datasets.

    Are they all ok so to link the "move around" path to? If so, are there others? Or is it all just defined in the csv?
    Last edit: 2 years 2 months ago by 52ndOx.

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago #97 by Davinci

  • Elite Member
  • Elite Member

  • Posts: 3024
  • Thank you received: 760

  • Gender: Male
  • Birthdate: Unknown
  • New question now I am looking at roads. :whistle:

    In map.csv, do the IDS_ names have any relevance, or is it just the csv values themselves that are important.

    I saw some maps with:
    IDS_MAP_COBBLESTONE100
    IDS_MAP_COBBLESTONE105
    IDS_MAP_ROAD110
    IDS_MAP_ROAD115

    The only difference is movement modifiers, so of the four values there are only two datasets.

    Are they all ok so to link the "move around" path to? If so, are there others? Or is it all just defined in the csv?

    Yes, the names are "Defined" in another file that I can't remember the name of, at Work at the moment.

    As long as you are using default names you will not receive any "ID Not Found" errors. But that particular error won't cause any other problems. Just a sort of reminder.

    If you are asking is it OK to link the "GrayScale Color 25" to them then the answer is Yes, it should be alright to do so.

    The Logic behind the "Two Names" is that one is the "Inner Road" and the "Second One" is the outer road.

    The purpose is to show that the unit is on the "Road" and not to show something like, Road, field, Road, Grass, Road, etc...

    You know, just to have a continued Name showing the units current location.

    *** Use those two values in any New Road, one of them ( i.e..Inner Road" has to be the highest value.

    The Game is designed to seek out the fastest path in order for the road-system to work, correctly.

    davinci

    The only true logic is that, there is no true logic!
    The following user(s) said Thank You: 52ndOx

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago - 2 years 2 months ago #98 by 52ndOx

  • Junior Member
  • Junior Member

  • Posts: 120
  • Thank you received: 92

  • Gender: Unknown
  • Birthdate: Unknown
  • Thanks Davinci, that's very helpful.
    if there is a file with definitions for the IDS names then I would be interested in looking at it.

    I suspect the 25 method is a bit hit or miss. I can make it work for small simple areas, but not on a large complex thing like my coastline. I'm a bit surprised that the engine doesn't seem to support something as basic as impassable terrain.

    I completed the road network on my map now, and units seem to follow it including crossing bridges as expected.
    Last edit: 2 years 2 months ago by 52ndOx.
    The following user(s) said Thank You: Davinci

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago #99 by Davinci

  • Elite Member
  • Elite Member

  • Posts: 3024
  • Thank you received: 760

  • Gender: Male
  • Birthdate: Unknown
  • If there is a file with definitions for the IDS names then I would be interested in looking at it.

    If Memory serves, it is located in the Work Folder, but its been years since I have seen it.

    I suspect the 25 method is a bit hit or miss.

    I stopped using it years ago, never could get it to work, correctly.

    I completed the road network on my map now, and units seem to follow it including crossing bridges as expected.

    Well, You are way ahead of the curve, the Road-System is probably the hardest part of the Map Making Process.

    Also, Check the file size of your ( log ), and remember a rough estimate of what that size usually is after loading a game.

    This will alert you of any errors, and example would be that mine is approximately ( 25kb ).

    So, if the size is larger than that in My Game, I know that there are errors somewhere.

    davinci

    The only true logic is that, there is no true logic!
    The following user(s) said Thank You: 52ndOx

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago - 2 years 2 months ago #100 by 52ndOx

  • Junior Member
  • Junior Member

  • Posts: 120
  • Thank you received: 92

  • Gender: Unknown
  • Birthdate: Unknown
  • That's a good tip.
    I am getting fewer errors as I gain experience. The most common ones have been:
    • Saving the height map in the wrong size or tga format. But its finished now.
    • Using a fill or other function that blends colours, producing bad values in the BMP. More careful now.
    • Forgetting to convert the BMP to gray-scale so it won't load.
    • Corrupting a CSV by incorrect load/save. The different csvs are not all the same format, some use other separators than commas and the data columns can get displaced.
    • Making edits in PR and forgetting to save before recompiling

    Most of them are format errors because SOW is hyper sensitive to different forms of JPG, TGA, BMP and CSV.
    It is easy to break the game just by loading and saving a file, without actually editing it.But by using the right editors those problems can be avoided.

    Mostly I get less errors now because the community is so helpful. <3
    Last edit: 2 years 2 months ago by 52ndOx.
    The following user(s) said Thank You: RebBugler

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago #101 by Davinci

  • Elite Member
  • Elite Member

  • Posts: 3024
  • Thank you received: 760

  • Gender: Male
  • Birthdate: Unknown
  • Mostly I get less errors now because the community is so helpful. <3

    Yes, One of the Best Forums on the Net.

    And, Probably one of the Few Forums where Nobody ever stays on Topic!

    Answer from Earlier - That file is located in the Games \ Text Directory - Called "sowstr.db"

    The ( db ) file can be Opened and Edited with Notepad.

    That will be the file to Edit when you are putting in new names, and new road names. You can give each road a separate name as long as you give them a different "GrayScale Color" in the "MapName.bmp". Then assign the new name in the "MapName.csv" file.

    davinci

    The only true logic is that, there is no true logic!

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago #102 by Davinci

  • Elite Member
  • Elite Member

  • Posts: 3024
  • Thank you received: 760

  • Gender: Male
  • Birthdate: Unknown
  • @Crikey - If the Ships that were posted by 52ndOx had a Collision Radius applied to them and the Angle of those ships were pointed towards the land, would a retreating unit still ignore that collision?

    I'm not sure what the "Angle" thing does, I have never noticed it before.

    It is the Red Arrow in the Picture below. I don't have any Maps with a large body of water to test Theory this on.



    davinci

    The only true logic is that, there is no true logic!
    Attachments:

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago - 2 years 2 months ago #103 by 52ndOx

  • Junior Member
  • Junior Member

  • Posts: 120
  • Thank you received: 92

  • Gender: Unknown
  • Birthdate: Unknown
  • Answer from Earlier - That file is located in the Games \ Text Directory - Called "sowstr.db"
    The ( db ) file can be Opened and Edited with Notepad.

    Great, thanks, except I don't seem to have a Text directory either in the main game or the SDK?

    If the Ships that were posted by 52ndOx had a Collision Radius applied to them

    There might be something in this method, but not with my ships. They are not objects, just 2d terrain sprites which the program rotates to face the camera.
    Last edit: 2 years 2 months ago by 52ndOx.

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago #104 by Davinci

  • Elite Member
  • Elite Member

  • Posts: 3024
  • Thank you received: 760

  • Gender: Male
  • Birthdate: Unknown
  • Great, thanks, except I don't seem to have a Text directory either in the main game or the SDK?

    I keep forgetting that you are using the SOWWL and not the SOWGB game, So I am not sure how your game would handle this.
    One of the Waterloo Modders will have to answer this one.

    There might be something in this method, but not with my ships. They are not objects, just 2d terrain sprites which the program rotates to face the camera.

    I see, I thought that you made some 3D Ships.

    Well, back to square one!

    Also, I scanned over the Power Render Manual located in the LStudio directory, didn't find anything useful to help out with this situation.

    davinci

    The only true logic is that, there is no true logic!

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago #105 by Biondo

  • NSD QA Team
  • NSD QA Team

  • Posts: 86
  • Thank you received: 92

  • Gender: Unknown
  • Birthdate: Unknown
  • If you add new terrain IDS in the csv file you have to create a new folder in your mod folder.

    Create Layout/Media/Language folder

    In language folder copy LanguageEnglishMod.xml file from Scourge of War Waterloo/Base/Layout/Media/Language folder

    Then open the xml file with a text editor and it has to look like this




    <?xml version="1.0" encoding="UTF-8"?>
    <MyGUI>
    <Tag name="IDS_NEWTERRAIN">New terrain</Tag>
    </MyGUI>
    The following user(s) said Thank You: RebBugler

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago #106 by 52ndOx

  • Junior Member
  • Junior Member

  • Posts: 120
  • Thank you received: 92

  • Gender: Unknown
  • Birthdate: Unknown
  • Thanks Biondo. That might be useful too.
    But at this time I don't need to add any new names. I was just asking about the significance of the existing ones.

    If a line in map.csv has the same values, but just a different IDS, does it affect the game at all which is used?
    In particular, to connect a 25 "move around" to a road, does the road entry have to have a particular range of values, or a particular name, or maybe both?

    In other words, what actually defines a road?

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago #107 by 52ndOx

  • Junior Member
  • Junior Member

  • Posts: 120
  • Thank you received: 92

  • Gender: Unknown
  • Birthdate: Unknown
  • Not giving up on move around, but its a bit of a "battle" :P

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago - 2 years 2 months ago #108 by Davinci

  • Elite Member
  • Elite Member

  • Posts: 3024
  • Thank you received: 760

  • Gender: Male
  • Birthdate: Unknown
  • In other words, what actually defines a road?

    The Game does not know a road from a cornfield, the Programming is Programed to "Seek" out the fastest movement speeds.

    A formula that is very Simple, and very Clever !

    So, if the Roads are given a positive value ( 0.2, or 0.1 ) and all of the other values are lower than those two values, the Game will move the units on the fastest path.

    So, the MapName.csv file can have multiple names that are the same, and also have multiple values assigned to some of them that are identical.

    It just can't have the same "GrayScale Color" doing different things, as far as I know, but I have never tried it.

    *** Also - Did You know that the Power Render Engine actually supports moving reflective water, it's just Not working as of now, but in the old TC2M Day's it did work.

    davinci

    The only true logic is that, there is no true logic!
    Last edit: 2 years 2 months ago by Davinci.
    The following user(s) said Thank You: RebBugler

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago #109 by 52ndOx

  • Junior Member
  • Junior Member

  • Posts: 120
  • Thank you received: 92

  • Gender: Unknown
  • Birthdate: Unknown
  • The following user(s) said Thank You: RebBugler, Petrus58, r59

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago #110 by RebBugler

  • Administrator
  • Administrator
  • Design, Mods, NSD Designer

  • Posts: 4045
  • Thank you received: 2124

  • Gender: Male
  • Birthdate: 07 Feb 1948
  • Great thread, it's answered a lot of questions, still, I'm stuck at Post #20 . I can't get the Packages objects into lstudio to view them, and eventually edit them. I had no problem loading the map.lsl file via libedit and then roaming the terrain with lstudio. I got the Packages .dat files in libedit and copied them to the Map 1 folder, reloaded lstudio but still get errors that say the Packages files can't be found. What am I doing wrong?

    To head off another question, my goal here is to scale the map Packages objects smaller. Will this have to be done one object at a time, or will they be able to be scaled en-mass via Excel or a similar app?

    I'll try not to interfere with this thread's flow too much. Just some brief help here and then I'll start a new thread discussing a new mod, and it's development.

    Bugles & Flags Gettysburg - Toolbar, Flags, Scenarios, and More...

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago - 2 years 2 months ago #111 by 52ndOx

  • Junior Member
  • Junior Member

  • Posts: 120
  • Thank you received: 92

  • Gender: Unknown
  • Birthdate: Unknown
  • You don't need to extract the packages.dat to use the objects in Lstudio.
    Need to add the whole library in Lstudio with Packages/Package Manager/Add Package

    I don't think you can resize the actual models without loading them back into a 3D editor, but you can set the scale of an object when you add it with Properties/Orientation. These values are remembered during the Lstudio session, or if you select a model already added to the scene and duplicate.

    Not possible to do anything with a spreadsheet here because the .dat are binary.
    Last edit: 2 years 2 months ago by 52ndOx.
    The following user(s) said Thank You: RebBugler

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago #112 by RebBugler

  • Administrator
  • Administrator
  • Design, Mods, NSD Designer

  • Posts: 4045
  • Thank you received: 2124

  • Gender: Male
  • Birthdate: 07 Feb 1948
  • Need to add the whole library in Lstudio with Packages/Package Manager/Add Package


    I'm doing this. I added them from their original file, I've copied them to the Map 1 file (the test file that got the terrain to show up in lstudio) and added them from there, to no avail, all I get is same terrain without objects, and the packageName can't be found errors.

    Regardless, I'm screwing up somewhere, I'll just go back and start over. Thanks for the help

    Bugles & Flags Gettysburg - Toolbar, Flags, Scenarios, and More...

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago - 2 years 2 months ago #113 by 52ndOx

  • Junior Member
  • Junior Member

  • Posts: 120
  • Thank you received: 92

  • Gender: Unknown
  • Birthdate: Unknown
  • It should work.

    LS map with no packages:




    Add WL.dat via package manager and reload:

    Last edit: 2 years 2 months ago by 52ndOx.
    The following user(s) said Thank You: RebBugler

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago #114 by RebBugler

  • Administrator
  • Administrator
  • Design, Mods, NSD Designer

  • Posts: 4045
  • Thank you received: 2124

  • Gender: Male
  • Birthdate: 07 Feb 1948
  • Did exactly what you said. It then appears here in the Packages Manager.


    After 'reload' I get this error, and no objects.

    Bugles & Flags Gettysburg - Toolbar, Flags, Scenarios, and More...
    Attachments:

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago - 2 years 2 months ago #115 by RebBugler

  • Administrator
  • Administrator
  • Design, Mods, NSD Designer

  • Posts: 4045
  • Thank you received: 2124

  • Gender: Male
  • Birthdate: 07 Feb 1948
  • OK, found the problem, but not the solution. Went back and worked with a WL map. Followed your procedure and had no issues, package files were accepted, and I see and can move objects now. In fact, they showed up without going through the Package Manager procedure. So, it's a GB maps issue, or I should a procedural issue on my part. Davinci or another GB map maker will probably steer the correct GB route for fixing this issue.
    Thanks for helping me load a WL map. :lol:

    Bugles & Flags Gettysburg - Toolbar, Flags, Scenarios, and More...
    Last edit: 2 years 2 months ago by RebBugler.

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago - 2 years 2 months ago #116 by Davinci

  • Elite Member
  • Elite Member

  • Posts: 3024
  • Thank you received: 760

  • Gender: Male
  • Birthdate: Unknown
  • "Reb" - What's New in the Great State of Arkansas "

    The "Main" Problem that you are going to encounter is that the Packages are in a dozen different files, and a lot of them have duplicate objects in some of them.

    There was never a Standard on loading them, so everyone did something different.

    Now, the "Packages" have to be "Loaded" in "Two Separate" folders to work correctly.

    There is a "Packages" Folder in the LStudio Directory \ NSDTools - I think is the name of yours.

    There is also a Packages Folder in the Mod \ Maps \ Packages - folder, place the same Packages into both of those.

    The LStudio - Will call on the Packages from it's directory.

    The Game - Will call on the Packages from the Maps \ directory.

    Once you have extracted the Packages in the "LibEdit Window" and copied them into another folder to view, there are usually 3 or 4 files that are associated with each item. ( item equal house, barn, fence, etc.)

    There is a ( LS ) file that can be viewed with "NotePad" and Edited with "NotePad" - its a text file.

    If you know the "Exact" Size that you want an item to be, this file can be altered manually, as long as it isn't already placed on the Map in question.

    To put that another way, if the Map that you are going to edit already has a "House1" on it, it will do "No Good" to edit the ( LS ) file, since it will not override the existing house size on the map.

    All of the current objects and their locations and current sizes are stored in the "Terrain.lvl" file that is located in the MapName.lsl file.

    Now, if you are going to change the sizes of the fences, to best way to change ten thousand of them in two seconds is with a "Hex Editor", but it really only changes the height and not the length of them.

    This is for your New Mod - So what size difference are you changing everything too?

    Load All of the Packages in this Folder - and then use the Menu from LStudio in the Picture that you posted above to [ Add Packages ] one at a time into the Map that you are currently working on!



    davinci

    The only true logic is that, there is no true logic!
    Attachments:
    Last edit: 2 years 2 months ago by Davinci.
    The following user(s) said Thank You: RebBugler, 52ndOx

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago #117 by RebBugler

  • Administrator
  • Administrator
  • Design, Mods, NSD Designer

  • Posts: 4045
  • Thank you received: 2124

  • Gender: Male
  • Birthdate: 07 Feb 1948
  • Thanks davinci,

    Copying the packages .dat files into the NSDTools/Packages folder did the trick. This is why the WL map loaded without a hitch, as the .dat files for it were already there. Didn't need to mess with the LibEdit app, thank goodness, or the 320 object files would have had to be saved one at a time, if extracted to a folder.

    Now I can see and edit map objects. :lol:

    Bugles & Flags Gettysburg - Toolbar, Flags, Scenarios, and More...
    The following user(s) said Thank You: Davinci

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago #118 by Davinci

  • Elite Member
  • Elite Member

  • Posts: 3024
  • Thank you received: 760

  • Gender: Male
  • Birthdate: Unknown
  • Didn't need to mess with the LibEdit app, thank goodness, or the 320 object files would have had to be saved one at a time, if extracted to a folder.

    Dropping the Packages.dat into the LibEdit Window - is only when you are going to "Change" something such as making another house with a different roof for the game, or changing the doors or windows.

    This way is a lot better than starting from scratch, just rename a house, change the appearance, and add it back into the Packages.dat file.

    You might want to load that "BoxScale" figure on the Map and adjust the height to the men on the field.

    Open the LStudio - and place the Boxscale figure where you think that the men will show up in the game, and move some men over to his position to get the right scale.

    Then go into the LStudio - and change his height, now when placing down houses and fences, you can use his scale to determine the correct size.

    I usually place him near the doors of a structure to get the right size of a house or barn.

    Also - it's a good idea to also start writing down what values you use on each house, barn, etc...it will make the conversions a lot easier, so you don't have to remember what values to use.



    davinci

    The only true logic is that, there is no true logic!
    Attachments:
    The following user(s) said Thank You: RebBugler, Biondo

    Please Log in or Create an account to join the conversation.

    2 years 2 months ago - 2 years 2 months ago #119 by Crikey

  • Regimental Commander
  • Regimental Commander

  • Posts: 442
  • Thank you received: 574

  • Gender: Unknown
  • Birthdate: Unknown
  • Reb....I believe the 3D box scale figure’s default scale properties is set at 1.6, 1.6, 1.6 - length, height, width etc. That may be right for SoWGB although worth checking, but far too big for SoWWL. The latter should probably be around 1.2 to reflect the smaller sprites used. The default settings for SoW buildings generally come out far too big....in terms of scale and in terms of collision radius. You can spend a lot of time manually adjusting.

    On the latter i’m not even sure the AI recognises the size of the collision radius only that there is one. In TCM2 troops would recognise a 300 yard radius, in SOWWL they seem to recognise there is one but not it’s size, and just edge around the walls of the building. Perhaps this was a side effect of Norb’s bespoke PR variant.

    Finally, fences. As D suggests make sure you get the scale right before laying. Also, you can turn 3D collisions completely off on these.
    Last edit: 2 years 2 months ago by Crikey.
    The following user(s) said Thank You: RebBugler

    Please Log in or Create an account to join the conversation.

    2 years 1 month ago - 2 years 1 month ago #120 by r59

  • Junior Member
  • Junior Member

  • Posts: 50
  • Thank you received: 47

  • Gender: Unknown
  • Birthdate: Unknown
  • In other words, what actually defines a road?

    The Game does not know a road from a cornfield, the Programming is Programed to "Seek" out the fastest movement speeds.

    A formula that is very Simple, and very Clever !

    So, if the Roads are given a positive value ( 0.2, or 0.1 ) and all of the other values are lower than those two values, the Game will move the units on the fastest path.

    So, the MapName.csv file can have multiple names that are the same, and also have multiple values assigned to some of them that are identical.

    It just can't have the same "GrayScale Color" doing different things, as far as I know, but I have never tried it.

    davinci


    Hi Dav.
    I'm 100% new to the game pathfinding's insights.
    Please excuse my ignorance, first of all.
    Just a question...
    How could the game mark the (contiguous) road pixels as "SKD_ROAD" features for e.g. the AI's FindClosestFeature function?
    It marks the ones with the best movement modifier values?
    Or every table entry is considered as road below a defined grayscale value threshold (say 10)?
    Or just the first N entries in the terrain table brush?
    Thanks anybody for clarifying.

    I'm under the impression the road pathing doesn't use A* at all.
    Just seek for the closest road feature for start pos and goal pos.
    And following the grayscale's road pixels, sample path locations (probably smoothing that a bit before) to connect both extremes.

    I guess the grayscale_25 pixels should automatically trigger the same road pathing process, but only once a unit falls above any of them. That could explain why units set to move forward but on the opposite bank, tends to slide along both rivers edges, no?

    I spotted a true A* algorithm inside CHex::BuildPath, on the other hand.
    This is called every time you fire a move command, for example.
    But I could not make a sense of the implementation so far.
    Seems it can't pick the intermediate steps for the cheapest ai-hex-tiles path, returning in most of cases just goal and destination to the waypoints list instead.
    The heuristics is defined as...
    v.xy = abs(xy-goal.xy).
    1) 141 * v.x;
    2) 41 * v.x + 100 * v.y;
    3) 41 * v.y + 100 * v.x;
    Depending on comparison between v.x and x.y.
    The added cost of visiting a tile also looks strangely fixed (141 or 100 if matching previous node's xy).
    I see also some checks on collision objects there and probably something related to the unit "killbox" too (to avoid blocking lines of fires).
    If only this piece of code could work upon effective ground moving costs and do not visit impassable tiles like water bodies at all...
    Still a long way left for me to understand this system thoroughly, anyway.

    Ciao. ;)
    Last edit: 2 years 1 month ago by r59.

    Please Log in or Create an account to join the conversation.

    Moderators: RebBuglergunship24Leffe7Sargonpaul9038