Page 31 of 52
Re: Show and Tell (new ships/ ships in progress)
Posted: Tue Nov 22, 2011 11:32 pm
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.
Re: Show and Tell (new ships/ ships in progress)
Posted: Tue Nov 22, 2011 11:38 pm
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
Re: Show and Tell (new ships/ ships in progress)
Posted: Wed Nov 23, 2011 2:46 am
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?
Re: Show and Tell (new ships/ ships in progress)
Posted: Wed Nov 23, 2011 8:12 am
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!
Re: Show and Tell (new ships/ ships in progress)
Posted: Wed Nov 23, 2011 9:21 am
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
Re: Show and Tell (new ships/ ships in progress)
Posted: Wed Nov 23, 2011 10:48 am
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.
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.
Re: Show and Tell (new ships/ ships in progress)
Posted: Wed Nov 23, 2011 6:19 pm
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.
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.
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.
Re: Show and Tell (new ships/ ships in progress)
Posted: Wed Nov 23, 2011 6:22 pm
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
No worries. I wasn't exactly wide awake when I made my post either.
Re: Show and Tell (new ships/ ships in progress)
Posted: Wed Nov 23, 2011 7:12 pm
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]
It makes things a damn sight easier to read for debugging etc.[/color]
Re: Show and Tell (new ships/ ships in progress)
Posted: Thu Nov 24, 2011 12:46 am
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]
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.
Re: Show and Tell (new ships/ ships in progress)
Posted: Thu Nov 24, 2011 1:30 am
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?
Re: Show and Tell (new ships/ ships in progress)
Posted: Thu Nov 24, 2011 7:48 am
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.
Re: Show and Tell (new ships/ ships in progress)
Posted: Thu Nov 24, 2011 8:00 am
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.
Re: Show and Tell (new ships/ ships in progress)
Posted: Sun Nov 27, 2011 10:16 pm
by RyanHoots
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
Re: Show and Tell (new ships/ ships in progress)
Posted: Sun Nov 27, 2011 10:45 pm
by Cmdr. Maegil
It does look like one... in fact, it looks quite a lot like the Viper.