What do the numbers and values in "SetAIDifficulty" mean?

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
Jaspo
Command Sergeant Major
Command Sergeant Major
Posts: 282
Joined: Sun Mar 01, 2009 4:34 am
Projects :: AotC DoW+++Boonta Eve Classic
Games I'm Playing :: WoT MBWBVC Robocraft
xbox live or psn: No gamertag set
Contact:

What do the numbers and values in "SetAIDifficulty" mean?

Post by Jaspo »

For example, with

SetAIDifficulty(0, 2, "hard")

What is the 0, what is the 2, and what is "hard" compared to "medium," and what other options besides hard and medium are there? And was I observing correctly that having this in my conquest script makes the AI shoot faster at least, or was I just imagining things?
User avatar
Par3210
Jedi
Jedi
Posts: 1033
Joined: Sun Jun 14, 2009 10:31 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Owning people in SWBF2
Contact:

Re: What do the numbers and values in "SetAIDifficulty" mean?

Post by Par3210 »

No you were not dreaming or whatever. It is true. The 0,2 means the difficulty level. You could raise it to 1,0 which would make it a lot harder to win and beat them.
I'm sure that that makes the AI a lot smarter and can shoot easier and generally harder.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: What do the numbers and values in "SetAIDifficulty" mean?

Post by [RDH]Zerted »

http://www.secretsociety.com/forum/down ... F2Docs/AI/

Thats from the web site of one of the game developers who used to help us modders out. All the docs on his site should be required reading after your first map or two.
User avatar
Eggman
Master Bounty Hunter
Master Bounty Hunter
Posts: 1516
Joined: Mon Jul 16, 2007 1:30 pm
Projects :: Battlefront Chronicles
Location: Las Vegas

Re: What do the numbers and values in "SetAIDifficulty" mean?

Post by Eggman »

[RDH]Zerted wrote:http://www.secretsociety.com/forum/down ... F2Docs/AI/

Thats from the web site of one of the game developers who used to help us modders out. All the docs on his site should be required reading after your first map or two.
Agreed. It's all very useful information, especially when it comes to explaining small functions or properties such as this.
Jaspo
Command Sergeant Major
Command Sergeant Major
Posts: 282
Joined: Sun Mar 01, 2009 4:34 am
Projects :: AotC DoW+++Boonta Eve Classic
Games I'm Playing :: WoT MBWBVC Robocraft
xbox live or psn: No gamertag set
Contact:

Re: What do the numbers and values in "SetAIDifficulty" mean?

Post by Jaspo »

are 3 and -3 the highest and lowest values, or are there even higher levels of intelligence and stupidity?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: What do the numbers and values in "SetAIDifficulty" mean?

Post by Maveritchell »

Jaspo wrote:are 3 and -3 the highest and lowest values, or are there even higher levels of intelligence and stupidity?
Stock Hoth campaign uses higher modifiers, and your "base value" is 10. I've always assumed either 9 or 10 is the highest value you can use as a modifier.
Jaspo
Command Sergeant Major
Command Sergeant Major
Posts: 282
Joined: Sun Mar 01, 2009 4:34 am
Projects :: AotC DoW+++Boonta Eve Classic
Games I'm Playing :: WoT MBWBVC Robocraft
xbox live or psn: No gamertag set
Contact:

Re: What do the numbers and values in "SetAIDifficulty" mean?

Post by Jaspo »

uh, at least at first the stock hoth campaign is set to
SetAIDifficulty(0, 2, "hard")...does it get set harder later in the script (which I didn't see anywhere), or were you mistaken?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: What do the numbers and values in "SetAIDifficulty" mean?

Post by Maveritchell »

Jaspo wrote:uh, at least at first the stock hoth campaign is set to
SetAIDifficulty(0, 2, "hard")...does it get set harder later in the script (which I didn't see anywhere), or were you mistaken?
I was mistaken; not stock Hoth, stock Geonosis (most of the campaigns use SetAIDifficulty):

Code: Select all

SetAIDifficulty(2, -8, "medium")
Post Reply