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

A new section for modding SOW Waterloo. Ask questions, post tips here.
Davinci
Reactions:
Posts: 3034
Joined: Wed Jul 02, 2008 12:53 pm

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

Post by Davinci »

This sort of reminds "Me" of a very smart teacher speaking ( i.e...You ), and a very not so smart student ( i.e...Me ).

I have absolutely zero idea what "You" are asking here, so can you put the question another way?

Thanks,

davinci
The only true logic is that, there is no true logic!
r59
Reactions:
Posts: 101
Joined: Fri Apr 14, 2017 8:17 pm

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

Post by r59 »

I don't really think my English skills in itself would allow for teaching anything to anybody here, mate. :S
Sorry for that.
Anyway, I meant to say you can query the game engine for the closest "SKD_ROAD" (also dead roads) feature to a given map position in the AI DLL.
So probably the game has to mark those grayscale pixels as such, according to some criteria, when loading the level...
Your comment (the cornfield vs road example) left me under the impression the terrain types with the fastest movement speeds are picked by the road pathing procedures, whatever their grayscale values or entry position in the terrain table brush.
Are we sure about it?
Thanks for the patience. ;)
Last edited by r59 on Sun Sep 08, 2019 1:15 am, edited 1 time in total.
r59
Reactions:
Posts: 101
Joined: Fri Apr 14, 2017 8:17 pm

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

Post by r59 »

Ah, and I forgot telling 52ndOx...
Please don't give up with La Coruña!
We'll find a better way to work around your pathing issues that could potentially break the scenario design. Have faith. :side:
Last edited by r59 on Sun Sep 08, 2019 1:16 am, edited 1 time in total.
Davinci
Reactions:
Posts: 3034
Joined: Wed Jul 02, 2008 12:53 pm

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

Post by Davinci »

Your comment (the cornfield vs road example) left me under the impression the terrain types with the fastest movement speeds are picked by the road pathing procedures, whatever their grayscale values or entry position in the terrain table brush.
True, but "Norb" has programmed it that way, meaning.....

There is no default "Grayscale" value that "Has" to be used for any road or path, We as Modders always still to stick with what the Games Defaults values used. An Example would be values that are between ( 100 - 145 ).

But a road value can be any "GrayScale" color that the game accepts between ( 0 - 255 ).

So, how does the game know which value to use for the roads.....

It will choose the "GrayScale" color that has the "Fastest \ Highest" value assigned to it as long as those two values are ( 0.2 and 0.1 ) which are the highest values, while the other grayscale values are either ( 0 ) or a negative value.

There is probably a lot more going on here that I'm sure that you are aware of such as, the road-system has to go from one end of the map to the next. The raod-system has to be connected at all times to another road. The road-system has to use the same numbers, so you can't have a road with a speed of ( 0.2 ) and another road with a speed of ( 0 ).

So, if you are asking can a road system use a value of Grayscale Color ( 10 ) which is normally used for a river or stream, then the answer is Yes, you can use any value.

Post Back, if this didn't answer your question!

davinci
The only true logic is that, there is no true logic!
Davinci
Reactions:
Posts: 3034
Joined: Wed Jul 02, 2008 12:53 pm

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

Post by Davinci »

Ah, and I forgot telling 52ndOx...
Please don't give up with La Coruña!
We'll find a better way to work around your pathing issues that could potentially break the scenario design. Have faith. :side:
So, are You trying to figure out a way of not having any units go into the water if there is a large body of water on a particular map?

I don't think that that is possible, and even if you do find an acceptable solution, a routing unit will always ignore it and run into the water.

I think that what you are trying to do will be a Major undertaking, and even if it does work it would have to be done for each map that has a large body of water on it.

Just My Opinion!

davinci
The only true logic is that, there is no true logic!
r59
Reactions:
Posts: 101
Joined: Fri Apr 14, 2017 8:17 pm

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

Post by r59 »

I cannot ask "having faith" to a man of science like you, dear Maestro. :whistle:
But certainly I can expect great teaching and clarifications.
Your previous post(/s) falls into that category without any doubt.
Thanks so much for taking the time to write them. ;)

If we only could build (by hand to begin, but automatically later) an higher-level (approximated) walkable regions / chokepoints representation of a game map (like Wavre with its Dyle, for example), it should't be impossible to achieve something along the lines of BWTA2, I think.
Region having a center, a polygon, a list of adjacent chokepoints and reachable regions.
Chokepoints defined by 2 sides locations, width and the 2 connected regions.
We'd basically "intercept" any unit repathing call from the AI Dll and patch their waypoints list to reach the destination position according to our A*/HPA* solution.
The same procedure might work for routing units too, if (and only if) the same list is actually being taken into consideration whatever the unit state (hard to tell atm, I never come upon a unit fleeing with that queue not beign empty).

I'm looking for volunteers, of course. :)
Last edited by r59 on Sun Sep 08, 2019 11:44 pm, edited 1 time in total.
52ndOx
Reactions:
Posts: 134
Joined: Tue Jul 09, 2019 12:00 am

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

Post by 52ndOx »

