THE ARTIFICIAL INTELLIGENCE SYSTEM

By M25

Thanks to M25's AI libraries, the game's computer-controlled characters offer a much more interesting challenge.

Freedom Force X supports default AI behaviour for most attributes.

Additionally, AI behaviour can be set up for individual characters (custom or built-in) and will kick in during danger room sessions when they are used. The best way to do this is to use the AI Generator Rumble Room level to create the basics and tweak from there.

AI definition at a glance

The following is a brief description of the system, mainly intended as a short introduction for modders or tech-savvy experimenters (remember to back up those files!), before plunging into the AI Tactics documentation itself.

The AI data for characters is stored in a file called m25aidata.py in the \Missions\Scripts directory. Each character has a block of code along these lines:

['pyroness',
	["target enemy",
		'weakness_melee_crushing',
		'weakness_ranged_fire',
		'not hexed',
	],
	["timer", 'auto',
		'TUseRemedy()',
		"TFleeMelee(mindist='medium',movetype='move',time=0.88)",
		'TFleeMelee(type="any",subtype="emitting_damage",time=0.88)',
		'TInnerBeing()',
		"TRangedExplosive('hellfire',time=2.68)",
		'TFireWall()',
		"TRanged('fire cage',time=6.88)",
		"TDisruptObject('ignition',time=3.47)",
		"TMelee('swipe',time=2.36)",
		'TMoveTo(mindist=\'long\' ,subtype="not emitting_damage",time=0.88)',
	],
],