escorts don't have turrets in 1.71.2

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

Moderators: winston, another_commander, Getafix

Post Reply
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:

escorts don't have turrets in 1.71.2

Post by Commander McLane »

If any ship that happens to have a ballturret among its subentities is spawned as an escort, the ballturrets are missing. Other subentities are there, but no turrets.

In a similar form this was also the case in previous versions of Oolite. In 1.69 the turrets were missing, if the ship's AI was switched in launch_actions.

But in 1.71.2 the turrets are never there, regardless of the existence of launch_actions in the shipdata. Probably because the default ship-script does something similar to launch_actions (just a guess)?

If the same ship is created with another role, the turrets are there and working.

I've tested it with the Sentinel Asteroids from Anarchies.oxp (working on version 1.1), but also with The Liberator from liberator.oxp, which also has ballturrets. Same result. If created with another role, turrets are there and firing. If created as escort, no turrets.

That's a bug.
User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Post by Ramirez »

Can I add to the escort topic? Reading the Escort Instructions on the Wiki, if I understand correctly a ship needs a role of either 'escort' or 'wingman' in order to perform escort properly, wingman being used specifically for police ships.

I'm testing a scripted police patrol in 1.71.2 and the wingmen are no longer escorting their owner. Only when I add the 'escort' role into the escorts' shipdata do they correctly identify their mother, otherwise they just fly on into space with their default AI or else they latch on to any other passing police unit.

Has anyone else come across this?
Download Resistance Commander plus many other exciting OXPs HERE
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 »

@ Ramirez: That's seems to be perfectly in-line with the wiki-description, doesn't it? If you want a ship to be used as escort, give it the role escort. "escort(0.00001)" will make sure that it is (almost) never chosen by the system populator.

*****

Some more research on the original problem:

I can confirm now that the problem is in the setup_actions which a turret needs in order to work. Somehow the existence of the setup_actions-array prevents the turret to be created altogether, if the turreted ship is spawned as an escort. If I take out the setup_actions, the turret appears correctly - but of course it doesn't fire, because the initialiseTurret is missing.

Another very interesting detail is this: I spawned the escorts with setup_actions, therefore without turrets. Then I attacked their mother. In the very moment I killed the mother, all turrets on the escorts mysteriously appeared and started firing at me. :shock: So: If no mother, the turrets are there. As long as there is a mother, no turrets.

I hope this helps in hunting the bug down.

*****

For my current problem I got around the bug by keeping the turrets on the model, deleting the setup_actions and giving the main entity thargoid lasers instead. So now it looks like the turrets fire lasers instead of plasma bolts.

In doing this I came across another problem: If I define the escorts using the escort-role key in their mother's shipdata, everything is fine. If I use escort-ship instead, the escorts don't appear at all! This did not happen before I added the thargoid lasers. (And yes, I have made sure to exclude typos in the spelling of both the role and the entity-key.)
User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Post by Ramirez »

Commander McLane wrote:
@ Ramirez: That's seems to be perfectly in-line with the wiki-description, doesn't it? If you want a ship to be used as escort, give it the role escort. "escort(0.00001)" will make sure that it is (almost) never chosen by the system populator.
Thanks, that fix should work - I was just confused as back when I wrote the script on 1.65 I was able to have wingmen performing escort duties without having to add an extra escort role (i.e. 'wingman' is the police equivalent of 'escort'). I wasn't sure if this was something that got changed intentionally in 1.70+ or if it was a bug.

Anyway, you can have your thread back now!
Download Resistance Commander plus many other exciting OXPs HERE
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Commander McLane wrote:
@ Ramirez: That's seems to be perfectly in-line with the wiki-description, doesn't it? If you want a ship to be used as escort, give it the role escort. "escort(0.00001)" will make sure that it is (almost) never chosen by the system populator.
I think escort(0) will actually work with 1.71 and earlier. It is explicitly supported in 1.72.

However, “wingman” should work fine without “escort”. If it doesn’t, that’s a bug.
User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Post by Ramirez »

Maybe only a bit of a bug - although the mother ship had a police scan class and so acted as such, I hadn't actually given it the police role. I tried adding that rather than giving the escorts the escort role (leaving them as wingmen) and things began to work as expected.
Download Resistance Commander plus many other exciting OXPs HERE
Post Reply