Stacking effects. |
Ok, here i want to share my knowledge about effect stacking (what i figured out so far). For many effects, they don't stack by default, having more of a device don't bring anything to the design. But, if another device has that effect, it will stack. This can be an issue when you can mount multiple device that give significant boost, like the combat defense bonus you get by stacking ecm, stealth armor, scattering armor, cloaking device and whatever the ship base defense may be. So one has to keep that in mind when modding...
Also, it's possible to make non-stackable effects stack. Just create a formula that count how many devices of that type you have, or how many other devices has that effect. It can be tricky though, especially if you want to avoid absurd stacks from occuring... It can also be a good idea to include a condition in the formula so if a superior component is on the design, the current effect is invalidated. This is probably the way i will fix how the defense stack in my mod so no ship get a 200 + defense bonus...

Combat Bonus Stacking
Stacking for combat bonuses is controlled by the amount2 value on the ability. The best % value for amount1 will be added for each unique amount2.
-----

But...
But what if we want NON unique amount 2's to stack? Huh, what about that? 
_______________________
There are 10 types of people in the world:
Those that understand binary, and those that don't.

That works Rilbur.... It
That works Rilbur.... It works as sheilds and as armour.

quotes galore
If you can make sheilds that recharge themselves then you don't need a shield regenerator... Does this effect stack thou, as in you have 5 shield generators, each with a shield regen of 10, do you get 10 or 50 points of recharge?
If these stack then just ditch the shield regen module, bunk up the size of the recharging shield (if you want) and have it is a new module that "replaces" normal and phased shields.

What?
Say that again, you aren't making sense.
I want a components that does combat modifiers and stacks with itself.
_______________________
There are 10 types of people in the world:
Those that understand binary, and those that don't.

to tired to deal with subject fields
Say that again, you aren't making sense.
I want a components that does combat modifiers and stacks with itself.
My comment was that currently both shields and armour stack with themselves. As in more chunks of armour mean more armour points before your ship goes bang (well it doesn't bang in space but).
OK these aren't combat modifyers in the sense of giving bonuses, but they are objects that stack with themselves, I don't know how the game code handles this (or anything else really) but if you have a look at how this works it might help to understand how to stack shield regns or ECMS or whatever you want. (Or it might not, as I said I know nothing about coding, apart from being one of those awkward question askers, who sometimes strike lucky)
Stacking
You can't make regenerators stack because they don't have the same settings attack and defense bonuses do (no amount 2). Attack and defense bonuses DO stack- just look at the Stealth Armor and ECM in stock for an example. Combat Movement and Damage Reduction don't stack; they just take the best value.
I'm curious as to how you got damage negation to stack..

Stacking FTW
I'm curious as to how you got damage negation to stack..
I think he made damage reduction stack by taking a "get compenent count" or something similar on the hull abilities list.
Oh, and Attack/Defense bonuses only stack in some situations. Stealth Armor + ECM have differen't amount 2's, so they can stack...
But I can't have weapons that provide -1% defense bonus (e. g. they "radiate" a lot of energy making the ship easy to target).
_______________________
There are 10 types of people in the world:
Those that understand binary, and those that don't.
Doesn't work.
I checked Fallen's mod and the method he used doesn't work. Get_design_ability_component_count isn't functional in components.txt, and IIRC using it in the vehiclesize.txt ability list doesn't work either.
You can have your negative defense bonus weapons, its just you'll only get the penalty once ship (eg three guns is -1%, not -3%)

Thanks
... Which is exactly my point, I can't get them to stack up to -20% if you hvae 20 guns on board...
_______________________
There are 10 types of people in the world:
Those that understand binary, and those that don't.

Can't you change how the
Can't you change how the game recognises and counts it bonuses, make it so that when it calls for the bonus info it goes to a different function that looks at the ship, works out how many shield rens it has, and at what level (effect) totals those up then subits the answer back as if it where just 1 shield regen.
Short answer
Short answer: no.
Long answer: we tried that already, didn't work. MM could change it, modders can't.
Doesn't.
Three plates, 42 + 42 + 42 damage, or 126 total. A hit of less than 126 will still hurt the ship..
hmm
Tested two BSes, one with stealth/scattering/emissive, the other with that plus lots more emissive.
380 damage hit.
First BS took 57 armor damage and 82 internal damage.
Second BS took 63 armor damage and 0 internal damage.
15/25/25
63 - 57 = 12.3.
12.3/82 = 15%, which is the damage % of the emissive armor.
Interesting. How'd you discover that little quirk? As far as I can tell its just related to the amount of damage reduction on the ship and doesn't have anything to do with the Get_ function. It isn't actually blocking any damage, just redirecting it from the internals to the armor..




). Unfortunatly it doesn't work for shields recharge rate (can't make the stupid shield regenerator to work, but i can make the shields regen themselves), i tryied everything...
One simple thing you could
One simple thing you could do is put a conditional statement in, if defence is greater than 150 then defence is 150. (or whatever number you desire)