Could NPCs be made more likley to jump out?
Moderators: winston, another_commander
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
Could NPCs be made more likley to jump out?
In playing the game, NPCs very rarely seem to make hyperspace jump to escape. As players we'd usually get a hyperspace lock on another system, if fuel's available, just in case things get really tough. I've seen em jump occasionally and following them though their own wormhole was cool. Would it be do-able to up the chance of NPCs jumping out when on ENERGY_LOW?
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
- Cmdr. Maegil
- Sword-toting nut-job
- Posts: 1294
- Joined: Tue Feb 27, 2007 10:28 pm
- Location: On the mend in Western Africa
In Oolite\oolite.app\Contents\Resources\AIs\route1traderAI.plist, you'll find
Change
to
and add
That should do it. Maybe?
Code: Select all
FLEE = {
ATTACKED = (fightOrFleeHostiles);
FIGHTING = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
FLEEING = (setTargetToPrimaryAggressor, "setStateTo: FLEE");
"TARGET_LOST" = (performIdle, "setStateTo: GLOBAL");
"TARGET_DESTROYED" = (performIdle, "setStateTo: GLOBAL");
ENTER = ("setDesiredRangeTo: 25600", performFlee);
EXIT = ();
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, broadcastDistressMessage, fightOrFleeMissile, fightOrFleeHostiles);
"REACHED_SAFETY" = (performIdle, "setStateTo: GLOBAL");
UPDATE = ();
Code: Select all
FLEEING = (setTargetToPrimaryAggressor, "setStateTo: FLEE");
Code: Select all
FLEEING = (setTargetToPrimaryAggressor, "setSpeedFactorTo: 1.0", "pauseAI: 15.0", "setStateTo: EXIT_SYSTEM");
Code: Select all
"EXIT_SYSTEM" = {
ENTER = ();
EXIT = ();
UPDATE = (performHyperSpaceExit);
"WITCHSPACE OKAY" = (wormholeEscorts);
"WITCHSPACE BLOCKED" = (setTargetToFoundTarget, setDestinationWithinTarget, "setDesiredRangeTo: 10000.0", performFlyToRangeFromDestination);
"WITCHSPACE UNAVAILABLE" = ("setAITo: route1traderAI.plist");
};
You know those who, having been mugged and stabbed, fired, dog run over, house burned down, wife eloped with best friend, daughters becoming prostitutes and their countries invaded - still say that "all is well"?
I'm obviously not one of them.
I'm obviously not one of them.
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
I'll give that a try. I thought it might be hard coded, but that AI should work. Might do a quick brave_sir_robin.oxp hack. Make traders say 50% likely to jump out on energy low (if they can) and 50% likely to flee (either on injectors or normal power). Too higher chance or to low?
Last edited by LittleBear on Wed Jun 20, 2007 7:48 pm, edited 1 time in total.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
- Cmdr. Maegil
- Sword-toting nut-job
- Posts: 1294
- Joined: Tue Feb 27, 2007 10:28 pm
- Location: On the mend in Western Africa
With soundtrack?LittleBear wrote:Might do a quick brave_sir_robin.oxp hack.
http://www.stmoroky.com/sirrobin/robin~~.au
http://www.stmoroky.com/sirrobin/meeting~~.au
http://www.stmoroky.com/sirrobin/fleeing~~.au
Or will the minstrels be eaten followed by much rejoicing?
You know those who, having been mugged and stabbed, fired, dog run over, house burned down, wife eloped with best friend, daughters becoming prostitutes and their countries invaded - still say that "all is well"?
I'm obviously not one of them.
I'm obviously not one of them.
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
Done a tweaked AI (so installing the OXP gives all ships with the role "trader" this run-away AI). Doing a "sendCommsMessage: [runaway1] [runaway2] [runaway3] [tones] [cargo]" So the trader sends a random word from each list as a message when jumping out such as:-
"Beastly Brigand! I'm bravely running away to save my 7 tones of food!"
Wonder if I could make it play an .ogg at the same time!
"Beastly Brigand! I'm bravely running away to save my 7 tones of food!"
Wonder if I could make it play an .ogg at the same time!
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.