ai view range in the odf? [Solved]
Moderator: Moderators
- TGB
- Private Third Class
- Posts: 58
- Joined: Sun Oct 25, 2009 2:21 am
- xbox live or psn: pfff xbox
- Location: New Zealand
ai view range in the odf? [Solved]
im in the process of making ultra large maps and would like to know if there is an alternate way to the lua commands to increase / decrease the view range of ai units, specifically in their respective odf files because certain units should be able to see over longer distances.
-
CT-26-6958_Hevy
- Rebel Sergeant

- Posts: 193
- Joined: Sat Jul 10, 2010 5:30 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Behind enemy lines
Re: ai view range in the odf?
Maybe these two lines?
But I'm not sure
Code: Select all
ScanningRange = 100.0
TransmitRange = 300.0- DarthD.U.C.K.
- Master of the Force

- Posts: 6027
- Joined: Wed Sep 27, 2006 11:05 am
- Location: Duckburg, Germany
Re: ai view range in the odf?
try these lines
Code: Select all
MinRange = "8"
OptimalRange = "64"
MaxRange = "128""
- Eggman
- Master Bounty Hunter

- Posts: 1516
- Joined: Mon Jul 16, 2007 1:30 pm
- Projects :: Battlefront Chronicles
- Location: Las Vegas
Re: ai view range in the odf?
To expand a bit on what was posted:
These are what you want. The value that you're probably most concerned with is OptimalRange - this value controls how close a unit must be before an AI unit tries to attack it. Once the AI unit has "seen" the unit it is attacking, MinRange and MaxRange come into effect. MinRange controls how close a unit can get before the AI will stop attacking it with its current weapon and switch to a different weapon (for example, a sniper will switch to its pistol when the MinRange of the sniper rifle is reached). MaxRange controls how far away a unit can get before the AI stops attacking it with its current weapon (either switching to a different weapon, say from a pistol to a sniper rifle, or disengaging entirely).DarthD.U.C.K. wrote:try these linesCode: Select all
MinRange = "8" OptimalRange = "64" MaxRange = "128""
These show up in the .odfs for certain units (check out the .odfs for officer units, specifically), and they are related to the appearance of enemies on the radar screen (the values being the radius from the unit in question). These values don't have anything to do with how far the AI can "see" in terms of attacking, so they can be ignored unless you want to play around with the appearance of units on the radar.CT-26-6958_Hevy wrote:Maybe these two lines?
But I'm not sureCode: Select all
ScanningRange = 100.0 TransmitRange = 300.0
-
THEWULFMAN
- Space Ranger
- Posts: 5557
- Joined: Tue Aug 17, 2010 3:30 pm
- Projects :: Evolved 2
- Location: Columbus, Ohio
- Contact:
Re: ai view range in the odf?
These are what you want. The value that you're probably most concerned with is OptimalRange - this value controls how close a unit must be before an AI unit tries to attack it. Once the AI unit has "seen" the unit it is attacking, MinRange and MaxRange come into effect. MinRange controls how close a unit can get before the AI will stop attacking it with its current weapon and switch to a different weapon (for example, a sniper will switch to its pistol when the MinRange of the sniper rifle is reached). MaxRange controls how far away a unit can get before the AI stops attacking it with its current weapon (either switching to a different weapon, say from a pistol to a sniper rifle, or disengaging entirely).Eggman wrote:Hidden/Spoiler:
These show up in the .odfs for certain units (check out the .odfs for officer units, specifically), and they are related to the appearance of enemies on the radar screen (the values being the radius from the unit in question). These values don't have anything to do with how far the AI can "see" in terms of attacking, so they can be ignored unless you want to play around with the appearance of units on the radar.[/hide][/quote]CT-26-6958_Hevy wrote:Maybe these two lines?
But I'm not sureCode: Select all
ScanningRange = 100.0 TransmitRange = 300.0
Thanks eggman, i wondered what the transmit/scan thing was, good to know
- TGB
- Private Third Class
- Posts: 58
- Joined: Sun Oct 25, 2009 2:21 am
- xbox live or psn: pfff xbox
- Location: New Zealand
Re: ai view range in the odf?
thanks i always wondered what optimalrange did 
