I'll put it up next week. Still got a few things to finish off, but I've shot down over 10 victims in playtesting. I've gone rather overboard with randomization as every single hail and mission screen are randomly generated. Mission text template:-
Code: Select all
{
GLOBAL = {
ENTER = ("setSpeedFactorTo: 0.75", performIdle, "setStateTo: DECIDE_COURSE");
EXIT = ();
UPDATE = (); };
"DECIDE_COURSE" = {
ENTER = ("scriptActionOnTarget: reset: mission_random_hits_marklow", "scriptActionOnTarget: reset: mission_random_hits_npcfired", "scriptActionOnTarget: reset: mission_random_hits_playernear", "scriptActionOnTarget: reset: mission_random_hits_playerfired", "rollD: 2");
"ENERGY_LOW" = ("scriptActionOnTarget: set: mission_random_hits_marklow TRUE");
"ROLL_1" = ("setStateTo: GO_TO_WITCHPOINT");
"ROLL_2" = ("setStateTo: GO_TO_STATION");
EXIT = ();
UPDATE = ("setStateTo: DECIDE_COURSE"); };
"GO_TO_STATION" = {
ENTER = ("setSpeedFactorTo: 0.75", "scanForNearestShipWithRole: player");
"ENERGY_LOW" = ("scriptActionOnTarget: set: mission_random_hits_marklow TRUE");
"TARGET_FOUND" = (setTargetToFoundTarget, "scriptActionOnTarget: set: mission_random_hits_playernear TRUE", "setStateTo: REACT_TO_PLAYER");
"NOTHING_FOUND" = (setTargetToSystemStation, "setDesiredRangeTo: 5000.0", setDestinationToTarget, checkCourseToDestination);
"COURSE_OK" = ("setSpeedFactorTo: 0.75", performFlyToRangeFromDestination);
"DESIRED_RANGE_ACHIEVED" = ("scriptActionOnTarget: reset: mission_random_hits_marklow", "scriptActionOnTarget: reset: mission_random_hits_npcfired", "scriptActionOnTarget: reset: mission_random_hits_playernear", "scriptActionOnTarget: reset: mission_random_hits_playerfired", "setStateTo: GO_TO_WITCHPOINT");
"AEGIS_IN_DOCKING_RANGE" = ("scriptActionOnTarget: reset: mission_random_hits_marklow", "scriptActionOnTarget: reset: mission_random_hits_npcfired", "scriptActionOnTarget: reset: mission_random_hits_playernear", "scriptActionOnTarget: reset: mission_random_hits_playerfired", "setStateTo: GO_TO_WITCHPOINT");
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, "scriptActionOnTarget: set: mission_random_hits_npcfired TRUE", fightOrFleeMissile, setTargetToPrimaryAggressor, "scriptActionOnTarget: setAITo: randomhitsharmlessAI.plist", "setStateTo: FLEE_NPC_ATTACK");
ATTACKED = (setTargetToPrimaryAggressor, "scriptActionOnTarget: set: mission_random_hits_npcfired TRUE", setTargetToPrimaryAggressor, "scriptActionOnTarget: setAITo: randomhitsharmlessAI.plist", "setStateTo: FLEE_NPC_ATTACK");
UPDATE = ("scanForNearestShipWithRole: player");
EXIT = ();
};
"GO_TO_WITCHPOINT" = {
ENTER = ("setSpeedFactorTo: 0.75", "scanForNearestShipWithRole: player");
"TARGET_FOUND" = (setTargetToFoundTarget, "scriptActionOnTarget: set: mission_random_hits_playernear TRUE", "setStateTo: REACT_TO_PLAYER");
"NOTHING_FOUND" = (setDestinationToWitchpoint, "setDesiredRangeTo: 1000.0", setDestinationToTarget, checkCourseToDestination);
"COURSE_OK" = ("setSpeedFactorTo: 0.75", performFlyToRangeFromDestination);
"DESIRED_RANGE_ACHIEVED" = ("scriptActionOnTarget: reset: mission_random_hits_marklow", "scriptActionOnTarget: reset: mission_random_hits_npcfired", "scriptActionOnTarget: reset: mission_random_hits_playernear", "scriptActionOnTarget: reset: mission_random_hits_playerfired", "setStateTo: GO_TO_STATION");
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, "scriptActionOnTarget: set: mission_random_hits_npcfired TRUE", fightOrFleeMissile, setTargetToPrimaryAggressor, "scriptActionOnTarget: setAITo: randomhitsharmlessAI.plist", "setStateTo: FLEE_NPC_ATTACK");
ATTACKED = (setTargetToPrimaryAggressor, "scriptActionOnTarget: set: mission_random_hits_npcfired TRUE", setTargetToPrimaryAggressor, "scriptActionOnTarget: setAITo: randomhitsharmlessAI.plist", "setStateTo: FLEE_NPC_ATTACK");
UPDATE = ("scanForNearestShipWithRole: player");
EXIT = ();
};
"FLEE_NPC_ATTACK" = {
ENTER = ("addFuel: 15", "setSpeedFactorTo: 2.0", "setDesiredRangeTo: 25600", performFlee);
"ENERGY_LOW" = ("scriptActionOnTarget: set: mission_random_hits_marklow TRUE");
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, fightOrFleeMissile, "scriptActionOnTarget: setAITo: randomhitsharmlessAI.plist", "setStateTo: FLEE_NPC_ATTACK");
ATTACKED = (setTargetToPrimaryAggressor, "scriptActionOnTarget: setAITo: randomhitsharmlessAI.plist", "setStateTo: FLEE_NPC_ATTACK");
"TARGET_LOST" = ("scriptActionOnTarget: reset: mission_random_hits_npcfired", performIdle, "addFuel: -15", "scriptActionOnTarget: reset: mission_random_hits_playernear", "scriptActionOnTarget: reset: mission_random_hits_playerfired", "setStateTo: DECIDE_COURSE");
"TARGET_DESTROYED" = ("scriptActionOnTarget: reset: mission_random_hits_npcfired", performIdle, "addFuel: -15", "scriptActionOnTarget: reset: mission_random_hits_playernear", "scriptActionOnTarget: reset: mission_random_hits_playerfired", "setStateTo: DECIDE_COURSE");
EXIT = ();
"REACHED_SAFETY" = ("scriptActionOnTarget: reset: mission_random_hits_npcfired", performIdle, "addFuel: -15", "scriptActionOnTarget: reset: mission_random_hits_playernear", "scriptActionOnTarget: reset: mission_random_hits_playerfired", "setStateTo: DECIDE_COURSE");
UPDATE = (); };
"REACT_TO_PLAYER" = {
ENTER = ("rollD: 9");
"ENERGY_LOW" = ("scriptActionOnTarget: set: mission_random_hits_marklow TRUE");
"ROLL_1" = ("setStateTo: FOUND_PLAYER_HURRY_ON_COURSE");
"ROLL_2" = ("setStateTo: FOUND_PLAYER_HURRY_ON_COURSE");
"ROLL_3" = ("setStateTo: FOUND_PLAYER_HURRY_ON_COURSE");
"ROLL_4" = ("setStateTo: FOUND_PLAYER_HURRY_ON_COURSE");
"ROLL_5" = ("setStateTo: FOUND_PLAYER_HURRY_ON_COURSE");
"ROLL_6" = ("setStateTo: FOUND_PLAYER_HURRY_ON_COURSE");
"ROLL_7" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_8" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_9" = ("setStateTo: FOUND_PLAYER_FLEE_PLAYER");
EXIT = ();
UPDATE = ("setStateTo: REACT_TO_PLAYER"); };
"FOUND_PLAYER_HURRY_ON_COURSE" = {
ENTER = ("setSpeedFactorTo: 1.1");
"ENERGY_LOW" = ("scriptActionOnTarget: set: mission_random_hits_marklow TRUE");
"COURSE_OK" = ("setSpeedFactorTo: 1.1", performFlyToRangeFromDestination);
"NOTHING_FOUND" = ("scriptActionOnTarget: reset: mission_random_hits_playernear", "scriptActionOnTarget: reset: mission_random_hits_playerfired", "setStateTo: DECIDE_COURSE");
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: DECIDE_COURSE");
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, fightOrFleeMissile, "scriptActionOnTarget: setAITo: randomhitsharmlessAI.plist", "scriptActionOnTarget: set: mission_random_hits_playerfired TRUE", "setStateTo: REACT_TO_PLAYER_ATTACK");
ATTACKED = (setTargetToPrimaryAggressor, "scriptActionOnTarget: setAITo: randomhitsharmlessAI.plist", "scriptActionOnTarget: set: mission_random_hits_playerfired TRUE", "setStateTo: REACT_TO_PLAYER_ATTACK");
UPDATE = ("scanForNearestShipWithRole: player");
EXIT = (); };
"FOUND_PLAYER_FLEE_PLAYER" = {
ENTER = ("commsMessage: [mark-fleeing]", "addFuel: 5", "setSpeedFactorTo: 2.0", "setDesiredRangeTo: 25600", performFlee);
"ENERGY_LOW" = ("scriptActionOnTarget: set: mission_random_hits_marklow TRUE");
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, fightOrFleeMissile, "scriptActionOnTarget: setAITo: randomhitsharmlessAI.plist", performFlee);
ATTACKED = (setTargetToPrimaryAggressor, "scriptActionOnTarget: setAITo: randomhitsharmlessAI.plist", performFlee);
"TARGET_LOST" = (performIdle, "addFuel: -10", "scriptActionOnTarget: reset: mission_random_hits_playernear", "scriptActionOnTarget: reset: mission_random_hits_playerfired", "setStateTo: DECIDE_COURSE");
"TARGET_DESTROYED" = (performIdle, "addFuel: -10", "scriptActionOnTarget: reset: mission_random_hits_playernear", "scriptActionOnTarget: reset: mission_random_hits_playerfired", "setStateTo: DECIDE_COURSE");
EXIT = ();
"REACHED_SAFETY" = (performIdle, "addFuel: -10", "scriptActionOnTarget: reset: mission_random_hits_playernear", "scriptActionOnTarget: reset: mission_random_hits_playerfired", "setStateTo: DECIDE_COURSE");
UPDATE = (performFlee); };
"FOUND_PLAYER_FIGHT_PLAYER" = {
ENTER = ("scanForNearestShipWithRole: player");
"ENERGY_LOW" = ("scriptActionOnTarget: set: mission_random_hits_marklow TRUE");
"TARGET_FOUND" = (setTargetToFoundTarget, setTargetToPrimaryAggressor, "scriptActionOnTarget: set: mission_random_hits_playernear TRUE", "setStateTo: ATTACK_SHIP");
"NOTHING_FOUND" = ("scriptActionOnTarget: reset: mission_random_hits_playernear", "scriptActionOnTarget: reset: mission_random_hits_playerfired", "setStateTo: DECIDE_COURSE");
UPDATE = ("scanForNearestShipWithRole: player"); };
"ATTACK_SHIP" = {
ENTER = ("commsMessage: [mark-fighting]", performAttack);
"ATTACKED" = (setTargetToPrimaryAggressor, "scriptActionOnTarget: setAITo: randomhitsharmlessAI.plist", "scriptActionOnTarget: set: mission_random_hits_playerfired TRUE");
"ENERGY_LOW" = ("scriptActionOnTarget: set: mission_random_hits_marklow TRUE", "setStateTo: MARK_HURT");
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, "scriptActionOnTarget: setAITo: randomhitsharmlessAI.plist", "scriptActionOnTarget: set: mission_random_hits_playerfired TRUE", fightOrFleeMissile);
"TARGET_DESTROYED" = ("setStateTo: GLOBAL");
"TARGET_LOST" = ("setStateTo: GLOBAL");
"FRUSTRATED" = (performAttack);
EXIT = ();
UPDATE = (); };
"REACT_TO_PLAYER_ATTACK" = {
ENTER = ("rollD: 9");
"ENERGY_LOW" = ("scriptActionOnTarget: set: mission_random_hits_marklow TRUE");
"ROLL_1" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_2" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_3" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_4" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_5" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_6" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_7" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_8" = ("setStateTo: FOUND_PLAYER_FLEE_PLAYER");
"ROLL_9" = ("setStateTo: FOUND_PLAYER_FLEE_PLAYER");
EXIT = ();
UPDATE = ("setStateTo: REACT_TO_PLAYER_ATTACK"); };
"MARK_HURT" = {
ENTER = ("rollD: 9");
"ENERGY_LOW" = ("scriptActionOnTarget: set: mission_random_hits_marklow TRUE");
"ROLL_1" = ("setStateTo: BEG_FOR_LIFE");
"ROLL_2" = ("setStateTo: BEG_FOR_LIFE");
"ROLL_3" = ("setStateTo: BEG_FOR_LIFE");
"ROLL_4" = ("setStateTo: FOUND_PLAYER_FLEE_PLAYER");
"ROLL_5" = ("setStateTo: FOUND_PLAYER_FLEE_PLAYER");
"ROLL_6" = ("setStateTo: FOUND_PLAYER_FLEE_PLAYER");
"ROLL_7" = ("setStateTo: FIGHT_TO_DEATH");
"ROLL_8" = ("setStateTo: FIGHT_TO_DEATH");
"ROLL_9" = ("setStateTo: CONSIDER_JUMP");
EXIT = ();
UPDATE = ("setStateTo: MARK_HURT"); };
"CONSIDER_JUMP" = {
ENTER = ("rollD: 3");
"ENERGY_LOW" = ("scriptActionOnTarget: set: mission_random_hits_marklow TRUE");
"ROLL_1" = ("setStateTo: BEG_FOR_LIFE");
"ROLL_2" = ("setStateTo: FIGHT_TO_DEATH");
"ROLL_3" = ("setStateTo: JUMP_OUT");
EXIT = ();
UPDATE = ("setStateTo: MARK_HURT"); };
"FIGHT_TO_DEATH" = {
ENTER = (performAttack);
"ATTACKED" = (setTargetToPrimaryAggressor, "scriptActionOnTarget: setAITo: randomhitsharmlessAI.plist", "scriptActionOnTarget: set: mission_random_hits_playerfired TRUE");
"ENERGY_LOW" = ("scriptActionOnTarget: set: mission_random_hits_marklow TRUE", performAttack);
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, "scriptActionOnTarget: setAITo: randomhitsharmlessAI.plist", "scriptActionOnTarget: set: mission_random_hits_playerfired TRUE", fightOrFleeMissile);
"TARGET_DESTROYED" = ("setStateTo: GLOBAL");
"TARGET_LOST" = ("setStateTo: GLOBAL");
"FRUSTRATED" = (performAttack);
EXIT = ();
UPDATE = (); };
"BEG_FOR_LIFE" = {
ENTER = ("commsMessage: [mark-begging]", setTargetToSystemStation, "setDesiredRangeTo: 5000.0", setDestinationToTarget, checkCourseToDestination, "setSpeedFactorTo: 0.5");
"ENERGY_LOW" = ("scriptActionOnTarget: set: mission_random_hits_marklow TRUE");
"COURSE_OK" = ("setSpeedFactorTo: 0.5", performFlyToRangeFromDestination);
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: GO_TO_WITCHPOINT");
"AEGIS_IN_DOCKING_RANGE" = ("setStateTo: GO_TO_WITCHPOINT");
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, "scriptActionOnTarget: set: mission_random_hits_playerfired TRUE", fightOrFleeMissile, "scriptActionOnTarget: setAITo: randomhitsharmlessAI.plist", "setStateTo: BEG_FAILED");
ATTACKED = (setTargetToPrimaryAggressor, "scriptActionOnTarget: set: mission_random_hits_playerfired TRUE", "scriptActionOnTarget: setAITo: randomhitsharmlessAI.plist", "setStateTo: BEG_FAILED");
UPDATE = ();
EXIT = (); };
"BEG_FAILED" = {
ENTER = ("scanForNearestShipWithRole: player");
"ENERGY_LOW" = ("scriptActionOnTarget: set: mission_random_hits_marklow TRUE");
"TARGET_FOUND" = (setTargetToFoundTarget, setTargetToPrimaryAggressor, "scriptActionOnTarget: set: mission_random_hits_playernear TRUE", "setStateTo: FIGHT_TO_DEATH");
"NOTHING_FOUND" = ("scriptActionOnTarget: reset: mission_random_hits_playernear", "scriptActionOnTarget: reset: mission_random_hits_playerfired", "setStateTo: DECIDE_COURSE");
UPDATE = ("scanForNearestShipWithRole: player"); };
"JUMP_OUT" = {
ENTER = ("commsMessage: [mark-jumping]", "scriptActionOnTarget: reset: mission_random_hits_playernear", "scriptActionOnTarget: reset: mission_random_hits_playerfired", "addFuel: 70", performHyperSpaceExit);
EXIT = ();
UPDATE = (performHyperSpaceExit);
"ENERGY_LOW" = ("scriptActionOnTarget: set: mission_random_hits_marklow TRUE");
"INCOMING_MISSILE" = (fightOrFleeMissile, setTargetToPrimaryAggressor, "scriptActionOnTarget: setAITo: randomhitsharmlessAI.plist", "setStateTo: FLEE_NPC_ATTACK");
ATTACKED = (setTargetToPrimaryAggressor, "scriptActionOnTarget: setAITo: randomhitsharmlessAI.plist", "setStateTo: FLEE_NPC_ATTACK");
"WITCHSPACE OKAY" = (wormholeEscorts);
"WITCHSPACE BLOCKED" = (setTargetToFoundTarget, setDestinationWithinTarget, "setDesiredRangeTo: 10000.0", performFlyToRangeFromDestination);
"WITCHSPACE UNAVAILABLE" = ("addFuel: -70", "setStateTo: DECIDE_COURSE");
};
}
None of the ships are any tougher than the normal versions, but their special piolts have some tricks up their sleezes.