Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Idle chatter (http://angband.oook.cz/forum/forumdisplay.php?f=6)
-   -   Resistances: additive vs boolean (http://angband.oook.cz/forum/showthread.php?t=4115)

pampl February 9, 2011 07:11

Resistances: additive vs boolean
 
I've been thinking about resistances and I'm not sure which of two options is better: the classic Angband system, where you either have/don't have a resistance (complicated slightly with temp resistances and immunities and vulnerabilities), or the approach used by OAngband/EyAngband/FAAngband and most (all?) Diablo-ish games: each resistance on your equipment adds to the net total resistance. That doesn't have to be a percentile figure, e.g. in Torchlight resistance is a straight damage reduction. It's not a completely black-and-white situation, as there are sometimes resistance caps which render any additional resistance pointless- similar to already having a resistance in Angband's true/false system.

I think I prefer Vanilla Angband's system, because the boolean nature of it makes having a resistance vs. having a "hole" a stark difference that clarifies the consequences of equipment decisions. On the other hand, the granularity that's usually present in the additive system means more possible variety. I'm interested to hear all your opinions on it, even though we're probably slightly biased towards Angband's way of doing it ;)

Philip February 9, 2011 07:18

I went with the O system because I think it allows for more variety and such, and it allows for more specialization. Have 60% chaos resist? Guess who you're going after.

Storch February 9, 2011 08:25

Quote:

Originally Posted by Philip (Post 48346)
I went with the O system because I think it allows for more variety and such, and it allows for more specialization. Have 60% chaos resist? Guess who you're going after.

O system is obviously "better". Anyway I like boolean resistances more because O system tempts me to optimize ad nauseam and makes me perpetually discontent. What I don't like and understand in V system are high resistances - why they are random, why there are arbitrary damage caps etc.

Philip February 9, 2011 09:14

Wait a sec. Are we all in agreement or do I just not understand the poll?

Storch February 9, 2011 10:20

Quote:

Originally Posted by Philip (Post 48351)
Wait a sec. Are we all in agreement or do I just not understand the poll?

I don't know, I didn't vote :-)

Philip February 9, 2011 10:35

OK, now I'm *very* confused, pampl seems to like the Vanilla system, but if I understand correctly I just voted for the O system. Maybe pampl hasn't voted either. To adress pampl's concern for the clear difference between holes and not holes I think it'll be still quite clear.

pampl February 9, 2011 13:17

Quote:

Originally Posted by Philip (Post 48355)
OK, now I'm *very* confused, pampl seems to like the Vanilla system, but if I understand correctly I just voted for the O system.

I managed to mis-vote in my own poll. I should have waited until I got some sleep before trying to do such a complicated task

buzzkill February 9, 2011 13:18

The additive FA/O system is better. It makes every resistance on every piece of equipment matter. It also provides some 'random' variability (just because you have rBase covered doesn't mean that they are covered equally). Furthermore, you can achieve higher levels of resistance without bothering with potions/spells (V-style double resists).

Philip February 9, 2011 13:57

So to set the record clear, it's actually 8-2, right?

pampl February 9, 2011 23:25

No doubt it was at the time you wrote it; as of now it's 9-5. Additive resistances are more popular than I would have predicted; I guess I should be considering them more seriously.

camlost February 9, 2011 23:50

It would be great if AngbandBase could accomodate both options on a per-variant basis.

Nick February 10, 2011 02:30

Quote:

Originally Posted by camlost (Post 48375)
It would be great if AngbandBase could accomodate both options on a per-variant basis.

At this point, AngbandBase is all lower-level code than where resistances appear, so it's agnostic to them.

andrewdoull February 10, 2011 08:30

I can't see the option for geometric resistances, which is what Unangband uses.

1 level of resistance reduces damage by half (1/2), 2 levels by 1/3, 3 levels by 1/4 etc.

Andrew

Philip February 10, 2011 10:14

Quote:

Originally Posted by andrewdoull (Post 48389)
I can't see the option for geometric resistances, which is what Unangband uses.

1 level of resistance reduces damage by half (1/2), 2 levels by 1/3, 3 levels by 1/4 etc.

Andrew

That is indeed an interesting idea, although I think that you meant that 1 level of resistance reduces damage by 1/2(still sensible), 2 levels by 2/3(not 1/3 which would punish you for multiple resistance) and so on, where damage is reduced by X/X+1 where X is number of resistances. Question: Are those attacks beefed up? This way they do less damage, but maybe you went the O way, where nothing much was done and noone actually cares.

Nick February 10, 2011 10:18

Quote:

Originally Posted by andrewdoull (Post 48389)
I can't see the option for geometric resistances, which is what Unangband uses.

"Additive" here means multiple sources gets you more resistance - so Un is additive in this sense.

Timo Pietilš February 10, 2011 13:28

Quote:

Originally Posted by pampl (Post 48344)
I've been thinking about resistances and I'm not sure which of two options is better: the classic Angband system,[snip] or the approach used by OAngband/EyAngband/FAAngband and most (all?) Diablo-ish games: each resistance on your equipment adds to the net total resistance.

I could vote each way. It really doesn't matter which one is "better" because they can't be "better" than anything else. It all depends of how game is balanced, and balancing is made after game rules have been set.

Which of the rules is easier to balance? I don't know. Which one allows more variety? Also don't know, because game is a combination-game. Additive resistances might actually reduce variety by making choices less drastic.

I think I vote for vanilla system.

Tiburon Silverflame February 10, 2011 23:53

I'm not sure the question's answerable without discussing implementation specifics.

In a purely additive system, a huge issue is that the stacking can result in total immunity, especially for fairly common resists like the basic four. This suggests that most items need to give relatively low resistance percentages...but that probably makes inventory management almost impossibly complex, because we now *need* double or triple resists. Temporary resists could easily become temporary immunities.

So, implementation issues become:

--how many item slots have ego types that grant resists? Do we need to review the existing types? And how will artifacts play a role...especially things like the ring of power. Note that defender weapons may become *incredibly* powerful in this scenario.

--what is the appropriate percentage for the types we keep?

And I still see, at best, a very fragile system insofar as balance goes.

Andrew's accumulative approach is a heckuva lot simpler, in that we never hit immunity, that the first gives what it gives now so there's not a total overhaul, and that there's diminishing returns, which I think is good here. It's inherently more robust. However, are we going to find ourselves yelling out for that great crystal drake to do more damage, because we've got double shards resistance? The simplicity of the V system allows for much simpler monster design.

pampl February 11, 2011 03:42

I think most additive systems sidestep the immunity issue by capping resistances then requiring a separate flag if you want to go above the cap. The Un approach appeals to me too.. though it doesn't reward specialization as much as the straight additive approach does, where the value of each point of resistance grows the more resistance you already have (until you reach the cap and they stop being worth anything). It would be kind of cool having players stockpile different sets of EQ to deal with different kinds of enemies, especially with a quest system that let you know in advance what you're going to be facing. Also the strategy involved in min-maxing resists in the straight additive system sounds more fun to me, though I've never gotten very far in Un so I'm not speaking from experience.

Not entirely relevant, but I've been thinking about resistance reducers as well. I'm not sure which approach is best:
A) the current Angband approach of having them be unnecessary because the player doesn't have a full set of resists and immunities until the very end, so there's no need for an 'arms race'. Also allowing absurd overkill for unresisted damage so that resists become extremely important (OK, not true for all resists, but let's pretend)
B) having especially potent attacks cut through resistance, either by a straight subtraction or by dividing them.. e.g. hellfire is a 150% strength fire attack, so it subtracts 50% (or divides by 1.5) from the target's resistance. Both ways means the biggest proportional change is among people with the highest resistance, which seems wrong for some reason, though maybe it's how resistance reduction should work?
C) just doing a straight subtraction/division of resistances across the board as the levels increase, a la Diablo 2
D) relying on unresistable damage, e.g. hellfire is 50% fire damage and 50% mana damage, so fire resistance doesn't help much. This gets around high resistances but it does so in a way that makes them much less valuable, not more valuable
E) temporarily deactivating individual sources of resistance so that redundant resists gain value, e.g. >The succubus tricks you into taking off your trousers of fire resistance! >The succubus casts Hellfire!
I guess the problem is conflicting design goals: how can resistances stay valuable while you inflate them, without making them so essential that the only viable choice is the set of maximally resistant armor?

