Custom AI
Posted: Mon Nov 20, 2006 8:24 am
I'm working on a revised AI based on pirateAI.plist. In shipdata.plist I have the correct custom ai_type set, but whenever I come across these ships in space, their AI is pirateAI.plist, not my custom AI. Is that becuse they switch to other AIs like enteringPirateAI.plist, and then forget to return to the custom AI?
Second question is is there a way to refine attack modes? I'm thinking along the lines of:
This is meant to have the attack come in fast, slow to normal speed when close, then ram the target 50% of the time. Will it work?
Second question is is there a way to refine attack modes? I'm thinking along the lines of:
Code: Select all
<key>ATTACK_SHIP</key>
<dict>
<key>ENERGY_LOW</key>
<array>
<string>setStateTo: FLEE</string>
</array>
<key>ENTER</key>
<array>
<string>performAttack</string>
<string>setSpeedFactorTo:1.5</string>
<string>setDesiredRangeTo: 500.0</string>
<string>setSpeedFactorTo:1</string>
<string>rollD: 2</string>
<string>ROLL_1= performAttack</string>
<string>ROLL_2= setDestinationWithinTarget</string>
</array>
<key>ENTER WORMHOLE</key>
<array>
<string>setStateTo: ENTER_WORMHOLE</string>
</array>
<key>EXIT</key>
<array/>
<key>INCOMING_MISSILE</key>
<array>
<string>fightOrFleeMissile</string>
</array>
<key>TARGET_DESTROYED</key>
<array>
<string>setStateTo: COLLECT_LOOT</string>
</array>
<key>TARGET_LOST</key>
<array>
<string>setStateTo: COLLECT_LOOT</string>
</array>
<key>UPDATE</key>
<array/>
</dict>