Creating a customised instance of an existing ship...

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

Moderators: winston, another_commander

Post Reply
User avatar
drew
---- E L I T E ----
---- E L I T E ----
Posts: 2190
Joined: Fri May 19, 2006 9:29 am
Location: In front of a laptop writing a book.
Contact:

Creating a customised instance of an existing ship...

Post by drew »

The 'Captain Hesperus OXP' thread got me thinking.

I want to create a specific instance of an existing ship (say "Shuttle : Tianvian Trade Delegation"), and give it a slightly different texture than the generic shuttle.

Questions:

1. Do I copy the original .DAT model, config etc to my OXP for that model and then rename/modify it? Give it a unique role etc?
2. I assume I call it into existance with planetinfo.plist as per normal
3. How do I make sure it is NPC only?

Cheers,

Drew.
Drew is an author of SF and Fantasy Novels
WebsiteFacebookTwitter
User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Post by Ramirez »

It's fairly simple:

1. The texture information for each model is stored in the dat file, so yes you'll need copy it into your OXP config folder, do a find and replace on the texture names and then rename the file.

2. To call the specific ship in-game, you'll need a new entry in shipdata and give it a unique role, 'tianve-shuttle' or something. You'll also want to change the display name as well. If most of the other details are the same as for the normal shuttle, you can use like_ship to pick up the rest of the info from the existing shuttle entry.

3. Ships are player-enabled by adding a player version in the shipdata (with role=player) and adding an entry into shipyard.plist so that it can be bought. Leaving out these steps makes the ship NPC-only, so in the case of a shuttle you shouldn't need to do anything more.
Download Resistance Commander plus many other exciting OXPs HERE
User avatar
drew
---- E L I T E ----
---- E L I T E ----
Posts: 2190
Joined: Fri May 19, 2006 9:29 am
Location: In front of a laptop writing a book.
Contact:

Post by drew »

Excellent! Many thanks,

Cheers,

Drew.
Drew is an author of SF and Fantasy Novels
WebsiteFacebookTwitter
User avatar
Gunney_Plym
Dangerous
Dangerous
Posts: 64
Joined: Wed Jun 25, 2008 12:22 pm
Location: Sol 3, mostly.

Post by Gunney_Plym »

Bugger, now you tell me :)

I've got several versions of ships in a work-in-progress. I'd been redoing them through Wings, Paint Shop Pro, Python on each and every one; just using the same Wings model as a start point.

Just goes to show that there's usually an easier way for most things.
Gunney.

"In space nobody cares if you scream"

Wiki Page : http://wiki.alioth.net/index.php/User:Gunney_Plym
User avatar
Gunney_Plym
Dangerous
Dangerous
Posts: 64
Joined: Wed Jun 25, 2008 12:22 pm
Location: Sol 3, mostly.

Post by Gunney_Plym »

PS.

I don't suppose that there is a way of defining a 'Master' ship in the ShipData.plist file, then using a 'like this one, but with these differences' :?:

You would then just fully define one vessel and then specify a different .dat (and through that the texture file) for the sister ships in the class.
Gunney.

"In space nobody cares if you scream"

Wiki Page : http://wiki.alioth.net/index.php/User:Gunney_Plym
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:

Post by Commander McLane »

Gunney_Plym wrote:
PS.

I don't suppose that there is a way of defining a 'Master' ship in the ShipData.plist file, then using a 'like this one, but with these differences' :?:
Of course there is. You just have to link to your 'master' with the like_ship-key, and then put only those keys into the new entry that are different from the 'master'.

Starting from 1.72 there will also be the possibility to create a shipdata-entry specifically as a template, which can then be modified in subsequent entries, without the intention of bringing the template as such into the game.

Tip: If you use like_ship, try not to create chains, like "ShipB is like ShipA, but faster; ShipC is like ShipB, but green, ShipD is like ShipC, but with a different exhaust". All modified entries should refer to ShipA only.
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 »

