Page 1 of 1

Why Shadows escape vaults

Posted: Sun Jan 15, 2012 4:22 am
by edge2054
If I'm understanding this correctly... (ai/shadow.lua in the shadowChooseActorTarget function)

Code: Select all

		if act and act ~= self.summoner and self.summoner:reactionToward(act) < 0 and not act.dead and
			(
				-- If it has lite we can always see it
				(act.lite > 0)
				or
				-- Otherwise check if we can see it with our "senses"
				(self.summoner:canSee(act) and self.summoner.fov.actors[act].sqdist <= sqsense)
			) then

			actors[#actors+1] = act
		end
If you look at the fourth line, shadows can always target actors that have a lite source, like the player. So I think they're using this to target outside of vaults which is really annoying if you have a blood lich in a vault or something.

Re: Why Shadows escape vaults

Posted: Sun Jan 15, 2012 5:45 pm
by yufra
I don't think removing the act.lite check would help since the summoner would be able to canSee the actor (this just checks for stealth/invis IIRC) as long as the player was within the typical "sensing" radius. There is no check there that the projection between summoner and player is valid and does not cross the vault walls, which is what you appear to want. Can you and others be explicit about how you think this should work?

Re: Why Shadows escape vaults

Posted: Sun Jan 15, 2012 6:37 pm
by Canderel
It should be like this:

NO MONSTER SHALL EXIT* A VAULT UNTIL THE VAULT DOOR WAS OPENED.

And even after that, I believe those monsters should leave the vault via the door that was opened. I am not even sure if they should be able to pass undiggable walls inside the vault.

*: Or be summoned from within the vault.

Re: Why Shadows escape vaults

Posted: Sun Jan 15, 2012 7:41 pm
by edge2054
I want new players to not get killed by level 50 Ruin Banshees in Dreadfell or level 1 of the Infinite Dungeon. I don't want players to be constantly harassed by level 50 Shadows that are being spawned by a blood lich that's inside of a vault.

So yeah, pretty much what Canderel said.

Monsters in vaults should not 'know' the player exists if the vault door is closed. They should not be teleporting, using infusions, or trying to path to the player (these last two are more of a technical issue as I believe both eat up a lot of system resources on my old crappy computer and cause massive slow down when a large vault is on the level).

Vault walls should be unpassable and should block all senses basically. A summoner inside of a vault shouldn't even attempt to summon unless the vault door is open. In essence, vaults should be completely static until opened. The game shouldn't be having 30 monsters inside a vault trying to perform actions if those monsters do not have knowledge of the player.

Re: Why Shadows escape vaults

Posted: Sun Jan 15, 2012 8:19 pm
by Varil
Maybe just a way to flag monsters in vaults as having no AI until the vault is opened? Or just wait until the vault is opened to generate the monsters inside it, that could be interesting. I don't think there's any non-glitch way to get into a vault without the door, is there?

Re: Why Shadows escape vaults

Posted: Tue Jan 17, 2012 4:38 am
by benli
For shadows specifically, I think the easiest fix (though maybe not the best) would be to modify their custom phase door talent (in shadows.lua). For the following change, there needs to be a function that tests for the "vaultiness" of a grid, or I'm pretty sure there is at least a "no teleport" test. Anyway, the phase door could fail if both the shadow and the summoner are located in the vault and would succeed if at least one of them is outside. That would require that one of them physically leave the vault before the shadows could teleport out. I suppose a line-of-sight test could also be added to that to allow shadows to leave to attack something they can see. That would prevent blocking shadows for engaging by keeping them in the vault. I don't think its too necessary though.

Re: Why Shadows escape vaults

Posted: Tue Jan 17, 2012 2:38 pm
by yufra
benli wrote:For shadows specifically, I think the easiest fix (though maybe not the best) would be to modify their custom phase door talent (in shadows.lua). For the following change, there needs to be a function that tests for the "vaultiness" of a grid, or I'm pretty sure there is at least a "no teleport" test. Anyway, the phase door could fail if both the shadow and the summoner are located in the vault and would succeed if at least one of them is outside. That would require that one of them physically leave the vault before the shadows could teleport out. I suppose a line-of-sight test could also be added to that to allow shadows to leave to attack something they can see. That would prevent blocking shadows for engaging by keeping them in the vault. I don't think its too necessary though.
That sounds like a reasonably easy fix benli. I'll do just that later today if you don't beat me to it.

Re: Why Shadows escape vaults

Posted: Sun Jan 22, 2012 1:11 pm
by tekrunner
I just ran into a similar but slightly different case. I had a vault generated on the last level of the necro pride. The level also had a ruin banshee, which of course proceeded to wail. Shortly later I started seeing level 60 necromancers coming straight for me. My guess is that they teleported out of the vault and came to me after hearing the banshee. Needless to say, it made that level a lot more difficult than it was supposed to be.

(for the record I did beat it after an epic hour of summoning a ton of fire drakes, but not without losing a life to a big darkness damage spike :/)

Re: Why Shadows escape vaults

Posted: Mon Jan 23, 2012 5:43 pm
by yufra
T_HOWL and T_SHRIEK will both cross vault borders, and these should probably be altered. The only thing that occurs to me is to do a flood fill with a limited radius. I still haven't fixed the shadow's phase door talent and think that edge is probably right that it is their AI targeting that is more problematic than anything.

Re: Why Shadows escape vaults

Posted: Mon Mar 05, 2012 1:50 am
by Ploppy
still a problem in b38

Re: Why Shadows escape vaults

Posted: Mon Mar 05, 2012 2:14 am
by PureQuestion
Also, all liches summon shadows, not just Blood Liches.