Problem with subentities

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

Moderators: winston, another_commander

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:

Re: Problem with subentities

Post by Commander McLane »

Lone_Wolf wrote:
By default any given object is already frangible, so the use of this line must be to negate that.
copied from frangible entry in shipdata.plist.

Try adding 'frangible = no' to the definition of the turrets.
Nope. The frangible-key is only meaningful for the main entity.

@ UK_Eliter: PM underway.
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1246
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Problem with subentities - FIXED; Fer-de-Lance 3G OXP UPDATE

Post by UK_Eliter »

Thanks to Commander McLane, the problem is now fixed. I've uploaded a new version. It's available via the wiki. Sorry for my ineptitude on this mater.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Problem with subentities

Post by Thargoid »

And the final root cause (and solution) was...?
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:

Re: Problem with subentities

Post by Commander McLane »

Thargoid wrote:
And the final root cause (and solution) was...?
A missing semicolon in one of the entries, causing the whole shipdata to be void (at least on a Mac; I'm not completely sure about what exactly it would cause on a Windoze; UK_Eliter flew the ship, after all).

If you want to correct yourself: It's the roles key of the first hunter NPC definition.
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1246
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Re: Problem with subentities

Post by UK_Eliter »

UPDATE: I've discovered that the change did NOT fix the problem. I really should test these things more.

But I've made some other changes, namely (1) adding commas to the ends of lines in the arrays (if that's the term), even when the line in question is the last line, (2) removing some instances of 'is_external_dependency' that, somehow, had made it into my shipdata.

Once again, SEEMINGLY, it works. But I'll test it some more.
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:

Re: Problem with subentities

Post by Commander McLane »

It seems that for some reason there are no turrets on the ship when I buy it. Instead I get offered a maintenance overhaul (quite expensive, 44000 credits). After taking that the turrets appeared and were not shot off in the next battle.

There were some DW Cobras for sale at the same shipyard. Out of curiosity I bought one of them, and had the same problem. I got immediately offered a maintenance overhaul. When I launched from the station without taking the overhaul, there were some subentities, but it's hard to tell whether all of them appeared.

Conclusion: Buying a ship with subentities does not automatically make all subentities appear. Instead the game offers you a maintenance overhaul, after which everything is alright. This looks like a game-bug to me.
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: Problem with subentities

Post by Eric Walch »

Commander McLane wrote:
It seems that for some reason there are no turrets on the ship when I buy it. Instead I get offered a maintenance overhaul (quite expensive, 44000 credits).
You probable missed the small printings at the bottom of the advertisment: Turrets are not included in this offer but can be mount afterwards at a fair price. :wink:
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:

Re: Problem with subentities

Post by Commander McLane »

UK_Eliter wrote:
UPDATE: I've discovered that the change did NOT fix the problem. I really should test these things more.

But I've made some other changes, namely (1) adding commas to the ends of lines in the arrays (if that's the term), even when the line in question is the last line, (2) removing some instances of 'is_external_dependency' that, somehow, had made it into my shipdata.
You should also check shipyard.plist for consistency. For instance, both Plus models have EQ_NAVAL_SHIELD_BOOSTER twice as an optional equipment. I haven't checked whether there are other doublets.
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: Problem with subentities

Post by Eric Walch »

UK_Eliter wrote:
But I've made some other changes, namely (1) adding commas to the ends of lines in the arrays (if that's the term), even when the line in question is the last line,
Although that is correct for 99% of the systems, some don't want that last comma. At least Mac OSX tiger refuses to load such plists. All newer Mac versions have no problem with it. (accept both) And I think windows and linux also accept both. So, to allow your code for all os systems you must use the comma as separator in arrays and not as terminator.

I know that it is a problem, because my current plist editor also adds that comma as terminator. To remove it for a release, I must manually remove them, or re-save the plist with my old plist editor that shipped with os tiger.
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1246
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Re: Problem with subentities

Post by UK_Eliter »

@Eric, @McLane: thanks.
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:

Re: Problem with subentities

Post by Commander McLane »

Commander McLane wrote:
Conclusion: Buying a ship with subentities does not automatically make all subentities appear. Instead the game offers you a maintenance overhaul, after which everything is alright. This looks like a game-bug to me.
Filed and fixed here.
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1246
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Re: Problem with subentities - FIXED! (Really - no, really)

Post by UK_Eliter »

I've nailed it! :D 8) Yay! I still don't know what was causing it, but I've now got a script that will restore any lost turret (on a '3G+(t)') as soon, or almost as soon, as it gets shot off (and on launch from any station). Phew. Thanks to all who helped. The fixed version is 1.5 - available here: http://www.box.net/shared/moreq536ht
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2272
Joined: Tue Jan 02, 2007 12:38 pm

Re: Problem with subentities

Post by Killer Wolf »

Commander McLane wrote:
Conclusion: Buying a ship with subentities does not automatically make all subentities appear. Instead the game offers you a maintenance overhaul, after which everything is alright. This looks like a game-bug to me.
that sucks, i was going to do the player version of the Phantom w/ subents. >:-(
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6626
Joined: Wed Feb 28, 2007 7:54 am

Re: Problem with subentities

Post by another_commander »

Killer Wolf wrote:
Commander McLane wrote:
Conclusion: Buying a ship with subentities does not automatically make all subentities appear. Instead the game offers you a maintenance overhaul, after which everything is alright. This looks like a game-bug to me.
that sucks, i was going to do the player version of the Phantom w/ subents. >:-(
Don't worry, it's fixed for 1.75.3.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Problem with subentities

Post by Thargoid »

And it's quite simple to work-around anyway. Just use the playerBoughtNewShip event to issue a restoreSubEntities command in script.

That is basically what the fix mentioned above does (except using the taking damage event to trigger it) which for me is more a sticking plaster on the symptom rather than a fix for the problem, but it works in practice from the player experience viewpoint.
Post Reply