AI Difficulty
Command Line Options:
/DisableAIAutoBalance |
This will disable auto balancing for the entire game. Use this to pure balance your levels.
|
Console debugging commands:
aidiff |
Dumps the difficulty to the console, and also to the debug output (TTY on ps2, DrWatson for xbox): Profile setting: MEDIUM AutoBalance: ACTIVE base lua auto = total Player : 10 + 0 + 0 = 10 Enemy : 12 + 0 + 0 = 12 This shows the current profile difficulty setting (EASY, MEDIUM, HARD). Then it says if AutoBalance is turned on. You can control this with the
lua EnableAIAutoBalance() command. The modes shown are: Then it shows the difficulty setting calculation. "Base" is the base value that it gets from the profile setting. "Lua" is the adjustment modifier that you can set in the lua with the SetAIDifficulty() command. "Auto" is the modifier from the auto balancer. "Total" is the final value that it uses. |
Lua Script commands:
EnableAIAutoBalance() |
Turn on AutoBalancing. This will work for Conquest/Assault/CTF games. Not campaign. Basically if the score gets too far in one teams favor (+/- 40 conquest, 60 assault, 1 ctf) it will make the loosing team better and the winning team worse until things get back to close again.
|
DisableAIAutoBalance() |
Turn off AutoBalancing. It is on by default so you should use this for your campaign mode scripts.
|
SetAIDifficulty(player, enemy) |
This will set the current difficulty modifier. The two values are for the player's team and for the enemy's team. These are only modifiers on the current profile setting, so you don't need to set these at all if you want. All maps default to (0,0). SetAIDifficulty(-2, 3) This will make the AI on the players team 2 settings easier, and the AI on the enemy team 3 settings harder. This can be called from any point within a mission. So if you want the bad guys to be more difficult on just one objective, call this with say (0,2) in the OnStart function, then call it again with (0,0) to reset it in the OnComplete function.
|
SetAIDifficulty(player, enemy, diff) |
This works just like the above, but only for a specific profile setting. So if you want to leave medium alone, but make hard mode harder, you could do: SetAIDifficulty(0, 3, "hard") The last value can be "easy", "medium", or "hard".
|