Show and Tell (new ships/ ships in progress)

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

Moderators: winston, another_commander

User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Show and Tell (new ships/ ships in progress)

Post by mandoman »

Smivs wrote:
Just looked at the docks from core. The horizontal one is actually dock-flat, so that is probably the one you should be using. The dock-flat.dat (and dock.dat) have "dark_metal.png" as their defined texture, so they will use this automatically. The 'materials' you are using (when in the right place) will only have a mild affect on the shininess and reflectiveness anyway, which are pointless for docks. If you did want to specify any 'materials' these should be placed in the actual shipdata for the dock, not the sub-entity of the main ship.
Yeah, I mis-spoke again, and you have once again caught me. I have the dark_metal.png in the Textures folder for the ballturret, which specifies that texture as part of the turret. That is also where the "shininess" thing is you are referring to. I used those directly out of the core Oolite files, so if it's wrong......well, what can I say. :roll:
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Show and Tell (new ships/ ships in progress)

Post by Smivs »

Ah, I don't really 'do' ballturrets so am not familiar with them. Either way that information should not be in the sub-entity definition of the ship, it should be in the ballturret's shipdata.plist entry.
As you've got dark_metal.png already, that should work for the dock as well
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Show and Tell (new ships/ ships in progress)

Post by mandoman »

Smivs wrote:
Ah, I don't really 'do' ballturrets so am not familiar with them. Either way that information should not be in the sub-entity definition of the ship, it should be in the ballturret's shipdata.plist entry.
As you've got dark_metal.png already, that should work for the dock as well
From Core shipdata.plist,

Code: Select all

"ballturret" =
	{
		/*	Standard turret.
			Not used by Oolite directly, but provided as a resource for OXPs
			starting with Oolite 1.72.
		*/
		ai_type = "nullAI.plist";
		laser_color = magentaColor;
		model = "oolite-ball-turret.dat";
		smooth = "yes";
		materials =
		{
			"back_metal.png" =
			{
				shininess = 15;
				specular_color = (0.75, 0.75, 0.75, 1.0);
			};
			"oolite-ball-turret.png" =
			{
				shininess = 15;
				specular_color = (0.75, 0.75, 0.75, 1.0);
			};
		};
		name = "Ball Turret";
		roles = "ballturret";
		setup_actions = ( initialiseTurret );
		thrust = 1;
		weapon_energy = 25;
	};
From Andricothere shipdata.plist,

Code: Select all

"ballturret" =
	{
		ai_type = "nullAI.plist";
		model = "oolite-ball-turret.dat";
		smooth = "yes";
		materials =
		{
			"back_metal.png" =
			{
				shininess = 15;
				specular_color = (0.75, 0.75, 0.75, 1.0);
			};
			"oolite-ball-turret.png" =
			{
				shininess = 15;
				specular_color = (0.75, 0.75, 0.75, 1.0);
			};
		};
		name = "Ball Turret";
		roles = "ballturret";
		setup_actions = (initialiseTurret);
		thrust = 1;
		weapon_energy = 25;
        };
I'm not sure what you are objecting to, or telling me that I'm doing wrong. That is exactly the way I showed in my earlier post. Nothing of that do I have listed under "subentities". What I DO have under "subentities" is the key, the position, and the orientation of each individual ballturret. That is also what my earlier post indicated. It was the same with the dock, though when trying to show you WHICH dock I used from the core files, I accidently copied, and pasted the shipdata.plist listing of a dock, rather than what I had originally had, which was a dock-flat. A slip on my part, as incredible as it may seem. Now, what was the question again?
Last edited by DaddyHoggy on Wed Nov 23, 2011 10:56 pm, edited 1 time in total.
Reason: Edited to make it easier to read for OXPers and coders
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2278
Joined: Tue Jan 02, 2007 12:38 pm

Re: Show and Tell (new ships/ ships in progress)

Post by Killer Wolf »

