jack1974
Aug 12, 2014
Haha no prob, you found a bug and that's enough for me

renke_
Aug 13, 2014
uh, my talking about integer parsing was complete wrong: 23/25 is identical to int(23/25.0) in python...
[code]>>> print 23/25
0
>>> print int(23/25.0)
0
>>> #narf
>>> #what about summing the diffs?
>>> diff = 0
>>> diff += 23/25.0 # a resistance
>>> diff += 2*1.5 # weapon damage
>>> diff += 3 # e.g. attack
>>> print diff
6.92
>>> print int(diff)
6
>>> # or, to frustrate yayswords (he's the one babbling about rounding all the time, isn't he?)
>>> print int(round(diff,0))
7[/code]
jack1974
Aug 13, 2014
Anyway I don't think the auto-item should be the ultimate comparing tool, since many people would prefer +2 attack over +5 speed for example. Loren didn't had that even (one of the many gazillion improvements I did). So if it's slightly wrong for the resistances I don't think is a big deal.
A solution would be instead of dividing, multiplying. So I keep the resistances value the same, but I multiply the attack, defense, etc by 25 (internally only of course, for the compasion, not in the game!).
renke_
Aug 13, 2014
the result is identical, but I think your solution needs more code

jack1974
Aug 13, 2014
I made the multiply change and now seems fine.
The real question is: should I compare the stats absolute value only, or consider the real impact on the game?
Damage for weapons, or defense for armors, they should have higher weight? If so (as it is now) I probably need to add some extra help in the tutorial explaining why, because if you see two identical weapons but one has +2 defense and another has +1 damage and last one is marked green, players could be confused.
renke_
Aug 13, 2014
don't change it until you pushed a new release - the comparison will never perfect (different needs for different setups) but with the down-weighted resistances it should be okay; but we have to see it in the game before we can ask for more changes

jack1974
Aug 13, 2014
Too late I've changed it already

The problem is that, as you said, if a resistance is 23 divided by 0 basically count nothing. Instead keeping the resistance value normal and multiplying the other values, if two items are completely identical but one has Fire 23 and the other Fire 22, the former is still marked green as it should. So this change definitely makes sense.
For now I'll keep the other stats comparison as they are now, so giving more importance to Damage for weapon and Defense for armors.
renke_
Aug 13, 2014
I meant further changes, not the division SNAFU

imho everything around "Damage for weapons, or defense for armors, they should have higher weight?" can stay untouched for the moment.
jack1974
Aug 13, 2014
Yes exactly, I didn't touch that.
With the new system you have accuracy up to the single resistance


https://pbs.twimg.com/media/Bu5-hfdCMAAbuJ9.jpg:large" style="max-width:100%">
the item is not marked green because the base stats null each other (+1 +1 vs -1 -1) and the Dark 26 is by 1 resistance lower than Water 27. Success!
