Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd los check to npc positions on overmap... #16430
Conversation
This comment has been minimized.
This comment has been minimized.
AdonaiJr
commented
Apr 29, 2016
•
|
I guess maybe some people will complain, but I particularly think it add's to immersion and (some level of) better realism. As a vision (sugestion) of mine, maybe in the future (you awesome dev's guys) could implement some kind of mechanic's like finding other people (or new missions) scanning radio frequencies (I'm not sure if there's already something of this kind). Maybe just people you've met before and asked for their frequency, by dialog options. |
Coolthulhu
self-assigned this
Apr 29, 2016
This comment has been minimized.
This comment has been minimized.
|
Doesn't work properly with z-levels - you can see NPCs above your basement. Other than that it seems to be working. I'll wait for others to tune in about the balancing, though. Losing (as in, being unable to find) a NPC can be annoying, especially without an ability to shout to all nearby NPCs to respond and say where they are. |
Coolthulhu
removed their assignment
Apr 29, 2016
This comment has been minimized.
This comment has been minimized.
I couldn't reproduce this problem. While in an evac shelter basement, I couldn't see an NPC on the overmap when the (follower & non-follower) NPC was directly above me, nor when the npc was 1 tile away to the north in the upper layer. Any suggestion for reproducing this problem?
In day lighting, the overmap view distance is pretty far. Something like 10 overmap tiles. That's about as far as you could reasonably yell. Though, at night, yea, you'd expect you could yell to locate someone. |
This comment has been minimized.
This comment has been minimized.
Try getting a good light source so that your '@' is in daylight level of brightness.
NPCs seen with regular sight aren't a problem. The problems start when the NPC is behind a corner or something like that. |
This comment has been minimized.
This comment has been minimized.
Tried with a flashlight, but no luck reproducing the issue. Did you experience this at a shelter basement? or somewhere else?
Overmap los doesn't factor in corners. iirc, it's just a distance calculation using the characters overmap sight points (increased with some traits and binoculars) plus lighting. Zombie horde markers on the overmaps uses the same fyi. |
This comment has been minimized.
This comment has been minimized.
You need something that would let you see at near full range. The overmap sight function has a breakpoint at 48. A floodlight should work. Add bird eye and scout mutations and binoculars item to see it further. Each tile of solid stone is worth 5 field tiles, so at perfect conditions, you should have a range of 5-6 tiles. |
This comment has been minimized.
This comment has been minimized.
|
@Coolthulhu Oh, I see what's happening. While underground, sight_points are always going to be 0 (Only exception to this is using debug night vision. Fey Nightvision, Bird Eye, Binoculars aren't even sufficient). The natural_light_level value() is LIGHT_AMBIENT_MINIMAL while underground (zlevel < 0). See Lines 5801 to 5802 in 9ed289c Line 23 in 9ed289c Lines 4004 to 4006 in 9ed289c If you're above ground, then, yes, it's possible to see an NPC above/below you on the overmap. This bug in the overmap los check affects other calculations too (Hordes and mongroups, whatever those are, are the only others using this calculation as far as I see, though not sure if either of those can appear underground.).
I surmise you either had debug night vision or were actually looking down into the basement (or up at a multi-z-level building). Is that accurate? |
This comment has been minimized.
This comment has been minimized.
|
Added commit to prevent overmap los from crossing underground z levels. |
lucianposton
force-pushed the
lucianposton:fix-superman-vision
branch
to
41c7b33
Apr 30, 2016
lucianposton
referenced this pull request
Apr 30, 2016
Closed
Feature Request: Communicate with NPCs via radio #16454
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Who are we waiting for, specifically? So that this PR doesn't fall by the wayside, please @ mention them so they are notified and aware that this PR is blocked on them. |
This comment has been minimized.
This comment has been minimized.
|
I'm not convinced this would be a good change. NPCs are rather easy to lose. Quest givers can run off, AI can decide to charge into zeds, NPCs can decide to hide in tiny, dark rooms etc. |
This comment has been minimized.
This comment has been minimized.
You can still see them run off and make chase, unless there is total darkness. The overmap view distance is about 8 overmap tiles during day lighting, and that increases with vision enhancing traits/mutations/bionics/items. That's plenty of leeway in my experience so far playing with this patch. Overmap view distance and los is considerably better than local terrain view distance / los. The real issue I see here is that there is no way to communicate with NPCs that you can't see e.g. when you are in total darkness. @AdonaiJr suggested radio communication. Above, you or he suggested yelling to locate NPCs in the total darkness. I think those are better solutions to the problem than the current superman vision (I particularly like the latter, as it has the consequence of making sound to draw zombies / hostile NPCs / hordes).
Same as above, you can see this happen (perhaps even hear the fighting). You can also communicate with amenable NPCs to instruct them not to do this, so there are already options for the player to address this. Realistically, if someone runs off into the distant so far that you can no longer see him, you shouldn't know his position.
How does this factor into overmap line of sight? Overmap los is different than local terrain line of sight. Local terrain, like walls, isn't a factor here. Also, keep in mind that there are positive aspects to this change. With it, the overmap info better mirror's the player's vision capability, including light attenuation, vision enhancing traits, and bionics/binoculars optics. For example, consider that irl distant vision at night has low resolution. Consequently, you can see building outlines in this distance, but not details like a distant human figure in the darkness (unless you have night vision enhancements, of course, which is factored in w/ this change). So factoring in overmap vision distances into NPCs drawn on the overmap makes more sense than treating NPCs like stationary overmap markers (like building locations), which are always drawn, regardless of distance/vision factors. Another nice thing about this change is that the overmap info better reflects the player's knowledge. You shouldn't know the exact location of a wandering survior across the world e.g. in a different city. |
This comment has been minimized.
This comment has been minimized.
|
Regarding loosing NPCs, how about a minimum sight radius of 3 or 4 (under all circumstances, but only for detection of NPCs)? This would still hide NPCs that are far away, but would show those that are inside the reality bubble. (And NPCs outside the reality bubble don't move.) |
This comment has been minimized.
This comment has been minimized.
|
Stalled with lack of consensus. Could be resubmitted with changes although discussion of design via issue may be most appropriate before continuing with further work. |
lucianposton commentedApr 28, 2016
...so that you can't see NPC positions from across the world, when dark, etc.