Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Cuttenslise on November 27, 2002, 05:26:05 am

Title: Capital Ship Hangars
Post by: Cuttenslise on November 27, 2002, 05:26:05 am
I don't know if this is the right place for this, but here goes...

Could something be included to detect a hit on the hangar of a capital ship, either by giving the hangar a damage rating or introducing a new sexp. A damage rating would be preferable.

This is quite important, as a hangar that is hit with a cyclops or helios won't be launching many fighters. (A more interesting re-write of Slaying Ravana could be on the cards if such a feature is introduced)

Or is this  Bugzilla? :confused:
Title: fighter bays
Post by: Sesquipedalian on November 27, 2002, 05:58:37 am
*Sesquipedalian sights his friend Cuttenslise*

Fire Control, acquire lock on target.  Warm up the Welcome Beam, and... FIRE!
(http://members.cox.net/~wmcoolmon/images/welcome.gif)
Exits are to the sides and rear.  In case of emergency, flamethowers are located beneath your seat.  If a large hungry Shivan jumps you, its probably just Carl.  Give him your lunch and he'll go away happy.

Anyway, it's good to see you.  We'll be getting our own forum here in the next day or two for SA.

As for your question, that actually pretty easy to solve. :)  In your ships.tbl, and find the entry of the ship you want to change.  In the entry, find the line (or lines) that look like this:

$Subsystem: fighterbay01, 0,0.0

and change the first number after the subsystem name to a positive value.  This value represents what percentage of the ship's hit points the subsystem has.  Following FS precedent, one might change the above line to:

$Subsystem: fighterbay01, 5,0.0