hope this doesn't come across as pointless or patronising (not sure how you model) but if you're going to use the standard models, the best way (IMO) would be to do this :
- run the DAT2OBJ routine on the core's dock DAT so you can import it into your modeller
- import/merge your Andricothere and see how they align. the first, most obvious thing, that i'm thinking is that the dock will be the wrong way around : ie, for the Coriolis model the dock mouth needs to be at the front, whereas you'll need to turn it 180 so you can dock from the rear.
- w/ the two models in the modeller you'll be able to scale and move the ship to get them properly aligned.

if the ship size/design doesn't accomodate a normal dock you'll have to create one yourself. this is where it get's slightly annoying, as i've found that docks need to be created at the Origin and then shifted via your Subent placement code in Shipdata. so, you need to model the dock in the ship, save the ship and the dock as different models, then get your dock model and shift it to the Origin, and save it. then, in Shipdata, you'll be shifting it back to where it came from. yeah, it's a bit odd!
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Show and Tell (new ships/ ships in progress)

Post by Smivs »

mandoman wrote:
I'm not sure what you are objecting to, or telling me that I'm doing wrong. That is exactly the way I showed in my earlier post. Nothing of that do I have listed under "subentities". What I DO have under "subentities" is the key, the position, and the orientation of each individual ballturret. That is also what my earlier post indicated.
Ah, sorry, yes I see what you're saying. I was halfway to bed when I answered you and was tired and clearly wasn't paying enough attention.
It didn't help that the code quoted had no indents - at first glance it looked like one shipdata entry, not three and that's what lead me astray.
I'll make sure I'm awake next time I try to help :wink:
Commander Smivs, the friendliest Gourd this side of Riedquat.
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: Show and Tell (new ships/ ships in progress)

Post by Eric Walch »

mandoman wrote:
I used those directly out of the core Oolite files, so if it's wrong......well, what can I say. :roll:
But what is the point in overwriting any internal shipdata from Oolites core? Some oxps do it to add new textures to core ships but such things are likely to get buggy if more than one oxp tries to overwrite core ships, as only the definition from the last used one is used. Better to only overwrite any core shipdata if strictly needed and I see no need for it in your oxp.
When you want custom docks and turrets, please give it a unique name like "mandoman_dock" or "mandoman_turret" and use a like_ship reference to the internal ones.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Show and Tell (new ships/ ships in progress)

Post by mandoman »

Killer Wolf wrote:
hope this doesn't come across as pointless or patronising (not sure how you model) but if you're going to use the standard models, the best way (IMO) would be to do this :
- run the DAT2OBJ routine on the core's dock DAT so you can import it into your modeller
- import/merge your Andricothere and see how they align. the first, most obvious thing, that i'm thinking is that the dock will be the wrong way around : ie, for the Coriolis model the dock mouth needs to be at the front, whereas you'll need to turn it 180 so you can dock from the rear.
- w/ the two models in the modeller you'll be able to scale and move the ship to get them properly aligned.

if the ship size/design doesn't accomodate a normal dock you'll have to create one yourself. this is where it get's slightly annoying, as i've found that docks need to be created at the Origin and then shifted via your Subent placement code in Shipdata. so, you need to model the dock in the ship, save the ship and the dock as different models, then get your dock model and shift it to the Origin, and save it. then, in Shipdata, you'll be shifting it back to where it came from. yeah, it's a bit odd!
Patronising? Heck, I didn't even know that was possible. Thanks for the info, especially the "Dat2Obj routine", and how to make the dock. Man, you told me in no uncertain, confusing terms what I need to do. Very much appreciated. :D
Eric Walch wrote:
mandoman wrote:
I used those directly out of the core Oolite files, so if it's wrong......well, what can I say. :roll:
But what is the point in overwriting any internal shipdata from Oolites core? Some oxps do it to add new textures to core ships but such things are likely to get buggy if more than one oxp tries to overwrite core ships, as only the definition from the last used one is used. Better to only overwrite any core shipdata if strictly needed and I see no need for it in your oxp.
When you want custom docks and turrets, please give it a unique name like "mandoman_dock" or "mandoman_turret" and use a like_ship reference to the internal ones.
I didn't know that, Eric. Thanks. There isn't any point in duplicating anything from core files, if it isn't necessary. Thanks. :)
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Show and Tell (new ships/ ships in progress)

Post by mandoman »

