problems with oxp-ship

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

Moderators: winston, another_commander

Post Reply
User avatar
tsoj
Dangerous
Dangerous
Posts: 66
Joined: Wed May 18, 2016 8:19 pm

problems with oxp-ship

Post by tsoj » Wed May 18, 2016 8:33 pm

Hello guys,

i modeled my first ship (with blender), i have textures for this model but i have issues with the configs. I tried to copy all config texts from the cobra mark three (copy worked) and to replace all words like "oolite_template_cobra3-..." with the name of my ship-model. However oolite didnt recognized this ship with these configs. Then i tried to replace the model of the cobra mark three with my model (in the gamefolder [oolite/oolite.app/resources/models/...]). this worked. i really dont know what im doing wrong, so i thought to myself, 'hey, there is this nice forum,why not asking them?
So im asking you now, what could i do in this case?
btw im using windows.
and sorry for some mistakes i might have done im not an native speaker ;)

User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 13680
Joined: Sat Jul 04, 2009 9:31 pm
Location: Corke's Drift
Contact:

Re: problems with oxp-ship

Post by Cody » Wed May 18, 2016 10:01 pm

Welcome aboard, Commander! I've asked the Mods to move this thread to a more suitable place, where it'll get more attention.
Hopefully, someone will then be able to help you. I'm just a dumb pilot, you see - flying a Cobra Mk III is about all I can do!
Last edited by Cody on Wed May 18, 2016 10:33 pm, edited 2 times in total.
Their dreams a tattered sail in the wind

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5397
Joined: Wed Feb 28, 2007 7:54 am

Re: problems with oxp-ship

Post by another_commander » Wed May 18, 2016 10:28 pm

Moved to Expansion Pack.

User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2543
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: problems with oxp-ship

Post by Norby » Wed May 18, 2016 10:50 pm

Welcome tsoj in the forum!

Please insert the content of your shipdata.plist here, we can take a look on it. Another help is your Logs/Latest.log file, maybe an error printed within about your shipdata like a missing bracket.

User avatar
ClymAngus
---- E L I T E ----
---- E L I T E ----
Posts: 2508
Joined: Tue Jul 08, 2008 12:31 am
Location: London England
Contact:

Re: problems with oxp-ship

Post by ClymAngus » Thu May 19, 2016 11:11 am

Indeed "eyes on" would be useful. :)

User avatar
tsoj
Dangerous
Dangerous
Posts: 66
Joined: Wed May 18, 2016 8:19 pm

Re: problems with oxp-ship

Post by tsoj » Thu May 19, 2016 3:43 pm

The error is:
Failed to restore saved game. Could not find ship type. "tsoj_Boomslang-mkII-player" -please reinstall the appropriate OXP.

In this save-file i wrote tsoj_Boomslang-mkII-player instead of cobra3-player.

My .oxp-folder is tsoj_Boomslang-mkII.oxp
In there are the three folders Config Models Textures.
Model and texture are in their folders and the shipdata.plist and shipyard.plist and the demoship.plist files are in the Config folder.

Content of my shipdata.plist file is this:

Code: Select all

