this.shipEnteredPlanetaryVicinity = function(planet)

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

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

this.shipEnteredPlanetaryVicinity = function(planet)

Post by Frame »

Oolite 1.72.1
javascript

Code: Select all

this.shipEnteredPlanetaryVicinity = function(planet)
still does not trigger.... while

Code: Select all

this.shipExitedPlanetaryVicinity = function()
works

windows vista 32 bit
1.5 gb ram
1.0 gb vram
GFX: ATI HD 2600 XT
Bounty Scanner
Number 935
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

It seems to be working for me? Getting triggered messages from both PlanetFall and Traffic Control using it...
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 »

Thargoid wrote:
It seems to be working for me? Getting triggered messages from both PlanetFall and Traffic Control using it...
?? I don't think so. I had your traffic control added under 1.71 and always had it triggered, but it stopped since my upgrade to 1.72. You are confused with the triggers close to the planet. This one is fired at 3 times planet radius. It should fire at the same time the AI variant is send and that still happens. All traders that use the AI variant still work fine.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Image

In PlanetFall 1.11 WIP, I wrote:
this.shipEnteredPlanetaryVicinity = function(planet)
{
this.lastPlanet = planet;
if(!planet.isSun)
{
player.commsMessage(system.name + " Planetary Control - for planetfall please fly toward the surface, slowing when on final approach.",5);
}
}
in Traffic Control 1.01, I wrote:
this.shipEnteredPlanetaryVicinity = function(planet)
{
if(planet.isMainPlanet)
{
if(this.thePlayerShip.hasEquipment("EQ_ADVANCED_COMPASS"))
{
player.commsMessage("This is " + system.name + " Traffic Control - For station approach, please select and follow the beacon N on your compass.", 5);
}
else
{
player.commsMessage("This is " + system.name + " Traffic Control - For station approach, please follow the rectangle on your compass.", 5);
}
}
}
Like I said, in my new install of 1.72.1, it's working again ;)


Mine's also the Windows version (under WinXP though), with the noted versions of my OXPs.

