.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Campaigns, Scenarios & Maps (http://forum.shrapnelgames.com/forumdisplay.php?f=106)
-   -   Gotta AI problem here and I could use some help (http://forum.shrapnelgames.com/showthread.php?t=51481)

SaS TrooP January 28th, 2017 07:35 PM

Gotta AI problem here and I could use some help
 
This is mainly directed to fellow scenario makers.

New scenario from WW3 series is pretty much done for a while now, including 200x160 brand new map based on some satellite work. Long story short: I put quite a work to it.

But it seems I f*cked up a little bit.

First time for a while I decided to make a scenario where AI attacks from top to bottom instead of left/right.

First of all, AI ends turn with all vehicles facing right what allows player to score a lot of side shots, making this battle more pathetic rather than hardcore fun what I intended.

And secondly, AI seems to be following VERY strange paths or just driving around without any actual control over their own actions.

Can anyone help me to fix it? I would have it released and proceed to the next one, but testing is stuck for like 2 weeks now.

Imp January 28th, 2017 07:56 PM

Re: Gotta AI problem here and I could use some help
 
Don't think it will help but have you set the rally point to the top edge of the map for the AI side & the bottom for the player side.

Mobhack January 28th, 2017 08:01 PM

Re: Gotta AI problem here and I could use some help
 
SP has a natural order - left hand side plays Right hand side

- Retreaters will eventually head for their map side,, where they can exit.

- Off map artillery arrives from the player's map side, never top or bottom

DRG January 28th, 2017 08:05 PM

Re: Gotta AI problem here and I could use some help
 
Try Johns suggestion and try using waypoints for the AI...Pyros wrote a "more detail than you thought possible" explanation of their use and limitations and it's in the Game Guild.

While I appreciate innovation and I wouldn't want to lose a prime map either.... North / South attacks are not highly recommended for all the reasons you have discovered. The game is designed to be played L-R and everything is geared towards that.

Not the answer you really wanted but......that's it

SaS TrooP January 30th, 2017 07:14 PM

Re: Gotta AI problem here and I could use some help
 
If I understand waypoints well, I should create waypoints every couple of hexes for AI to work correctly? Or is it enough to place couple of those, marking general direction?
I rarely use waypoints, particularly scenarios this size. I could use some help with it.

OR, but I guess that's pure fantasy, any chance I (or someone else) can "turn" the map?

DRG January 30th, 2017 08:48 PM

Re: Gotta AI problem here and I could use some help
 
The short answer is yes <you create waypoints every couple of hexes >but you really need to read Pyros write up..load the guide and search for "waypoints". It is VERY detailed but it's broken down into

The basic (very simple) "three five" waypoint method,
The advanced "three five" waypoint method and
The "Pyros" detailed formula


There is a bit more to it than just clicking a waypoint then moving on to the next

... I've re-written it a bit
Quote:

on clear terrain assign waypoint marks using this pattern:

Every five hexes distance you should click three times the waypoint tool on the same hex
No, you cannot turn the map

Suhiir January 30th, 2017 10:41 PM

Re: Gotta AI problem here and I could use some help
 
I've done a lot of work with waypoints and can usually get formations to do what I want using Pyros methods, aside from the ongoing issues with vehicle vs infantry (or passengers) speeds. I usually use the editor to reduce vehicle speeds so the infantry can keep up. But this still doesn't solve the AI constantly unloading and reloading passengers issue.

shahadi January 31st, 2017 09:22 AM

Re: Gotta AI problem here and I could use some help
 
The waypoints and AI suggestions from previous posts are worth exploring. There are a number of scenarios, some by Camo Workshop that are North/South or top/bottom orientation.

Check out #32 Counterattack at Khafji 2/91.

You may want to check your battle type. Also, check your VF and make sure all of them are on the map.

So, my suggestion would be to go back over the fundamentals and review a number of scenarios with North/South orientation.

=====

Mobhack January 31st, 2017 10:52 AM

Re: Gotta AI problem here and I could use some help
 
There may well be some Top/Bottom (North and "Top of Map" are not synonymous!) scenarios out there, nevertheless its not recommended practice.

Grant1pa January 31st, 2017 06:17 PM

Re: Gotta AI problem here and I could use some help
 
I'll add some comments here.

I've never designed a scenario for exclusively top/bottom movement. I've done a few with flanking attacks from the top/bottom, and in those, I've used waypoint movement with fairly reasonable results.

Now some explanation of that. I use waypoints for the attacking force (computer controlled) or meeting force (computer), but not for the human player. I generally use Pyros method of waypoints, 3/5, 5/3 or what ever it is (five hexes/ 3 waypoints at end). With the CD version of the game, I've not had a problem.

Now, I'll mix units with way points sometimes with units coming in later waves simply controlled by the remaining objective points. Seems to work with me and doesn't annoy me as much, simply because some of the objectives may already have been taken. For those coming in later turns, I position them with the object of moving left/right.

As others have said, waypoints won't help you with how either side retreats. I imagine rally points may address some of that, but I still think the program will default (not my area).

I don't recall having an orientation problem with using waypoints in flanking engagements. I'll have to go back and check that with some of the scenarios I used that in. I think the program may still orient the vehicle towards the next waypoint, but again, I'll let someone with more program knowledge answer that.

One recommendation I will make is to do your maps and save them in the map file as a base. When you do your scenario design, you can select the base map, and further define it as you want. I know what it is like to spend hours on a map, then go right into a scenario without saving it. You might be able to re-open the scenario, deselect your forces, and try over, but that S*$ks. Been there, done that.

This is one of the reasons I love the Venhola program. You can get the terrain you want, then rotate the map so that you do a left/right scenario, regardless of the true compass direction. I recommend that program highly.

Best to you in working this out.

Tom

Mobhack February 1st, 2017 05:54 AM

Re: Gotta AI problem here and I could use some help
 
Rally points will direct the initial retreat towards them (if close enough, otherwise the map edge wins as far as I recollect). But then they will go for the left or right map edge as determined by the scenario side.

In addition the initial retreat from a burst of fire is almost always towards the appropriate map side for the player - so in a top-down scenario you can have infantry retreat from fire across the line of contact, so picking up additional shots at it.

Suhiir February 1st, 2017 10:35 AM

Re: Gotta AI problem here and I could use some help
 
Quote:

Originally Posted by Mobhack (Post 836988)
... so in a top-down scenario you can have infantry retreat from fire across the line of contact, so picking up additional shots at it.

Had that happen more times then I care to remember ... makes "you're surrounded" scenarios interesting.

I keep forgetting and trying again and again ... must be an age thing ... or sheer stupidity ...

SaS TrooP February 1st, 2017 01:34 PM

Re: Gotta AI problem here and I could use some help
 
@Grand1pa - where I can find that Venhola program? Thay may come in handy. This is bloody 200x160 map painted clear from sat images. I WILL have a butthurt if this scenario won't work the way I want. And I want to fix it.

Now, my problem is NOT the way they retreat. Problem is they choose sorta "retarded" paths, going over and around. If you do not mind spoilers, I can show you the WIP version. When you watch the first turn, you will see that AI units are just going randomly to the left and then they eventually MAY turn, only to capture the flag nearby. I will try to move some flags around, may that's what messed up (but usually works in left/right orientation).

This is typical scenario of mine, so brigade sized engagement - not that I'm lazy but you can guess I would do my best to avoid waypointing about 450 units.

Grant1pa February 1st, 2017 03:55 PM

Re: Gotta AI problem here and I could use some help
 
Sorry Mate, I was at work.

http://www.venhola.com/maps/geo.html

Check the sticky in the scenario forum: MAPS/HEIGHT MAPS for a lengthy discussion.

You're going to come to love the program.

Best,

Tom

Imp February 1st, 2017 03:58 PM

Re: Gotta AI problem here and I could use some help
 
Quote:

Originally Posted by Suhiir (Post 836992)
Quote:

Originally Posted by Mobhack (Post 836988)
... so in a top-down scenario you can have infantry retreat from fire across the line of contact, so picking up additional shots at it.

Had that happen more times then I care to remember ... makes "you're surrounded" scenarios interesting.

I keep forgetting and trying again and again ... must be an age thing ... or sheer stupidity ...

Been a while since I have used it but from memory works pretty well though only set for part of the force not the whole side.
Airdrop or similar normaly set about 3/4 the way along enemies map edge.

Grant1pa February 1st, 2017 04:14 PM

Re: Gotta AI problem here and I could use some help
 
Quote:

Originally Posted by SaS TrooP (Post 836999)
Now, my problem is NOT the way they retreat. Problem is they choose sorta "retarded" paths, going over and around. If you do not mind spoilers, I can show you the WIP version. When you watch the first turn, you will see that AI units are just going randomly to the left and then they eventually MAY turn, only to capture the flag nearby. I will try to move some flags around, may that's what messed up (but usually works in left/right orientation).

This is typical scenario of mine, so brigade sized engagement - not that I'm lazy but you can guess I would do my best to avoid waypointing about 450 units.

I'm not sure if this will help, but I will often deploy only my forward elements on the initial turn, leaving follow-on elements to a reinforcement turn. I think I may have already said that I use waypoint movement for most of my attacking forces. Most of the time I do this for reinforcement turn elements, and sometimes I merely place them forward in the map (not on the side edge) towards an objective flag where I let them move independently. This usually has to be adjusted in play-testing to see how far my lead elements get to make sure my intended objectives are still not seized. It's an imperfect system.

Without waypoints, your OPFOR will often execute tactically unsound movement (I presume the path of least resistance). So if your terrain favors the defense, you're stuck with waypoints for survivability. So I use the "place and hope for the best" method sparingly.

It works for me most of the time when I design large scale battles (which is most of what I do). This may eliminate some of the tedious nature of assigning way points for your second echelon in large scale engagements.

I have no objection to you posting your Work In Progress and would surely look at it.

Best.

Tom

DRG February 1st, 2017 05:49 PM

Re: Gotta AI problem here and I could use some help
 
Quote:

Originally Posted by SaS TrooP (Post 836999)
@Grand1pa - where I can find that Venhola program?

once you have the link set in your browser ( I have it on my favorites bar and can call it up anytime )

enter

50.0575
19.9802

and you will centre right in the middle of Krakow

It will make a 999 map for you but after you load it in the game you MUST flood fill it with page 2 clear terrain to see the contours... Page 2 upper left button. When it first load it will appear flat but look at the mini map. The is a detailed discussion and a link to the guide in the sticky section above this

Don

HERE IS THE GUIDE FOR THE PROGRAM
Quote:

SPMBT-maps user manual

SPMBT-maps is a tool to help you create good WinSPMBT maps.

Choosing a location

The map tool generates you a 160x200 hex map approximately 8000 meters wide and 8660 meters high containing the height information as provided by Google API. The resolution of Google API is in general 152 meters: i.e. terrain features that are finer than 3 hexes wide may get lost and must be filled in by hand where appropriate. However, that is the lowest resolution and in some cases the overall result is better than this promise.

When you have a good candidate location you can use the WWW map service that contains cached OpenStreetMap tiles to see how that map would be produced. You can either go straight to the map interface defaulting in Helsinki, Finland suburbs or you can enter your coordinates and map rotation. The map location and rotation may be easily adjusted later in the UI tool. Coordinates must be entered in WGS84 decimal format, so S20.1 W8.05 is entered by typing in -20.1 and -8.05 respectively. Rotation is in degrees.

In the tool you can then do adjustments (some of them are hidden when they would have no effect)

Move map: Drag (with mouse) by holding the left button
Rotate map: Shift + Alt + drag (holding left button of your mouse)
Zoom in: Double click / ⊞ button / mouse wheel scroll up
Zoom out: ⊟ button / mouse wheel scroll down
Redraw hex grid to current map center on screen according to map rotation: ✛ button
Rotate map to geographical north: ⇧ button
Rotate map to hex grid west-east axis: ⟂ button
Download current hex grid area: ⇩ button
Get link to the map (for bookmarking, linking outside...): L button
When you zoom in long enough you start to see individual hexes and some of them will contain their hex grid coordinates to help you fill the map.

Working on the map

Getting the terrain

After picking a good location so that all areas of interests are covered by the map click the Download button. Generating the map will take about half a minute but you can continue to use the UI while waiting. When the source map is generated it should be copied to game directory tiled "Maps". It will be map number 999 and will be overwritten by autosave if you work with any other map in the WinSPMBT map editor.

After opening the map go to second page of tools (either by clicking the blue triangle or "n" key on your keyboard) and choose clear keeping the current contour. Do not click on any hex but choose then Fill range button and enter 255 in. Then press the fill button and the terrain should be finished.

Starting the hard work

After getting a fresh terrain map I usually start by drawing in the major roads. Zoom in the map enough to see the main roads and their hexes with numbers such as (4,0) in them. These correspond to the coordinates in your map editor. After roads are in the other terrain features are easier to place. Other sources of information such as Google Earth and maps containing terrain information (rough / impassable areas, grass, woods etc) may be helpful. OpenStreetMap might not contain accurate information everywhere. Using two monitors is a major helper when making these maps.

Sometimes you find yourself in a situation where you can't replicate the features on the map you see with WinSPMBT map editor. Especially intersections, bridges or built areas might provide hard to fill in. In these cases I have aimed to the closest look and feel gamewise and tended to be more creative especially if the area in question is not an essential one considering the location. So roads that squirm on the map edge may be replaced with woods where they would show up on the map.


SaS TrooP February 1st, 2017 09:21 PM

Re: Gotta AI problem here and I could use some help
 
This tool looks lovely! And is quick and easy to use, I believe I may try it in future scenarios. Sadly, this does not solve my problem with this scenario I'm having.

I tested Pyros' guide on tank battalion. Tanks are doing well, his system probably works well. It seems nothing is left for me than to apply it to the rest of the 450 units brigade.
I should be done by around 2025. DO you still plan to update the game by then?

One more question though: I got some units coming in as reinforcements. I read the guide on waypoints, but something worries me. My waypoint "line" is not going from unit which will appear on map, but its going from very top-left corner of the map (from grey area). Should I be worried? I would like to know that before I put 120 waypoints for this unit.

Mobhack February 2nd, 2017 03:31 AM

Re: Gotta AI problem here and I could use some help
 
If your unit is off map then it is at -1,-1 and likely that waypoints will plot from there. It might be different if you have placed it on a reinforcement hex and given it an arrival turn, but as I never use waypoints in scenarios, I dont know the details.

Grant1pa February 2nd, 2017 07:43 AM

Re: Gotta AI problem here and I could use some help
 
Quote:

Originally Posted by SaS TrooP (Post 837019)

One more question though: I got some units coming in as reinforcements. I read the guide on waypoints, but something worries me. My waypoint "line" is not going from unit which will appear on map, but its going from very top-left corner of the map (from grey area). Should I be worried? I would like to know that before I put 120 waypoints for this unit.

I had this happen to me numerous times and with help from board members figured it out. Non-APC units should not do this. Check for that. If the units that start their first waypoint go up/left most, they are probably a command leg unit (first squad of a company/platoon). Simply place the loaded APC where you want it, then unload it. Go to the command screen and set your waypoints and they should work. When all waypoints are completed, go back and load the units to their APC. I've also seen this with air defense leg units in an APC platoon/coy. If you get the way off first waypoint, go and unload them and simply follow the same procedure.

This may not be according to the manual, but it works for me.

If you don't correct it, I think the unit will move to the first waypoint (off map) before on map waypoints. Not my area, but I know I had units rolling past the course I set them.

Best,

Tom

Mobhack February 2nd, 2017 09:45 AM

Re: Gotta AI problem here and I could use some help
 
A passenger is off map, so at -1,-1 as far as coordinates go. So the initial plot will be from -1,-1 -> top left of map.

As stated above - dismount passengers before issuing waypoints, then load if they are to be carried by APC.

Grant1pa February 2nd, 2017 08:12 PM

Re: Gotta AI problem here and I could use some help
 
Quote:

Originally Posted by Mobhack (Post 837024)
A passenger is off map, so at -1,-1 as far as coordinates go. So the initial plot will be from -1,-1 -> top left of map.

As stated above - dismount passengers before issuing waypoints, then load if they are to be carried by APC.

Copy that. But I've found through practical application that only the "command" element (Btn,Coy cmdr/ Ptl "cmdr") or the special defense section (last unit on ptl, independent ptl's or recce ptl's having apc's) are the only ones I need to unload before setting waypoint (and I sincerely hope I'm explaining this right...it's been a long day at work!). Maybe I'm wrong but that's the way the program works for me.

Tom

SaS TrooP February 2nd, 2017 10:39 PM

Re: Gotta AI problem here and I could use some help
 
I have just tested it and it works just as you both say, so thank you again. Waypoints seems to be solving my problem pretty fine, though I am still not satisfied with little details.

1) If you have mechanized infantry going with the waypoints and infantry unloads due to contact, will AI units pick up that infantry (as they do on default) before proceeding further? Or will IFVs just leave infantry behind and dash happily forward?
2) what happens when there are no more waypoints? Will AI proceed to nearest flags as they normally do? If so, is it worth trying to set waypoints to like first half of the map, and then leave it to them?

