Planning and Weights

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
authraw
1st Lieutenant
1st Lieutenant
Posts: 445
Joined: Mon Jun 26, 2006 3:45 pm

Planning and Weights

Post 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:
Image
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?
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Planning and Weights

Post 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%
User avatar
tsurugi13
Lieutenant Colonel
Lieutenant Colonel
Posts: 543
Joined: Mon Dec 17, 2007 6:16 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Battling the ISA menace on Helghan.

Re: Planning and Weights

Post 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.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Planning and Weights

Post 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.
Post Reply