Changing compass values of ships (from white to red)

An area for discussing new ideas and additions to Oolite.

Moderators: another_commander, winston

Post Reply
User avatar
Amen Brick
Deadly
Deadly
Posts: 187
Joined: Sat May 10, 2008 5:22 pm
Location: Bolton!

Changing compass values of ships (from white to red)

Post by Amen Brick »

Can a ship 'hide' as a white symbol on the compass until a "proximity alert" goes off and it attacks?
User avatar
Commander McLane
---- E L I T E ----
---- 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:

Post by Commander McLane »

I think that's possible with a workaround. The scanClass of a ship is not changeable, not even under JS.

But you can spawn a clone of your ship with scanClass CLASS_ROCK, and let it perform the proximity search for the player (or whatever). If the research returns a positive result, you delete the ship and spawn another clone of it with the correct scanClass.
User avatar
Amen Brick
Deadly
Deadly
Posts: 187
Joined: Sat May 10, 2008 5:22 pm
Location: Bolton!

Post by Amen Brick »

Nice.

*muhahahahaha with added hand rubbing.
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

Commander McLane wrote:
I think that's possible with a workaround. The scanClass of a ship is not changeable, not even under JS.

But you can spawn a clone of your ship with scanClass CLASS_ROCK, and let it perform the proximity search for the player (or whatever). If the research returns a positive result, you delete the ship and spawn another clone of it with the correct scanClass.
"Delete the ship":-P

you mean explode, afaik, we cant make ships "vanish", so by exploding the ship, you will get an explosion....

I did this for the original rock hermit locator in 1.65 and 1.68. As the AI scanned for an asteroid, spawned a bouy near it, killed the asteriod, exploded the bouy, death actions checked whether or not the player had
the rock hermit locator or not, and depending on that it spawned a bouy with or without an advanced space compas targeteble bouy..

With 1.70 it is all moved to java scripting, by Erich Walch.
Can´t thank him enough for this.. :-)

Alternatively you could try and make the rock leave the system, just not sure it will respond to that AI command
Bounty Scanner
Number 935
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2862
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

You could use landOnplanet which removes the ship from the game without an explosion; it just winks out. If you added the neutral scan_class (yellow on scanner) clone at the same co-ordinates it would appear that the white scanner object had switched to yellow and 'powered up'.
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.
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

LittleBear wrote:
You could use landOnplanet which removes the ship from the game without an explosion; it just winks out. If you added the neutral scan_class (yellow on scanner) clone at the same co-ordinates it would appear that the white scanner object had switched to yellow and 'powered up'.
So if i understand you correctly, you can use landOnplanet anywhere, and the object in Question just vanishes ?...

Good to know, i assumed you had to be near the surface, in order for the ship to vanish...
Bounty Scanner
Number 935
User avatar
Commander McLane
---- E L I T E ----
---- 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:

Post by Commander McLane »

I wasn't too precise (hey, people may like to figure out something by themselves :wink: ), but yes, landOnPlanet is indeed the method to "delete" a ship. I am using quotationmarks here, because the ship doesn't actually vanish.

landOnPlanet does not depend on proximity to a planet, but can be used anywhere. (If you ever have tried to attack a Generation Ship in interstellar space, you will have noticed that the ship reacts with a commsMessage, and then simply disappears. If you look into its AI you will find that this is actually achieved with landOnPlanet, although there of course aren't even any planets in interstellar space.)

If I understand correctly, what landOnPlanet actually does is to remove the calling entity, look for the closest planet, and increase a counter for the ships landed on that planet. So at any point in the future a ship (I am not sure whether it will be the same ship, or just any ship) will start from that planet, and the counter will be decreased again. In interstellar space the counter of an imaginary planet will be increased (?), so this may in the long run lead to some stack overflow (?). (I have left the base of my knowledge now, and entered the realms of wild guessing, as you see from the questionmarks.)

Anyway, as you probably don't want to have ships starting from some random planet too often (especially not if it's a ship that you actually wanted to eliminate from the Ooniverse in the first place), this method should be used cautiously, carefully and not inflationary. So, please, everybody, don't go now and script AIs with zillions of landOnPlanets.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Commander McLane wrote:
If I understand correctly, what landOnPlanet actually does is to remove the calling entity, look for the closest planet, and increase a counter for the ships landed on that planet. ...., this method should be used cautiously, carefully and not inflationary. So, please, everybody, don't go now and script AIs with zillions of landOnPlanets.
I also think it should not used to often because of the reasons McLane mentions. The increased counter is the shuttle counter. It will add an extra launch of a rising shuttle. Any ship with a role of shuttle can be used but not the vanishing ship. The launches are spaced to one every 5 to 10 minutes so it will not immediately lead to problems. Only when a station already has heavy traffic it could lead to a build-up of docking ships around the main station.

In intergalactic space there is no planet and no counter is increased.
User avatar
Commander McLane
---- E L I T E ----
---- 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:

Post by Commander McLane »

Thanks for the clarification! :D
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

Eric Walch wrote:
In intergalactic space
WOW! :shock: damn thargoids also compromized using the Galactic Hyperspace Drive now :shock:


:wink: :lol:

On a side note, think about it, a Galactic Mis-jump...
me starts up oolite ;-)
Bounty Scanner
Number 935
User avatar
Commander McLane
---- E L I T E ----
---- 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:

Post by Commander McLane »

Frame wrote:
On a side note, think about it, a Galactic Mis-jump...
me starts up oolite ;-)
Nope. We all know that the Thargoids have the technology to interrupt the "witchfield" of normal vessels, thereby causing it to mis-jump and to ambush it in interstellar space.

Thargoid interception technology is far from being understood, although it is a prime subject of Navy-scientists and engineers, especially in laboratories like the famous Naval Research and Development Complex on Ribilebi. It can be said, however, that this technology is much less effective if it comes to intergalactic witchspace travel. The reason for that is not well understood, but it seems to have something to do with the increased energy output of the Galactic Hyperdrive, making the "witchfield" much more stable.

In fact there have been no confirmed incidents of galactic mis-jumps at all. :wink:
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

Commander McLane wrote:
Frame wrote:
On a side note, think about it, a Galactic Mis-jump...
me starts up oolite ;-)
Nope. We all know that the Thargoids have the technology to interrupt the "witchfield" of normal vessels, thereby causing it to mis-jump and to ambush it in interstellar space.

Thargoid interception technology is far from being understood, although it is a prime subject of Navy-scientists and engineers, especially in laboratories like the famous Naval Research and Development Complex on Ribilebi. It can be said, however, that this technology is much less effective if it comes to intergalactic witchspace travel. The reason for that is not well understood, but it seems to have something to do with the increased energy output of the Galactic Hyperdrive, making the "witchfield" much more stable.

In fact there have been no confirmed incidents of galactic mis-jumps at all. :wink:
Because if that happens, they are stranded for good... only one galactic hyper-drive pr ship... ;-) ... and who want to take a chance of stranding in inter-galactic space, even with a 2nd galactic hyper drive onboard ready to be fit... it might be just impossible to recalculate galactic hyperspace coordinates.. an damn... i just got an idea.. for an OXP, gotta write it all up soon... , when i get the time... the damn time,,, ;-)
Bounty Scanner
Number 935
Post Reply