For example: where is the code in Unreal Engine that deals with the player picking up a weapon?
Is this an acceptable type of question?
What about a more general version: how can I find the code for different systems in CryEngine?
For example: where is the code in Unreal Engine that deals with the player picking up a weapon?
Is this an acceptable type of question?
What about a more general version: how can I find the code for different systems in CryEngine?
Absolutely not.
I don't think it matters what the content or circumstances around the question are. I cannot think of an example of a question along the lines of "Where is the code for X?" isn't an XY problem.
The following example scenario was provided as a counter argument to this:
"I may know how to implement an achievement for picking up a specific weapon, but not know where the code is located."
This is clearly an XY problem because the question assumes that their solution includes finding the code for how to pick up a specific weapon. The reality is that the code for picking up a specific weapon may not exist. Even if the code did exist, maybe the engine contains the ability to handle certain triggers such as picking up a weapon? Maybe there is an OnItemPickup event that the askers code could hook onto? Wouldn't these be better solutions than modifying engine code directly?
If the asker had asked something more like "How do I implement awarding an achievement on pickup of a specific weapon?" instead of "Where can I find the code for picking up a specific weapon?" we end up with a better quality question and a better quality answer that more people are going to be able to use because of it.
One final note, if the solution to a problem actually requires locating and modifying code it will be answered as such regardless of what the question is. If the question is an XY problem (Where is the code for...) I would say 99% of the time the question should be edited / improved to remove Y.
The second question, "how can I find..." is too broad and not game-development specific (the art of navigating a complex code base is generally discipline-agnostic).
The first question is, I think, not good. It's an XY question. That is, you are asking about what you think is the solution, rather than the actual problem you are trying to solve. That certainly makes it a bad question, but does it make it off-topic entirely (and thus suitable for closure)? I still think so; I don't think it's our job to host questions that effectively serve as documentation for third-party source code.
I think at an appropriately-high level of granularity (such as "what file handles the picking-up of weapons?) this may be okay. I'd be willing to let a few such questions exist and see how they work out. However, I worry about the fuzzy line between appropriately-granular and too-granular ("where's the function that gets called to enumerate available D3D adapters?") and about the time-sensitive nature of the queries if phrased improperly.