Battlezone 98 Redux

Battlezone 98 Redux

Not enough ratings
Extra Utilities
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
501.579 KB
21 Jan @ 4:15pm
10 Feb @ 5:29pm
16 Change Notes ( view )

Subscribe to download
Extra Utilities

Description
Many bz modders have encountered a problem, the stock lua utilities are lacking certain functionality, and many things are hardcoded within bz itself. This mod intends to fix that problem by using a custom DLL to extend scripting functionality beyond the limitations of the game.

Release Version 0.4.0:

Added two new functions, GetLives and SetLives. Note that changes to lives will not be visible in game until you lose a life, but they do work. Satellite state should hopefully be fixed in multiplayer now too.

Known Issues:

- Luminance functions are disabled
- Fog functions may be unreliable
- Causes instability in multiplayer that seems to scale with player count, use with caution (TEMP FIX: put a print statement after each function call to reduce/remove crashing)

Included functions:

- GetObj
- GetGravity
- SetGravity
- GetLuminance
- SetLuminance
- GetFogStart
- SetFogStart
- GetSmartCursorRange
- SetSmartCursorRange
- GetReticleAngle
- GetReticlePos
- GetSatState
- GetSatCursorPos
- GetSatCamPos
- GetSatClickPos
- GetSatPanSpeed
- SetSatPanSpeed
- GetMinSatZoom
- SetMinSatZoom
- GetMaxSatZoom
- SetMaxSatZoom
- GetSatZoom
- SetSatZoom
- GetRadarState
- SetRadarState
- GetGameKey
- GetSteam64
- GetWeaponMask
- GetLives
- SetLives
- SetAsUser

Special thanks to:
- Janne, for letting me use her original DLL code
- DivisionByZero, for the relative path logic in RequireFix.lua
- GrizzlyOne95, for the workshop directory function in RequireFix.lua

Github Repo is now up: https://github.com/VTrider/ExtraUtilities

README.txt

Usage:

Place "RequireFix.lua" into your mod directory, you can subscribe to the separate mod and copy it from there, but I also included a copy in the files of this mod as well. After you initialize RequireFix with the correct workshop ID, you can require extra utilities in your mod. Reference the readme for RequireFix for more details on how to initialize it. Here's a code block with an example:

```lua
local RequireFix = require("RequireFix")
RequireFix.Initialize(3144751838) -- This is the workshop ID for extra utilities
local exu = require("ExtraUtils")
```

I would suggest abbreviating the module to "exu" as this is used internally, and it will also save you time when referencing functions. Function documentation is detailed inside the ExtraUtils lua file. WARNING! if you use the alias "exu" for the require, it must be local, otherwise it will cause a stack overflow. Other aliases may be global.

Because this is a work in progress, be sure to thouroughly read the warnings and limitations of the DLL functions, they will crash your game or cause unexpected behavior if used improperly.

Place exu.Start() inside the start function of your map to initialize the module and print out some metadata to the console.

If you would like to report an issue or request a feature, contact me on discord at "vtrider", or join the battlezone community discord at discord.gg/battlezonestrategy.

Enjoy my mod!
4 Comments
blue 28 Feb @ 11:48am 
so these are the hacks i've heard about
/3udweiser /3andit 31 Jan @ 11:13am 
this is nuts thanks bro awsome
Rosario 23 Jan @ 11:21am 
Nice
GrizzlyOne95 22 Jan @ 7:59am 
Great work VT!