Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artificial Night Generator shouldn't grant full invisibility #74366

Closed
rselias opened this issue Jun 7, 2024 · 10 comments · Fixed by #74947
Closed

Artificial Night Generator shouldn't grant full invisibility #74366

rselias opened this issue Jun 7, 2024 · 10 comments · Fixed by #74947
Labels
stale Closed for lack of activity, but still valid. <Suggestion / Discussion> Talk it out before implementing

Comments

@rselias
Copy link
Contributor

rselias commented Jun 7, 2024

Is your feature request related to a problem? Please describe.

Apparently back before 0.G, the Artificial Night Generator CBM gained the invisibility effect in addition to its normal effect of generating shadows. It's exactly the same invisibility effect as the Cloaking System CBM, but for less than a third of the power cost.

This doesn't make any sense to me. It's supposed to make enemies have a harder time seeing you from a distance, unless they have good night vision, no? Instead, even enemies that can see perfectly in the dark are unable to see you, and you can't be detected at all unless bumped into.

The PR that included the change made no mention of a deliberate functionality change. Maybe it was accidental?

Solution you would like.

Revert the change, removing invisibility from the Artificial Night Generator.

Describe alternatives you have considered.

Increase the cost to match the Cloaking System, or remove the CBM entirely as it's redundant.

Additional context

No response

@rselias rselias added the <Suggestion / Discussion> Talk it out before implementing label Jun 7, 2024
@GuardianDll
Copy link
Member

The 48151 that included the change made no mention of a deliberate functionality change. Maybe it was accidental?

You can see it doesn't change anything, just changed the notation
image
i agree it shouldn't give invisibility, i suspect it does it to not make monsters with high night vision completely ignore said field

@rselias
Copy link
Contributor Author

rselias commented Jun 7, 2024

You're right, looks like it's been full invisibility for a long time. If only github had a branch search filter - trying to trace its history is a pain.

Shouldn't monsters with high night vision ignore it, though? If an enemy sees in the dark, why would artificially generating darkness do anything meaningful?

I just tried it out with the invisibility removed, and it seems to behave exactly as I'd expect it to. Normal zombies can't see me from more than three tiles away, and shady zombies can see me just fine.

I'm guessing full invisibility was a workaround for some issue years ago that probably doesn't exist anymore.

Edit: Looks like it's always had full invisibility. Was this actually Kevin's intention, or was it an effect of monster vision range being determined by global light level?

@GuardianDll
Copy link
Member

it was not the work of Kevin, it was initially added in #1724, then it was added in #40645, with invis effect
@Fris0uman do you happen to remember why there is an invis effect here?

@rselias
Copy link
Contributor Author

rselias commented Jun 7, 2024

Looks like the invisibility enchantment was added in #39563. Unless it was hardcoded in elsewhere before that?

With regards to Kevin's intention, in another issue about this @RenechCDDA pointed out that Kevin added the night generator to a vision check alongside the cloaking system here. But that was a merge, so I question whether it was really his intent.

@Fris0uman
Copy link
Contributor

Fris0uman commented Jun 7, 2024

it was not the work of Kevin, it was initially added in #1724, then it was added in #40645, with invis effect @Fris0uman do you happen to remember why there is an invis effect here?

Basically it has always made you invisible, I just moved it from hardcoded to an enchantment
EDIT: it's possible that the shadow effect does not affect at all the ability of monster to see you or not, maybe this has changed since the initial implementaiton, it would not be very hard to remove the invisibiity part and see what happens

@GuardianDll
Copy link
Member

GuardianDll commented Jun 7, 2024

There is no reason to remove it, there is plenty of magiclysm/MoM spells that do exactly this
I was lucky to play with them, so i know they work exactly as Rselias says
@rselias if you're interested, feel free to make a PR that removes invis effect

@Fris0uman
Copy link
Contributor

I meant to check if the darkness by itself does anything or is purely cosmetic

@GuardianDll
Copy link
Member

Again, it does

@rselias
Copy link
Contributor Author

rselias commented Jun 7, 2024

From brief testing, the shadow generation alone works as you would expect it to. I plan to make a PR after I've tested it more thoroughly to make sure I'm not missing anything.

Copy link
Contributor

github-actions bot commented Jul 7, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@github-actions github-actions bot added the stale Closed for lack of activity, but still valid. label Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Closed for lack of activity, but still valid. <Suggestion / Discussion> Talk it out before implementing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants