Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Zarax on August 27, 2015, 02:28:04 am

Title: [Request] more parameters for shields
Post by: Zarax on August 27, 2015, 02:28:04 am
Hi,
Customizing shields properly right now requires massive changes of armor and weapons tables.
While flexible, this opens the road to bugs and adds a new balancing layer difficult to manage for less experienced modders.
For example, right now for a shield to be effective against beams requires creating new armor, damage categories and changes to every single beam in game.

Would it be possible to add at least basic damage absorption parameters specifically for shields?

Regards and thanks for your time!
Title: Re: [Request] more parameters for shields
Post by: AdmiralRalwood on August 27, 2015, 04:17:13 am
Technically, you only have to add it to beams that will ever hit that shield... and modular tables make this really easy to do. I'm not saying something like this will never happen (FSO is open source, after all, so anybody can add any feature they want), but it's... unlikely, given that you're basically asking for a slightly different take on a feature we already have. That's not really a high priority for anyone.

Now, making features we already have more user-friendly is something we like to do (when we can), and it sounds like your main problem is the amount of typing you have to do to do what you want. Perhaps it would make sense to have some way for specifying a default damage type for an entire category of weapons (e.g. a single line to give the same damage type to every single beam weapon). It might dovetail nicely with some ideas I've had for extending modular tables, but if I do it that way it'd probably take even longer to see any results...
Title: Re: [Request] more parameters for shields
Post by: Zarax on August 27, 2015, 05:12:28 am
Well, it's more about resurrecting a very old flag (there was around 10 years ago a build in which you could have shields absorbing beam fire) than about the typing amount.
IMHO it makes only sense that shields are treated separately from armor but of course a coder's opinion has much more weight than that of an old poster :)
Title: Re: [Request] more parameters for shields
Post by: Goober5000 on August 27, 2015, 09:48:04 am
We still have that flag.  Just add "no pierce shields" to the $Flags entry.
Title: Re: [Request] more parameters for shields
Post by: Zarax on August 27, 2015, 09:51:24 am
Thanks, in which table file?
Title: Re: [Request] more parameters for shields
Post by: AdmiralRalwood on August 27, 2015, 01:01:25 pm
He's talking about the weapons.tbl flag (http://hard-light.net/wiki/index.php/Weapons.tbl#.22no_pierce_shields.22). AFAIK there has never been a ships.tbl flag to cause that specific ship's shields, and no others, to absorb beam fire.

IMHO it makes only sense that shields are treated separately from armor but of course a coder's opinion has much more weight than that of an old poster :)
Shields are treated separately from hull, but both can have their own armor type. Just because it's called "armor" doesn't mean it literally has to do with armor plating.
Title: Re: [Request] more parameters for shields
Post by: Zarax on August 27, 2015, 01:18:52 pm
Well, the no pierce shields flag is what I was talking about, IIRC it was introduced in some version around 10 years ago (at that time it was an installer option) and it simplifies a lot what I'm trying to do (basically making a beam resistant Lucifer).
Title: Re: [Request] more parameters for shields
Post by: Dragon on August 31, 2015, 10:19:43 am
If Lucifer is the only big ship with shields, you can, in theory, try giving every anti-cap beam that flag, counting on the fact that fighter shields are too weak for it to have a noticeable effect on them and on anti-fighter beams being to weak to do noticeable damage to Lucifer. This is remarkably simple to do, but bear in mind that it'd result in Lucifer's shield letting anti-fighter beams go through, which could, depending on mission design and the shield mesh you use, be jarring. An egg-shaped mesh would make this effect particularly pronounced, while for a form-fitting mesh (or surface shields) this wouldn't be an issue. It's a hackish solution, but if you're not making any other drastic changes, it should work.
Title: Re: [Request] more parameters for shields
Post by: Zarax on August 31, 2015, 10:24:46 am
Yes, that's exactly what I'm doing using the surface shield flag.
Title: Re: [Request] more parameters for shields
Post by: AdmiralRalwood on August 31, 2015, 12:40:58 pm
If you're adding a flag to every beam anyway, it's not much more typing to add a damage type to them all.
Title: Re: [Request] more parameters for shields
Post by: Dragon on September 03, 2015, 12:46:46 pm
It does require wrapping your head around Armor.tbl, though, and while it's not hard to understand, I can see why someone who's mostly a FREDer would prefer a simpler way. Damage types are a more elegant solution, though.