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 upHiding #28593
Conversation
Fris0uman
added some commits
Mar 8, 2019
Night-Pryanik
reviewed
Apr 25, 2019
src/descriptions.cpp Outdated
Night-Pryanik
reviewed
Apr 25, 2019
src/handle_action.cpp Outdated
Night-Pryanik
reviewed
Apr 25, 2019
src/npcmove.cpp Outdated
Night-Pryanik
reviewed
Apr 25, 2019
src/npcmove.cpp Outdated
Night-Pryanik
and others
added some commits
Apr 25, 2019
This comment has been minimized.
This comment has been minimized.
|
So after messing around a bit with iexamine, I'm not sure it's a good idea to add hiding as an |
Fris0uman
added some commits
Apr 25, 2019
ZhilkinSerg
self-assigned this
May 4, 2019
kevingranade
requested changes
May 8, 2019
|
Sorry I haven't gotten around to re-reviewing this in so long, I've barely been able to keep up with bugfixes recently. My last feedback was that overriding impassable for this purpose is NOT OK. There is way too much code that treats impassable as holy writ, I don't want to maintain a feature going forward that violates this assumption. It's way too likely to break strange things all over the place. |
Fris0uman
closed this
May 11, 2019
This comment has been minimized.
This comment has been minimized.
|
The crouching system already does most of the hiding stuff, so I'm just going to re-submit the part about player size and let the hiding in furniture idea rest for now. |
Fris0uman commentedMar 9, 2019
•
edited
Summary
SUMMARY: Features "Adds action to hide in appropritate furniture/terrain"Purpose of change
Flesh out the hiding mechanic introduced with HIDE_PLACE flag
Describe the solution
Hiding is an action bound to j by default.
Stand next to elligible tile, press j and choose the direction : if the place is elligible for hiding in it, the game checks your size, and if you're small enough you move to the tile and are hidden in it.
I also edited how get_size() works for player, so now size mutation actually changes your size. Instead of always being a medium size creature, players can actually be anything between
tinysmall and huge.Dumpster are no longer passable, they were briefly passable when I made HIDE_PLACE flag to allow things to actually hide in it, but now it's not necessary anymore so I reverted it back to what it was before.
Walking on a tile with HIDE_PLACE flag doesn't do anything.
Hiding in a tile might be possible even if the tile is impassable,
meaning that you can use it to pass through a locker for example.But you can't use it to pass through impassable tile, as you'll be sent back to your entry point when leaving the hiding place.You can't hide from one impassable hiding place into another impassable hiding place unless it's of the same furniture type and has the CONNECT flag.
Describe alternatives you've considered
Additional context
What's left to do :
The list of furniture/terrain that can hide a creature needs to be validated so feel free to express yourself on what should be added or removed from the list and why.
Also we need to agree on what are the size constraints and if there should be a NO_SIGHT penalty or not for each one.
The fact that hiding is now an action, and don't just work by walking on a tile, means that it's more complicated to do for AIs. My aim here is to make it possible for an AI to "randomly" get inside a furniture to hide.
Doing the right thing and implementing correct AI decision making on when and where to hide is beyond my abbilities. But the current implementation should allow for someone else to do it : hide is a Creature classe function so it can be applied to player, monster and NPCs.
I'm oppen to suggestion for the default key, currently j .