Hardcoded behaviour of stations?
Moderators: winston, another_commander
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Hardcoded behaviour of stations?
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!
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!
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...
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...
Benulobiweed.inc
By Appointment to
--- : GalCoop : ---
Your nearest Benulobiweed.inc dealer:
http://www.box.net/public/b2tic3tjsk#main
Charlie
By Appointment to
--- : GalCoop : ---
Your nearest Benulobiweed.inc dealer:
http://www.box.net/public/b2tic3tjsk#main
Charlie
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
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.Charlie wrote:Also, call me dumb if you like, but it's supposed to be orbiting the star - Shows up any place but...
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.
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 )
( 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 )
Benulobiweed.inc
By Appointment to
--- : GalCoop : ---
Your nearest Benulobiweed.inc dealer:
http://www.box.net/public/b2tic3tjsk#main
Charlie
By Appointment to
--- : GalCoop : ---
Your nearest Benulobiweed.inc dealer:
http://www.box.net/public/b2tic3tjsk#main
Charlie
- Arexack_Heretic
- Dangerous Subversive Element
- Posts: 1876
- Joined: Tue Jun 07, 2005 7:32 pm
- Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
- Contact:
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.
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.
Riding the Rocket!
Hmmm.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.
As the next release is currently in development hell - something else to add.
Benulobiweed.inc
By Appointment to
--- : GalCoop : ---
Your nearest Benulobiweed.inc dealer:
http://www.box.net/public/b2tic3tjsk#main
Charlie
By Appointment to
--- : GalCoop : ---
Your nearest Benulobiweed.inc dealer:
http://www.box.net/public/b2tic3tjsk#main
Charlie
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Nope, that's not it.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.
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.
- Cholmondely
- Archivist
- Posts: 5365
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Hardcoded behaviour of stations?
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"
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");
};
}
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
- Wildeblood
- ---- E L I T E ----
- Posts: 2453
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: Hardcoded behaviour of stations?
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
In your heart, you know it's flat.
- Cholmondely
- Archivist
- Posts: 5365
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Hardcoded behaviour of stations?
Thank you! I totally missed that...Wildeblood wrote: ↑Wed Aug 28, 2024 2:33 pmThe response to debris being in the station aegis is to launch a scavenger vessel to clear it up.
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?