Tales of Maj'Eyal

Tales of Maj'Eyal

View Stats:
monad Sep 26, 2016 @ 2:52am
Is there such a thing as too much rest?
Last edited by monad; Sep 26, 2016 @ 2:56am
< >
Showing 1-8 of 8 comments
wckowalski Sep 26, 2016 @ 10:24am 
What, did you have a sustain active that drains health continually, but were able to outheal it thanks to vitality?
monad Sep 26, 2016 @ 1:53pm 
Notice below the minimap, I have Berserker's Rage sustained. Apparently the talent detected an enemy, but the auto-explore did not.
Patashu Sep 26, 2016 @ 8:04pm 
Weird, I didn't know autoexplore could fail to see a monster.
Dr Gori Sep 26, 2016 @ 8:42pm 
Originally posted by Patashu:
Weird, I didn't know autoexplore could fail to see a monster.
usually, i have the reverse problem - autoexplore seeing a monster that cannot get to me nor me to it.
wckowalski Sep 26, 2016 @ 9:45pm 
Line of sight issues could be a lot worse.

A while ago I was playing Dungeonmans and line of sight in that game is not symmetric, so sometimes enemies out of your line of sight around corners could see and attack you and vice versa. Sometimes you could repeatedly shoot an enemy without them responding.
Patashu Sep 27, 2016 @ 7:28pm 
Originally posted by wckowalski:
Line of sight issues could be a lot worse.

A while ago I was playing Dungeonmans and line of sight in that game is not symmetric, so sometimes enemies out of your line of sight around corners could see and attack you and vice versa. Sometimes you could repeatedly shoot an enemy without them responding.
I suspect LoS is slightly asymmetric in ToME4, based on the notes in this addon: https://te4.org/games/addons/tome/qt-sight-overhaul

I am not familiar with the details however.

Dungeonmans is definitely a more notable case.
monad Sep 27, 2016 @ 10:12pm 
Originally posted by Patashu:
Weird, I didn't know autoexplore could fail to see a monster.

It could have been the other way around, that Berserker Rage was incorrectly kept sustained. Once I started walking around, it deactivated and I didn't manage to locate a nearby enemy. Or they were both working as intended.

In mod/class/Player.lua in the tome module, there's a restCheck function. It references the spotHostiles function in the same file (relevant part, line 821):

local seen = {}
if not self.x then return seen end

-- Check for visible monsters, only see LOS actors, so telepathy wont prevent resting
core.fov.calc_circle(self.x, self.y, game.level.map.w, game.level.map.h, self.sight or 10, function(_, x, y) return game.level.map:opaque(x, y) end, function(_, x, y)
local actor = game.level.map(x, y, game.level.map.ACTOR)
if actor and self:reactionToward(actor) < 0 and self:canSee(actor) and game.level.map.seens(x, y) then
seen[#seen + 1] = {x=x,y=y,actor=actor, entity=actor, name=actor.name}
end
end, nil)

Which in turn references the canSee function in mod/class/Actor.lua. The Berserker Rage talent is defined in data/talents/teqniques/strength-of-the-berserker.lua and includes the function hasFoes (line 74):

hasFoes = function(self)
for i = 1, #self.fov.actors_dist do
local act = self.fov.actors_dist[i]
if act and self:reactionToward(act) < 0 and self:canSee(act) then return true end
end
return false
end

This function references the canSee function as well. It appears that spotHostiles is having FoV calculated, whereas hasFoes is simply looking through a list. I didn't figure out how the list was being populated, didn't bother looking through all the files that mentioned actors_dist, only the ones that seemed promising. Perhaps someone familiar with the code can explain.

Beyond that, looking back at the restCheck function, a comment asserts that "We can rest if no hostiles are in sight, and if we need life/mana/stamina/psi (and their regen rates allows them to fully regen)" and performs the check like so (relevent part, line 972):

-- Check resources, make sure they CAN go up, otherwise we will never stop
if not self.resting.rest_turns then
if self.air_regen < 0 then return false, "losing breath!" end
if self.life_regen <= 0 then return false, "losing health!" end
if self.life < self.max_life and self.life_regen> 0 then return true end
if self.air < self.max_air and self.air_regen > 0 and not self.is_suffocating then return true end

Apparently the 2% life depletion from Berserker Rage is not factored into the life_regen variable. However it's implemented, it should probably be taken into account in this check, regardless of whether everything else is working properly. Is there an issue tracker somewhere to mention this?
Last edited by monad; Sep 28, 2016 @ 11:09am
Patashu Sep 28, 2016 @ 5:46am 
IDK if there's an issue tracker, but there is a Bugs forum http://forums.te4.org/viewforum.php?f=42&sid=7af711d0a59e50937ea8ab8b81cf1fb7
< >
Showing 1-8 of 8 comments
Per page: 15 30 50

Date Posted: Sep 26, 2016 @ 2:52am
Posts: 8