Weapon effects mod

A place to discuss mods in development and concepts for new mods.
Post Reply
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Now that we have objDamage we can apply weapon effects to any object we want. I plan on making a mod encompassing most of these.

planned functions (all effects do at least 1 damage)

(wemApplyDamage spaceObject damage damageType [wmdLevel] [sourceObject] [position])
(wemApplyMomentum spaceObject level position)


I am thinking making the valid damage range from 1 to 200 would anyone need numbers higher than this? Of course I will take a new UNID for this ,I will need 22295 different weapons. :shock:

any comments or suggestions?
Last edited by Betelgeuse on Mon Oct 26, 2009 4:17 pm, edited 1 time in total.
Crying is not a proper retort!
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

I will need 22295 different weapons. Shocked
That's a lot :D

why so many ? how is it going to work ?
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Well each weapon will be a fixed damage weapon. When you call something like

(wemApplyDamage blah 34 laser 3)

It will find the wmd 3 laser that does 34 damage and use it to damage blah.

Maybe I should take an extra argument for the firer. (in case the player is shooting at friendlies)
Crying is not a proper retort!
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

Can we do negative momentum?
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

You can probably get by with 100 per damage type and just apply multiple passes for stuff above 100. That may not get you no roundoff, but it will get you roundoff only rarely and never where there isn't a HPbonus style resist.
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Atarlost wrote:You can probably get by with 100 per damage type and just apply multiple passes for stuff above 100. That may not get you no roundoff, but it will get you roundoff only rarely and never where there isn't a HPbonus style resist.
The problem with multiple passes is that you get multiple applications of resistance. If we could get the resistance of a shield or armor then we could use that to adjust but I don't know a way of doing that.
Crying is not a proper retort!
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

Resistances are multiplicative so the only way the number of passes matter is if the resist causes damage to be lost to roundoff errors. I think the roundoff errors for 100 damage and 5 seperate should be the same as for 105 in most cases.
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

due to onDamage (the core of this mod) being disabled in damage events (the main use of it :? ) this mod is canceled

Hopefully George makes the function with his resources.
Crying is not a proper retort!
george moromisato
Developer
Developer
Posts: 2997
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Sorry about that. If I understand the problem correctly, you are trying to call (objDamage) from inside an <OnDamageArmor> (or similar) event.

The reason that won't work is because (objDamage) will itself end up firing an <OnDamageArmor> event (because it ends up damaging armor). Which means that you end up in an infinite loop.

Edit: BTW, why can't you call (shpDamageArmor) from inside <OnDamageArmor>? That should work fine, I think.
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

the entire reason for this mod was to have a controlled way of damaging shields in damage events.

The infinite loop only occurs if you call objDamage with the same weapon that the OnDamageShield or OnDamageShield with and this mod doesn't have those events thereby avoiding the infinite loop. I agree that it can cause problems but no more than saying loop while true.
Crying is not a proper retort!
Post Reply