Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Griff ships with player-defined decals

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

Moderators: winston, another_commander

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: Griff ships with player-defined decals

Post by Commander McLane »

El Viejo wrote:
Let me know if you figure out how to manipulate those co-ords, please.
I have a specific view in mind, but can't get my old brain round them.
The position is simply xyz-coordinates from the origin of your ship. x = right-left; y = up-down; z = front-aft.

The orientation is a quaternion which specifies the direction of the view.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16079
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Griff ships with player-defined decals

Post by Cody »

I love the way you say 'simply' McLane... at my age, only falling over is simple.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
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: Griff ships with player-defined decals

Post by Commander McLane »

El Viejo wrote:
I love the way you say 'simply' McLane... at my age, only falling over is simple.
You note that I left the moniker out in the quaternions part. :wink:
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Re: Griff ships with player-defined decals

Post by Griff »

oops, the gun wasn't supposed to be destroyable, i'm glad El Viejo remembered the fix because i'd completely forgotten it, the same bug was in the player flyable companion oxp i uploaded the other day, and probably explains why the gun on the mamba wasn't showing up, i've updated that oxp and the cobraIII multidecal to add in the frangible=false line, the multidecal cobraIII has also had it's engine glowmap updated to take out the orangey glow
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Griff ships with player-defined decals

Post by JensAyton »

Commander McLane wrote:
Is it possible in Oolite 1.75 to make only some subentities frangible?
No.
Commander McLane wrote:
Or will it be possible in the future?
Probably.
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: Griff ships with player-defined decals

Post by Eric Walch »

Commander McLane wrote:
El Viejo wrote:
I love the way you say 'simply' McLane... at my age, only falling over is simple.
You note that I left the moniker out in the quaternions part. :wink:
And even that is simple when using the console to do the calculations for you. Just type:

Code: Select all

Vector3D(x, y, z).direction().multiply(-1).rotationTo(Vector3D(0,0,1))
x, y, z are the 3 coordinates you used in the position. This will give a quaternion pointing to the centre of the ship. When you don't want to look to the centre but to a specific other point you need:

Code: Select all

Vector3D(x2, y2, z2).subtract(Vector3D(x1, y1, z1)).direction().rotationTo(Vector3D(0,0,1))
Point 1 is were you looking from and point 2 is were you looking at. This resulting vector must be transformed to a unit vector with the direction() method

No need to understand the math in it, just type it in the console and use the result you get. :D

(It could be that rotationTo() has a bug. At least something this function relied on had a bug that is fixed in the current nighties)
Last edited by Eric Walch on Sun Feb 27, 2011 1:38 pm, edited 1 time in total.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16079
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Griff ships with player-defined decals

Post by Cody »

Thanks Eric... I'm tempted to ask what console, as I've never used it, but that would be a bit flippant.
I will try and get my old brain round this stuff... one fine day.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
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: Griff ships with player-defined decals

Post by Commander McLane »

Eric Walch wrote:

Code: Select all

Vector3D(x2, y2, z2).subtract(Vector3D(x1, y1, z1)).direction().rotationTo(Vector3D(0,0,1))
Point 1 is were you looking from and point 2 is were you looking at. This resulting vector must be transformed to a unit vector with the direction() method

No need to understand the math in it, just type it in the console and use the result you get. :D
Now that's what I call convenience. :D
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: Griff ships with player-defined decals

Post by Eric Walch »

Commander McLane wrote:
Now that's what I call convenience. :D
The only dis-convenience could be that one parameter is missing. You look in the right direction, but you might look at it upside down :wink:
That means you still have to experiment a bit with it. Take the rotate command and rotate it as much around the vectorForward() of the found orientation, till it feels alright.

I must say I discovered that command only yesterday and used it today for view points for the first time. And now I hit the bug in 1.75.0 myself: I got back [1,0,0,0] as result. It is the same bug that sends the thargoid lasers sometimes in the wrong direction as reported by you yesterday. Both bugs are already fixed in the current nighty.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16079
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Griff ships with player-defined decals

Post by Cody »

At last, after being grounded for over a month, I’ve had a chance to fly your latest scuffed multi-decal Cobra III, Griff.
The fore gun subent doesn’t glow red when the laser overheats, as it did previously.

Line 150 of its shipdata.plist should read:

Code: Select all

"griff_cobra_mk3_scuffed_front_gun_diffuse_spec.png" =
not:

Code: Select all

"griff_cobra_mk3_scuffed_mainhull_diffuse_spec.png" =
(I think… it seems to fix it anyway).

Otherwise, it’s really great… Rolling Thunder looks terrific with the new ‘scuffed’ paintjob... thanks Griff.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Gimi
---- E L I T E ----
---- E L I T E ----
Posts: 2073
Joined: Tue Aug 29, 2006 5:02 pm
Location: Norway

Re: Griff ships with player-defined decals

Post by Gimi »

El Viejo wrote:
At last, after being grounded for over a month, I’ve had a chance to fly your latest scuffed multi-decal Cobra III, Griff.
The fore gun subent doesn’t glow red when the laser overheats, as it did previously.
Line 150 of its shipdata.plist should read:

Code: Select all

"griff_cobra_mk3_scuffed_front_gun_diffuse_spec.png" =
not:

Code: Select all

"griff_cobra_mk3_scuffed_mainhull_diffuse_spec.png" =
(I think… it seems to fix it anyway).
Otherwise, it’s really great… Rolling Thunder looks terrific with the new ‘scuffed’ paintjob... thanks Griff.
I think the same error is present in the normal cobra. Do you have the solution to that one as well
Edit: Hmm, just checked, and it looks ok, but I seem to remember it not working. Need to check again.
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Re: Griff ships with player-defined decals

Post by Griff »

El Viejo wrote:
Line 150 of its shipdata.plist should read:

Code: Select all

"griff_cobra_mk3_scuffed_front_gun_diffuse_spec.png" =
not:

Code: Select all

"griff_cobra_mk3_scuffed_mainhull_diffuse_spec.png" =
(I think… it seems to fix it anyway).
It's highly likely that i've made some sort of Copy & Paste error when i was putting together the oxp, i'll have a check this evening and get it updated, BTW, El Viejo did you have a look at the CobraIII with missiles OXP that Thargoid worked on? pretty cool stuff!
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16079
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Griff ships with player-defined decals

Post by Cody »

I've installed that OXP Griff, but haven't spotted one yet.

Could some kind soul remind me which bit of code I have to change in Oolite core, in order to have a spinning Griff Cobra at start-up.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Re: Griff ships with player-defined decals

Post by Griff »

El Viejo wrote:
I've installed that OXP Griff, but haven't spotted one yet.
I forgot they might be rare, i kept spawning them in groups of 6 outside the station when i was testing the oxp.

Have a look here re: spinning cobraIII at startup
https://bb.oolite.space/viewtopic.ph ... 44#p133744
you might need to ammend the like_ship reference though if you're using the scuffed cobra or the multidecal one
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16079
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Griff ships with player-defined decals

Post by Cody »

Thanks Griff... I missed that post while I was off-line recently.

I just named that code snippet 'shipdata.plist' and dropped it into the Config folder in my AddOns folder... perfect.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
Post Reply