andrewdoull February 11, 2011 04:47

Quote:

Originally Posted by Philip (Post 48394)
That is indeed an interesting idea, although I think that you meant that 1 level of resistance reduces damage by 1/2(still sensible), 2 levels by 2/3(not 1/3 which would punish you for multiple resistance) and so on, where damage is reduced by X/X+1 where X is number of resistances. Question: Are those attacks beefed up? This way they do less damage, but maybe you went the O way, where nothing much was done and noone actually cares.

I've not really needed to beef up the attacks - if anything they are weaker. Don't forget Angband 2/3 damage resistance is the equivalent of having two resist foo items in Unangband, so the basic resistances are tougher to get to start with.

Andrew

Philip February 11, 2011 07:42

Yes, I don't think anyone really understands the O system. In O, it would take about 8 or so resistance items to get IM_BASE, and the more you invest, the lower return you have. It also allows semiimunity items, which would add 80% resistance under normal circumstances. It does not work in the way that wearing an armor with rbase, a shield with rbase and a defender weapon give you immunity or something. That would give you maybe 70% resistance.

the Invisible Stalker February 11, 2011 09:46

Either system is playable, once you understand how it works. As coded, the O system is more transparent for new players than the V system, because the 'C' command shows you your resistance percentages. But that's more of a user interface question than a gameplay question. The O base resistance progression starts 0% -> 45% -> 75% -> 85%. After three resistances, it's really not worth the bother any more. There are also minor resistances, which seem to be worth half a resist. Depending on your class and the resistance, you might also have the progression -30% -> 25% -> 60%. I can't check how these continue without recalling to town. Not all higher resists in O are percentage based, only light, dark, confusion, sound, shard, nexus, nether, chaos, and disenchantment. The others are binary. Often the same equipment item will have fewer resists in O than in V, or minor resists instead of full, so holes in the higher resists are common even in the endgame, and you rarely get multiple high resists. But that's the way O is balanced, not a consequence of additive resists in general.

