Can anybody make this docking bay work?

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

Moderators: winston, another_commander

User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Can anybody make this docking bay work?

Post by pagroove »

Code: Select all

{

"pagroove_tigershark_mainhull" = 
	{
		aft_eject_position = "0.0 -20.0 -67.0";
		aft_weapon_type = "WEAPON_PULSE_LASER";
		ai_type = "route1traderAI.plist";
		auto_ai = yes;
		cargo_type = "CARGO_NOT_CARGO";
		energy_recharge_rate = 3;
		exhaust = ("-9.8 5.6 -78.5 10.0 10.0 8.0", "9.8 5.6 -78.5 10.0 10.0 8.0");
		forward_weapon_type = "WEAPON_MILITARY_LASER";
		fuel = 70;
		has_ecm = 0.95;
		has_escape_pod = 0.95;
		has_scoop = 0.95;
		likely_cargo = 7;
		max_cargo = 750;
		max_energy = 500;
		max_flight_pitch = 0.1;
		max_flight_roll = 0.35;
		max_flight_speed = 100;
		missile_launch_position = "0.0 -9.0 60.0";
		missiles = 7;
		model = "pagroove_tigershark_mainhull.dat";
		name = "Tigershark";
		roles = "pagroovetigershark bigTrader";
		thrust = 14;
		weapon_position_aft = "0.0 0.0 -85.0";
		weapon_position_forward = "0.0 -4.0 85.0";
		weapon_position_port = "-37.5 -4.0 -40.0";
		weapon_position_starboard = "37.5 -4.0 -40.0";
	subentities = ("pagroove_tigershark_dockingbay  0 0 -995.9887 1 0 0 0");
	shaders = 
		{ 
            "pagroove_tigershark_mainhull_diffuse.png" = 
			{ 
                vertex_shader = "pagroove_tigershark.vertex"; 
                fragment_shader = "pagroove_tigershark.fragment"; 
                textures = 
						(
							"pagroove_tigershark_mainhull_diffuse.png", 
							"pagroove_tigershark_mainhull_normal.png"
						);
				uniforms =
						{
						uColorMap = { type = texture; value = 0; };
						uNormalMap = { type = texture; value = 1; };
						uTime = "universalTime";
						nearly_dead = "throwingSparks";	
						isHostile = "hasHostileTarget";						
						hull_heat_level = "hullHeatLevel";
						PaintColor1 = {type = "randomUnitVector"; scale = 0.25;};					
						}; 	
			}; 
		}; 
	};

"pagroove_tigershark_dockingbay" = 
	{
	ai_type = "dumbAI.plist";
	model = "pagroove_tigershark_dockingbay-192x64x250.dat"; 
	name = "Tigershark";
	roles = "docking-slit";
	shaders = 
		{ 
            "pagroove_tigershark_dockingbay_diffuse.png" = 
			{ 
                vertex_shader = "pagroove_tigershark_dockingbay.vertex"; 
                fragment_shader = "pagroove_tigershark_dockingbay.fragment"; 
                textures = ("pagroove_tigershark_dockingbay_diffuse.png"); 
			}; 
		}; 
	};
}
ATM it doesn't work. Can anybody help and maybe teach us how to make docks.?
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

It's for this ship.

Image
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
aegidian
Master and Commander
Master and Commander
Posts: 1161
Joined: Thu May 20, 2004 10:46 pm
Location: London UK
Contact:

Post by aegidian »

It's been a while but perhaps you also need

Code: Select all

isCarrier = yes;
"The planet Rear is scourged by well-intentioned OXZs."

Oolite models and gear? click here!
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2278
Joined: Tue Jan 02, 2007 12:38 pm

Post by Killer Wolf »

i put my dock findings in the "things i wish i knew..." thread, might be of help.
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

pagroove wrote:
It's for this ship.

Image
BTW, I wanted to say - a very nice looking ship!!!
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

What the master and commander wrote..

you can also include carrier into the role set

"role1 role2 carrier"...
Bounty Scanner
Number 935
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

One other important thing is that the string "dock" must be part of the dock-name in the old way of defining subentities. Oolite looks for this string to determine if a subentity is a dock. In the new system of subentities introduced with version 1.73 (See the wiki) any name can be used.
Last edited by Eric Walch on Tue Dec 15, 2009 10:18 pm, edited 1 time in total.
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

Code: Select all


