ManGuyBen

Researching Loading Zone Glitch (DLZ) - Where can I find the Source code for how the game handles all loading zones and triggers?

Recommended Posts

Hi. So the speedrunning community is trying to figure out how a glitch works that we call a "Displaced Loading Zone" (aka DLZ). And I've come here for some help solving this mystery.


What is a DLZ?

A DLZ is when you're just walking along in the game and suddenly, for no apparent reason, the game loads a different module - as if you had walked into a Loading Zone.

Examples:

Speedrunner DLZ info doc: What We Know

This used to be a very rare occurrence and getting footage of it was even rarer. But as more people streamed the game, we got more and more examples. We eventually got enough info to start some early speculation on how this glitch was occurring. Long story short, we have a basic understanding of the circumstances needed for this glitch to fire.


How does a DLZ work?

What's Confirmed:

  1. A DLZ always occurs when the player is "below" or "south" of the Loading Zone on the map (in the negative Y direction).
  2. A DLZ can occur at any Y position below the loading zone, so long as it coincides with the trigger.
  3. Z position does not matter
  4. Camera facing does not matter
  5. Player facing does not matter?
  6. Which character is party leader doesn't matter
  7. A DLZ can trigger dialogue cutscenes as well as Loading Zones.
  8. Some maps in game are turned 90 degrees from the way they are actually oriented in the Toolset (example: Endar Spire - Command Module).
  9. If a party member is too far away from the party leader, a "Gather Your Party" dialogue occurs instead of the module transition and the player is placed outside the door at the transabort point.
  10. If there are 2 valid destinations above the player when a DLZ is triggered, it will not always go to the nearest one

What's Theorized:

  1. A DLZ occurs when the player is within range of some sort of trigger or encounter, etc.
  2. A DLZ occurs when the player is "East" or "West" of any trigger on the map (in any X direction - not just when inside the trigger)
  3. A DLZ is caused because the game checks if the player position matches the Y coordinate of the trigger and the X coordinate of the loading zone.
  4. A DLZ cannot cause a player to reach a loading zone that is "East" or "West" of them (in the positive or negative X direction).
  5. A DLZ cannot cause a player to reach a loading zone that is "South" of them (in the negative Y direction)
  6. If there are 2 valid destinations above the player when a DLZ is triggered, it will always go to the farthest one (highest Y coord)
  7. A DLZ only fires when you're aligned at the very edge of the door's loading zone with your X value.

Here's an example DLZ from the Endar Spire:

Spire_DLZ.png

Conceptual Semantics:
There are various ways of conceptualizing this phenomenon and we often use them interchangeably. Expressing it in these different ways can cause confusion. All of these are conceptually more or less the same, even if it's not exactly how the glitch works.

  • The Loading Zone is brought down to the player - (hence, "Displaced Loading Zone")
  • The player is brought up to the Loading Zone
  • Move along the Y-axis
  • Move up/down from this X point
  • Aligned at this X value
  • Vertical DLZ
  • Matching X coordinate of the Loading Zone and the Y coordinate of the Trigger.


Consistent Results - Performing the Glitch at Will

We just recently discovered a way to consistently perform the glitch. Up until now, we have been unable to perform the glitch at will. This made studying how it works next to impossible. The method involves continuously walking into a wall while angling left and right to continually pass over the X position where we know the glitch can occur. The Consistency varies wildly. But it's something.

In fact, the new Endar Spire DLZ method is so consistent that anyone can do it in, at most, about 10 seconds. It's basically free.

So, after trying this method on various DLZ locations, we set about determining precisely what X value needed to be achieved for it to fire. Some DLZ locations were harder to get to work than others. And some seemed to need extremely precise positioning to work. We suspect that there is something to this that we are missing. It appears that sometimes if we are moving too fast or too slow in the X direction, it doesn't happen. So, our current method is to pass over the X point as many times as we can to just hope it fires.