{
	"tsoj_Boomslang-mkII" = 
	{
		aft_eject_position = "0.0 -13.25 -23.8";
		ai_type = "oolite-traderAI.js";
		auto_ai = yes;
		auto_weapons = yes;
		cargo_type = "CARGO_NOT_CARGO";
		custom_views =
		(
			{
				view_description = "Rear View";
				view_orientation = "1.0 0.0 0.0 0.0";
				view_position = "0.0 30.0 -200.0";
				weapon_facing = "FORWARD";
			},
			{
				view_description = "Rear Right View";
				view_orientation = "0.9239 0.0 0.3827 0.0";
				view_position = "141.42 30.0 -141.42";
				weapon_facing = "FORWARD";
			},
			{
				view_description = "Right View";
				view_orientation = "0.7071 0.0 0.7071 0.0";
				view_position = "200.0 30.0 0.0";
				weapon_facing = "FORWARD";
			},
			{
				view_description = "Front Right View";
				view_orientation = "0.3827 0.0 0.9239 0.0";
				view_position = "141.42 30.0 141.42";
				weapon_facing = "FORWARD";
			},
			{
				view_description = "Front View";
				view_orientation = "0.0 0.0 1.0 0.0";
				view_position = "0.0 30.0 200.0";
				weapon_facing = "FORWARD";
			},
			{
				view_description = "Front Left View";
				view_orientation = "0.3827 0.0 -0.9239 0.0";
				view_position = "-141.42 30.0 141.42";
				weapon_facing = "FORWARD";
			},
			{
				view_description = "Left View";
				view_orientation = "0.7071 0.0 -0.7071 0.0";
				view_position = "-200.0 30.0 0.0";
				weapon_facing = "FORWARD";
			},
			{
				view_description = "Rear Left View";
				view_orientation = "0.9239 0.0 -0.3827 0.0";
				view_position = "-141.42 30.0 -141.42";
				weapon_facing = "FORWARD";
			},
			{
				view_description = "Top View";
				view_orientation = "-0.7071 0.7071 0.0 0.0";
				view_position = "0.0 200.0 -15.0";
				weapon_facing = "FORWARD";
			},
			{
				view_description = "Bottom View";
				view_orientation = "0.0 0.0 0.7071 0.7071";
				view_position = "0.0 -200.0 -15.0";
				weapon_facing = "FORWARD";
			}
		);
		energy_recharge_rate = 4;
		exhaust = 
		(		
			"10.7601 6.3008 -33.8587  6.3 5.6 1.0",
			"-10.7601 6.3008 -33.8587 6.3 5.6 1.0"
		);
		forward_weapon_type = "WEAPON_BEAM_LASER";
		frangible = 0;
		fuel = 70;
		has_ecm = 0.15;
		has_escape_pod = 0.95;
		has_scoop = 0.95;
		is_template = 1;
		likely_cargo = 15;
		materials = 
		{ 
			"Hull" = 
			{ 
				diffuse_map = "oolite_cobra3_diffuse.png"; 
				specular_color = ( 0.2, 0.2, 0.2 );
				shininess = 5; 
				emission_map = { name = "oolite_cobra3_diffuse.png"; extract_channel = "a"; }; 
				emission_modulate_color = (0.9926, 0.9686, 0.7325, 1.0);
			};
			"Gun" = 
				{ 
					diffuse_map = "oolite_cobra3_subents.png"; 
					specular_color = ( 0.2, 0.2, 0.2 ); 
					shininess = 5; 
				};			
		};
		max_cargo = 20;
		max_energy = 256;
		max_flight_pitch = 1;
		max_flight_roll = 2;
		max_flight_speed = 350;
		max_missiles = 4;
		missile_launch_position = "0.0 -15.5 -24.5";
		missiles = 3;
		model = "tsoj_Boomslang-mkII.dat";
		name = "Boomslang MK-II";
		scoop_position = "0.0 -5.5 25.0";
		thrust = 32;
		view_position_aft = "0.0 6.0 -35.5";
		view_position_forward = "0.0 7.25 31.0";
		view_position_port = "-35.5 7.5 0.0";
		view_position_starboard = "35.5 7.5 0.0";
		weapon_facings = 15;
		weapon_position_aft = "0.0 0.0 -33.5";
		weapon_position_forward = "-0.0961 0.9367 43.4655";
		weapon_position_port = "-47.4 -2.3 0.0";
		weapon_position_starboard = "47.4 -2.3 0.0";
	};
	"tsoj_Boomslang-mkII-trader" =
	{
		like_ship = "tsoj_Boomslang-mkII";
		is_template = 1;
		max_flight_speed = 300;
		thrust = 30;
		roles = "trader(0.375) trader-courier(0.2) trader-smuggler(0.75) hunter-medium(0.5) pirate-heavy-fighter pirate-interceptor(0.25) pirate-aegis-raider(0.2) scavenger sunskim-trader";
	};
	"tsoj_Boomslang-mkII-alternate" =
	{
		like_ship = "tsoj_Boomslang-mkII";
		has_ecm = 0.95;
		is_template = 1;
		max_cargo = 35;
		max_flight_speed = 300;
		materials =
		{
			"Hull" =
			{
				diffuse_map = "oolite_cobra3_diffuse_alt.png";
				specular_color = (0.2, 0.2, 0.2);
				shininess = 5;
				emission_map = 
				{
					name = "oolite_cobra3_diffuse_alt.png"; extract_channel = "a";
				};
				emission_modulate_color = (0.9926, 0.9686, 0.7325, 1.0);
			};
			"Gun" = 
				{ 
					diffuse_map = "oolite_cobra3_subents.png"; 
					specular_color = ( 0.2, 0.2, 0.2 ); 
					shininess = 5; 
				};			
		};
		roles = "pirate-light-freighter pirate-medium-freighter(0.2) trader(0.375) hunter-heavy escort-heavy(0.25) hermit-ship sunskim-trader cobra3-alternate assassin-medium";
	};
	"tsoj_Boomslang-mkII-pirate" =
	{
		like_ship = "tsoj_Boomslang-mkII";
		is_template = 1;
		ai_type = "oolite-pirateAI.js";
		bounty = 50;
		forward_weapon_type = "WEAPON_PULSE_LASER";
		has_ecm = 0.1;
		has_escape_pod = 0.85;
		has_scoop = yes;
		has_shield_booster = 0.25;
		materials =
		{
			"Hull" =
			{
				diffuse_map = "oolite_cobra3_diffuse_pirate.png";
				specular_color = (0.2, 0.2, 0.2);
				shininess = 5;
				emission_map = 
				{
					name = "oolite_cobra3_diffuse_pirate.png"; extract_channel = "a";
				};
				emission_modulate_color = (0.9926, 0.9686, 0.7325, 1.0);
			};
			"Gun" = 
				{ 
					diffuse_map = "oolite_cobra3_subents.png"; 
					specular_color = ( 0.2, 0.2, 0.2 ); 
					shininess = 5; 
				};			
		};
		max_cargo = 20;
		max_flight_speed = 300;
		missiles = 1;
		roles = "pirate(0.25) pirate-medium-fighter(0.5)";
	};
	"tsoj_Boomslang-mkII-player" =
	{
		like_ship = "tsoj_Boomslang-mkII";
		is_template = 1;
		forward_weapon_type = "WEAPON_PULSE_LASER";
		roles = "player";
	};
}

