Anarchies 2.3 now available

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

Moderators: another_commander, winston

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 »

Mauiby de Fug wrote:
In that case my ship's as iron ass as I can make it for the time being.

I really want to continue on to the other galaxies in order to gain access to the special equipment, but I'm going through completing all the available missions I can in each galaxy before jumping on, and I'm currently halfway through the incredibly tedious stage in the Ionics mission, so still haven't left Galaxy 2. Guess I'll just have to continue blasting those damn ships!
I'm feeling with you! (Been there, done that.)
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

Post by Mauiby de Fug »

550 kills later (there were a fair few Thargoids/Thargons about!) and I can confirm that despite my unusual situation of having an EEU and a non-functioning NEU, Oolite is able to correctly award me a functioning NEU at the appropriate time, and remove both the other now superfluous pieces of equipment.

About 100 of the above kills were Ionics ships. I think I can now identify them from about 23km away without a Target Enhancer! Something about the way their exhausts trail from the ship...

I have now realised that it is quarter to 9 in the morning and I still haven't gone to bed yet. This game is going to kill me...
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1244
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Post by UK_Eliter »

Mr de Fug, you need to take it easy, i.e. get some sleep!
User avatar
Gibbon
Competent
Competent
Posts: 37
Joined: Sun Dec 05, 2010 10:18 am
Location: Planet Primus
Contact:

Post by Gibbon »

I've been enjoying this oxp, but today i found a bug. Was happily about to dock at one of the salvage yards when i noticed the salvage guys towing what looked like a sidewinder. On final approach i decided to let them go first so watched them dock, then it all went wrong for them at least.

They stopped at the first entrance, started to rotate around through the asteroid then promptly blew up. It's like they can't dock. Normal AI ships manage it ok as i saw a Cobra mk3 dock quite easily.

Don't know if this has been reported before, if so, apologies.
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 »

Yeah, this may happen occasionally. I also have watched a Tugger with its salvaged Python turn inside the cave of the asteroid before docking normally, without any problems.

The issue is three-fold: (1) the docking AI may and will make course corrections at any point during approach, even on the very last meters in front of the dock; (2) Oolite and the docking AI aren't aware of the long tunnel inside the asteroid, so they treat it just like the big open space in front of the asteroid; and (3) Oolite's collision detection isn't up to par with the other aspects of the game, therefore sometimes even turning inside the tunnel will not trigger a collision event (and subsequent destruction of the ship), but at other times it will.

Unfortunately the OXP can't do anything about any of these issues. So everything is going to work if you're lucky; and it isn't, if you're not.
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:
(2) Oolite and the docking AI aren't aware of the long tunnel inside the asteroid, so they treat it just like the big open space in front of the asteroid;
That not true as far as I could see. The approach route works with waypoints. They all have an offset of the tunnel length. That means that the last waypoint should be in front of the tunnel and from there on it should fly in a straight line to the dock. I recently tested this (for just one ship I must admit) and did notice the waypoints bring the ship exactly in front of the tunnel.
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 »

Eric Walch wrote:
Commander McLane wrote:
(2) Oolite and the docking AI aren't aware of the long tunnel inside the asteroid, so they treat it just like the big open space in front of the asteroid;
That not true as far as I could see. The approach route works with waypoints. They all have an offset of the tunnel length. That means that the last waypoint should be in front of the tunnel and from there on it should fly in a straight line to the dock. I recently tested this (for just one ship I must admit) and did notice the waypoints bring the ship exactly in front of the tunnel.
Yes, it's true that ships line up in front of the asteroid, so it seems the last waypoint lies out in the open.

However, that doesn't prevent ships from attempting course corrections even between the last waypoint and the dock. And when doing so, it seems that Oolite ignores that by this point they are surrounded by the asteroid model. So I wasn't precise in my wording.

Here's a screenshot:
Image
I made it when following a tugger into a Salvage Gang. As you see, the ship makes a last course correction just a few meters in front of the dock. By this point it is in the middle of the asteroid, so it must be long past the last waypoint. I don't recall whether the ship survived the attempted 360-degree turn. (Probably not, but it made for a nice screenshot anyway.)
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:
By this point it is in the middle of the asteroid, so it must be long past the last waypoint. I don't recall whether the ship survived the attempted 360-degree turn. (Probably not, but it made for a nice screenshot anyway.)
I looked it up. You are right, I can't see any correction for how deep the dock is inside the structure. I just thought so by seeing them align up correctly before the port. From the code:

Code: Select all

corridor_distance[] =	{	-1,	1,	3,	5,	7,	9,	11,	12,	12};
corridor_offset[] =		{	0,	0,	0,	0,	0,	0,	1,	3,	12};
These values are multiplied with 250. (the standard dock length). corridor_distance is in front of the dock and corridor_offset is a sideway deviation on this point. It seems that at 9*250 meter (= 2250 meter) the ships are already heading for the center-line. And your whole rock is less than 2000 meter long resulting they do line up correctly for this length. But any dock more than 2250 meter inside a rock will give problems.

