Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: TrashMan on June 28, 2009, 11:28:21 am

Title: Beams, shields and piercing
Post by: TrashMan on June 28, 2009, 11:28:21 am
Right now we have just a pierce or no pierce setting for a beam weapon - and it works the same on every shield. I propose the following:

A beam weapon has an aditional entry in the tables

"shield_penetration:     (1, 0, 0, 0)     


A ships has the following entry right below shield strength
+shield_type:      1



Now, this are just the default values for backward compability.
Short explanation - there are several shield types.. let's say 5. Shield type determines which one it is.

The weapon file determines how much damage passes trough the shield in order (tpye1, type2, type3, type4, type5)

So, the entry (1, 0.5, 0,7, 0, -1) means
- 100% of the beam damage passes trough a type 1 shield
- 50% of the beam damage passes trough a type 2 shield (half the damage to the shield, other half to the hull)
- 70% of beam damage passes trough a type 3 shield (with only 30% hitting the hull)
- 0% passes trough a type 4 shield (all damage done to shield)
- type5 shield doesn't take damage for this beam type at all. Completely impervious



Thoughts?

Title: Re: Beams, shields and piercing
Post by: headdie on June 28, 2009, 11:39:34 am
It would require shield type setting in all ship entries and the penetration levels would have to be set for every weapon weather used or not

good luck to whoever programs that lol ;7
Title: Re: Beams, shields and piercing
Post by: TrashMan on June 28, 2009, 12:24:26 pm
That's what defaulting when no entry is present is for.  ;7
Title: Re: Beams, shields and piercing
Post by: Commander Zane on June 28, 2009, 12:26:56 pm
Sounds like making the shields act like the armor tags, which wouldn't be a bad idea. If it could go as far as *Shield 1 is affected more by Beam A but less than Beam B* :)
Title: Re: Beams, shields and piercing
Post by: Dragon on June 28, 2009, 02:01:52 pm
*Shield 1 is affected more by Beam A but less than Beam B*

I have even better idea: *Shield 1 is affected more by Weapon A but less than Weapon B* .
Why limit it to beam cannons only?
Of course ,in FS only beams can pierce shields ,but think about other universes ,for example Star Wars with ray and particle shielding.
Title: Re: Beams, shields and piercing
Post by: TrashMan on June 29, 2009, 06:44:02 am
From a programing standpoint, methinks there's not much of a difference making a piercing check for any weapon.

