Third Plea For Help

For discussion of ports to POSIX based systems, especially using GNUStep.

Moderators: winston, another_commander, Getafix

User avatar
RyanHoots
---- E L I T E ----
---- E L I T E ----
Posts: 958
Joined: Fri May 20, 2011 8:10 pm
Location: Nowhere
Contact:

Re: Third Plea For Help

Post by RyanHoots »

Eric Walch wrote:
RyanHoots wrote:
That works, thanks. :D

I still don't really understand how it works, at least I know that it does. :)
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.
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
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. :)
Image
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Third Plea For Help

Post by mandoman »

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. :?
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Third Plea For Help

Post by JensAyton »

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. :)
No, that’s not what he said. In general, 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.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Third Plea For Help

Post by mandoman »

Here is what I get in Latest.log:

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).
Here is what I have in shipdata.plist:

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;
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.
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Third Plea For Help

Post by Thargoid »

I'd suspect it's not your turrets at all that are screwing things up, but perhaps the dock. Specifically

Code: Select all

type = "dock_horizontal";
Docks are defined by is_dock = true;[/color]
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Third Plea For Help

Post by mandoman »

Thargoid wrote:
I'd suspect it's not your turrets at all that are screwing things up, but perhaps the dock. Specifically

Code: Select all

type = "dock_horizontal";
Docks are defined by is_dock = true;[/color]
I have that in the dock description:

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";
	};
Are you saying that it needs to be in the subentity listing?
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Third Plea For Help

Post by Thargoid »

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";
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).

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.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Third Plea For Help

Post by mandoman »

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).

Code: Select all

type = "dock_horizontal";
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).

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.
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. :)
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
RyanHoots
---- E L I T E ----
---- E L I T E ----
Posts: 958
Joined: Fri May 20, 2011 8:10 pm
Location: Nowhere
Contact:

Re: Third Plea For Help

Post by RyanHoots »

Ahruman wrote:
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. :)
No, that’s not what he said. In general, 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.
I really need to figure out how to understand techno-talk a little better. Thanks for clearing that up, Ahruman.
Image
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Third Plea For Help

Post by mandoman »

Thank you, Thargoid. That was exactly the problem. I'll remember that from now on. Little, by little, it becomes more clear. :)
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
RyanHoots
---- E L I T E ----
---- E L I T E ----
Posts: 958
Joined: Fri May 20, 2011 8:10 pm
Location: Nowhere
Contact:

Re: Third Plea For Help

Post by RyanHoots »

mandoman wrote:
Little, by little, it becomes more clear. :)
Well said. Same thing for me. :)
Image
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Third Plea For Help

Post by Thargoid »

mandoman wrote:
Thank you, Thargoid. That was exactly the problem. I'll remember that from now on. Little, by little, it becomes more clear. :)
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.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Third Plea For Help

Post by mandoman »

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.
:D
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
Post Reply