Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: krevett62 on January 23, 2017, 05:34:50 am

Title: shield generator
Post by: krevett62 on January 23, 2017, 05:34:50 am
Hello,
I've seen an old post from goober saying he added a new type of subsystem $shield that if destroyed turned the shields off on the ship.

I wonder this feature has never been implemented in the main isn't it? Was there a problem with it?
Title: Re: shield generator
Post by: LaineyBugsDaddy on January 23, 2017, 10:42:06 am
Pretty sure that has been implemented, and Fate of the Galaxy would use it. Wing Commander Saga would also have used it, I think. I seem to remember having to fight shielded cap ships in an official Wing Commander game and having to take out the generator to be able to take down their shields so I could destroy them. That might have been in Wing Commander Prophecy, actually, so I don't know how much that would apply to WCS...
Title: Re: shield generator
Post by: Droid803 on January 23, 2017, 10:46:06 am
Even if this feature isn't in, it is exceptionally easy to replicate the effect via sexp in FRED.
So in a way it is already in.
Title: Re: shield generator
Post by: krevett62 on January 23, 2017, 11:05:13 am
Ok thanks for your lights on the subject
Title: Re: shield generator
Post by: LaineyBugsDaddy on January 23, 2017, 11:09:16 am
Good point, Droid83. I forgot about that. All you have to have is a named subsystem of "Shield Generator" or whatever it's supposed to be called and a subsystem destroyed sexp that forces shields down when that subsystem is destroyed.
Title: Re: shield generator
Post by: AdmiralRalwood on January 23, 2017, 01:14:35 pm
As far as a hardcoded shield generator type goes, there is currently no code for that in FSO; there's also no flag you can set on a subsystem to indicate that the shields should drop if it's destroyed. If you want that functionality, you'll either need to SEXP it into every mission or write a Lua script to do it automatically.
Title: Re: shield generator
Post by: krevett62 on January 23, 2017, 02:26:36 pm
I understand, then I have another question ^^

How do you destroy the subsystem while the ship is shielded? Is there a way to make it take damage?
Title: Re: shield generator
Post by: Thisisaverylongusername on January 23, 2017, 03:11:27 pm
You can have an anti-subsystem weapon that pierces shields but doesn't do any hull damage.
Title: Re: shield generator
Post by: Droid803 on January 23, 2017, 03:56:48 pm
Or if you have a modelled shield mesh you can have it not cover the generator, which is another way of doing it. However that kind of needs the subsystem to be sticking out somehow and requires creating/editing the shield mesh in the pof.

Also, beams by default pierce shields too unless a flag is set for them not to.
Title: Re: shield generator
Post by: krevett62 on January 24, 2017, 12:26:40 am
I think I'll have to try droid's method because I'd like them to be destroyed by standard weapons not only beams.

Also if the shield mesh is big enough and a small fighter fire from the inside of the mesh will it hurt the hull?
Title: Re: shield generator
Post by: Droid803 on January 24, 2017, 12:49:07 am
Yep, you can have fighters fly under a modeled shield meshes and damage the hull.
Title: Re: shield generator
Post by: zookeeper on January 24, 2017, 01:36:22 am
Yep, you can have fighters fly under a modeled shield meshes and damage the hull.

You sure about that? I'm under the rather distinct impression that that's not the case. Although if it's not, it looks like it could probably easily be implemented by allowing +Allow Bypass (http://www.hard-light.net/wiki/index.php/Ships.tbl#.2BAllow_Bypass:) to work with normal shield meshes too.
Title: Re: shield generator
Post by: krevett62 on January 24, 2017, 04:18:59 am
I'll give a try at this to see if it works when I have a bit of time, first i'll finish my personnal conversion almost the end by now ^^
Title: Re: shield generator
Post by: Droid803 on January 24, 2017, 12:21:33 pm
Yep, you can have fighters fly under a modeled shield meshes and damage the hull.

You sure about that? I'm under the rather distinct impression that that's not the case. Although if it's not, it looks like it could probably easily be implemented by allowing +Allow Bypass (http://www.hard-light.net/wiki/index.php/Ships.tbl#.2BAllow_Bypass:) to work with normal shield meshes too.

Yes. I'm sure.
One of the missions in Dimensional Eclipse takes place entirely under a shield mesh of a ship (which is a huge bubble) and you can kill the ship without ever dropping its shields.
The shield stops projectiles from outside but once you're inside you can hit the hull just fine.
Title: Re: shield generator
Post by: krevett62 on January 24, 2017, 01:33:26 pm
Great then, thanks droid for the input!
Title: Re: shield generator
Post by: Bryan See on January 26, 2017, 12:05:58 pm
And what of Star Destroyers from Star Wars? What happens if a Star Destroyer have all of its shield generators destroyed? The shield goes down. I've seen the effect in X-Wing Alliance and other X-wing computer games. I would like to see that effect, besides the SEXPing via FREDding and Lua scripting.
Title: Re: shield generator
Post by: Droid803 on January 26, 2017, 12:47:48 pm
Why does it need to be hardcoded if it can be done with one event SEXP?
Title: Re: shield generator
Post by: Bryan See on February 24, 2017, 10:01:56 pm
Because for years it has been hardcoded because the shields in game are automatically recharging. If a multi-"shield generator" subsystem(s) are implemented, when they destroyed, the shields and its regeneration rate are set to zero.
Title: Re: shield generator
Post by: The E on February 25, 2017, 12:05:06 am
Because for years it has been hardcoded because the shields in game are automatically recharging. If a multi-"shield generator" subsystem(s) are implemented, when they destroyed, the shields and its regeneration rate are set to zero.

Since this effect can be implemented using trivial scripts or sexps, I see no reason to integrate a feature like that in the engine (in other words: if you want it, you need to do the work yourself)
Title: Re: shield generator
Post by: Bryan See on February 25, 2017, 01:08:43 am
Because for years it has been hardcoded because the shields in game are automatically recharging. If a multi-"shield generator" subsystem(s) are implemented, when they destroyed, the shields and its regeneration rate are set to zero.

Since this effect can be implemented using trivial scripts or sexps, I see no reason to integrate a feature like that in the engine (in other words: if you want it, you need to do the work yourself)
That's what I'm thinking about right now.
Title: Re: shield generator
Post by: Trivial Psychic on February 25, 2017, 04:46:39 pm
I could see someone wanting this to be hard-coded, if it was to be implemented on a large number of craft in the mission.  If only a few ships need it, by all means, use SEXPs.
Title: Re: shield generator
Post by: Dragon on February 25, 2017, 05:25:10 pm
If it's about all ships in the mission, I think that argument SEXPs provide an easy way of doing that for everyone. However, it could be tedious if you wanted to exclude some ships from this treatment.