Suhiir February 3rd, 2017 03:58 AM

Re: Gotta AI problem here and I could use some help
 
Quote:

Originally Posted by SaS TrooP (Post 837038)
I have just tested it and it works just as you both say, so thank you again. Waypoints seems to be solving my problem pretty fine, though I am still not satisfied with little details.

1) If you have mechanized infantry going with the waypoints and infantry unloads due to contact, will AI units pick up that infantry (as they do on default) before proceeding further? Or will IFVs just leave infantry behind and dash happily forward?
2) what happens when there are no more waypoints? Will AI proceed to nearest flags as they normally do? If so, is it worth trying to set waypoints to like first half of the map, and then leave it to them?

#1
Generally once unloaded and contact is broken (due to line-of-sight or enemy elimination) APCs/IFVs will go into a cycle of "load infantry" - "unload infantry" and neither will move from the area where they unloaded.
Sometimes they may pick up infantry and proceed to their next waypoint, but don't count on it.
APCs/IFVs that share a formation with infantry will not dash forward leaving them behind, but if they are in a separate formation they may.

#2
I generally find it best to plot the last waypoint (or several) near a "final objective" to encourage the AI to advance because sometimes when you use waypoints they just mill around when they reach the area where the last one was plotted.

shahadi February 3rd, 2017 08:07 AM

