[SOLVED] Stacking deffense settings

O Ilusionista

Captain 100K
If we have two different "defense" settings,will both work or the last one will be used?

Like this:
defense all 0.4 30
defense shock 0.1 30

Will the engine reduce ALL damages to 40% AND SHOCK damage to 10%, or it will ignore the first line and only use the second one?
 
O Ilusionista said:
If we have two different "defense" settings,will both work or the last one will be used?

Like this:
defense all 0.4 30
defense shock 0.1 30

Will the engine reduce ALL damages to 40% AND SHOCK damage to 10%, or it will ignore the first line and only use the second one?

You're correct - there is one set of defence settings on an entity for each attack type. As with most attributes in OpenBOR, the last one to be read in "wins".

In your example, you've effectively set that model up to take 10% of the damage from SHOCK type attacks and 40% from all other types.

DC
 
O Ilusionista said:
So i can use only one defense? Or do I need to make a defense for each attack type without using "all"?

Depends on what you mean by more than one. You can set up a defense for as few or as many attack types you like. Or more accurately, you're just adjusting settings that are already there. But there is only one defense for each given type. So one defense for SHOCK, one for BURN, one for ATKTYPE 1, and so on. In turn each defense is made of lots of arguments (damage, knockdown, etc.).

You can change them on the fly with script, although it's a little clunky and I'm working on a better way.

Lastly, using all or not is up to you. The engine doesn't care. Personally I prefer to define defenses individually so I can see them all in the text file and know what's going on. It's up to you to decide which method you like better.
 
Sorry I am on the phone.
So I can use defense for multiple attacks together like:
Defense attack1 bla bla
Defense burn bla bla
Defense shock bla bla
All together, right?

And about the exemple I gave on the first post? Will the engine reduce "all" damage to 40% and then only set the "shock" damage to 10% or will it ignore the "all" setting?

In other words: can I use "all" and then use a specific type after that?
 
O Ilusionista said:
Sorry I am on the phone.
So I can use defense for multiple attacks together like:
Defense attack1 bla bla
Defense burn bla bla
Defense shock bla bla
All together, right?

Absolutely. And I'll do you one better - the math is a simple multiplier (damage taken = force * defense) with no caps in either direction, meaning you can use negative values too. IOW, you could make Iceman take double damage from fire... but gain HP if hit by ice.

And about the exemple I gave on the first post? Will the engine reduce "all" damage to 40% and then only set the "shock" damage to 10% or will it ignore the "all" setting?

In other words: can I use "all" and then use a specific type after that?

Unless I am mistaken, yes to this as well. Just be sure to put the "all" first. Remember, last command wins.

 
Back
Top Bottom