Page 1 of 2

Frangibility problem with my ship

Posted: Thu Mar 10, 2011 4:22 am
by UK_Eliter
Can anyone help with me with a problem I have with frangibility? I can't stop the turret on my ship (Fer-de-Lance 3G+) getting shot off.

I have this in the shipdata code:

frangible = "false";

But it does not work. I've tried various variants (for I've seen the variants in various places in others' code, I think) such as:

"frangible" = false;

and

frangible = no;

But to no avail. What's the correct syntax, please?

Re: Frangibility problem with my ship

Posted: Thu Mar 10, 2011 5:13 am
by Mauiby de Fug
According to the [EliteWiki] shipdata page, 'tis "frangible" = no

Re: Frangibility problem with my ship

Posted: Thu Mar 10, 2011 6:23 am
by Thargoid
The quotes shouldn't matter, and false and no are equivalent in an openstep plist.

Is there anything in the latest.log indicating an error with the ship? And you are putting the frangible line in the entry for the main body of the ship and not that of the sub-entity (the turret) aren't you?

Re: Frangibility problem with my ship

Posted: Thu Mar 10, 2011 6:51 am
by UK_Eliter
Mauiby: thanks. But it does not work!

Thargoid: nothing in the log, and the frangible entry is for the ship, not the entity. I did try moving it to the entity part, but that didn't work.

Perhaps I'd better give the whole relevant part of my shipdata code.

Code: Select all

"ferdelance3G-player_plusModel" = {
		like_ship = "ferdelance3G-player";
		
		cloak_passive = "true";
		energy_recharge_rate = 5.3;
		exhaust = ("0.0 -6.0 -39.0 4.0 3.9 17.0"); // Note that this is not the same as the standard 3G model
		forward_weapon_type = "WEAPON_MILITARY_LASER";
		"frangible" = no;
		max_cargo = 36;
		max_energy = 448;
		max_flight_roll = 3.50; // slightly less than the standard 3G model
		max_flight_pitch = 1.35;
		max_flight_speed = 500;
		max_flight_yaw = 1.25; // plus model has 0.1 less than the standard 3G model
		max_missiles = 7;
		missile_launch_position = "0.0 -10.5 16.5";
		model = "ferdelance3G+.dat";
		name = "Fer-de-Lance 3G+";
		roles = "player";
		scoop_position = "0.0 -8.0 -14";
		subentities =
		(
			{
				type = "ball_turret";
				subentity_key = "ballturret" ; // this is the inbuilt one
				fire_rate = 0.4; // interval between shots, in seconds. Default: 0.5. Minimum 0.25
			}
		);
		thrust = 56;
		weapon_position_forward = "0.0 -10.85 46.0"; // This ship longer than the 3G model
		view_position_forward = "0.0 -10.85 46.0" // this value altered too
	};
I am using Oolite oolite-trunk-1.75.1.4425-dev.win32. But I had the same trouble with the official beta, I think.

PS: Thargoid, I like your Naval Energy Grid. (You just keep turning out the OXPs! Are you a programmer for a living?)

Re: Frangibility problem with my ship

Posted: Thu Mar 10, 2011 8:35 am
by Commander McLane
@ UK_Eliter: just asking the next obvious question: do you press SHIFT while starting Oolite and hold it down until you see the spinning Cobra?

Re: Frangibility problem with my ship

Posted: Thu Mar 10, 2011 10:00 am
by Thargoid
The only thing I can see in the posted shipdata.plist is that there is a space between the end of the line and the ; in the subentity key defined for the turret. Not that I think this is the root cause of your problem here, but just as a comment.

The other way to do it is to set the energy and/or recharge rate to be high for the sub-ent, but of course that would only work if you're defining your own rather than using the built-in one.

I'll test it out on some of my turretted ships later and see if it's a generic problem.

UK_Eliter wrote:
PS: Thargoid, I like your Naval Energy Grid. (You just keep turning out the OXPs! Are you a programmer for a living?)


