wiz8vd

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 6 Imported by: 0

README

Wizardry 8 View Distance Extender

https://pkg.go.dev/codeberg.org/bsdcode/wiz8vd

Documentation

Overview

Wiz8vd extends the Wizardry 8 view distance. It overwrites the view distance of all locations in the LEVELS.SLF file with the value 2000; originally it ranges between 75 and 260.

Wiz8vd has no safeguards. It will overwrite any given file, whether it is Wizardry 8's LEVELS.SLF or not.

Usage:

wiz8vd <file>

Compatibility

Wiz8vd does not know or parse the binary layout and data structures used in this file, instead it relies on constant byte offsets into the file where the binary representation of the view distance is stored. This makes wiz8vd not applicable to heavily modded files in which the offsets do not match anymore.

The determined offsets are compatible with an LEVELS.SLF file from Wizardry 8 v1.2.4 with the following MD5 hash of the unmodified file:

5482ab8fb2cf83b805f4cdb48a992ec8

Offset Discovery

The offsets were found with the help of the Cosmic Forge modding tool, a hex editor, and good old human stupidity:

The view distance is preceded by other values seen in Cosmic Forge, i.e. “Near Fog Border”, “Far Fog Border”, “F1” and “Ambient Light”. They are all stored in little endian 32-bit floating-point format. For example, the “Lower Monastery” location has the following values:

                |  value | in hex
----------------+--------+-----------
Near Fog Border |   0.80 | 0x3f4ccccd
Far Fog Border  |   0.95 | 0x3f733333
F1              |   1.00 | 0x3f800000
Ambient Light   |   1.00 | 0x3f800000
View Distance   | 110.00 | 0x42dc0000

Given this context, the offset can be determined by searching for the following byte sequence in LEVELS.SLF:

cd cc 4c 3f 33 33 73 3f 00 00 80 3f 00 00 80 3f 00 00 dc 42

Such a context is not always unique because different locations can have the same values. Writing sentinel values to the view distances and cross-check them in Cosmic Forge allows to associate each location with the correct context.

Versions

v1.0.0: Initial release.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL