Sight calculation

Started by Beider, February 25, 2017, 07:56:36 AM

Previous topic - Next topic

Beider

I noticed something that didn't make sense to me, I got a character with Cataract on both eyes (-35% sight).

http://steamcommunity.com/sharedfiles/filedetails/?id=871835264

Now what I find weird is the calculation used, I got -35% vision in both eyes, but my total ends up at 30%.

http://steamcommunity.com/sharedfiles/filedetails/?id=871835748

Obviously this happens because both subtractions are added up and just subtracted from 100% vision. But this makes no sense, if I got 65% vision on both eyes my total should be 65% vision, not 30%.

In other words, the way overall sight is calculated at the moment seems wrong to me.

XeoNovaDan

Each eye accounts for 50% of vision. If each eye loses 35% vision, there's 15% vision left per eye.

As there are naturally two eyes, 2x15 = 30%

Beider

Quote from: XeoNovaDan on February 25, 2017, 08:03:39 AM
Each eye accounts for 50% of vision. If each eye loses 35% vision, there's 15% vision left per eye.

As there are naturally two eyes, 2x15 = 30%

That doesn't make sense either, even if each eye account for 50% then you would not state the sight loss in a number from 0-100%. What happens then if my sight reduction in each eye is 70%? Do I get negative percentage vision?

Even if each eye is 50%, the calculation ends up like this.

35% of 50% is 17.5%. As such each eye should have a vision of 50-17.5 = 32.5%

32.5 * 2 = 65%

XeoNovaDan

It's not a proportional decrease, it's simply a static subtraction (i.e. (50-35)x2, not (50x0.65)x2)

Beider

#4
Quote from: XeoNovaDan on February 25, 2017, 08:20:11 AM
It's not a proportional decrease, it's simply a static subtraction (i.e. (50-35)x2, not (50x0.65)x2)

If so I think the health screen needs to be changed, if I have 50% reduced vision in each eye that would make my character blind. That is a very illogical way of displaying it.

Jimyoda

#5
Quote from: Beider on February 25, 2017, 08:58:52 AM
Quote from: XeoNovaDan on February 25, 2017, 08:20:11 AM
It's not a proportional decrease, it's simply a static subtraction (i.e. (50-35)x2, not (50x0.65)x2)

If so I think the health screen needs to be changed, if I have 50% reduced vision in each eye that would make my character blind. That is a very illogical way of displaying it.
This was already explained, but you're still doing the math differently than was explained. Do not gloss of the fact that each has has it's own health from 0-100%. And naturally, each eye accounts for half the overall vision, but that still does not mean that each eye has health from 0-50% - No, it is still 0-100%.
So with two eyes at 100%, let's determine overall sight. Even before math we know it should come out to 100%.  Each eye's contribution towards sight is half (.5) of its health, meaning we multiply it by .5. Then to figure the their combined total, we add those results together.
The formula is:
(LeftEyeHealth * .5) + (RightEyeHealth * .5) = Sight

Now apply this to your example of each eye at 50%. You should reach the conclusion that overall sight is 50%.


Edit: OK, that wasn't right. Yeah, with cataracts it's simply 100%-35%-35%=30%.

Quote from: Rahjital on July 09, 2015, 03:09:55 PM
"I don't like that farmers chop people up."

Obviously she has already played Rimworld :P

Read the wiki. Edit the wiki. Let the wiki be your guide.
http://rimworldwiki.com/

Beider

#6
Quote from: Jimyoda on February 25, 2017, 10:58:16 AM
Quote from: Beider on February 25, 2017, 08:58:52 AM
Quote from: XeoNovaDan on February 25, 2017, 08:20:11 AM
It's not a proportional decrease, it's simply a static subtraction (i.e. (50-35)x2, not (50x0.65)x2)

If so I think the health screen needs to be changed, if I have 50% reduced vision in each eye that would make my character blind. That is a very illogical way of displaying it.
This was already explained, but you're still doing the math differently than was explained. Do not gloss of the fact that each has has it's own health from 0-100%. And naturally, each eye accounts for half the overall vision, but that still does not mean that each eye has health from 0-50% - No, it is still 0-100%.
So with two eyes at 100%, let's determine overall sight. Even before math we know it should come out to 100%.  Each eye's contribution towards sight is half (.5) of its health, meaning we multiply it by .5. Then to figure the their combined total, we add those results together.
The formula is:
(LeftEyeHealth * .5) + (RightEyeHealth * .5) = Sight

Now shown in a table.




Left eye   100% * .5 =50%
Right eye   100% * .5 =50%
Overall sight =100%

Now apply this to your example of each eye at 50%. You should reach the conclusion that overall sight is 50%.

In my example each eye had a reduction of 35%, which means they each had an efficiency of 65%. Using your math for both eyes I get,
65% * .5 = 32.5%

Multiply by two since we have two eyes, 32.5% * 2 = 65%.

If you look at the screenshots you see the reduction is 35% on each eye, yet overall vision is reduced to 30%. This would only make sense if the percentages per eye goes from 0 - 50%, where 50% = blind on that eye.

This has to be either a UI issue or a calculation issue. As it stands now if I a rimworld character has 90% reduced vision on one eye, then they would have 10% overall reduced vision even though their other eye works perfectly. That makes no sense.

O Negative

...

Why is this thread so long?

A cataract in one eye is coded to offset a person's vision by -35% Naturally, the game gives a pawn cataracts in both eyes at the same time. So, -35%*2 = -70%

That's why you end up with 30% vision with two otherwise perfectly "healthy" eyes.

Each eye accounting for 50% of vision has nothing to do with how RimWorld cataracts currently work.

Beider

Quote from: O Negative on February 25, 2017, 11:46:43 AM
...

Why is this thread so long?

A cataract in one eye is coded to offset a person's vision by -35% Naturally, the game gives a pawn cataracts in both eyes at the same time. So, -35%*2 = -70%

That's why you end up with 30% vision with two otherwise perfectly "healthy" eyes.

Each eye accounting for 50% of vision has nothing to do with how RimWorld cataracts currently work.

Alright my bad, then it's just that the UI didn't make sense to me. My impression was since both eyes were listed separately each percentage represent the reduction in sight for that eye only and not overall sight.

O Negative

Quote from: Beider on February 25, 2017, 11:52:22 AM
Alright my bad, then it's just that the UI didn't make sense to me. My impression was since both eyes were listed separately each percentage represent the reduction in sight for that eye only and not overall sight.

It's not your fault, lol. Cataracts were just poorly designed. They don't even have stages.