Thank you. Oh and nope, not a programmer. Indeed quite the opposite, I help to make microchips for a living. People do seem to like it so far - 17 downloads in about 12 hours...

Re: Frangibility problem with my ship

Posted: Thu Mar 10, 2011 10:16 am
by Smivs
Thargoid wrote:
I help to make microchips for a living.
What! You mean my computer might rely on Thargoid technology? :shock:

Re: Frangibility problem with my ship

Posted: Thu Mar 10, 2011 10:55 am
by Thargoid
Almost certainly. As will your phone, your XBox, your GPS and your car.

Re: Frangibility problem with my ship

Posted: Thu Mar 10, 2011 11:11 am
by Smivs
Hah...not quite. I don't have an X-box or GPS and my car is 29 years old...it almost pre-dates electricity. I am worried about the phone though :(

Re: Frangibility problem with my ship

Posted: Thu Mar 10, 2011 11:52 am
by Svengali
UK_Eliter wrote:

Code: Select all

subentities =
		(
			{
				type = "ball_turret";
				subentity_key = "ballturret" ; // this is the inbuilt one
				fire_rate = 0.4; // interval between shots, in seconds. Default: 0.5. Minimum 0.25
			}
		);
Seems position and orientation is missing.

Re: Frangibility problem with my ship

Posted: Thu Mar 10, 2011 12:35 pm
by Killer Wolf
Thargoid wrote:
Almost certainly. As will your phone, your XBox, your GPS and your car.
hmmm! so that explains it : the faults that cause WS misjumps is the same tech that misleads trucks down single-track country lanes!

Re: Frangibility problem with my ship

Posted: Thu Mar 10, 2011 4:33 pm
by UK_Eliter
Thanks everyone. I've uploaded a new and improved version. (But accidentally I have said so in a new thread within the 'expansion pack' forum. But I am repeating the essentials here.)

The link: http://www.box.net/shared/moreq536ht

Re: Frangibility problem with my ship

Posted: Thu Mar 10, 2011 5:30 pm
by Eric Walch
UK_Eliter wrote:
Thanks everyone. I've uploaded a new and improved version. (But accidentally I have said so in a new thread within the 'expansion pack' forum. But I am repeating the essentials here.)

The link: http://www.box.net/shared/moreq536ht
I just got it. There are still missing semicolons in shipData and shipYard. At least on the mac this means the plists are not loaded.

shipYard (3x): one after missiles, one after weapon_facings and one after the second-last curly bracket.
shipData (5x) : 3 after role-lists, one after fire_rate and one after the second-last curly bracket.

With these changes the ships also load on mac systems.

And as Svengali noted, you did not define a position for the turrets. That means they default to 0,0,0 and that is the ships center. They can fire from there through the hull, but you never will see the turrets themselves. (Actually, I noticed in your screenshots that they are just visible.)
Also the orientation is not defined. Than the will default to point forward [1,0,0,0]. You can sneak in from behind and the turrets will never hit you there. On the other hand, when you just have one single turret, it must point in a direction, and forward is not bad by itself.

Re: Frangibility problem with my ship

Posted: Fri Mar 11, 2011 5:56 pm
by Commander Ragugaki
Eric Walch wrote:
*snip* you did not define a position for the turrets. That means they default to 0,0,0 and that is the ships center. They can fire from there through the hull, but you never will see the turrets themselves. (Actually, I noticed in your screenshots that they are just visible.)
Image
@UK_Eliter: So that's a turret in the middle of your 3G+ ship! Check this out while near a station:
Press "c" for docking computers (buy them 1st if not installed)
Press "v" until you can get see the ship from the front
That turret of yours is quite something! Moves all by itself, pitch, roll...

Re: Frangibility problem with my ship

Posted: Fri Mar 11, 2011 8:17 pm
by UK_Eliter
@Ragugaki: yes; (but) the problem is that sometimes the turret dips *into the ship*. I'm trying to fix this at the moment, by relocating the turret to one side of the ship - actually, having one on each side. I've appropriated Thargoid's Vortex turret for this, and he's been giving me some advice.