Frangibility problem with my ship

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

Moderators: winston, another_commander

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

Frangibility problem with my ship

Post 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?
User avatar
Mauiby de Fug
---- E L I T E ----
---- E L I T E ----
Posts: 847
Joined: Tue Sep 07, 2010 2:23 pm

Re: Frangibility problem with my ship

Post by Mauiby de Fug »

According to the [EliteWiki] shipdata page, 'tis "frangible" = no
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Frangibility problem with my ship

Post 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?
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1248
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Re: Frangibility problem with my ship

Post 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?)
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: Frangibility problem with my ship

Post 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?
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Frangibility problem with my ship

Post 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...
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Frangibility problem with my ship

Post by Smivs »

Thargoid wrote:
I help to make microchips for a living.
What! You mean my computer might rely on Thargoid technology? :shock:
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Frangibility problem with my ship

Post by Thargoid »

Almost certainly. As will your phone, your XBox, your GPS and your car.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Frangibility problem with my ship

Post 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 :(
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Frangibility problem with my ship

Post 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.
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2279
Joined: Tue Jan 02, 2007 12:38 pm

Re: Frangibility problem with my ship

Post 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!
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1248
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Re: Frangibility problem with my ship

Post 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
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: Frangibility problem with my ship

Post 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.
User avatar
Commander Ragugaki
Competent
Competent
Posts: 51
Joined: Tue Feb 08, 2011 6:44 pm
Location: Sydney, Australia

Re: Frangibility problem with my ship

Post 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...
"And... sweet Lord Giles on a gyro-spider, they didn't even fit you out with a docking computer!"
Have you tried docking at full speed lately?
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1248
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Re: Frangibility problem with my ship

Post 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.
Post Reply