Page 6 of 22

Re: New ships under developemnt

Posted: Wed May 23, 2012 10:05 pm
by Cody
I give up! Those hex(?) numbers make no sense to me, as they seem to imply that a cargo pod has a greater volume than a Cobra III?

Re: New ships under developemnt

Posted: Wed May 23, 2012 11:31 pm
by SandJ
cim wrote:
... A Cobra III has a bounding box volume of 2.5E5 cubic metres. A Coriolis has an internal volume of over 8.3E8 cubic metres, so you could fit well over a thousand Cobra IIIs inside the Coriolis ... A cargo pod has a bounding box volume of 3.6E2 cubic metres ...
El Viejo wrote:
Those hex(?) numbers make no sense to me
2.5E5 = 2.5 * 10^5 = 250,000
8.3E8 = 8.3 * 10^8 = 830,000,000
3.6E2 = 3.6 * 10^2 = 360

The 'E' stands for 'exponent'. The format may be familiar from spreadsheets which automatically switch to that format for large numbers.

Re: New ships under developemnt

Posted: Wed May 23, 2012 11:39 pm
by Cody
SandJ wrote:
The format may be familiar from spreadsheets
The format may well be familiar to some (it probably would've been to me fifteen to twenty years ago, but now it makes little sense).
If I have to reach for a calculator to fully understand a post, you may as well post in Dutch and I'll reach for a translator.
However, thanks for the explanation, S&J!

Re: New ships under developemnt

Posted: Thu May 24, 2012 8:27 am
by Eric Walch
El Viejo wrote:
Smivs wrote:
There is no 'standard' template as such for readmes.
On the subject of readmes: is there any reason why .rtf shouldn't be used for a readme instead of .txt? Many OXP authors do use .rtf, but not all.
Rich Text Format is far more readable than .txt, which is a pain and doesn't encourage the reading of anything!
I only remember one Linux user complaining about rtf files as he did not have a rtf reader. Others linux users said they were good available. I think rtf is so universal that you should install a reader for it if you don't have it. It is a format used already by the oldest MS word versions and I use it already over 25 years without problems.
From the Mac side I know it is implemented in the default text reader since OSX 10. Before you needed 3th party programs to read it.

I would say: only use rtf for readMes. :D

Re: New ships under developemnt

Posted: Thu May 24, 2012 12:28 pm
by Shipbuilder
Is it possible to design a ship then have, depending on say the role, a different texture for each role type ?

For example design a ship which when used by pirates could have a skull and crossbones or similar themed texture while the same ship used by the police could have another texture altogether.

Re: New ships under developemnt

Posted: Thu May 24, 2012 1:05 pm
by cim
Shipbuilder wrote:
Is it possible to design a ship then have, depending on say the role, a different texture for each role type ?

For example design a ship which when used by pirates could have a skull and crossbones or similar themed texture while the same ship used by the police could have another texture altogether.
Yes. Define the ship for say, the pirate role:

Code: Select all

"my_ship" = {
  ...
  roles="pirate";
  model="my_ship.dat";
  materials = {..."pirate_texture.png"...};
  ...
}
Then define the police role using like_ship

Code: Select all

"my_police_ship" = {
  like_ship="my_ship";
  roles="police";
  materials = {..."police_texture.png"...};
}
When you use like_ship, any parameters not specified in the ship definition will be taken from the base ship definition - so here we override roles and materials, but leave the rest the same - in practice you might want to change a little more than that.

Re: New ships under developemnt

Posted: Thu May 24, 2012 1:36 pm
by Smivs
Shipbuilder wrote:
Is it possible to design a ship then have, depending on say the role, a different texture for each role type ?
Yes, easily done.
For a comprehensive example take a look at my Smivs'Shipset (the Adder is probably as good a one to look at as any), or for a simple one, the Contractor has a seperate 'pirate' skin.

Re: New ships under developemnt

Posted: Thu May 24, 2012 3:15 pm
by CommonSenseOTB
cim wrote:
Shipbuilder wrote:
Is it possible to design a ship then have, depending on say the role, a different texture for each role type ?

For example design a ship which when used by pirates could have a skull and crossbones or similar themed texture while the same ship used by the police could have another texture altogether.
Yes. Define the ship for say, the pirate role:

Code: Select all

"my_ship" = {
  ...
  roles="pirate";
  model="my_ship.dat";
  materials = {..."pirate_texture.png"...};
  ...
}
Then define the police role using like_ship

Code: Select all

"my_police_ship" = {
  like_ship="my_ship";
  roles="police";
  materials = {..."police_texture.png"...};
}
When you use like_ship, any parameters not specified in the ship definition will be taken from the base ship definition - so here we override roles and materials, but leave the rest the same - in practice you might want to change a little more than that.
And if you do this...

Code: Select all

"my_player_ship" = {
  like_ship="my_ship";
  roles="player";
  materials = {..."player_texture.png"...};
}
then be sure to correctly match the facings in the shipyard.plist with any weapons defined on the shipdata.plist in order to prevent unchangeable weapons on your player ship. :)

