Hmm, interesting. So, startup actions didn't work because Oolite didn't look in that area of .plist code. Good to know for the future.Eric Walch wrote:Internally does Oolite only use the new style declarations. On building the cache on startup, all old style definitions are translated to the new one. When one of the old style subs contains a 'setup_actions' with "initialiseTurret", that subentity is defined as turret in the new style. The new style definition no longer looks at the setup_actions to see if it is a turret because it has a specific key telling it is a turret.RyanHoots wrote:That works, thanks.
I still don't really understand how it works, at least I know that it does.
On the second start, Oolite gets the already converted definitions from the cache.
When you have the choice, I would always use the new definitions as that allows different specifications for the different turrets. eg. energy or speed
Third Plea For Help
Moderators: winston, another_commander, Getafix
- RyanHoots
- ---- E L I T E ----
- Posts: 958
- Joined: Fri May 20, 2011 8:10 pm
- Location: Nowhere
- Contact:
Re: Third Plea For Help
Re: Third Plea For Help
I'm having a problem with another ship, and older creation that isn't a player ship, the Andricothere. When I first tried it out with a test_script.js, I was able to look it all over well enough to get the ball turrets in the right positions, but could never get them initialized. I went back to that ship and did basically the same to it as I did with the Genesis......but the ball turrets don't even appear anymore. In fact, I get a Latest.log warning that I'm using a "Bad" type identification. Says it should only be specified as "flasher, or ball_turret". I have the type listed as ball_turret in shipdata.plist, but the Latest.log says it's wrong. What now? I'm at a loss as to why it doesn't accept the same type as I have listed in the Genesis shipdata.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: Third Plea For Help
No, that’s not what he said. In general,RyanHoots wrote:Hmm, interesting. So, startup actions didn't work because Oolite didn't look in that area of .plist code. Good to know for the future. :)
setup_actions
work (but are deprecated, because they’re part of the legacy scripting engine). initialiseTurret
is a special case; as a command, it doesn’t actually do anything, but the game looks for it to determine if a subentity is a turret.When the new subentity declaration was introduced, this hacky mechanism wasn’t carried forward, but it’s used when internally translating old-style declarations.
E-mail: [email protected]
Re: Third Plea For Help
Here is what I get in Latest.log:
Here is what I have in shipdata.plist:
That is extremely similar to what I have for the Genesis, on which the ball turrets are now working fully. Can anyone see where the mess up is, or what I've left out, or put in, that I shouldn't? Thanks.
Code: Select all
09:56:19.840 [shipData.load.error.badSubentity]: ***** ERROR: subentity declaration for ship Andricothere Trader does not declare a valid type (must be standard, flasher or ball_turret).
Code: Select all
"subentities" = (
{
type = "ball_turret";
subentity_key = "andricothere_ball_turret";
position = (0.2, 54.2, 192.5);
orientation = (1, 1, 0, 0);
},
{
type = "ball_turret";
subentity_key = "andricothere_ball_turret";
position = (0.2, 54.2, 192.5);
orientation = (1, 0, 1, 0);
},
{
type = "ball_turret";
subentity_key = "andricothere_ball_turret";
position = (0.0, -122.0, 101.0);
orientation = (1, -1, 0, 0);
},
{
type = "ball_turret";
subentity_key = "andricothere_ball_turret";
position = (0.0, -122.0, 101.0);
orientation = (1, 0, -1, 0);
},
{
type = "ball_turret";
subentity_key = "andricothere_ball_turret";
position = (100.25, 77.0, -74.0);
orientation = (1, -1, 0, 0);
},
{
type = "ball_turret";
subentity_key = "andricothere_ball_turret";
position = (-100.25, 77.0, -74.69);
orientation = (1, 0, -1, 0);
},
{
type = "ball_turret";
subentity_key = "andricothere_ball_turret";
position = (0.0, 102.5, -247.0);
orientation = (1, 1, 0, 0);
},
{
type = "ball_turret";
subentity_key = "andricothere_ball_turret";
position = (0.0, 102.5, -247.0);
orientation = (1, 0, 1, 0);
},
{
type = "ball_turret";
subentity_key = "andricothere_ball_turret";
position = (0.7, -121.0, -146.0);
orientation = (1, -1, 0, 0);
},
{
type = "ball_turret";
subentity_key = "andricothere_ball_turret";
position = (0.7, -121.0, -146.0);
orientation = (1, 0, -1, 0);
},
{
type = "dock_horizontal";
subentity_key = "Andricothere-dock";
position = (0.0, 2.327, -1.233);
orientation = (1, 0, 0, 0);
}
);
"forward_weapon_type" = "NONE";
"thrust" = 3.5;
};
"andricothere_ball_turret" =
{
ai_type = "andricothere_ball_turretAI.plist";
model = "andricoturret.dat";
smooth = "yes";
materials = "andricoturret.png";
name = "Ball Turret";
roles = "andricothere_ball_turret";
script = "andricothere_ball_turret.js";
thrust = 1;
weapon_energy = 50;
Re: Third Plea For Help
I'd suspect it's not your turrets at all that are screwing things up, but perhaps the dock. Specifically
Docks are defined by is_dock = true;[/color]
Code: Select all
type = "dock_horizontal";
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
Re: Third Plea For Help
I have that in the dock description:Thargoid wrote:I'd suspect it's not your turrets at all that are screwing things up, but perhaps the dock. SpecificallyDocks are defined by is_dock = true;[/color]Code: Select all
type = "dock_horizontal";
Code: Select all
"Andricothere-dock" =
{
ai_type = "nullAI.plist";
is_dock = "true";
materials = "Andricothere-dock.png";
model = "andricothere-dock.dat";
name = "Andricothere-dock (horizontal)";
roles = "androcpthere-dock";
};
Re: Third Plea For Help
Code: Select all
09:56:19.840 [shipData.load.error.badSubentity]: ***** ERROR: subentity declaration for ship Andricothere Trader does not declare a valid type (must be standard, flasher or ball_turret).
Code: Select all
type = "dock_horizontal";
And yes, is_dock should be in the subentity command of the mother, not the sub-entity itself. Look in the shipdata.plist of the trunk files for guidance (for example the entries for the Coriolis or other stations).
Just replace the type="dock_horizontal"; with is_dock=true'; and remove it from the dock's definition array.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
Re: Third Plea For Help
Okay. Thanks. I missed that "standard" as one of the conditions. Not sue why, probably because it didn't specify "dock". I'm learning, really, it's true.Thargoid wrote:Code: Select all
09:56:19.840 [shipData.load.error.badSubentity]: ***** ERROR: subentity declaration for ship Andricothere Trader does not declare a valid type (must be standard, flasher or ball_turret).
The error in the log lists the three available values of type. "dock_horizontal" isn't one of them. It should be "standard", or just omitted completely (at which point standard is assumed).Code: Select all
type = "dock_horizontal";
And yes, is_dock should be in the subentity command of the mother, not the sub-entity itself. Look in the shipdata.plist of the trunk files for guidance (for example the entries for the Coriolis or other stations).
Just replace the type="dock_horizontal"; with is_dock=true'; and remove it from the dock's definition array.
- RyanHoots
- ---- E L I T E ----
- Posts: 958
- Joined: Fri May 20, 2011 8:10 pm
- Location: Nowhere
- Contact:
Re: Third Plea For Help
I really need to figure out how to understand techno-talk a little better. Thanks for clearing that up, Ahruman.Ahruman wrote:No, that’s not what he said. In general,RyanHoots wrote:Hmm, interesting. So, startup actions didn't work because Oolite didn't look in that area of .plist code. Good to know for the future.setup_actions
work (but are deprecated, because they’re part of the legacy scripting engine).initialiseTurret
is a special case; as a command, it doesn’t actually do anything, but the game looks for it to determine if a subentity is a turret.
When the new subentity declaration was introduced, this hacky mechanism wasn’t carried forward, but it’s used when internally translating old-style declarations.
Re: Third Plea For Help
Thank you, Thargoid. That was exactly the problem. I'll remember that from now on. Little, by little, it becomes more clear.
- RyanHoots
- ---- E L I T E ----
- Posts: 958
- Joined: Fri May 20, 2011 8:10 pm
- Location: Nowhere
- Contact:
Re: Third Plea For Help
Well said. Same thing for me.mandoman wrote:Little, by little, it becomes more clear.
Re: Third Plea For Help
You're welcome sir. I can recall being in a similar position a few years back and people here guiding me from confusion to clarity. Now I'm happy to be able to pay that investment back.mandoman wrote:Thank you, Thargoid. That was exactly the problem. I'll remember that from now on. Little, by little, it becomes more clear.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
Re: Third Plea For Help
Thargoid wrote:You're welcome sir. I can recall being in a similar position a few years back and people here guiding me from confusion to clarity. Now I'm happy to be able to pay that investment back.