Page 1 of 1
Planning and Weights
Posted: Wed Jul 23, 2008 1:16 pm
by authraw
I'm having trouble understanding how to get weights to work properly. My map has a lot of underground tunnels that twist and turn, so my planning involves a lot of hubs to compensate for this. These tunnels have many different paths to get to the different command posts. The AI follow the pathing fine--the problem is that they always take the shortest path possible and a lot of the tunnels are completely neglected. I've been trying to understand weights, but I can't figure out how they work.
For the sake of an example, consider this diagram. Several situations similar to this arise as a result of my twisty tunnels:

The units enter from the left, in the direction of the red arrow. The triangle in hub 4 represents a command post. When they hit hub 1, I want half to go up to 2, and half to go down to 5. They currently only go up to 2 because it is a shorter path.
How do I weight this so that the units will take both paths? When I click on edit weights, which hub do I click first? Which do I click second? What numbers should I put in for the weights?
Re: Planning and Weights
Posted: Wed Jul 23, 2008 7:12 pm
by AceMastermind
ZeroEditor_guide.doc wrote:WEIGHTS
By default each connection from a starting hub to a destination hub has a weight of 100. To change the weight of a connection in the AI’s selection process select Edit Weights from the menu and click on a starting hub. The connection will change color to yellow and when the mouse is moved outside the hub a line will be attached to the cursor until a destination hub is selected by clicking on it with the left mouse button. To delete an unattached path weight, click the right mouse button at any time. Once attached to a destination hub, the weight can be changed by entering a new weight in the Weight input field on the menu. WEIGHTS allow for greater control over which connections are used by AI as they move towards their final destination hub next to a command post.
Try weighting your connections from hub 1-2 at 50% and 1-5 at 50%
Re: Planning and Weights
Posted: Wed Jul 23, 2008 10:51 pm
by tsurugi13
AceMastermind wrote:ZeroEditor_guide.doc wrote:WEIGHTS
By default each connection from a starting hub to a destination hub has a weight of 100. To change the weight of a connection in the AI’s selection process select Edit Weights from the menu and click on a starting hub. The connection will change color to yellow and when the mouse is moved outside the hub a line will be attached to the cursor until a destination hub is selected by clicking on it with the left mouse button. To delete an unattached path weight, click the right mouse button at any time. Once attached to a destination hub, the weight can be changed by entering a new weight in the Weight input field on the menu. WEIGHTS allow for greater control over which connections are used by AI as they move towards their final destination hub next to a command post.
Try weighting your connections from hub 1-2 at 50% and 1-5 at 50%
If the AI's tendency is to take the shorter path then 1-2 at 25% and 1-5 at 75% might be better, but I don't work with planning too much so I don't know.
Re: Planning and Weights
Posted: Wed Jul 23, 2008 11:27 pm
by AceMastermind
Yeah by default the AI takes the shortest route to their destination, but if the game engine detects your custom weight data then the default AI behavior might be ignored when reaching that hub and the custom weights would be used.
Not sure though, i've never had a reason to edit the path weights, try it out and let us know the outcome.