Page 1 of 1
Hardcoded behaviour of stations?
Posted: Tue Mar 13, 2007 10:53 am
by Commander McLane
And yet another question:
In various OXPs I am working on I am adding a couple of stations to the Ooniverse. Some are variants of Coriolis etc., some are variants of Rock Hermits. But both types are dockable entities, none of them is using the default stationAI, but some custom AI.
But there is a significant difference in behaviour between these two main types of stations:
- The Coriolis etc.-type continuously spits out Worms, Adders, Transporters and so on, also bigger ships with escorts etc. It does so even if it doesn't make sense story-wise. Why should civil planetary craft launch from a military station close to the witchpoint?
- The Rock Hermit-type doesn't. Nothing coming out of it except defense-ships during an attack or scavengers according to it's AI. Nothing else. Never.
Now where does this completely different behaviour come from? As I said, all of them have (not too different) custom AIs, none of them uses stationAI. The only difference I can see between the two types is the scan_class, which is CLASS_STATION in the first case and CLASS_ROCK in the second case. Does that make all the difference for the engine?
And if so, can I do something to prevent an entity with scan_class CLASS_STATION from launching "normal" ships? That would be very nice, because sometimes it completely defeats the whole story the station is placed within (e.g. a deliberately hidden secret research station just wouldn't spawn random traders when the player approaches, would it?).
As always, any clues are appreciated!
Posted: Tue Mar 13, 2007 1:14 pm
by Charlie
Ditto:
My Orb.oxp is getting another update & among the new bits is an Orb City.
Makes little sence for it to be spitting out lots of non-orb ships ( even with a custom AI ! )
Also, call me dumb if you like, but it's supposed to be orbiting the star - Shows up any place but...
Posted: Wed Mar 14, 2007 7:20 am
by Commander McLane
Charlie wrote:Also, call me dumb if you like, but it's supposed to be orbiting the star - Shows up any place but...
Now that one should be relatively easy to fix. Give it coordinates in the sps-system, which means the origin is the core of the sun, the z-axis goes to the planet and the measurement is solar radii.
So something like "addShipsAt: orbcity 1 sps 0 0 2" should add it one solar radius away from the sun on the line towards the planet. The last number has to be bigger than 1, because 1 would set the station right on the sun's surface--too hot even for the Orb, I guess.
"addShipsAt: orbcity 1 sps 1.41 0 1.41" should give it a position at the same distance from the sun (1 radius from its surface), but diagonal to the axis to the planet. Same does "addShipsAt: orbcity 1 sps 0 1.41 1.41", only in another diagonal.
Posted: Thu Mar 15, 2007 10:50 pm
by Charlie
Ahhh.
( for some reason I've never gotton my head round the co-ordinates system )
Many thanks - sorry for hijacking your thread.
I don't know if this will be apropriate to your plans but I'm looking into the orbcity being set as a carrier...
-More control over what it spits out.
-May be tricky to make it behave wholly like a station...
Hmmm, maybe an amalgamated object: Carrier with a station hidden inside it..?
( just rambling now - a carrier that launches a station could have it's uses
Occ creative messing with Oolite can get some useful results )
Posted: Fri Mar 16, 2007 1:03 pm
by Arexack_Heretic
about station hadcoded launches:
possibly a roles-thing again.
Anything with the role station in it's roles-shipdata, launches hardcoded system ships.
Is my guess.
@Charles: would be cool to have orbs actually taking off from and landing on the star... just like worms and transports do on planet.
Posted: Sat Mar 17, 2007 7:35 pm
by Charlie
Arexack_Heretic wrote:@Charles: would be cool to have orbs actually taking off from and landing on the star... just like worms and transports do on planet.
Hmmm.
As the next release is currently in development hell - something else to add.
Posted: Tue Mar 20, 2007 7:23 am
by Commander McLane
Arexack_Heretic wrote:about station hadcoded launches:
possibly a roles-thing again.
Anything with the role station in it's roles-shipdata, launches hardcoded system ships.
Is my guess.
Nope, that's not it.
As I wrote in my original post
both the asteroid-based hackers or salvagers
and the added stations have the role station. But
only the latter launch ships, the former don't.
So it must have to do with the scan_class, because that's the only difference between them I can spot.
Re: Hardcoded behaviour of stations?
Posted: Wed Aug 28, 2024 12:34 pm
by Cholmondely
Just trying to make sense of the AI's so I can sort out the refugee adder AI.
Why does the stationAI.plist in the vanilla game refer to "checking for debris"?
It seems not to
do anything about the debris.
Am I missing something, or is it an oversight?
Vanilla game "stationAI.plist"
Code: Select all
{
GLOBAL =
{
ENTER = ("setStateTo: IDLE");
};
"DEFENSE_MODE" =
{
ENTER = (checkTargetLegalStatus);
ATTACKED = (setTargetToPrimaryAggressor, increaseAlertLevel, groupAttackTarget);
"RED_ALERT" = (launchDefenseShip);
"YELLOW_ALERT" = ("setStateTo: IDLE");
"GREEN_ALERT" = ("setStateTo: CHECK_FOR_DEBRIS");
"INCOMING_MISSILE" = (fireECM, increaseAlertLevel);
"TARGET_OFFENDER" = (increaseAlertLevel);
"TARGET_FUGITIVE" = (increaseAlertLevel);
"ENERGY_FULL" = ("pauseAI: 20.0", "setStateTo: IDLE");
"OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 15", launchDefenseShip, increaseAlertLevel, groupAttackTarget);
"TARGET_DESTROYED" = ("pauseAI: 20.0", "setStateTo: IDLE");
"TARGET_LOST" = ("pauseAI: 20.0", "setStateTo: IDLE");
"NO_TARGET" = ("pauseAI: 20.0", "setStateTo: IDLE");
};
"CHECK_FOR_DEBRIS" =
{
ATTACKED = (setTargetToPrimaryAggressor, increaseAlertLevel, "setStateTo: DEFENSE_MODE");
"OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 15", launchDefenseShip, increaseAlertLevel, groupAttackTarget);
"INCOMING_MISSILE" = (fireECM, increaseAlertLevel);
"TARGET_FOUND" = (launchScavenger, "setStateTo: IDLE");
"NOTHING_FOUND" = ("setStateTo: IDLE", "pauseAI: 20.0");
UPDATE = (scanForLoot, "pauseAI: 10.0");
};
IDLE =
{
ATTACKED = (setTargetToPrimaryAggressor, increaseAlertLevel, "setStateTo: DEFENSE_MODE");
"OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 15", launchDefenseShip, increaseAlertLevel, groupAttackTarget);
"INCOMING_MISSILE" = (fireECM, increaseAlertLevel);
UPDATE = (decreaseAlertLevel, "setStateTo: CHECK_FOR_DEBRIS");
};
}
Re: Hardcoded behaviour of stations?
Posted: Wed Aug 28, 2024 2:33 pm
by Wildeblood
Code: Select all
"CHECK_FOR_DEBRIS" =
{
ATTACKED = (setTargetToPrimaryAggressor, increaseAlertLevel, "setStateTo: DEFENSE_MODE");
"OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 15", launchDefenseShip, increaseAlertLevel, groupAttackTarget);
"INCOMING_MISSILE" = (fireECM, increaseAlertLevel);
"TARGET_FOUND" = (launchScavenger, "setStateTo: IDLE"); <<<--------- HERE
The response to debris being in the station aegis is to launch a scavenger vessel to clear it up.
Re: Hardcoded behaviour of stations?
Posted: Sun Sep 01, 2024 12:46 pm
by Cholmondely
Wildeblood wrote: ↑Wed Aug 28, 2024 2:33 pm
The response to debris being in the station aegis is to launch a scavenger vessel to clear it up.
Thank you! I totally missed that...