I was thinking about sub-entities on ships in oolite, and I thought I had heard a while back on the forum that they can be set to be indestructable (where they are part of the ship and can't be destroyed) or set to frangible (where they have a certain amount of energy and are destroyed when that is drained without damaging the ship). Checking the wiki seems to confirm that information is true, which leads me to wonder why there isn't a third option.
Is there a reason why we can't have frangible subents that are connected to the ship's energy/health? What I am thinking of is that you could place subents that blow off if the ship (bonus points if they have to be physically hit by the laser) when the ship has dropped below a certain energy level and that transfer any damage received to main ship. Currently if you have subents they either can't be destroyed or are damaged independently of the ship. If this third option were available, then you could add subents that blow off reflecting the state of the ship.
So if I was flying a hypothetical Griff refitted Cobra Rapier (One of my favorite shipset authors, and one of my favorite ships) with hull paneling subents, it would develop hull gaps and laser scarring as I took hull damage, rather than it is currently; where the subent's would only be destroyed with the ship, or where they would blow off without damaging the ship and independently of any actual damage to the main ship itself. The last option could cause problems as adding subents effectively gives the ship armor, which could be good for a boss or special npc ship, but problematic if you are balancing a player ship.
It seems like an obvious option. However, I haven't heard it suggested, so I am wondering if there are reasons why it can't be done, before I put something in a suggestions topic? Is it too complicated? Are oxpers uninterested?
Sub-entities
Moderators: winston, another_commander
- Commander Wilmot
- Deadly
- Posts: 206
- Joined: Thu Mar 17, 2011 10:12 pm
- Location: Somewhere in galaxy 1, flying my Diamondback
Re: Sub-entities
It can be done - with current features, at that - using scripting. I've not seen it done yet, but it sounds an interesting idea. (There is Smivs' shipset for retexturing on damage, which is a similar effect with a different approach)Commander Wilmot wrote:It seems like an obvious option. However, I haven't heard it suggested, so I am wondering if there are reasons why it can't be done, before I put something in a suggestions topic? Is it too complicated? Are oxpers uninterested?
You can call
ship.subEntities[0].remove()
or ship.subEntities[0].explode()
even on non-frangible ships, when requested by an appropriate script trigger, and they do about what you'd expect. Alternatively, you can put a script on a frangible subentity so that when it takes damage, it checks the health of the main ship, and if that's still good, moves the damage to the main ship rather than taking the damage itself.Since missing subents triggers a maintenance overhaul request for player ships, and that's quite expensive, there is some balancing in there already.Commander Wilmot wrote:The last option could cause problems as adding subents effectively gives the ship armor, which could be good for a boss or special npc ship, but problematic if you are balancing a player ship.
- Commander Wilmot
- Deadly
- Posts: 206
- Joined: Thu Mar 17, 2011 10:12 pm
- Location: Somewhere in galaxy 1, flying my Diamondback
Re: Sub-entities
Ok, thanks. I thought that it might be possible with scripting, but I don't code so I didn't know for sure; and I was also wondering if scripting it would be less efficient than having it done in the game engine even if theoretically possible. As for triggering maintenance overhaul requests, I realize that was done for turreted ships so pilots could get them repaired faster than waiting until the ship needs an overhaul, but does it affect the ship's maintenance rating or whatever it is called? Because it might be irritating to a player to have to repair cosmetic damage unless they want to misjump often.cim wrote:It can be done - with current features, at that - using scripting. I've not seen it done yet, but it sounds an interesting idea. (There is Smivs' shipset for retexturing on damage, which is a similar effect with a different approach)
You can callship.subEntities[0].remove()
orship.subEntities[0].explode()
even on non-frangible ships, when requested by an appropriate script trigger, and they do about what you'd expect. Alternatively, you can put a script on a frangible subentity so that when it takes damage, it checks the health of the main ship, and if that's still good, moves the damage to the main ship rather than taking the damage itself.
Since missing subents triggers a maintenance overhaul request for player ships, and that's quite expensive, there is some balancing in there already.
Re: Sub-entities
Yes, but not by enough that's likely to matter in most circumstances - at least, not for anything simple enough that we'd generally consider putting a hard-coded option into the game engine for it.Commander Wilmot wrote:I was also wondering if scripting it would be less efficient than having it done in the game engine even if theoretically possible.
Commander Wilmot wrote:As for triggering maintenance overhaul requests, I realize that was done for turreted ships so pilots could get them repaired faster than waiting until the ship needs an overhaul, but does it affect the ship's maintenance rating or whatever it is called? Because it might be irritating to a player to have to repair cosmetic damage unless they want to misjump often.
EDIT: actually, yes, having subentities blown off does harm maintenance level. Sorry - I missed that bit on first look.
Last edited by cim on Mon Feb 03, 2014 10:21 pm, edited 1 time in total.
Re: Sub-entities
The technique is used in the mission ship in Aquatics (the Kraken IV) to allow the platforms it carries to fire. I think someone (Eric?) also did a ship script where you could shoot off and disable NPC equipment like scoops.
Also Griff and I did something similar with the Cobra with external missiles.
Also Griff and I did something similar with the Cobra with external missiles.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: Sub-entities
Wonderful stuff, that - works really well.Thargoid wrote:Also Griff and I did something similar with the Cobra with external missiles.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!