and adding the piercing filed to other weapons is easy.
Title: Re: Beams, shields and piercing
Post by: Wanderer on June 30, 2009, 03:43:07 pm
Basically this seems to be request for extending the armor.tbl to affect also shields (with new entry that is) instead of just hull and subsystems
Title: Re: Beams, shields and piercing
Post by: Rodo on June 30, 2009, 04:04:21 pm
nice idea... also couldn't you just use this thing also to make cap ship shields (not surface shields) possible? I mean creating a new type of beam/weapon that would be 100% shield penetrating or somewhat like that?
Title: Re: Beams, shields and piercing
Post by: Dragon on June 30, 2009, 07:29:17 pm
We already have (and had since retail) capship shields ,you only need to find a capship with shield mesh ,or make one yourself (Unholy Alliance had some ,there's also a shielded Hecate in ItDOH and finally INF have shielded Shivan planet killer).
Beams pierce shields by default and you can make weapons to do so by "Pierce Shields" flag.
I agree that extending Armour.tbl would be certainly one of the most handy solutions for shield types.
Title: Re: Beams, shields and piercing
Post by: chief1983 on June 30, 2009, 07:39:06 pm
Or use the hull shield flag, then you don't need to add a mesh.
Title: Re: Beams, shields and piercing
Post by: TrashMan on July 01, 2009, 05:48:39 am
This is about damage done and piercing, not the shield model itself. It should work the same for surface shields and regular shields anyway.
Title: Re: Beams, shields and piercing
Post by: kaloonzu on July 01, 2009, 06:58:54 am
i actually like this idea. make it so heavy bombers have different types of shields from interceptors, and uv added a new aspect to the game thru simple code
Title: Re: Beams, shields and piercing
Post by: asyikarea51 on July 01, 2009, 07:30:35 am
Could it be made simpler in any sense? Or more "closer" to armor.tbl...???

I like the idea (and could probably find a use for it sooner or later if implemented) but doing it that way just reminds me of Red Alert 2... and damn I hated the mess of INI files; a useless crash message doesn't help one bit...

That said, I haven't played with armor.tbl for a very long time now so it could be there's just no other way of doing it, unless someone else around here is better at "thinking out of the box"...

(and on the topic of hull shields... well it has this stigma that I can't get over :doubt:)
Title: Re: Beams, shields and piercing
Post by: TrashMan on July 01, 2009, 09:52:43 am
Could it be made simpler in any sense? Or more "closer" to armor.tbl...???

How simpler can it possibly get?

It's just penetration values for weapons and shield type identifier for ships.
Title: Re: Beams, shields and piercing
Post by: Trivial Psychic on July 01, 2009, 01:54:24 pm
I proposed something similar to this a few years back.  My rationale was using ST:DS9 as a model.  Large Starfleet+Klingons Vs. Dominion+Cardassians.  Dominion weapons can pierce shields of all enemies, except DS9 itself which can stop their beams.  So, all weapons and shields are normal except Dominion weapons which have a piercing flag, but you need a way to block piercing weapons from going through DS9's shields.  Rather than simply having  a "shields cannot be pierced" flag to DS9, I figured that a numeric piercing value and piercing defense value should be included.  I had it where in order for a weapon to pierce a shield, its piercing value must exceed the piercing defense value of the enemy shields.  Shields would have a default value of 0 and all weapons with the exception of beams would have a default piercing value of 0, with beams having 1.  The concept of partial piercing (as proposed in this thread, from what I gather) didn't cross my mind.

On the subject of shields however, it occurred to me that it could be integrated into the often-proposed-and-discussed-but-never-developed Tertiary Equipment System.  Tertiary Systems (for those who don't remember or weren't around then) allows the instillation of additional equipment into a fighter from the loadout screen, or something similar.  An example of a Tertiary system is a cloaking device, but could include things such as extra primary or secondary weapon packs, jamming devices, etc.  The tertiary system could (if ever implemented) allow default subsystems to be swapped out by the player.  For example, (again from DS9) the Defiant's shields can't protect it from Dominion weapons, but a new shield gets designed to protect against it, which is made available to the player to swap out before the mission.  The defensive values of each shield subsystems available would be defined in the tertiary tables, including perhaps a higher energy draw on the rector.  That said, you could even have a swappable reactor later in a campaign, making more power available for more powerful weapons and subsystems.
Title: Re: Beams, shields and piercing
Post by: CaptJosh on July 01, 2009, 02:02:47 pm
I like this concept. Basically, you could tune your shields to defend against what you expected to come against. Also, Trivial Psychic's subsystem loadout idea sounds good too. Sort of like how you customize starships in the old starship constructor software, a copy of which came with DS9: Dominion Wars, the name of which escapes me at the moment.
Title: Re: Beams, shields and piercing
Post by: Dragon on July 01, 2009, 02:12:29 pm
It would be great to have tertiary equipment, for example interchangeable shields, countermeasures, reactor, engines, maneuvring thrusters, sensors, maybe even armour plating.
I'm certain that it will have many uses, for example you can take heavy shields when you expect large battle, better afterburners for escort mission, and cloaking device for recon.
Title: Re: Beams, shields and piercing
Post by: Trivial Psychic on July 01, 2009, 02:26:47 pm
Obviously, just like with weapons, the modder must restrict which of each type tertiary/subsystem a fighter can carry, so you can't turn a heavy assault fighter into the fastest craft in the game.  The addition of armor must also be made to add to the numeric values that make the fighter more sluggish in maneuverability and acceleration.
Title: Re: Beams, shields and piercing
Post by: TrashMan on July 01, 2009, 03:19:01 pm
Tertiray systems add a whole new level of complexity and takes a lot more work to implement.

I proposed this because if was simple, powerful and relatively easy to implement.

For your DS9/Defiant example, it's as easy as just giving the DS9 or Defiant a different shield type in it's ship.tbl.
Could be made even more powerful with the ability to change shield type with a SEXP in FRED. That way you wouldn't need duplicate entries and can change shields in-mission.
Title: Re: Beams, shields and piercing
Post by: TrashMan on July 30, 2009, 06:20:08 am
Sorry for bumping this, but I was wondering if any coder was interested in actually implementing this?
Title: Re: Beams, shields and piercing
Post by: Wanderer on August 01, 2009, 12:23:24 pm
Yes.. i have taken a look at it and it doesnt seem too problematic to implement it...  Just havent got around to it yet
Title: Re: Beams, shields and piercing
Post by: TrashMan on August 02, 2009, 08:40:40 am
Hooray! :)

The important part is that it's not problematic. Someone will get around to it now that the idea is out...
Title: Re: Beams, shields and piercing
Post by: Wanderer on August 02, 2009, 11:25:32 am
I wrote and committed a patch to enable armor types to be used with shields as well .. Will post details to wiki later on.
Title: Re: Beams, shields and piercing
Post by: TrashMan on January 10, 2010, 04:17:54 pm
Sorry for bumping this thread, but I find it better than starting a new one.

What I wanted to ask - I've been looking at the wiki and I wanted to ask. I noticed an addition to the armor.tbl for the shield piercing percentage.
I was wondering - why is this part of an armor table? This locks shields with armor and reduces flexibility.

Right now if I want to have several types of armor and several types of shield, I need to put every possibly combo in the armor  tbl.
Having 2 separate tables and specifiying shield and armor separately is more flexible and easier.
Title: Re: Beams, shields and piercing
Post by: Dragon on January 10, 2010, 04:55:59 pm
Current setup isn't different, it's like your proposition, but you have both tables in one file.
Shield armour and hull armour are completely indipendent.
Title: Re: Beams, shields and piercing
Post by: TrashMan on January 12, 2010, 01:07:42 am
So shield armor is specified as another entry in the ships tbl then?


Does it go after the normal amor? The wiki doesn't specify. Like this?

$Hitpoints:             200
$Armor Type:            Reflective
$ShieldArmorType:        polarized
$Flags:                 ( "player_ship" "fighter" "in tech database")
Title: Re: Beams, shields and piercing
Post by: Fury on January 12, 2010, 01:17:39 am
Wiki does specify where to put it in ships.tbl entries.
http://www.hard-light.net/wiki/index.php/Ships.tbl#.24Shield_Armor_Type:

You can also set armor types via sexps to hull, shields and subsystems.

In armor.tbl the table does not differentiate between armor types for hull and shields, they all work regardless of whether you apply them to hull, shields or subsystems.