That code definitely needs a correction for that. Also the fixed length of 250 meter for a dock could give problems if one would create a 2500 meter dock with 1000 meter long ships. Now it would reach the endpoint at a fixed value of 250 inside the dock. Such a long ship is not docked yet at that position. However, Oolite was never designed for super ships.
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 »

That rings a bell.

I now recall that, when I first looked at the asteroids-with-tunnels models and made some tests with launching and docking NPCs, it seemed always clear that Oolite completely ignores the tunnel. Launching ships turn sideways into the asteroid before leaving the tunnel. That's why I created a special tunnel launch AI at least for the defense ships.

And for approaching ships, it's pure luck that they line up in front of the tunnel. In fact, for normal stations, the docking AI lets them reach center-line way out in the open. And it just happened that this point is also in the open in case of the asteroids, but only just. This creates the illusion of the NPCs lining up outside the tunnel, when in fact they only line up at a considerable distance from the dock. Luckily this distance is bigger than the tunnel length.

That's what I assumed back then, and you have now confirmed the suspicion.

BTW: I always wondered if the docking_radius key would influence the lining-up-center-line distance. I thought it should. However, the key was broken when the asteroid models were introduced, and I haven't done any tests since it is working.
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:
....I now recall that, when I first looked at the asteroids-with-tunnels models and made some tests with launching and docking NPCs, it seemed always clear that Oolite completely ignores the tunnel. Launching ships turn sideways into the asteroid before leaving the tunnel. That's why I created a special tunnel launch AI at least for the defense ships.
Its not only this station. For the big dredgers I also had to write a special launching AI to prevent hitting the exit. And I remember that some launching shuttles of the buoyRepair station sometimes also flew trough the mesh above the port. Currently Oolite pauses the AI for two seconds on launch. Probably we should define a tunnel length to add to the docking waypoints and a longer AI pause based on launch speed and tunnel length.
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 »

Eric Walch wrote:
Currently Oolite pauses the AI for two seconds on launch. Probably we should define a tunnel length to add to the docking waypoints and a longer AI pause based on launch speed and tunnel length.
Okay, I now got it working. On setting up the dock, also a tunnel length is calculated. This is added to the docking waypoints. The ships have now no waypoints inside the tunnel and head in one line from the last waypoint outside of the station to the dock.

Same for launching. The fixed launch_delay of 2 seconds is now made variable, based on launch speed and tunnel length, so that the first AI update and the "LAUNCHED OKAY" message arrive when the ship is 2 seconds outside of the tunnel.

Traders with escorts now fly correct to the end of the tunnel of the salvage gang and only turn away when clearly in the open sky. :wink:
User avatar
Fatleaf
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 1988
Joined: Tue Jun 08, 2010 5:11 am
Location: In analysis mode on Phaelon
Contact:

Re: Anarchies 2.3 now available

Post by Fatleaf »

Found this in the log:


12:32:26.797 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (anarchies-henchman-script 2.5): TypeError: system.shipsWithPrimaryRole("anarchies_henchman", player.ship)[1] is undefined
12:32:26.797 [script.javaScript.exception.unexpectedType]: ../AddOns/Anarchies2.5.oxp/Scripts/anarchies-henchman-script.js, line 83.

Hope it helps.
Find out about the early influences of Fatleaf here. Also his OXP's!
Holds the Ooniversal record for "Thread Necromancy"
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: Anarchies 2.3 now available

Post by Eric Walch »

Fatleaf wrote:
Found this in the log:


12:32:26.797 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (anarchies-henchman-script 2.5): TypeError: system.shipsWithPrimaryRole("anarchies_henchman", player.ship)[1] is undefined
12:32:26.797 [script.javaScript.exception.unexpectedType]: ../AddOns/Anarchies2.5.oxp/Scripts/anarchies-henchman-script.js, line 83.

Hope it helps.
It is a harmless bug. The game starts with two henchman ships and after the negotiations with one of them, the other is removed. The script forgets to test if it is indeed still around.

btw. McLane is still working on this oxp as I received a private question about anarchies from him last week. It is just that RL is a bit demanding for him at the moment.
User avatar
Fatleaf
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 1988
Joined: Tue Jun 08, 2010 5:11 am
Location: In analysis mode on Phaelon
Contact:

Re: Anarchies 2.3 now available

Post by Fatleaf »

Eric Walch wrote:
McLane is still working on this oxp as I received a private question about anarchies from him last week. It is just that RL is a bit demanding for him at the moment.
It is a shame RLTM is keeping him away from the denizens of this board. But it is great news that he continues to be active behind the scenes. Pass on our regards please. :D
Find out about the early influences of Fatleaf here. Also his OXP's!
Holds the Ooniversal record for "Thread Necromancy"
Post Reply