Page 2 of 3

Re: Problem with subentities

Posted: Fri May 20, 2011 7:34 pm
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.

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

Posted: Sun May 22, 2011 5:03 pm
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.

Re: Problem with subentities

Posted: Sun May 22, 2011 5:12 pm
by Thargoid
And the final root cause (and solution) was...?

Re: Problem with subentities

Posted: Sun May 22, 2011 5:24 pm
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.

Re: Problem with subentities

Posted: Mon May 23, 2011 12:20 am
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.

Re: Problem with subentities

Posted: Mon May 23, 2011 7:23 am
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.

Re: Problem with subentities

Posted: Mon May 23, 2011 7:45 am
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:

Re: Problem with subentities

Posted: Mon May 23, 2011 9:04 am
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.

Re: Problem with subentities

Posted: Mon May 23, 2011 11:14 am
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.

Re: Problem with subentities

Posted: Mon May 23, 2011 12:24 pm
by UK_Eliter
@Eric, @McLane: thanks.

Re: Problem with subentities

Posted: Mon May 23, 2011 1:15 pm
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.

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

Posted: Tue Jun 07, 2011 1:42 am
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

Re: Problem with subentities

Posted: Tue Jun 07, 2011 6:18 am
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. >:-(

Re: Problem with subentities

Posted: Tue Jun 07, 2011 7:14 am
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.

Re: Problem with subentities

Posted: Tue Jun 07, 2011 8:48 am
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.