Re: Gotta AI problem here and I could use some help
 
Quote:

Originally Posted by Grant1pa (Post 837037)
Quote:

Originally Posted by Mobhack (Post 837024)
A passenger is off map, so at -1,-1 as far as coordinates go. So the initial plot will be from -1,-1 -> top left of map.

As stated above - dismount passengers before issuing waypoints, then load if they are to be carried by APC.

Copy that. But I've found through practical application that only the "command" element (Btn,Coy cmdr/ Ptl "cmdr") or the special defense section (last unit on ptl, independent ptl's or recce ptl's having apc's) are the only ones I need to unload before setting waypoint (and I sincerely hope I'm explaining this right...it's been a long day at work!). Maybe I'm wrong but that's the way the program works for me.

Tom

I've had to grapple with this as well...setting waypoints for mounted units. It really only works if they are dismounted as stated elsewhere, but I think it is not by a unit (unless the unit is a formation.) Point being, waypoints are set by formation. A platoon (C0) may have, say four fomations (C0, D0, E0, and F0)...if you set a waypoint for C0 only units of that formation (C0, C1, C2) will respond to the waypoint. You'll have to set waypoints for each of the formations in the platoon separately.

This is what I recall.

And back to setting waypoints for mounted units...I prefer to buy my vehicles separately from the leg infantry.

Another reason when creating scenarios I open MobHack (ScenHack, and the Extended Map Editor as well.) I seem always having to create formations.

Say, you want to set a patrol around a perimeter, that patrol would behave better if you limit the formation to only one unit, say a squad when you set it's waypoints. Also, to get it right, you may have to factor terrain in your waypoint calcs...again see that guy Pyros' tutorial.

=====


All times are GMT -4. The time now is 01:00 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.