Of frangible bits and space semis...

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

Moderators: winston, another_commander

Post Reply
Paradox
---- E L I T E ----
---- E L I T E ----
Posts: 607
Joined: Wed Feb 20, 2013 1:24 am
Location: Aboard the D.T.T Snake Charmer: My Xanadu
Contact:

Of frangible bits and space semis...

Post by Paradox »

("Semis" really doesn't look right...)
Anyways, in case you don't read the The Honourable Guild of Test Pilots thread, I am working on this..., and while making some adjustments as per feedback, I started to wonder about frangibility. The problem, is that while the aft laser model is part of the rear trailer mesh, when I tried to define the rear laser in the shipdata.plist, as part of the trailer2s subentity, it didn't work. The laser was originating from farther down. I had to cut and paste the entry back to the main part of the .plist, for it to work correctly. But now, I am wondering if there is a way to make the trailers frangible so that if the rear trailer is lost, the aft laser is lost as well...?

I am also wondering now, if I could make just a cab and single trailer, that, if once you bought it, you could then buy additional trailers to add to it which would also increase the cargo limit (like 50 TC per trailer). So, you buy a base model Heavy Metal with cab and single trailer, then the ship yard could offer a second trailer. If you buy that, then it would add the second trailer sub-entity and the same for buying a third trailer etc... ? Then there is the question of getting that aft laser mounted on the last purchased trailer... ouch, ouch, brain hurts...

Basically, can this be done with the shipdata/shipyard.plist? If so, jut show me and I can do that part... I think. Or is there gonna be scripting/coding involved? If so, Is there anyone willing to help with that part... please!?
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Of frangible bits and space semis...

Post by Thargoid »

For the single trailer model, you'd need scripting on the trailer sub-ent to remove the players aft laser if the sub-ent is destroyed. That can be done reasonably easily if that's the route you want to take.

As to the positioning of the rear laser on the sub-ent - the first thing to check is that you have the sub-ent centred correctly (the model) so that there's not an offset getting introduced somewhere along the line which is moving things downwards.

The other bits you're talking about (adding new trailers) aren't easily possible, at least without buying a complete new ship. You can buy an extended cargo bay for most ships which increase your cargo capacity, but it's a one-off and won't add additional sub-ents. The only way you could conceivably do it is basically to have a maximal ship (ie the truck plus the maximum number of trailers you'll allow) and then use script to remove/swap around/reposition the sub-ents to form whichever ship design you want at that time (one, two, three etc trailers). You'd then "buy" additional trailers to basically unlock them, with the purchase just letting the script know how to set up the ship on launch etc. The problem there is of course if you have multiple trailers in-flight and the middle one got shot out, then what happens to the ones behind it?

It'd be a complex script, but one that could be done (although not by me, as I'm busy this week and on holiday next week - but if you can wait a bit I'll see what I can do to assist).
Paradox
---- E L I T E ----
---- E L I T E ----
Posts: 607
Joined: Wed Feb 20, 2013 1:24 am
Location: Aboard the D.T.T Snake Charmer: My Xanadu
Contact:

Re: Of frangible bits and space semis...

Post by Paradox »

Thargoid wrote:
For the single trailer model, you'd need scripting on the trailer sub-ent to remove the players aft laser if the sub-ent is destroyed. That can be done reasonably easily if that's the route you want to take.

As to the positioning of the rear laser on the sub-ent - the first thing to check is that you have the sub-ent centred correctly (the model) so that there's not an offset getting introduced somewhere along the line which is moving things downwards.
So you're saying that I should be able to assign the aft laser as a subent, there's no special tricks to it... Hmm. okay, I will go back and look at that again. As you can see in the pictures, The mesh is showing up in the correct place on top of the last trailer, And I know the coordinates were right, because all I did was cut and paste them back into the main body of the shipdata.plist to get it to work correctly... But I will go play with it some more.
Thargoid wrote:
The other bits you're talking about (adding new trailers) aren't easily possible, at least without buying a complete new ship. You can buy an extended cargo bay for most ships which increase your cargo capacity, but it's a one-off and won't add additional sub-ents. The only way you could conceivably do it is basically to have a maximal ship (ie the truck plus the maximum number of trailers you'll allow) and then use script to remove/swap around/reposition the sub-ents to form whichever ship design you want at that time (one, two, three etc trailers). You'd then "buy" additional trailers to basically unlock them, with the purchase just letting the script know how to set up the ship on launch etc.
Yup, I was afraid of that... lots of icky scripting and nasty wild syntax... (I just hates syntax(s)) It will simply be a lot easier to offer 2-3 separate versions.
Thargoid wrote:
The problem there is of course if you have multiple trailers in-flight and the middle one got shot out, then what happens to the ones behind it?
Well, to be honest, I hadn't even thought off that... :oops: In a perfect world, I guess it would be swapped with another model of the trailer and then swap the AI with the same one the asteroids use, so that it just floats off in space. But again, I simply don't have the interest to learn all the coding/scripting etc...
Thargoid wrote:
It'd be a complex script, but one that could be done (although not by me, as I'm busy this week and on holiday next week - but if you can wait a bit I'll see what I can do to assist).
Thanks for the offer Thargoid, but this is getting far more complicated now than I was hoping for. I will simply make multiple version of the truck/ship, and though shooting off trailers would have been fun, it's not worth the hassle for me. I already have 4 more ships in the works! };] Thanks again or the answer/info!
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Of frangible bits and space semis...

Post by Thargoid »

To get some idea of what's possible have a look at my Stellar Serpents OXP. It's in a similar vein to what you want in terms of follow the leader entities although there the body segments and tail are individual entities rather than sub entities. That works for NPCs but wouldn't for the player ship. But it may give you some idea and the sub ent route is viable for NPCs.
Post Reply