Your fighterbays will now take damage (though for some reason they won't show a percent left on the HUD target box like other subsystems) and can even be destroyed.
Title: fighter bays
Post by: Cuttenslise on November 27, 2002, 07:49:15 am
Hi, Sesquipedalian, thanks for the welcome.

Anyway, your answer is just what I am looking for. However, I am now assuming that anyone who wished to play a mission with this feature enabled would need to update their ships.tbl in the same fashion, which when using the standard FS2 ships could be slightly awkward. However, for new capital ships this arrangement is ideal.

Will you incorporate this feature in the SA capital ships?

Look forward to seeing the new SA board, and hopefully becoming part of the SA team.
Title: fighter bays
Post by: DTP on November 27, 2002, 02:45:31 pm
Quote
Originally posted by Sesquipedalian


Your fighterbays will now take damage (though for some reason they won't show a percent left on the HUD target box like other subsystems) and can even be destroyed.


but i guees it can still launch fighters right ?, since the paths will still be there.

if so, bad thing if the mission uses waves.
Title: fighter bays
Post by: Solatar on November 27, 2002, 02:55:00 pm
I thought that if the fighterbay was destroyed, then no more fighters from wings that launch from that fighterbay launch. Same as if the whole ship is destroyed.
Title: fighter bays
Post by: DTP on November 27, 2002, 02:57:24 pm
hmm maybe, maybe not, maybe it just uses thats last path vert as exit/enter point.

dunno havent looked, thats why i asked.
Title: fighter bays
Post by: EdrickV on November 27, 2002, 03:13:41 pm
Quote
Originally posted by Hades
I thought that if the fighterbay was destroyed, then no more fighters from wings that launch from that fighterbay launch. Same as if the whole ship is destroyed.


Not sure if the fighterbay affects the ships launching from it (since normally they can't be destroyed) but an easy fix that ought to work would be to use is-subsystem-destroyed in the ships arrival cues. :)
Title: fighter bays
Post by: Inquisitor on November 27, 2002, 05:49:33 pm
split this to it's own thread, it was kinda buried in the release thread...
Title: fighter bays
Post by: Sesquipedalian on November 27, 2002, 06:05:30 pm
Oh sure, it'll still be able to launch fighters if you want it to.  To accomplish the effect of not launching fighters from a damaged/destroyed fightrbay one uses usual sexp-type methods (e.g. setting the arrival cue not to be true if the f-bay's hitpoints are below X percent).
Title: fighter bays
Post by: Sesquipedalian on November 27, 2002, 06:12:38 pm
Quote
Originally posted by Cuttenslise

Anyway, your answer is just what I am looking for. However, I am now assuming that anyone who wished to play a mission with this feature enabled would need to update their ships.tbl in the same fashion, which when using the standard FS2 ships could be slightly awkward. However, for new capital ships this arrangement is ideal.
One just has to include a modified ships.tbl entry along with the mission, and instructions in case someone doesn't know how to edit their table files.

Quote
Will you incorporate this feature in the SA capital ships?
If called for by a Fredder, sure.  That would just be a drop in the bucket compared to all the table hacking going on for SA.

Quote
Look forward to seeing the new SA board, and hopefully becoming part of the SA team.
Soon and very soon! :nod:  I've now received access, so I just have to get the site ported over from Angelfire, and then have the admins set up the board itself.
Title: fighter bays
Post by: Cuttenslise on December 09, 2002, 10:12:50 am
Quote
Originally posted by Sesquipedalian
To accomplish the effect of not launching fighters from a damaged/destroyed fightrbay one uses usual sexp-type methods (e.g. setting the arrival cue not to be true if the f-bay's hitpoints are below X percent).


Another interesting variant of this would be that, providing the hangar was not destroyed (and therefore all craft contained within it), all the craft within it could be damaged by a random percentage. (Say between 0 and twice the damage level sustained by the hangar.) This represents the blast ripping through the hangar and damaging exposed craft with shrapnel, debris and bodies, whilst craft that are tied down better or otherwise out of harms way remain relatively undamaged.

I know that you can do this with subsystems, but I am not sure about the hull.

Incidentally, I am one of those who doesn't know (yet) how to modify table files, although tblview and vpview both proved their worth this weekend.

Incidentally, if anyone is interested, the fwd flak turrets of a Sathanas Juggernaut are turrets 49 and 50. After two hours I had'nt worked that out; then with the help of VPView and dissecting 'Bearbaiting', I had the answer in 5 minutes. Marvellous.
Title: fighter bays
Post by: Galemp on December 09, 2002, 10:20:50 am
In FRED, if you select a capship and hit K, it will outline each turret and you can cycle through them.

:wtf: Why did you bump this, though?
Title: fighter bays
Post by: Sesquipedalian on December 09, 2002, 06:02:38 pm
Extract the tbl file, and use Notepad and/or Wordpad to edit it.

Set-subsystem-random could probably do what you are looking to do as far as damaged fighters coming from damaged fighterbays goes.
Title: fighter bays
Post by: Cuttenslise on December 10, 2002, 02:59:42 am
Quote
Originally posted by GalacticEmperor
In FRED, if you select a capship and hit K, it will outline each turret and you can cycle through them.


I didn't know that. Well, you learn something new every day. :)
Title: fighter bays
Post by: Goober5000 on December 13, 2002, 08:23:33 pm
Quote
Originally posted by Sesquipedalian
Your fighterbays will now take damage (though for some reason they won't show a percent left on the HUD target box like other subsystems) and can even be destroyed.


Now they'll show damage. :) I added a mission flag (256) to do this.  You'll still have to modify the ship table, but now the HUD will show the percent damage.
Title: fighter bays
Post by: Sesquipedalian on December 13, 2002, 09:42:13 pm
Nice!  So we have to stick that flag onto every mission, then, Goober?
Title: fighter bays
Post by: Deepblue on December 13, 2002, 09:52:32 pm
Quote
Originally posted by Sesquipedalian
*Sesquipedalian sights his friend Cuttenslise*

Fire Control, acquire lock on target.  Warm up the Welcome Beam, and... FIRE!
(http://members.cox.net/~wmcoolmon/images/welcome.gif)
Exits are to the sides and rear.  In case of emergency, flamethowers are located beneath your seat.  If a large hungry Shivan jumps you, its probably just Carl.  Give him your lunch and he'll go away happy.

fire control target Cuttenslise
(http://members.cox.net/~wmcoolmon/images/welcome.gif)
(http://members.cox.net/~wmcoolmon/images/welcome.gif)
Double beam power :cool:
Title: fighter bays
Post by: Goober5000 on December 13, 2002, 10:30:09 pm
Quote
Originally posted by Sesquipedalian
Nice!  So we have to stick that flag onto every mission, then, Goober?


Yes.  To maintain compatibility, I didn't make it automatic.  You need the flag. :)

Quote
Originally posted by Deepblue
fire control target Cuttenslise
(http://members.cox.net/~wmcoolmon/images/welcome.gif)
(http://members.cox.net/~wmcoolmon/images/welcome.gif)
Double beam power :cool:


Uh, careful there, Deepblue.  I got yelled at for playing with the beams in another thread.  Make sure people don't see you messing around with the beam controls... :nervous:
Title: fighter bays
Post by: Sesquipedalian on December 13, 2002, 11:18:00 pm
What would it break?  :confused:

Even if a fighterbay subsystem is destroyed, it won't affect anything insofar as launching fighters or anything else is concerned.
Title: fighter bays
Post by: Goober5000 on December 14, 2002, 12:00:13 am
Right - it wouldn't break anything, but after seeing the reaction from people when Phreak modified the targeting code and Bobboau added beam tiling, I decided to make the damage display contingent on a mission flag.  Just to keep things familiar. :)
Title: fighter bays
Post by: Sesquipedalian on December 14, 2002, 05:36:16 am
Personally, I'm inclined to think that if this were hard-wired, it would be well received.   The engine code's logic should run like this: "Is the fighterbay's subsystem strength set to something besides zero in the table?  Yes, so we'll display a hitpoint percentage for it on the hud, or no, so we won't."  

You can be pretty sure that if someone writes the table entry in such a way that the fighterbay has hitpoints in the first place, they will want a damage percentage to be displayed for it.
Title: fighter bays
Post by: Goober5000 on December 14, 2002, 10:13:51 am
Hmm.  That makes a lot of sense.

Maybe I'll do that.  Does anyone else have any objections?
Title: fighter bays
Post by: Goober5000 on December 14, 2002, 11:14:45 am
It's done, barring any objections.  Fighterbay damage will now display unless fighterbay subsystems have been assigned a max damage of 0 in ships.tbl. :)