Page 1 of 1

Creating a customised instance of an existing ship...

Posted: Wed Oct 22, 2008 2:03 pm
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.

Posted: Fri Oct 24, 2008 10:42 am
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.

Posted: Sun Oct 26, 2008 8:15 am
by drew
Excellent! Many thanks,

Cheers,

Drew.

Posted: Tue Oct 28, 2008 12:57 pm
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.

Posted: Tue Oct 28, 2008 1:01 pm
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.

Posted: Tue Oct 28, 2008 1:17 pm
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.

Posted: Tue Oct 28, 2008 4:22 pm
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.

Posted: Wed Oct 29, 2008 7:25 am
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:

Posted: Wed Oct 29, 2008 10:25 am
by Gunney_Plym
:D :D :D :D

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

Posted: Wed Oct 29, 2008 10:37 am
by TGHC
I'd like a yacht.

Posted: Wed Oct 29, 2008 10:42 am
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.

Posted: Wed Oct 29, 2008 11:24 am
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)

Posted: Wed Oct 29, 2008 4:10 pm
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.

Posted: Wed Oct 29, 2008 4:13 pm
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.

Posted: Wed Oct 29, 2008 9:48 pm
by Gunney_Plym
Hijacked is such an emotive term, I only borrowed a small corner of it :D