Explanation of Timer and Other Patch Files
Guides
/
Explanation of Timer and Other Patch Files
Updated 1 year ago by Saradoc

THE TIMER
The timer is a plugin that calculates the time without loads automatically.
Functionality:
The plugin hooks some of the engine's functions related to rendering loading screens to determine if a loading screen is currently being rendered and when normal gameplay has resumed. The timer is set to 0 at the start of a new game and then the loading times are subtracted from it. On the ending condition it stops being updated to the current time.
If a video plays during a loading screen, it will not count towards the time without loads. On the other hand chapter screens and videos outside loading screens halt the display of the timer, but the time will still be counted. Chapter screens at the end of a loading screen (such as entering chapter 3 in Gothic 2) also do count towards your time, so you should skip those quickly.

Features:
With P you can toggle the display for the time with loads on and off.
You can make more changes in a file located at "system/Autorun/zSpeedRunTimer_Settings.txt".
Read that file to find out how to set:

  • different ending conditions for mods or Undead Dragon Kill or challenge runs
  • the time with loads being shown by default
  • a different real time toggle key
  • change the "Game Time: ", "Real Time: " prefixes
  • change from automatic reset on New Game to manual resets whereever you want

The last part will get some special attention here as it regards use in practice:
ManualReset=0
resetkey=F11
resetmodetogglekey=F12
You can use these keys to time sections in your practice. Say you want to time or practice a section or compare to different strategies for a section. You can then first enable manual reset mode by pressing F12. Now you make a save at the start of the section. Now press F11 to reset the timer the next time you load.
Load and do the section and read the timer. Press F11 again and do it again and see if you did better this time. This is quite a bit more convenient than using a stopwatch or comparing videos.

THE FILES

VisualCppRedist_AIO_x86_x64.exe
This is only a requirement for some of the following files.

Union Primary Universal 05.02.2022.exe
This is a general patch to add missing files, update the exe file to its newest version, add the Playerkit for playing mods and extend RAM usage from 2GB to 4GB to let the game run without crashing longer.

Union 1.0k 03.05.2021.exe
Union is a fanpatch based on Systempack and AST that changes several things. It allows the game to run on modern systems without issues. It greatly reduces saving and loading times and lag. It allows plugins (like the timer) to be used. It fixes several bugs in the engine (it also introduced new bugs in the process). And it introduces some new features to the engine. Since the speedrun is supposed to be done on an original version without fanpatches but the performance improvements and the timer plugin are too valuable, there is an additional file that seeks to disable all gameplay changes introduced by Union:

  • NOGAMEPLAYCHANGESPURE.PATCH
    This file disables all the gameplay changes introduced by Union. You can open it with a text editor and look at what it does yourself. The total list of engine patches is in "Union.patch" which you can also look at with a text editor.
  • NoGameplayChangesPure.vdf
    This file does nothing at the moment, but it overwrites previous versions.
  • ZMOUSEFIX.PATCH
    This empty file only overwrites the same file in Union.vdf. See zMouseFix.dll below.
  • NoRenderDelay.patch
    In Gothic 2 the loading screen lingers for a short while after the game has already finished loading. This was a problem for determining the time without loads. In the past we used the cheatmode since that got rid of the delay (and we still do so for the Gothic 2 Demo), but this is a better solution.
  • speedrun.patch
    This file used to have the contents of NoGameplayChangesPure.patch, but I made that its own patch for casual use and eventually decided not to keep up two almost identical patches. The only thing it does now is show the version on the main menu and add "[MSS_UnhandledException]", which is supposed to help with a random crash at the Raven fight in Gothic 2: Night of the Raven.

The "Autorun" folder:
These files are plugins that get automatically loaded (hence "Autorun"). To disable one of these plugins just move of them out of the folder or change their file extension (for example "zSpeedRunTimer.dll-").

  • OOBFix.dll
    This plugin tries to restore the out of bounds behaviour of older Windows versions. On Windows XP you could freely walk while out of bounds in Gothic 1, but in Windows 7 and 10 you get stuck or swim instead.
  • zMouseFix.dll
    This plugin actually does absolutely nothing. The original Union contains a plugin by default that changes mouse controls and also prevents input during loading screens. Since for speedruns we actually want to be able to input during loading screens (for example holding Forwards while running through a loading zone) this simply disables that plugin by overwriting it.
  • zSpeedRunTimer.dll
    This is the timer explained in more detail above.
  • zSpeedRunTimer_Endings.txt
    You can define endings for mod speedruns here.
  • zSpeedRunTimer_Settings.txt
    You can make some changes to the timer here.

The "copy into x folder" folders:

  • Systempack.ini
    Each game has a systempack.ini provided that has good speedrun settings and enhanced view distance. But you can change any setting here - most of them will simply have no effect since they are disabled.
  • G1: Chinese.mod/ini
    These files add a mod to the GothicStarter that lets you play with the scripts of the Chinese version, which is preferred for Any%.
  • G1: glitchless.mod/patch
    This readds some of Union's engine patches to prevent accidentally strafing in the air or using duplicated trader items for categories that ban usage of those glitches.
  • G2 Classic: GermanScripts.mod/ini
    The dragonkillcounter glitch was fixed (without documentation) in non-German releases. If you want to use it, you have to play with the German scripts which are in this file. To switch back to the normal scripts simply put it in the "disabled" folder next to it.
  • G2 NOTR: practice.mod/ini
    These files add a mod to the GothicStarter that adds some more items that are useful for practice. In the game enter devmode (bmarvinb), open the console via F2 and type insert bag, insert practice or insert bpractice to have a look at them.
  • G2 NOTR: UndeadDragonKill.ini & ud.ico
    These files add a mod to the GothicStarter that pauses the timer on the Undead Dragon death cutscene. The "mod" actually does nothing, the timer just checks for its name.
  • Sequel: UpdatePack
    This mod updates the world and scripts to the latest stage of the original development. Use it for the 100% category.

gothic.asl
This is a script to let LiveSplit read the value of the timer.

Raven Fix
This is an old fix that fixes a bug that caused a seemingly random crash at the Raven fight in G2 NOTR. It is not clear exactly how much it helps since the more recent Union patches and I ran a long time without it before getting the crash again a single time.
You have to be careful with this fix when playing mods since it replaces the whole addon world. It's best to ONLY use this when running Any% and removing the file otherwise.
The download is in the NOTR Resources section or direct link: https://www.speedrun.com/resourceasset/mahgs

Game stats
Followers
112
Runs
192
Players
30
Latest news
Preliminary Switch rules
  • A category gets PC/Switch subcategories, when a Switch run is submitted.
  • Load times are not removed.
  • Crashes/Softlocks/Quitouts are treated the same as on the PC version including stopping the timer and adding time penalties.
  • Keyboard/Mouse is banned. Third party controllers are allowed as l
4 months ago