WHY does a DLZ happen?

Seeking the answer to this question is what led me here to make this post. I started combing through the source SCRIPTS of the game to try to understand how triggers and loading zones are handled by the game. It's a big pool to dive into. I can read the scripts well enough. It's all VERY thoroughly commented, which helps a lot. But I can't seem to find the scripts I'm looking for, even when going down an #include rabbit trail.

The closest I've come to finding what I'm looking for is coming across the GetEnteringObject() function being used. But I have yet to find the NSS file where it's defined.

What I'm looking for:

  1. How does the game track player position?
  2. How does the game know a player entered a trigger zone?
  3. How does the game know a player entered a loading zone?
  4. How could the player/loading zone coordinates be getting confused?

My theory is something like: in the script, the programmer assumes the Y coordinate for the player is known and only checks to see that the X coord matches. Something like that.

If you've read this far, thank you for your time. Any help or insights you could give would be greatly appreciated.
 

Edited by ManGuyBen

Share this post


Link to post
Share on other sites

Hello!

I cannot unfortunately offer you any help on this but I can confirm that the sudden load of an extraneous module happened to me a few times too without any apparent reason. I can add I have never attempted any kind of speedrunning through the game.

Cheers!

  • Light Side Points 1

Share this post


Link to post
Share on other sites

I really hope that this is something that even CAN be sleuthed out. There's a very real chance that for what I'm looking for, there is no source available via Kotor Tool and my only chance would be to search through NeverWinter Scripts. Which... I mean... I have no idea where to even start with that...

  • Thanks 1

Share this post


Link to post
Share on other sites
18 hours ago, ManGuyBen said:

The closest I've come to finding what I'm looking for is coming across the GetEnteringObject() function being used. But I have yet to find the NSS file where it's defined.

This is a C++ routine, not a function defined in Neverwinter Script. It's defined in the source code for the game executable. Neverwinter Script is a separate scripting language that makes calls to the actual C++ routines. You can find a list of them in nwscript.nss. But they are implemented in C++, not Neverwinter Script. Since we don't have the game's source code, all we can really do is make guesses about how they work.

I was skeptical of it being related to player coordinates—based on my experience with it, and what I've heard from other modders, I thought it was some sort of resource management issue with the game mistaking a reference to one trigger for another. However, I was able to repeat the issue on the Endar Spire in the same location after moving the door, and I don't believe there is another trigger in that location.

For the record, I encountered the issue during regular play in the enclave, somewhere around the rotunda. I was able to repeat it on the Endar Spire without Trask in the party by warping back to it, and also by controlling a different party member.

  • Thanks 1

Share this post


Link to post
Share on other sites
20 minutes ago, JCarter426 said:

For the record, I encountered the issue during regular play in the enclave, somewhere around the rotunda. 

You encountered it during a normal playthrough?

Share this post


Link to post
Share on other sites
11 hours ago, StellarExile said:

Where have they happened to you, @Salk?

I don't actually remember that because it happened so sporadically.

But I am quite certain we are talking of two different areas.

Share this post


Link to post
Share on other sites
8 hours ago, JCarter426 said:

I was able to repeat the issue on the Endar Spire in the same location after moving the door, and I don't believe there is another trigger in that location.

So, this got me thinking. What if I removed absolutely everything except the final door out of the module?

After many presses of my Delete key, I tried it out. To my surprise, the DLZ still worked!

I'm inclined to believe that this is entirely caused by how the game checks to see if the player has entered a trigger or not. Probably something like a > or < scenario instead of a ≥ or ≤. Or vice versa.

Also, I forgot to mention that it seems that a DLZ tends to only fire when you're aligned at the very edge of the door on the X value. We've had the Dantooine Enclave DLZ Fire on either side of the door. When you're perpendicular to the target door like with the Endar Spire DLZ, it's harder to tell since the thickness of the "door" is a little more vague.

Edited by ManGuyBen

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.