dos350 February 11, 2011 12:47

as a MAJOR diablo 2 advocate, i voted additive, but i dont think it would work in vanilla angband, ee~ binary feels good , but it took me awhile to get used to..

Philip February 11, 2011 12:49

Why should it not work? There are two perfectly good implementations, both mentioned in the thread in quite some detail.

dos350 February 11, 2011 15:01

please no, so wat? , eee

Philip February 11, 2011 15:09

What on earth is that post supposed to mean? Could you explain using more that 4 words?

Timo Pietilš February 11, 2011 15:13

Quote:

Originally Posted by Philip (Post 48496)
What on earth is that post supposed to mean? Could you explain using more that 4 words?

I don't think you will get anything comprehensible from eek. At most you get some yeek-talk. Apparently he is quite incapable of writing like a human being.

half February 11, 2011 19:14

There are several different specifics that can be used for 'additive' resists. First, let's suppose that all resists are either present or not on an object or temporary source (like now) but that having multiple copies of a resist improves your resistance. There are a few obvious approaches:

Code:

(1):  66.7%, 88.9%, 96.3%, ...  (2/3, 8/9, 26/27, ...)
(2):  50.0%, 75.0%, 87.5%, ...  (1/2, 3/4, 7/8, ...)
(3):  50.0%, 66.7%, 75.0%, ...  (1/2, 2/3, 3/4, ...)

(1) is closest to the current system, and continually divides the damage by 3. This currently occurs with permanent + temporary resistance, and this would simply extend this to incorporate multiple permanent sources. (2) is similar, but halves the damage instead of dividing by 3. This is perhaps better balanced with current resistance distribution on items. (3) is weaker again, but quite elegant.