Content of my shipyard.plist is:

Code: Select all

{
	"tsoj_mkII-Boomslang-player" =
	{
		chance = 0.5;
		"optional_equipment" =
		(
            "EQ_CARGO_BAY",
			"EQ_ECM",
			"EQ_FUEL_SCOOPS",
			"EQ_PASSENGER_BERTH",
			"EQ_ESCAPE_POD",
			"EQ_ENERGY_BOMB",
			"EQ_ENERGY_UNIT",
			"EQ_NAVAL_ENERGY_UNIT",
			"EQ_DOCK_COMP",
			"EQ_WEAPON_PULSE_LASER",
			"EQ_WEAPON_BEAM_LASER",
			"EQ_WEAPON_MINING_LASER",
			"EQ_WEAPON_MILITARY_LASER",
			"EQ_FUEL_INJECTION",
			"EQ_SCANNER_SHOW_MISSILE_TARGET",
			"EQ_MULTI_TARGET",
			"EQ_GAL_DRIVE",
			"EQ_ADVANCED_COMPASS",
			"EQ_SHIELD_BOOSTER",
			"EQ_NAVAL_SHIELD_BOOSTER",
			"EQ_HEAT_SHIELD"
		);
		price = 150000;
		"standard_equipment" =
		{
			extras = "";
			"forward_weapon_type" = "EQ_WEAPON_PULSE_LASER";
			missiles = 3;
		};
		techlevel = 6;
		"weapon_facings" = 15;
	};
}

It could be something obvious that im doing wrong, im a total noob with things like this :P
Last edited by tsoj on Thu May 19, 2016 7:50 pm, edited 2 times in total.

User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 13680
Joined: Sat Jul 04, 2009 9:31 pm
Location: Corke's Drift
Contact:

Re: problems with oxp-ship

Post by Cody » Thu May 19, 2016 4:19 pm

A tip: if you highlight any code, then click the 'Code' button, it makes it easier to read.
Their dreams a tattered sail in the wind

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5397
Joined: Wed Feb 28, 2007 7:54 am

Re: problems with oxp-ship

Post by another_commander » Thu May 19, 2016 6:22 pm

Had a very quick look and this struck me as inconsistent:
shipdata.plist has

Code: Select all

"tsoj_Boomslang-mkII-player" = [...]
while shipyard.plist has

Code: Select all

"tsoj_mkII-Boomslang-player" = [...]

User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Disunited Kingdom
Contact:

Re: problems with oxp-ship

Post by Smivs » Fri May 20, 2016 8:21 am

By the way, demoship.plist is no longer used - you will need a shiplibrary.plist to add your ship to the display.
Commander Smivs, the friendliest Gourd this side of Riedquat.

User avatar
tsoj
Dangerous
Dangerous
Posts: 66
Joined: Wed May 18, 2016 8:19 pm

Re: problems with oxp-ship

Post by tsoj » Fri May 20, 2016 10:24 am

another_commander wrote:Had a very quick look and this struck me as inconsistent:
shipdata.plist has

Code: Select all

"tsoj_Boomslang-mkII-player" = [...]
while shipyard.plist has

Code: Select all

"tsoj_mkII-Boomslang-player" = [...]
oh, yes, i found also some other inconsistencies in this plist, like i hadnt rewrote the string after "model" (it was still oolite_cobra3.dat).
but this wasnt the problem. :P
Now im trying to adjust all the xyz-positiones from the shipdata.plist in the gamefolder of the cobra mark three to look nice with my model,
but i have this problem, that if i restart the game it hasnt changed, but when i restarted it today (after a windows hibernation relaunch) the changes have applied.
Why is that? Have i to logout and in? Or maybe its just one of the defects of my computer.

and thanks for your replies
Smivs wrote:By the way, demoship.plist is no longer used - you will need a shiplibrary.plist to add your ship to the display.
I'm sure that I had long wondered why that does not work ;)
Last edited by tsoj on Fri May 20, 2016 12:52 pm, edited 1 time in total.

User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 13680
Joined: Sat Jul 04, 2009 9:31 pm
Location: Corke's Drift
Contact:

Re: problems with oxp-ship

Post by Cody » Fri May 20, 2016 10:25 am

If you make changes, you need to restart Oolite with the shift key held down until the spinning Cobra appears - that flushes the cache.

Which code editor are you using? If you're not already aware of it, Notepad++ is good (and free).
Their dreams a tattered sail in the wind

User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2296
Joined: Fri Jul 14, 2006 12:29 pm
Location: Wales

Re: problems with oxp-ship

Post by Griff » Fri May 20, 2016 8:25 pm

I'm not 100% sure, but i don't think you need this line

Code: Select all

is_template = 1;
in any of the ship definitions other than the first "tsoj_Boomslang-mkII" one,
setting a ship as a template = 1 treats that ship as a 'reference only' ship which other 'like_ship =' ship versions refer too (saves you having to duplicate all the settings in each version of the ship you 'like_ship' too -
sorry about the mad circular logic, hope that makes a bit of sense :)

User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Disunited Kingdom
Contact:

Re: problems with oxp-ship

Post by Smivs » Fri May 20, 2016 10:05 pm

That's right. A good convention is to call the template, 'template', so your

Code: Select all

"tsoj_Boomslang-mkII"
might be called

Code: Select all

"tsoj_Boomslang-mkII_template"
and all the others like_ship to "tsoj_Boomslang-mkII_template", without the 'is_template' line.
Commander Smivs, the friendliest Gourd this side of Riedquat.

User avatar
tsoj
Dangerous
Dangerous
Posts: 66
Joined: Wed May 18, 2016 8:19 pm

Re: problems with oxp-ship

Post by tsoj » Fri May 20, 2016 10:51 pm

Ok, i followed your tips for template-ships and this and it worked. Thank you all for that help! :D

Post Reply