Smivs wrote:
mandoman wrote:
Ah, sorry, yes I see what you're saying. I was halfway to bed when I answered you and was tired and clearly wasn't paying enough attention. It didn't help that the code quoted had no indents - at first glance it looked like one shipdata entry, not three and that's what lead me astray. I'll make sure I'm awake next time I try to help :wink:
No worries. I wasn't exactly wide awake when I made my post either. :)
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: Show and Tell (new ships/ ships in progress)

Post by Thargoid »

Also don't forget that any OXP can access and reference any file (texture, model, script etc) that's in any installed and active OXP (plus those in trunk itself), not just the ones in its particular set of sub-folders. But also if there are two files with the same name, one will overwrite the other as a result of this as far as the game is concerned as Eric noted.

Also one small request - if you are posting script or file excerpts here, can you surround the piece in code tags please?

Code: Select all

[code]Paste your code here
[/code]

It makes things a damn sight easier to read for debugging etc.[/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: Show and Tell (new ships/ ships in progress)

Post by mandoman »

Thargoid wrote:
Also don't forget that any OXP can access and reference any file (texture, model, script etc) that's in any installed and active OXP (plus those in trunk itself), not just the ones in its particular set of sub-folders. But also if there are two files with the same name, one will overwrite the other as a result of this as far as the game is concerned as Eric noted.

Also one small request - if you are posting script or file excerpts here, can you surround the piece in code tags please?

Code: Select all

[code]Paste your code here
[/code]

It makes things a damn sight easier to read for debugging etc.[/color]
Another thing I didn't know. SHOCKING!!! Absolutely I will comply to your instructions. Sorry for the confusion. :)
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Show and Tell (new ships/ ships in progress)

Post by mandoman »

Ok, I now have a dock, created in Blender using the core dock-flat.dat/dock-flat.obj, sized down to fit directly into the Andricothere dock location. Now, Is there anything I need to do other than list in in shipdata.plist, define the coordinates in "subentities", put the Andricothere-dock.dat into the Models folder, and the texture.png into the Texture folder? :?:
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2278
Joined: Tue Jan 02, 2007 12:38 pm

Re: Show and Tell (new ships/ ships in progress)

Post by Killer Wolf »

the dock will have to be a separate dat model of course, give it its own name and role liek "mandormans-dock" or the like then you can do a texture for it yourself later on.

re scaling it down : be careful how much you've reduced it, or some ships may be too big to fit in.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Show and Tell (new ships/ ships in progress)

Post by mandoman »

Killer Wolf wrote:
the dock will have to be a separate dat model of course, give it its own name and role liek "mandormans-dock" or the like then you can do a texture for it yourself later on.

re scaling it down : be careful how much you've reduced it, or some ships may be too big to fit in.
I've already done that. The only ships that need to fit in are the SunBat escorts, and any transport tugs. I just named it "Andricotherdock.dat". Doesn't look any different in the game, though. I'm working on the AIs at the moment, so maybe they will cause some action that should help see if it is all coming together. I thought I would attack the Andricothere to set it all off. We'll see, as my scripting stinks most of the time. Still working on it. :)
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: Show and Tell (new ships/ ships in progress)

Post by RyanHoots »

Image

I was bored of fixing the Krait Player, so I needed to vent my creativity some other way. It's called the Massasauga, and a Test Pilot has been notified. I still need to fix the forward laser, and maybe texture a player version. It's a police ship.

http://oolite.ryanhoots.com/koneko-indu ... massasauga
Image
User avatar
Cmdr. Maegil
Sword-toting nut-job
Sword-toting nut-job
Posts: 1294
Joined: Tue Feb 27, 2007 10:28 pm
Location: On the mend in Western Africa

Re: Show and Tell (new ships/ ships in progress)

Post by Cmdr. Maegil »

RyanHoots wrote:
It's a police ship.
It does look like one... in fact, it looks quite a lot like the Viper.
You know those who, having been mugged and stabbed, fired, dog run over, house burned down, wife eloped with best friend, daughters becoming prostitutes and their countries invaded - still say that "all is well"?
I'm obviously not one of them.
Post Reply