Rock Hermit Buoys

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Rock Hermit Buoys

Post by Smivs »

Just checked (now running RHL v1.3.2 with Oolite v1.75).....RHL working fine here. Beacon showing up on scanner and only one beacon present.
Commander Smivs, the friendliest Gourd this side of Riedquat.
JD
Deadly
Deadly
Posts: 182
Joined: Thu Nov 25, 2010 10:42 pm
Location: London, UK

Re: Rock Hermit Buoys

Post by JD »

Switeck wrote:
Is it possible of the 2 buoys, 1 is the "turned off" and the other is "turned on"? Only 1 of the 2 is reported on the advanced space compass, so I'm thinking for some reason both get spawned.
I get to see the duplicates on my space compass.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Rock Hermit Buoys

Post by Cody »

Are there any errors showing in your latest.log?
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
JD
Deadly
Deadly
Posts: 182
Joined: Thu Nov 25, 2010 10:42 pm
Location: London, UK

Re: Rock Hermit Buoys

Post by JD »

El Viejo wrote:
Are there any errors showing in your latest.log?
None coming out of the Rock Hermit oxp (there's a YAH error, looks like the "system/System" issue, which I'll investigate and report elsewhere - unless you think it might have a bearing on this?).

Because I'm running a trunk version the level of logging is, what's the term I'm looking for, "aggressive", and the log file is massive. Otherwise I'd post it here.

When I get back to my home PC I'll try running the standard 1.75 again, and I'll try it with and without other oxps.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Rock Hermit Buoys

Post by Cody »

Thanks JD... I've been using RHL for ages, in 1.74.x and 1.75.x, and have never seen this double beacon... an odd one.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Rock Hermit Buoys

Post by Eric Walch »

JD wrote:
I've just installed the Rock Hermit Locator oxp, version 1.3.2, and have noticed that it creates two buoys per rock hermit. Is that intentional?
It could be two rock hermits exactly on top of each other?
Can you fly close to the hermit and make an entity dump: pause the game and press 0 (zero) while paused. You'll now see all system entities in your latest log, sorted by distance to the player. Paste the lines about the hermit and the buoys here. Maybe those give a clue.
JD
Deadly
Deadly
Posts: 182
Joined: Thu Nov 25, 2010 10:42 pm
Location: London, UK

Re: Rock Hermit Buoys

Post by JD »

OK, I'll do that this evening.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Re: Rock Hermit Buoys

Post by another_commander »

The addBuoys function is firing twice. Here is a small test case. Copy the below to script.js inside a Config folder in AddOns:

Code: Select all

this.shipLaunchedFromStation = function()
{
	this.i = 0;
	this.testTimer = new Timer(this, this.fireMsg, 1); // should fire message once, with counter i set to 0
}

this.fireMsg = function()
{
	player.consoleMessage("We are firing! var i is " + i);
	i++;
}
The expected behaviour is to get one message on the console, like this: "We are firing! var i is 0". And that should be it.

On my system, I seem to be getting the message twice, one with i set to 0 and one with i set to 1. I think this problem is similar to the one we had encountered some time ago with timers having interval of 1 firing twice.

Edit: In fact, setting the timer delay to 1.0001 solves the problem. I am sure we are looking at the same case of bug.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Rock Hermit Buoys

Post by Eric Walch »

another_commander wrote:
On my system, I seem to be getting the message twice, one with i set to 0 and one with i set to 1. I think this problem is similar to the one we had encountered some time ago with timers having interval of 1 firing twice.

Edit: In fact, setting the timer delay to 1.0001 solves the problem. I am sure we are looking at the same case of bug.
Now you mention it, I remember the bug report but didn't think about the possibility. The bug was system specific, therefor only some people see it.

JD, please open the 'script.js' file inside the Config folder of the oxp, look for the lines:

Code: Select all

this.shipExitedWitchspace = function ()
{
    // use a delay to allow all other oxp's to add heir stuff.
    this.buoyTimer = new Timer(this, this.addBuoys, 1);
}
The lines are somewhere at the start, and change the '1' in something else, like '0.5' or even '1.0001' as A_C suggest. If that helps, we are talking about the same Oolite bug and I update the oxp with a version that bypasses the bug. Actually any value grater than zero will do. It is just to make sure the hermits are counted after all other oxp's have added their ships. '0.001' is even enough for that :lol:
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Rock Hermit Buoys

Post by Switeck »

Commander McLane wrote:
Can you target them independently?
Yes, I can destroy them independently too!
JD wrote:
I get to see the duplicates on my space compass.
Come to think of it, I recall having to cycle through an inordinate number of R's on my space compass as well. :lol:
(So definitely duplicates for the same RH.)
User avatar
Mauiby de Fug
---- E L I T E ----
---- E L I T E ----
Posts: 847
Joined: Tue Sep 07, 2010 2:23 pm

Re: Rock Hermit Buoys

Post by Mauiby de Fug »

Interesting! I've come across a couple of duplicates as well, but not all the time. Sometimes it seems to be working properly, and only makes one buoy.

And when I have had the duplicates, only one of them has shown up on my compass...
JD
Deadly
Deadly
Posts: 182
Joined: Thu Nov 25, 2010 10:42 pm
Location: London, UK

Re: Rock Hermit Buoys

Post by JD »

Eric - I think this supports your theory about the bug - give or take any statistical uncertainty.

I had to try each scenario a few times before a rock hermit actually showed up in the system, and I've omitted those occasions from the sequence below.
  • I first ran Oolite with the normal value (1) in the script.js file. Exiting the station, only one RH beacon appeared.

    I therefore made a witchspace jump, and duplicate becons were created. I have various entity dumps if those might be useful.

    I then changed the script.js file as you suggested (to 1.0001). I unfortunately forgot to hold down shift. After a witchspace jump, I again saw duplicate beacons.

    Restarted, this time with shift held down.

    Another witchspace jump, singular beacons this time.

    Tried again, and once again, singular beacons.

    Reset the 1.0001 to 1, but again forgot to hold down shift on restarting. Still singular beacons.

    Restarted again, this time with shift held down.

    Witchspace jump, duplicate beacons.
I hope this helps, and I hope this small number of tests is sufficiently reliable.

Cheers
John
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Rock Hermit Buoys

Post by Eric Walch »

JD wrote:
in the interests of full disclosure I should probably also say that I'm running nightly trunk version 4412.
This is important version info, as the bug was known at mid January and it was thought to be fixed before the 1.75 release. At least it means you are not using a version from before the alleged fix.
It also means that other, one shot timers, in other oxps, using round integer values for the delay could be affected.
Post Reply