Commander McLane wrote:
Tip: If you use like_ship, try not to create chains, like "ShipB is like ShipA, but faster; ShipC is like ShipB, but green, ShipD is like ShipC, but with a different exhaust". All modified entries should refer to ShipA only.
Actually, this shouldn’t be a problem in the current code, and definitely isn’t a problem in 1.72.
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:

Post by Commander McLane »

Ahruman wrote:
Commander McLane wrote:
Tip: If you use like_ship, try not to create chains, like "ShipB is like ShipA, but faster; ShipC is like ShipB, but green, ShipD is like ShipC, but with a different exhaust". All modified entries should refer to ShipA only.
Actually, this shouldn’t be a problem in the current code, and definitely isn’t a problem in 1.72.
Oh, I somehow remembered you writing somewhere that cross-references are to be avoided. But probably I got you wrong there. And probably the problem really only starts with the next step, when you close the circle: "ShipA is like ShipD, but different". :wink:
User avatar
Gunney_Plym
Dangerous
Dangerous
Posts: 64
Joined: Wed Jun 25, 2008 12:22 pm
Location: Sol 3, mostly.

Post by Gunney_Plym »

:D :D :D :D

It's amazing what you can get if you ask.
Gunney.

"In space nobody cares if you scream"

Wiki Page : http://wiki.alioth.net/index.php/User:Gunney_Plym
User avatar
TGHC
---- E L I T E ----
---- E L I T E ----
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Post by TGHC »

I'd like a yacht.
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
User avatar
Gunney_Plym
Dangerous
Dangerous
Posts: 64
Joined: Wed Jun 25, 2008 12:22 pm
Location: Sol 3, mostly.

Post by Gunney_Plym »

TGHC wrote:
I'd like a yacht.
Ha, bloody, ha :roll:

PS. I just love these forums, alway friendly and more than likely to make me smile.
Gunney.

"In space nobody cares if you scream"

Wiki Page : http://wiki.alioth.net/index.php/User:Gunney_Plym
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:

Post by Commander McLane »

TGHC wrote:
I'd like a yacht.
I guess it depends more or less whom you ask. I your case I would suggest our old friend Maegil. :wink:

(Although--according to what he let us know about his yacht--at the end of the day you probably would not want it.) :shock: 8)
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 »

Commander McLane wrote:
Ahruman wrote:
Commander McLane wrote:
Tip: If you use like_ship, try not to create chains, like "ShipB is like ShipA, but faster; ShipC is like ShipB, but green, ShipD is like ShipC, but with a different exhaust". All modified entries should refer to ShipA only.
Actually, this shouldn’t be a problem in the current code, and definitely isn’t a problem in 1.72.
Oh, I somehow remembered you writing somewhere that cross-references are to be avoided. But probably I got you wrong there. And probably the problem really only starts with the next step, when you close the circle: "ShipA is like ShipD, but different". :wink:
Loops can indeed break some versions, although I think 1.7x versions will fail gracefully. Also, until 1.72 long chains are inefficient since they’re resolved on the fly. They are supposed to work, though, and 1.72 will do all the work at rebuilding-the-cache time.
User avatar
drew
---- E L I T E ----
---- E L I T E ----
Posts: 2190
Joined: Fri May 19, 2006 9:29 am
Location: In front of a laptop writing a book.
Contact:

Post by drew »

Gunney_Plym wrote:
TGHC wrote:
I'd like a yacht.
Ha, bloody, ha :roll:

PS. I just love these forums, alway friendly and more than likely to make me smile.
I always love that it's my posts that get hijacked! :roll: :lol:

Cheers,

Drew.
Drew is an author of SF and Fantasy Novels
WebsiteFacebookTwitter
User avatar
Gunney_Plym
Dangerous
Dangerous
Posts: 64
Joined: Wed Jun 25, 2008 12:22 pm
Location: Sol 3, mostly.

Post by Gunney_Plym »

Hijacked is such an emotive term, I only borrowed a small corner of it :D
Gunney.

"In space nobody cares if you scream"

Wiki Page : http://wiki.alioth.net/index.php/User:Gunney_Plym
Post Reply