Ah, and I forgot telling 52ndOx...
Please don't give up with La Coruña!
We'll find a better way to work around your pathing issues that could potentially break the scenario design. Have faith. :side:
Thank you!
And don't worry. I have not given up on Corunna. Nor have I lost the desire to learn more about SOW, which I didn't know about until recently.

I still greatly appreciate all the help and encouragement I have found here.

But I am busy with other things at the moment and don't have so much time for the project.
Davinci
Reactions:
Posts: 3034
Joined: Wed Jul 02, 2008 12:53 pm

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

Post by Davinci »

If we only could build (by hand to begin, but automatically later) an higher-level (approximated) walkable regions / chokepoints representation of a game map (like Wavre with its Dyle, for example), it should't be impossible to achieve something along the lines of BWTA2, I think.
Region having a center, a polygon, a list of adjacent chokepoints and reachable regions.
Chokepoints defined by 2 sides locations, width and the 2 connected regions.
We'd basically "intercept" any unit repathing call from the AI Dll and patch their waypoints list to reach the destination position according to our A*/HPA* solution.
The same procedure might work for routing units too, if (and only if) the same list is actually being taken into consideration whatever the unit state (hard to tell atm, I never come upon a unit fleeing with that queue not beign empty).

I'm looking for volunteers, of course. :)
If "You" are talking about changing the Games ".exe" file and creating a ton of sub-routines which might not be the correct term used to check the where-bouts of water, that is a Major undertaking.

It would have to check them as frequently as a sort of "line-of-sight" check, which is going to slow the game down to a crawl.

Also, I don't think that there are more than four of five Members on the Forum that has Programming Skills.

Since the routing units and the regular units don't walk or run through objects, I would guess that if an "Object" can be created to act as a sort of invisible wall, that might solve the problem.

I used the word "created" since, as of now, trying to used the current objects, it doesn't work.

I played around with trying to create a sort of wall that I would have later made invisible if it worked. but since I have "No Computer Knowledge" never did get very far with the experiment. But, I still think that it is possible.

Good Luck - if you decide to solve this!

davinci
The only true logic is that, there is no true logic!
r59
Reactions:
Posts: 101
Joined: Fri Apr 14, 2017 8:17 pm

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

Post by r59 »

If we only could build (by hand to begin, but automatically later) an higher-level (approximated) walkable regions / chokepoints representation of a game map (like Wavre with its Dyle, for example), it should't be impossible to achieve something along the lines of BWTA2, I think.
Region having a center, a polygon, a list of adjacent chokepoints and reachable regions.
Chokepoints defined by 2 sides locations, width and the 2 connected regions.
We'd basically "intercept" any unit repathing call from the AI Dll and patch their waypoints list to reach the destination position according to our A*/HPA* solution.
The same procedure might work for routing units too, if (and only if) the same list is actually being taken into consideration whatever the unit state (hard to tell atm, I never come upon a unit fleeing with that queue not beign empty).

I'm looking for volunteers, of course. :)
If "You" are talking about changing the Games ".exe" file and creating a ton of sub-routines which might not be the correct term used to check the where-bouts of water, that is a Major undertaking.

It would have to check them as frequently as a sort of "line-of-sight" check, which is going to slow the game down to a crawl.

Also, I don't think that there are more than four of five Members on the Forum that has Programming Skills.

Since the routing units and the regular units don't walk or run through objects, I would guess that if an "Object" can be created to act as a sort of invisible wall, that might solve the problem.

I used the word "created" since, as of now, trying to used the current objects, it doesn't work.

I played around with trying to create a sort of wall that I would have later made invisible if it worked. but since I have "No Computer Knowledge" never did get very far with the experiment. But, I still think that it is possible.

Good Luck - if you decide to solve this!

davinci
Hey Dav!
It might be easier than what you think...
Said that I'm no AI programmer, I tend to see big obstacles/unwalklable areas (like water bodies) as a path planning problem rather than a collision avoidance one.
That would run every time a unit moving command is issued instead of every frame!
In all cases, I honestly think the reasons of concerns about game performances are to be seek elsewhere.
Because my proposal of "stupid" path planning (pre-computed from a very semplified map representation, non tactical, chokepoint-driven), might reduce to something as simple as this (area around Bierge, Wavre's map), which has virtually zero computational cost:
Image
Oh, and luckly, I guess there's no need to change the EXE physically (on disk).
Let's see if I could make it work.
If I succeeded, might I count on any volunteer to mark at least regions pixels and chokepoints centers on a map for more extended testing?
Ciao. ;)
Last edited by r59 on Mon Sep 09, 2019 4:07 pm, edited 1 time in total.
User avatar
RebBugler
Reactions:
Posts: 4237
Joined: Sun Aug 03, 2008 12:51 am
Location: Ouachita Mountains, Arkansas

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

Post by RebBugler »

If I succeeded, might I count on any volunteer to mark at least regions pixels and chokepoints centers on a map for more extended testing?
I'll gladly test the pond on the QB map with whatever you come up with. That pond was a pain to script around, it sucked troops in like a Black Hole.
Bugles & Flags Gettysburg - Toolbar, Flags, Scenarios, and More...
Post Reply