Re: New ships under developemnt

Posted: Thu May 24, 2012 4:00 pm
by Thargoid
Or alternatively you can do it by scripting, so on spawning/launch the ship skin gets set on the fly. Both materials and shaders are fully visible to script (hence you can have the ships skin change, for example as the ship becomes damaged - see my Swarm thargoid warship for example).

Re: New ships under developemnt

Posted: Thu May 24, 2012 4:29 pm
by Smivs
Thargoid wrote:
Or alternatively you can do it by scripting, so on spawning/launch the ship skin gets set on the fly. Both materials and shaders are fully visible to script (hence you can have the ships skin change, for example as the ship becomes damaged - see my Swarm thargoid warship for example).
Smivs wrote:
Yes, easily done.
For a comprehensive example take a look at my Smivs'Shipset (the Adder is probably as good a one to look at as any)...
I suggested the Adder in my shipset as a nice straightforward example of applying different textures to variants (using 'like_ship') of the same ship, but as Thargoid mentioned there are clever things you can do with scripting as well. Most of the ships in my shipset use this to change to 'damaged' textures 'on the fly' when the ship's shields are down, and so you will also find many examples of how this works there as well. Note that to get the switching of textures working properly (with and/or without emission maps) you will need to seperate the ships though...each variant will need its own model with the correct texture for that variant specified in the .dat file.

Re: New ships under developemnt

Posted: Thu May 24, 2012 9:40 pm
by Shipbuilder
Thanks guys I'll give the different texturing thing a go probably over the weekend.

Re: New ships under developemnt

Posted: Fri May 25, 2012 5:15 pm
by Shipbuilder
Hi Everyone.

I would like to specify an npc ship which will be equipped with ECM hardened missiles. Can anyone advise if the code below in XML format is correct ?

Code: Select all

		<key>missile_roles</key>
		<string>EQ_ECM_HARDENED</string>
Is their somewhere that lists the different missile types ?

Re: New ships under developemnt

Posted: Fri May 25, 2012 5:22 pm
by cim
Close.

Code: Select all

<key>missile_role</key>
		<string>EQ_HARDENED_MISSILE</string>
The missile roles can be found in Oolite's standard equipment.plist file, and also in the shipdata.plist file.

Re: New ships under developemnt

Posted: Fri May 25, 2012 5:24 pm
by Smivs
It's "EQ_HARDENED_MISSILE"

Aaaargh! Ninja'd :roll:

PS please consider moving to OpenStep :wink:

Re: New ships under developemnt

Posted: Fri May 25, 2012 5:48 pm
by Shipbuilder
Smivs wrote:
It's "EQ_HARDENED_MISSILE"

Aaaargh! Ninja'd :roll:

PS please consider moving to OpenStep :wink:
Oops bit of a typo with the ECM reference in the code however I intended to put EQ_HARDENED so good job I asked anyway !

I do intend changing to OpenStep but have a few ships that I have already produced using XML script which I am tweaking and I wasn't too keen on rewriting them. That said future oxp ships, (other than the ones at the start of this thread) will be based on OpenStep.

One thing that I was going to do for my own purposes, in order to get my head around OpenStep, was to produce template shipdata and shipyard scripts that I would use as a starting point for future ship oxps. The idea being that I can read through the template and delete what I don’t want and alter what is left to suit (It will also act as a check list and hopefully once ready and correct should help avoid a good number of errors).

If deemed useful I would be happy to post on the forum somewhere when ready (It could also be useful for someone just starting with limited experience).

What does everyone think ?

Oh and thanks for your help with the scripting query.