Creating a customised instance of an existing ship...
Moderators: winston, another_commander
- drew
- ---- 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...
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.
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.
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.
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
- Gunney_Plym
- Dangerous
- Posts: 64
- Joined: Wed Jun 25, 2008 12:22 pm
- Location: Sol 3, mostly.
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.
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
"In space nobody cares if you scream"
Wiki Page : http://wiki.alioth.net/index.php/User:Gunney_Plym
- Gunney_Plym
- Dangerous
- Posts: 64
- Joined: Wed Jun 25, 2008 12:22 pm
- Location: Sol 3, mostly.
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.
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
"In space nobody cares if you scream"
Wiki Page : http://wiki.alioth.net/index.php/User:Gunney_Plym
- Commander McLane
- ---- 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:
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'.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'
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.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Actually, this shouldn’t be a problem in the current code, and definitely isn’t a problem in 1.72.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.
E-mail: [email protected]
- Commander McLane
- ---- 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:
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".Ahruman wrote:Actually, this shouldn’t be a problem in the current code, and definitely isn’t a problem in 1.72.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.
- Gunney_Plym
- Dangerous
- Posts: 64
- Joined: Wed Jun 25, 2008 12:22 pm
- Location: Sol 3, mostly.
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
"In space nobody cares if you scream"
Wiki Page : http://wiki.alioth.net/index.php/User:Gunney_Plym
- Gunney_Plym
- Dangerous
- Posts: 64
- Joined: Wed Jun 25, 2008 12:22 pm
- Location: Sol 3, mostly.
Ha, bloody, haTGHC wrote:I'd like a yacht.
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
"In space nobody cares if you scream"
Wiki Page : http://wiki.alioth.net/index.php/User:Gunney_Plym
- Commander McLane
- ---- 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:
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
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.Commander McLane wrote: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".Ahruman wrote:Actually, this shouldn’t be a problem in the current code, and definitely isn’t a problem in 1.72.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.
E-mail: [email protected]
- Gunney_Plym
- Dangerous
- Posts: 64
- Joined: Wed Jun 25, 2008 12:22 pm
- Location: Sol 3, mostly.
Hijacked is such an emotive term, I only borrowed a small corner of it
Gunney.
"In space nobody cares if you scream"
Wiki Page : http://wiki.alioth.net/index.php/User:Gunney_Plym
"In space nobody cares if you scream"
Wiki Page : http://wiki.alioth.net/index.php/User:Gunney_Plym