Blindness changes

All new ideas for the upcoming releases of ToME 4.x.x should be discussed here

Moderator: Moderator

Post Reply
Message
Author
lukep
Sher'Tul Godslayer
Posts: 1712
Joined: Mon Mar 14, 2011 10:32 am
Location: Canada

Blindness changes

#1 Post by lukep »

Change Blindness so that it only affects sight that you have through normal means. Getting hit with a sandstorm, and temporarily losing telepathy (and arcane eye) does not seem consistent to me.
Some of my tools for helping make talents:
Melee Talent Creator
Annotated Talent Code (incomplete)

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Blindness changes

#2 Post by darkgod »

Hum ? Detection, ESP, arcane eye, preternatural senses are all handled even while blind.
Are you sure?
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

lukep
Sher'Tul Godslayer
Posts: 1712
Joined: Mon Mar 14, 2011 10:32 am
Location: Canada

Re: Blindness changes

#3 Post by lukep »

Finally figured out why I was having trouble reproducing this. It would appear that Arcane Eye (from Unflinching Eye, don't know about level 5 spell) and wands of detection (for sure) do not detect creatures if you cast them while you are blind. They work normally of you cast them, then become blind while under their effects.
Some of my tools for helping make talents:
Melee Talent Creator
Annotated Talent Code (incomplete)

edge2054
Retired Ninja
Posts: 3756
Joined: Fri May 28, 2010 4:38 pm

Re: Blindness changes

#4 Post by edge2054 »

I just got blinded after using vimsense and lost sight of every creature that was in natural los. Creatures behind walls where still visible however.

lukep
Sher'Tul Godslayer
Posts: 1712
Joined: Mon Mar 14, 2011 10:32 am
Location: Canada

Re: Blindness changes

#5 Post by lukep »

Hmm. I might have drawn the wrong conclusions from my testing. It now appears that blindness makes everything in LoS invisible, everything outside of it is unaffected. My tests don't contradict this.
Some of my tools for helping make talents:
Melee Talent Creator
Annotated Talent Code (incomplete)

tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

Re: Blindness changes

#6 Post by tiger_eye »

Hmm, I'll take the easy issue:
lukep wrote: It would appear that Arcane Eye (from Unflinching Eye, don't know about level 5 spell) [...] do not detect creatures if you cast them while you are blind.
"Arcane Eye" only works while blind if it is greater than or equal to talent level 5. This is sort of included in its description: "At level 5 its vision can see through invisibility, stealth and all other sight affecting effects"

As for the other things...
edge2054 wrote:I just got blinded after using vimsense and lost sight of every creature that was in natural los. Creatures behind walls where still visible however.
Were the creatures in natural LoS that you lost sight of perchance near a vault or were you in a special level? Were the creatures friendly or neutral to you?

My other guess would be that displaying the map--and all entities on the map--checks "player:canSee(a)" rather than the more robust "has_seens" cache that is created via "player:playerFOV()", which does check things like arcane eye and vimsense. Don't know if that's actually the case, though.

lukep
Sher'Tul Godslayer
Posts: 1712
Joined: Mon Mar 14, 2011 10:32 am
Location: Canada

Re: Blindness changes

#7 Post by lukep »

Arcane Eye level 2 worked just fine for me while blind in one of my tests (but not another). Here's how I did them.

Arcane Eye able to see through blindness:
1. Activate Unflinching Eye, putting the Arcane Eye on the far side of a wall, near some enemies that will not move in Norgos Lair.
2. Switch to another amulet, so I can blind myself.
3. Cast Dark Torrent (25% chance to blind) on myself until it works.
4. I can still see through the arcane eye.

Arcane Eye not able to see through blindness:
1. Get hit by sand breath from multihued drake/wyrm in Tannen's Tower, blinding me.
2. Use wand of detection. I can see two of the four or so dragons, but they disappear from view when I mouseover them.
3. Wear Unflinching Eye, then activate it after sensing is finished, but while still blind.
4. Place the Arcane Eye at the far side of the room.
5. Arcane Eye does not work.

In hindsight, I should have left the room immediately after casting Arcane Eye, to check if that would have allowed me to see (as it's no longer in my LoS).
Some of my tools for helping make talents:
Melee Talent Creator
Annotated Talent Code (incomplete)

edge2054
Retired Ninja
Posts: 3756
Joined: Fri May 28, 2010 4:38 pm

Re: Blindness changes

#8 Post by edge2054 »

For me there was nothing odd going on, I was in Lake of Nur and got inked. No vaults.

Enemies behind walls remained visible, enemies in my natural LOS vanished.

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Blindness changes

#9 Post by yufra »

tiger_eye and I dived into the code last night to look at the Arcane Eye portion of the code, and note the last night because I think both of us were a bit bleary eyed when looking at the code. I believe the issue is that the way Arcane Eye is handled in mod.class.Player:playerFOV function does not properly account for the TL5 "true_seeing". If you have TL5 then you instantly "see" the tile with any actor on it, but you still have to resolve mod.class.Actor:canSee to determine if you can actually see the actor. The way mod.class.Actor:canSee work is by storing a cache of what you can see every round and then clearing it between rounds. If you are blind the canSee call will be false and you won't be able to see the actor on the map. The Arcane Eye section in mod.class.Player:playerFOV should probably set the can_see_cache so that the actor will definitely be seen. Something like this (untested):

Code: Select all

	-- Handle arcane eye
	if self:hasEffect(self.EFF_ARCANE_EYE) then
		local eff = self:hasEffect(self.EFF_ARCANE_EYE)
		local map = game.level.map

		core.fov.calc_circle(
			eff.x, eff.y, game.level.map.w, game.level.map.h, eff.radius, function(_, x, y) if map:checkAllEntities(x, y, "block_sight", self) then return true end end,
			function(_, x, y)
				local t = map(x, y, map.ACTOR)
				if t and (eff.true_seeing or self:canSee(t)) then
					map.seens(x, y, 1)
					self.can_see_cache[t]["nil/nil"] = {true,100}
				end
			end,
			cache and map._fovcache["block_sight"]
		)
	end
<DarkGod> lets say it's intended

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Blindness changes

#10 Post by darkgod »

fixed
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply