klauss wrote:Right now damage has three attributes: normal, phase and special. Although I think special is exclusive, so it's kind of encoded within a normal/phase pair in some way. Not a happy idea on the part of whoever wrote that.
I tried to dig in recently, there are "damage" and "phasedamage", with Beams that are scoops being a "special case" in that they don't work like others. Another "special case" are Missiles in that they have "detonationrange" and use "radius"
not for collision check but in their own way.
klauss wrote: Anyway, to model what's documented everywhere, you're likely no need more attributes. Armor piercing effects, shield bypassing (somewhat related to phase damage), kinetic impulse, secondary effects, emp (there are emp warheads, so emp should be an effect), etc, etc... It's quite likely that a better damage system would carry all those attributes with any shot, rather than modelling them as secondary callbacks or whatever
With this i agree. Moreover, i suspect that hardcoding all this stuff may be avoided by handling flags the same abstract way i'd like to handle slots - indexed text tags, check damaging effect vs. whatever it hit (layer by layer).
But in my understanding "direct hit" and "explosion" are
not damagetypes, for the same reason why "bolt" and "beam" aren't damagetypes. A direct hit may be plasma or slug and explosion wave may be frag or hard radiation or EMP - now
these are damagetypes.
Specifically kinetic, strictly speaking, is - but such effects aren't supposed to work like most damage types are supposed to - the shooter takes a recoil, the target is kicked, and the damage is dependent on the velocity... in short, IMO it's best to handle this all in physics of shooting/hitting and cause damage via existing (and adjustable separately) kinetic damage procedures rather than carry relative velocity and projectile mass into the damage model where probably nothing else would need it.
klauss wrote: - the damage model must be data-driven, not callback driven. All basic functionality should be built-in, with only complex stuff working through callbacks (perhaps). And the major reason for that, is that modders will want to edit CSV / XML files, which are data, and not callback scripts.
Basic, naturally. Crazy stuff like that laser mining - how? It's too specific to pile into engine, and implementation via scripts would be more flexible.
klauss wrote: Turbo Beholder wrote:When there will be damage types, i don't see how it will be harder or easier to assign them to weapons with or without one or two more attributes.
The "chained effects" proposal gives one extra option of simple combining... when there will be something to combine in first place.
I see chaining as a convoluted way of supporting extension. I don't know... show me a mockup of how the dataset would represent chaining and I might change my mind, but what I understood of the idea just was overly complicated for simple, trivial stuff.
For "trivial stuff" it's just not needed to be used, that's all.
Chaining: a mockup of exploding Flak (ready for use with a timed fuse) would look like this
<Ball name="Flak" mountsize="capship-light" >
<Energy rate="40" stability="6" refire=".25" >
</Energy>
<Damage rate="4" longrange="1" >A hit and improper explosion still hurts, though not as much.
</Damage>
<Distance speed="3000" radialspeed=".8" radius="1" pulsespeed="15" range="10000" endeffect="FlakBlast">
</Distance>
<Appearance file="explosion_orange.ani flakball.ani" soundwav="MASS.WAV" r="1" g="1" b="1" a="1" >
</Appearance>
</Ball>
<Burst name="FlakFrag">
<Energy stability="1">
</Energy>
<Damage rate="8">nothing more, a simple spherical / reverse square falloff explosion is default as it's used for missiles. I suspect that Frag should be closer to all-or-nothing, but it's another question.
</Damage>
<Distance speed="500" pulsespeed="15" range="20" >
</Distance>
<Appearance file="explosion_orange.ani" soundwav="FLAKBOOM.WAV" r="1" g="1" b="1" a="1" >
</Appearance>
</Burst>
klauss wrote: VS has been plagued with convoluted ways of extension, to the point that nobody (or few) can actually extend anything. That's almost as bad as not having an extension method.
VS got off lightly. I tried to mod Age of Wonders 2+, there you see almost everything moddable, but run into outrageous cases of "suddenly hardcoded!" on every other step until the complete frustration.
That's why i'm trying to imagine methods as generic and potentially flexible as it makes sense.
klauss wrote: Turbo Beholder wrote:The rest are options for those who edit weapon_list.xml - to change an arbitrary part of bolts' basic weapon damage to the kinetic or warhead procedure. For weapons you'll
not assign either mass or secondary effects nothing changes at all. No one would
have to do it with all weapons - and probably
should not, given the existence of "non-corporeal" bolts like plasma and disruptors.
To avoid more confusion in this discussion, why don't you show me an XML or CSV entries of how it would look like?
How would a simple "damage-dealing laser-that's-not-a-laser" look like? (you know, the weapon that's called a laser and isn't a laser, the very first one you have at the beginning of the game).
How would a capship laser look like?
How would a plasma gun look like?
What this little plasma soaker fires is neither Razor's
pocket fusion bombs nor a heavy autocannon's slug, so it needs neither momentum calculated nor an explosion after it hits. Thus it would look... exactly the same, on account of extra attributes left unset? Ditto for the other two.
klauss wrote: How would a missile look like?
It doesn't require chaining as such, so i guess it's about warheads.
Warheads: HeatSeeker conversion
weapon_list.xml:
<Missile name="HeatSeeker" mountsize="light-missile">
<Energy rate="0" stability="6" refire="3.1" locktime="3">
</Energy>
<Damage rate="400200" longrange="1" radius="1501" radialspeed="40">In the reformat script direct hit and warhead damage conversion rates should be accessible constants, so that modders could define what they want here. Here it's 0.5 and 1.0
</Damage>
<Distance speed="1300" pulsespeed="15" range="80000" detonationrange="10" volume="3" >
</Distance>
<Appearance file="heatseek" soundwav="missile_3.wav">
</Appearance>
</Missile>
<Burst name="HeatSeekerWarhead">
<Energy rate="0.5">A missile leeched dry really sucks and does not even explode
</Energy>
<Damage rate="400" radialspeed="1500" radius="150" damageself="1">As a default. Not sure about radialspeed, though
</Damage>
<Distance speed="1500" pulsespeed="15" range="10" volume="0.1" >10 is ex-"detonationrange": AI is supposed to use "range" to fire the weapon when its target is in range
</Distance>
<Appearance file="explosion_wave.ani" soundwav="explosion.wav">Just some reasonable defaults.
</Appearance>
</Burst>
units.csv:
heatseek,./weapons/heatseek,heatseek,,FIXME,MISSILE,WRITEME,missile-hud.spr,,,,,,{heatseek.bfxm;;},,,,,,,0.08,4.68,0.01,5,,,,,,,,,,,,,,,,,,,,0,0,0,,,,,1,4,103.56,126.27,103.25,50,50,50,79,62.38,38.99,43.67,43.67,43.67,43.67,220,220,FALSE,FALSE,10000,21.41,90,31.68,,,,,,,,<...>;;;;;;,{supernova.bmp.bfxm;0;0;-2.00000023841858;.6;;;;;},{HeatSeekerWarhead;;;;0;0;1;;;0;0;0;0;0;0;1;1},,,,,,,,
klauss wrote: And an EMP torpedo? What about the cluster bomb?
Mostly the same, and it will work, though doing EMP torpedo
properly would involve chaining two Bursts - a normal explosion and wider lightspeed EMP wave. Assuming it work much like modern explosive-driven generators... not that i'd really expect
any single-use pulsed power solution - and weaponized at that - to be less flashy than a twisted metal sheet buried in RDX.
edit: Drones and other launched interceptors, as well as KineticMissile, have negative "detonationrange" and as such are easy to detect and leave alone.