Alternatively, some systems have different (numerical) bonuses to resistance. For example an item might give +40% resistance to fire and another might give +20% resistance to fire. There are three natural ways for this to combine in an 'additive' way:

Code:

(4): add the numbers, if it is 100% or greater, you are immune
(5): add the numbers with a cut-off maximum resistance such as 90%
(6): 'co-multiplication'

(4) and (5) are fairly self-explanatory. (5) features in Diablo.

(6) is more tricky, but features in at least one variant (FA?). You take the complements of the resistances (the complement of X% is (100-X)%) and then multiply these and then take the complement of that. This is also the way that you 'add' probabilities to get the probability of (A or B) from the probability of A and the probability of B, and often comes up in mathematics (e.g. in De Morgan's laws).

For example, if you have +40% resistance from one source and +20% from another, the complements are +60% and +80%. Multiplying these gives +48%, and the complement of this is +52%, so you have +52% resistance.

Note that (6) is the equivalent to (1) and (2). For example, if you have two items with 50% resistance, it gives you 75% resistance, and if you have three it gives you 87.5% resistance. Two items with 66.7% resistance give you 88.9% resistance etc.

I think all six options are workable, but people might want to refer to this list when thinking about them as some of them have problems that others do not. For example (1) makes the game strictly easier, while the others do not.

Derakon February 11, 2011 20:01

My general opinion is that important algorithms should be as transparent as possible while still achieving the desired effect. Thus I'd suggest simply that resists divide damage by (N + 1), where N is the number of sources of resistance (thus 1/2, 1/3, 1/4, 1/5, etc.). Simple, scalable, easy to understand, doesn't distinguish between permanent and temporary resists or between basic 4, poison, and the rest. Basic elements are made about 16% more dangerous (which if necessary could be compensated for by tweaking damage formulae and caps), high element resistance is regularized.

Nick February 11, 2011 20:54

Quote:

Originally Posted by half (Post 48533)
(6) is more tricky, but features in at least one variant (FA?). You take the complements of the resistances (the complement of X% is (100-X)%) and then multiply these and then take the complement of that. This is also the way that you 'add' probabilities to get the probability of (A or B) from the probability of A and the probability of B, and often comes up in mathematics (e.g. in De Morgan's laws).

For example, if you have +40% resistance from one source and +20% from another, the complements are +60% and +80%. Multiplying these gives +48%, and the complement of this is +52%, so you have +52% resistance.

Yes, FA. I like to think of it (and it is coded) as reduction of damage - so in your example the first item reduces damage to 60%, and then the second item cuts off 20% of that, leaving damage at 48%.

pampl February 11, 2011 23:27

Quote:

Originally Posted by Derakon (Post 48539)
My general opinion is that important algorithms should be as transparent as possible while still achieving the desired effect. Thus I'd suggest simply that resists divide damage by (N + 1), where N is the number of sources of resistance (thus 1/2, 1/3, 1/4, 1/5, etc.). Simple, scalable, easy to understand, doesn't distinguish between permanent and temporary resists or between basic 4, poison, and the rest. Basic elements are made about 16% more dangerous (which if necessary could be compensated for by tweaking damage formulae and caps), high element resistance is regularized.

If we want higher resistances to reduce damage by less than low resistances we could always generalize that as damage = x/(x+n) where x = 1 for low resists and maybe 2 or 3 for high ones.

edit: haven't thought about it much, but this might be a good system for resistance reduction as well

Philip February 12, 2011 06:48

The FA system might be tricky, but as long as the code is easy to get, I think there is no trouble in letting the computer figure it out. As long as the character screen tells you what percent resists you have, I fully support it. It makes multiple resistance items less and less important, but still useful.
3 is the Un way if I am not mistaken. Also interesting, but I still prefer the O/FA system(yeah, well that applies pretty much everywhere)

half February 12, 2011 10:40

Quote:

Originally Posted by Derakon (Post 48539)
My general opinion is that important algorithms should be as transparent as possible while still achieving the desired effect. Thus I'd suggest simply that resists divide damage by (N + 1), where N is the number of sources of resistance (thus 1/2, 1/3, 1/4, 1/5, etc.). Simple, scalable, easy to understand, doesn't distinguish between permanent and temporary resists or between basic 4, poison, and the rest. Basic elements are made about 16% more dangerous (which if necessary could be compensated for by tweaking damage formulae and caps), high element resistance is regularized.

So this is what I called (3). One thing to note about it is that you may need to reduce the damage done by breathers of the big 5, if you want to avoid insta-death with one resistance (also true of (2)). Also note that it requires 8 sources of resistance to get to the stage of current 'double resists' and that we are already happy to hand out immunities more easily than that.

half February 12, 2011 10:43

Quote:

Originally Posted by Nick (Post 48543)
Yes, FA. I like to think of it (and it is coded) as reduction of damage - so in your example the first item reduces damage to 60%, and then the second item cuts off 20% of that, leaving damage at 48%.

Exactly. You could think of 'vulnerabilities' instead of resistances. You start with a vulnerability of 100% (normal) and then find an item of vulnerability 60% and one of vulnerability 80% and then your vulnerability is only 48% (meaning you only take 48% of normal damage). Immunity is 0% vulnerability. In the FA system the vulnerabilities multiply or, equivalently, the resistances co-multiply.

bron February 14, 2011 19:02

I voted in favor of "boolean" (i.e. the way it is now). I don't object to the idea of "additive," I just feel the current system works fine and don't feel like having it changed.

I will say however that if there *is* a move to another form of resist calculation, then I would favor the version where each extra instance of a resist cuts the damage by a fixed percentage, with 50% being the number of choice mostly because it is easy to express and makes sense: each additional instance of a resist, whether permanent or temporary, cuts the damage in half. This also neatly captures the current special-case 50% acid-resist that armor gives by simply counting armor as one level of acid resist (I realize the *code* may not be able to unify that all together, but the *concept* in the player's mind is uniform and easy to express).

Pete Mack February 15, 2011 05:28

Quote:

Originally Posted by bron (Post 48699)
I will say however that if there *is* a move to another form of resist calculation, then I would favor the version where each extra instance of a resist cuts the damage by a fixed percentage, with 50% being

Just to be contrary, I think if we must go with additive resistances, the ratio should be 1/(0.5*(1+sqrt(5)). That's a much prettier ratio than 1/2.

PowerDiver February 15, 2011 08:21

Quote:

Originally Posted by Pete Mack (Post 48708)
Just to be contrary, I think if we must go with additive resistances, the ratio should be 1/(0.5*(1+sqrt(5)). That's a much prettier ratio than 1/2.

Isn't there a design paradigm favoring integer style stuff? The obvious :) compromise is to divide by Fibonacci numbers, i.e. divide damage by F_{n+2} for n resists.

Pete Mack February 16, 2011 04:20

Quote:

Originally Posted by PowerDiver (Post 48710)
Isn't there a design paradigm favoring integer style stuff? The obvious :) compromise is to divide by Fibonacci numbers, i.e. divide damage by F_{n+2} for n resists.

I suspect you mean F_{n+1}, for this to make any sense at n=0...
But quite so, your pure integer paradigm is much better.

PowerDiver February 16, 2011 04:36

Quote:

Originally Posted by Pete Mack (Post 48740)
I suspect you mean F_{n+1}, for this to make any sense at n=0...
But quite so, your pure integer paradigm is much better.

The standard def is F_1 = F_2 = 1, with F_0 = 0.. I double-checked before I posted. If you want damage reduction for 1 resist but not for 0 resists I think I got it right.

Did you know that F_n = round(\phi^n / \sqrt{5})? Your earlier comment made you sound like a \phi fanatic, so you might want to remember that. You can express \sqrt{5} in terms of \phi as well if that tickles your fancy.

Pete Mack February 16, 2011 04:41

Whoops, you are right. And I knew you could represent the two as a closed formula, but I forgot what the formula is.

dos350 March 8, 2011 06:32

Bool!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


All times are GMT +1. The time now is 02:50.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.