Iirc you're right about 1.72 Eric, but 1.72.1 seems to be different at least for me for some reason. I was pleasantly surprised to see them coming up again. Between PlanetFall and Traffic Control I'm getting quite adept at these triggers and where/when they occur (or don't).

Frame - The trigger only occurs for the main planet in the system, not any additional ones from OXPs like System Redux. Also as an aside the main station is within the trigger area, so you'll have to fly away from the planet and back to see it (or come in from the Witchpoint) - you won't see them after launch from the main station unless you fly away for a fair distance and then come back. Could you be mixing up planets between the main one and an added one?
Last edited by Thargoid on Sun Dec 14, 2008 5:11 pm, edited 1 time in total.
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 »

note entirely sure, but I think the main planet, does not trigger

shipEnteredPlanetaryVicinity

i flew away from the main planet until i got a trigger on

shipExitedPlanetaryVicinity

then headed back and never got a trigger even when i got mass locked..

then headed to a moon added by system redux,

and shipEnteredPlanetaryVicinity triggerd...

so Thargoid, try and remove any planet/moon adding OXP you might have and see if still works ? i bet it do not...
Bounty Scanner
Number 935
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

It's System Redux doing the adding.

I'll try removing it and see if I get the trigger for you later, dinner's just been served :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 »

also a bit strange

in a 2 globe system


system.planets[0] was the moon, while system.planets[1] was the main planet...

I thought system.planets[0] was allways the mainPlanet... since it was created first, and the others are just created on will exit/launch by system redux...


strike that... i must have seen things
Bounty Scanner
Number 935
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Frame wrote:
so Thargoid, try and remove any planet/moon adding OXP you might have and see if still works ? i bet it do not...
OK, dinner over, System Redux removed, trigger not working...

So the work-around for this trunk bug is to add System Redux. Must actually check I have the latest version, as I seem to have the ever-expanding number of planets issue going on when docking and launching...
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 »

Thargoid wrote:
So the work-around for this trunk bug is to add System Redux. Must actually check I have the latest version, as I seem to have the ever-expanding number of planets issue going on when docking and launching...[/color]
On my system, with system redux, the trigger will not fire if i come from the oppersite direction of the main planets moon... infact it is the moon doing the triggering on my system.. are you 100% sure that it is indeed that main planet that triggers it,... while i can see there is a condition that it has to be the main planet in one of the scripts... see i figure that maybe it is the moon that infact reporting to be the main planet, even though it should not be...

testing that...

Edit... tested...

Planet[1] with a radius of 7000 km, is correctly reporting that it is not the main planet...

I can´t see how system redux should fix the trigger for the main planet...

Planetfall will do it for any non sun planet (the sun can trigger) the event too... which is why the !planet.isSun check is there

while traffic control does correctly check for if the planet is the main planet..

It might even be so complicated that the trigger works, when the player is also inside the vicinity of the moon, then the mainplanet will trigger correctly... That is the only thing i can see right now making traffic control work...
Last edited by Frame on Sun Dec 14, 2008 6:24 pm, edited 1 time in total.
Bounty Scanner
Number 935
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

My routine is as follows (at Leesti, as you can see from the screenshot):

  • Launch from the main station.
  • Turn to orient myself at the system's moon (added by SR).
  • Fly to the moon, and go near it to it's surface (your Fuel Collector text triggers, as does my PlanetFall one). Sometimes I even land here, with the aid of my WIP Planetfall.
  • About-face and point at the main planet and station again.
  • Fly away from the moon and towards the planet, whence I get the text as per screenshot.
So yes, it is the planet that's triggering it, not the moon. I've not tried it with any added planets to see whether they work or not.

Editted to add - Traffic control is only supposed to work around the main planet, as it's for docking with the main station. The released version of Planetfall (1.0) is similar, but the one I'm referring to is my current work-in-progress version (1.11) which allows landing on any planet or moon.[/color]
Last edited by Thargoid on Sun Dec 14, 2008 6:27 pm, edited 1 time in total.
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 »

[quote="Thargoid"]My routine is as follows (at Leesti, as you can see from the screenshot):

  • Launch from the main station.
  • Turn to orient myself at the system's moon (added by SR).
  • Fly to the moon, and go near it to it's surface (your Fuel Collector text triggers, as does my PlanetFall one). Sometimes I even land here, with the aid of my WIP Planetfall.
  • About-face and point at the main planet and station again.
  • Fly away from the moon and towards the planet, whence I get the text as per screenshot.
So yes, it is the planet that's triggering it, not the moon. I've not tried it with any added planets to see whether they work or not.
[*][/color][/quote

This is damn peculiar... heading to leesti... from zaonce Quitri to test there instead...
Bounty Scanner
Number 935
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 »

Leesti did´nt trigger at the main planet either... I´m installing traffic controle to see if that helps... it might be a combination of both OXPs that make the trigger work at the main planet...
Bounty Scanner
Number 935
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 »

Traffic Control did´nt make it trigger either... installing planetfall
Bounty Scanner
Number 935
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 »

Thargoid, your screen-shot looked very convincing, but I don't see it. I even put a logging line in he code in case I always missed it. I was thinking to send back a screen-shot without that message to convince you it doesn't fire but I am afraid you will say I took the shot at the wrong moment.

As alternative I looked into the code itself. In the 1.65 I understood what was happening but now it became even more complex. i specially dont see why it is working with more that 1 planet present and not with just one planet.

In the revision from 9 december the check is done with::
- (OOAegisStatus) checkForAegis. starting at line 3627. You see all the checkings. Quite complex and I don't really see why it is written that complex. This complexity probably leads to the bug. Specially the following part looks odd:

Code: Select all

		if ((aegis_status == AEGIS_NONE)&&(result == AEGIS_CLOSE_TO_MAIN_PLANET))
		{
			mainPlanet = [UNIVERSE planet];
			if (warnedPlanet != mainPlanet)
			{
				[self doScriptEvent:@"shipEnteredPlanetaryVicinity" withArgument:mainPlanet];
			}
			[shipAI message:@"CLOSE_TO_PLANET"];
			[shipAI message:@"AEGIS_CLOSE_TO_PLANET"];	//keep for compatibility with pre-1.72 AI plists
			[shipAI message:@"AEGIS_CLOSE_TO_MAIN_PLANET"];
		}
First it checks for a main planet and than for not being a main planet. This part will therefor never execute. It could even be that currently normal traders never get their "AEGIS_CLOSE_TO_PLANET" message but are only triggered by the massage "REACHED_DESTINATION". (that is 50 000 meters from the surface). I'll put the AI debugging on for a trader tomorrow to see if they also suffer from this bug. Looking at the code they both should work or both should not work.

But I fail to see why a AI script needs to differentiate between ANY and MAIN planet. When you write an AI-State you know were you are heading for and what planet to expect.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

I just report what I see :)

Anyway, as we've discussed above, even I only get it when I have System Redux installed. Without it I don't have the triggers like either you or Frame (and as I said I was quite surprised when it popped up).

I can offer no real explanation as to why it works for me, but my particular set-up of OXPs seems to allow it to work for some reason. And those are (to quote my most recent log file):
In my log file, Oolite wrote:
(oolite.app/Resources, AddOns, "AddOns/Aquatics 1.03.oxp", "AddOns/Missile Rack 1.02.oxp", "AddOns/Drones 1.01.oxp", "AddOns/Energy Equipment 1.04.oxp", "AddOns/Welcome Mat 1.05.oxp", "AddOns/Pods 1.02.oxp", "AddOns/Pods-UPS 1.01.oxp", AddOns/Probe_1.02.oxp, "AddOns/RepairBots 1.00.oxp", "AddOns/Traffic Control 1.01.oxp", AddOns/deposed1.3.2.oxp, "AddOns/Dictators v1.3.oxp", AddOns/FighterHud.oxp, AddOns/Galactic_Navy.oxp, AddOns/Hotrods.oxp, "AddOns/ionics-1.2.1.oxp", "AddOns/lovecats 1.1.oxp", "AddOns/military Fiasco 2.3.oxp", "AddOns/Missiles and Bombs v1.1.oxp", AddOns/murgh_Xships.oxp, AddOns/outrider.oxp, AddOns/OXPConfig1.06.oxp, AddOns/PAGroove_Stations_v1.2.1.oxp, "AddOns/TCAT 0.12.oxp", AddOns/TestShips.oxp, "AddOns/thargoid_wars 4.2.oxp", AddOns/Vector.oxp, "AddOns/weeviloid2-PC.oxp", "AddOns/Zz-Oo-Haul.oxp", "AddOns/ZZZZ_Supercobra 1.1.oxp", AddOns/AAACrooks.oxp, AddOns/AquaticsHauler.oxp, AddOns/Assassins.oxp, "AddOns/BehemothSpacewar 1.1.oxp", AddOns/Commies.oxp, AddOns/Rock_Hermit_Locator1.3.oxp, "AddOns/Target Reticle 1.0.1.oxp", "AddOns/UPS-courier v1.4.4.oxp", "AddOns/transports 1.46.oxp", "AddOns/Missile Analyser 1.1.1.oxp", "AddOns/AMS 1.00.oxp", AddOns/SecondWave.oxp, AddOns/Anarchies1.1.oxp, "AddOns/behemoth 2.5.oxp", AddOns/BountyScanner.oxp, AddOns/buoyRepair1.02.oxp, "AddOns/Oolite Shipyards Extension VBeta-21-11-08.oxp", AddOns/RandomHits261.oxp, "AddOns/Thorgorn_Threat 1.2.oxp", "AddOns/Trident Down v1.1.oxp", "AddOns/Dredgers 2.2.oxp", "AddOns/FuelCollector-v0.30.oxp", "AddOns/Planetfall 1.11.oxp", AddOns/System_Redux.oxp, "AddOns/Debug 1.72.oxp")
The planetfall is an unpublished version (for the moment) and there are a couple of other WIPs in there, but those latter ones aren't anything relevant.
Post Reply