"pagroove_tigershark_mainhull" = 
	{
		aft_eject_position = "0.0 -20.0 -67.0";
		aft_weapon_type = "WEAPON_PULSE_LASER";
		ai_type = "route1traderAI.plist";
		auto_ai = yes;
		cargo_type = "CARGO_NOT_CARGO";
		energy_recharge_rate = 3;
		exhaust = ("-9.8 5.6 -78.5 10.0 10.0 8.0", "9.8 5.6 -78.5 10.0 10.0 8.0");
		forward_weapon_type = "WEAPON_MILITARY_LASER";
		fuel = 70;
		has_ecm = 0.95;
		has_escape_pod = 0.95;
		has_scoop = 0.95;
		likely_cargo = 7;
		max_cargo = 750;
		max_energy = 500;
		max_flight_pitch = 0.1;
		max_flight_roll = 0.35;
		max_flight_speed = 100;
		missile_launch_position = "0.0 -9.0 60.0";
		missiles = 7;
		model = "pagroove_tigershark_mainhull.dat";
		name = "Tigershark";
		roles = "pagroovetigershark bigTrader";
		thrust = 14;
		weapon_position_aft = "0.0 0.0 -85.0";
		weapon_position_forward = "0.0 -4.0 85.0";
		weapon_position_port = "-37.5 -4.0 -40.0";
		weapon_position_starboard = "37.5 -4.0 -40.0";
	subentities = ("pagroove_tigershark_dockv1  0 0 -995.9887 1 0 0 0");
	shaders = 
		{ 
            "pagroove_tigershark_mainhull_diffuse.png" = 
			{ 
                vertex_shader = "pagroove_tigershark.vertex"; 
                fragment_shader = "pagroove_tigershark.fragment"; 
                textures = 
						(
							"pagroove_tigershark_mainhull_diffuse.png", 
							"pagroove_tigershark_mainhull_normal.png"
						);
				uniforms =
						{
						uColorMap = { type = texture; value = 0; };
						uNormalMap = { type = texture; value = 1; };
						uTime = "universalTime";
						nearly_dead = "throwingSparks";	
						isHostile = "hasHostileTarget";						
						hull_heat_level = "hullHeatLevel";
						PaintColor1 = {type = "randomUnitVector"; scale = 0.25;};					
						}; 	
			}; 
		}; 
	};

"pagroove_tigershark_dockv1" = 
	{
	ai_type = "dumbAI.plist";
	model = "pagroove_tigershark_dockv1-192x64x250.dat"; 
	name = "Tigershark";
	roles = "dock";
      is_dock = yes;
      isCarrier = yes;
      shaders = 
		{ 
            "pagroove_tigershark_dockingbay_diffuse.png" = 
			{ 
                vertex_shader = "pagroove_tigershark_dockingbay.vertex"; 
                fragment_shader = "pagroove_tigershark_dockingbay.fragment"; 
                textures = ("pagroove_tigershark_dockingbay_diffuse.png"); 
			}; 
		}; 
	};
}
Tried some things.

- Tried to use the word dock
- Tried to use roles l

no luck

But can't get it to work. Anyone want to have the ship to try? The advantage is that you get an interesting preview of the ship.
Sorry, I'm more of a creative type than a coder. :cry:
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Try putting the isCarrier in the carrier rather than the dock. :-)
Last edited by JensAyton on Tue Dec 15, 2009 10:20 pm, edited 1 time in total.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

pagroove wrote:
Tried some things.

- Tried to use the word dock
- Tried to use roles l

no luck. :cry:
Try putting:

Code: Select all

isCarrier = yes; 
into the carrier itself instead of in the dock. :roll:
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

Eric Walch wrote:
pagroove wrote:
Tried some things.

- Tried to use the word dock
- Tried to use roles l

no luck. :cry:
Try putting:

Code: Select all

isCarrier = yes; 
into the carrier itself instead of in the dock. :roll:
Ok will try tommorow.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

pagroove wrote:
Eric Walch wrote:
pagroove wrote:
Tried some things.

- Tried to use the word dock
- Tried to use roles l

no luck. :cry:
Try putting:

Code: Select all

isCarrier = yes; 
into the carrier itself instead of in the dock. :roll:
Ok will try tommorow.
Still no luck.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

You can try a few things to make it easier for Oolite.

For the main entity
- Rename the carrier from "pagroove_tigershark_mainhull" to "pagroove_tigershark_carrier"
- Give Oolite some more hints (equipment_price_factor, equivalent_tech_level, has_npc_traffic, hasShipyard, is_carrier, ...)
- Set frangible = false;
- Set roles "pagroove_tigershark_carrier"
- Take a look at the quaternion in the subent-declaration, rotate it for your needs, but keep in mind that the positions for X and Y have to be 0
For the subent
- Rename the subent to "pagroove_tigershark_dock"
- Set ai_type = "nullAI.plist";
- Set roles = "pagroove_tigershark_dock";

Some time ago I have started to write a small tutorial for dockable entities http://wiki.alioth.net/index.php/OXP_ho ... e_stations
It's not finished, but some usefull hints are there if you watch the source code mostly the comments (not visible in the normal view).

CheeriO
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

Svengali wrote:
You can try a few things to make it easier for Oolite.

For the main entity
- Rename the carrier from "pagroove_tigershark_mainhull" to "pagroove_tigershark_carrier"
- Give Oolite some more hints (equipment_price_factor, equivalent_tech_level, has_npc_traffic, hasShipyard, is_carrier, ...)
- Set frangible = false;
- Set roles "pagroove_tigershark_carrier"
- Take a look at the quaternion in the subent-declaration, rotate it for your needs, but keep in mind that the positions for X and Y have to be 0
For the subent
- Rename the subent to "pagroove_tigershark_dock"
- Set ai_type = "nullAI.plist";
- Set roles = "pagroove_tigershark_dock";

Some time ago I have started to write a small tutorial for dockable entities http://wiki.alioth.net/index.php/OXP_ho ... e_stations
It's not finished, but some usefull hints are there if you watch the source code mostly the comments (not visible in the normal view).

CheeriO

Hey that looks comprehensive. I never saw the tutorial. Thanx!
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2278
Joined: Tue Jan 02, 2007 12:38 pm

Post by Killer Wolf »

what exactly is the "doesn't work" aspect? is it placing the dock correctly but just not allowing you to dock, or what?
have you tried viewing w/ bounding boxes, the dock (if it's identifying one) will appear as red (ta to Commander McLane for that tip!)
Post Reply