Forged Alliance Forever Forged Alliance Forever Forums 2018-10-14T03:31:13+02:00 /feed.php?f=88&t=16606 2018-10-14T03:31:13+02:00 2018-10-14T03:31:13+02:00 /viewtopic.php?t=16606&p=168457#p168457 <![CDATA[Re: UNDER CONSTRUCTION! How to make AI path marker.]]>

Linking 2 path markers is simple. Select both markers and press the key "c".
To disconnect both markers you only need to press "d".

Here is a link to Ozonex's Map editor Wiki:

Statistics: Posted by Uveso — 14 Oct 2018, 03:31

2018-10-13T19:15:18+02:00 2018-10-13T19:15:18+02:00 /viewtopic.php?t=16606&p=168444#p168444 <![CDATA[Re: UNDER CONSTRUCTION! How to make AI path marker.]]> Is it already provided with the FAF Map Editor?
And how can I link path nodes like this?

Statistics: Posted by Georodin — 13 Oct 2018, 19:15

2018-08-20T18:46:29+02:00 2018-08-20T18:46:29+02:00 /viewtopic.php?t=16606&p=166915#p166915 <![CDATA[UNDER CONSTRUCTION! How to make AI path marker.]]> This can take several weeks month!

1. Why we need AI path markers ?
2. How does the AI use markers ?
3. How do we create markers ?
4. Where are the differences between AI's using those markers ?

1. Why we need AI path markers ?

First of all we need them for faster sim speed.
For every movement the AI need to know if the unit/platoon can reach it's destination, and we have two ways to get this information:

The first and only way for maps without markers is the c-engine command "unit:CanPathTo(Destination)".
If we call this from LUA, the c-engine is reading every map pixel from the unit position to it's destination to see if the way is pathable for the unit.
Those map scanns are consuming a huge amount of simspeed.

The second way is with makers.
If the map has 400 markers, we need to check about 600 path combinations to get a way across the whole map.
So markers are basically a precalculated map of "CanPathTo(Destination)". That's why they are so fast.

We also need markers to lead the way of our AI units.
Units will always move the direct way between each marker like on railways.
So we can lead units around hills to prevent disarranged formations or stucked units and uneven terrain for faster movement.

Last but not lest we can use markers to handle tough maps like "Seton's clutch" with 2 lakes/oceans,
or maps with high plateaus that are only reachable with air units/transporters.

Without markers the ACU/unit will move straight to the target:

If we have an enemy between us and the target, then we will move directly into the enemy:

With AI markers we can avoid the enemy, if we avoid markers with high threat (white numbers):

But markers are not only used for avoiding the enemy, they are also good for flank attacks.
Without markers the AI can only send it's units on the shortest way to the enemy.

2. How does the AI use markers ?

As example a map part with good and bad markers:

Here we have an ACU and an enemy on a higher plateau:

1.In the first pathing step we search for the closest marker near the enemy. (Marker 1)
2.The second step is finding a path way from the ACU to the enemy. (blue arrows)
3.Then we move the path, heading from marker to marker.
4.Last step after reaching "Marker1" is the attack move to the enemy.

Same situation with bad placed markers:

1.The first step is again finding the closest marker to the enemy. (Marker 1)
2.The second step is finding a way from the ACU to Maker1.
3.Step 3, moving the path makes no sense here, because the start and end marker is the same (Marker1)
4.So we start with step 4 and start an attack move to the enemy.

Moving from Marker1 to the enemy will use the pathing from the c-engine (blue arrows)
And this should not happen with AI markers.
If we need the help of the c-engine to avoid hills etc then we need more markers^^.

3. How do we create markers ?

Statistics: Posted by Uveso — 20 Aug 2018, 18:46