Battlezone 98 Redux

Battlezone 98 Redux

Not enough ratings
Community Patch - Extended Information
By Nielk1
Extended information about the community patch available here: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/discussions/3362534335

This guide will update over time with information about the patch as well as how to utilize its features in other mods.
   
Award
Favorite
Favorited
Unfavorite
Installation and Activation/Deactivation
Installation / Activation
Download the patch workshop item here:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3362534335
Run the Instant Action mission "! Community Patch Installer". This mission should run for about 1 second and will either end in success or failure of the installation.

To determine if the patch is running check the game version indicated at the bottom of the main menu; if the patch is running its version will be appended to the game version string.

Uninstallation / Deactivation
Delete the winmm.dll file in the game folder.
Support
This is a community created patch and thus is not supported by Rebellion or Big Boat. If you need assistance please make a post on the forum attached to this workshop item or join the Discord at https://discord.battlezone.report/ to discuss issues and suggestions.
Fixes and Features
  • [0.1] Multiplayer map list no longer hops and map filter no longer resets when workshop updates and data checks finish.
  • [0.1] Maps are now sorted based on case insensitive alpha-numerics. As the default font uses small-caps, this works best.
  • [0.1] Additional map filters added to multiplayer map filter dropdown. Feel free to request more filters.
  • [0.1] Multiplayer map names colorized to match their type icons.
  • [0.1] Multiplayer vehicle descriptions no longer overridden by mod files unless those files come from the selected map.
  • [0.2] Player Ban (Automatic Kick) function available to all game/lobby hosts.
  • [0.2] Various new multiplayer map types supported with their own icons and filter categories.
  • [0.2] Map type and filters are now data-driven meaning they can be updated without recompiling this patch module and mods can now control their own extended map data (documentation coming soon).
  • [0.2] Maps that are known to crash when selected are now hidden via filter file. (SBP's anti-lag-kick dummy map)
  • [0.2] Initial support for favorite maps filter.
  • [0.2] Map type icons are slightly bigger (easier to see all the new icons).
  • [0.2] Sessions using unknown maps now indicate the mod and map ID.
  • [0.2] BZCP version visible to external tools.

Notes on Map Sorting
Some incorrect statements have been made about the new map sorting logic. The map sorting bypasses non-alphanumeric characters thus a map called "[Magic][Words]" will sort under "m" not "[".

Notes on Bans
Bans are on a player's Steam or GOG ID and are maintained entirely locally. This logic is superior to that in mods that claim to support a banning system.

This Patch
Other Mods
Ban list starts empty
Ban list is pre-filled by mod creator(s)
Steam and GOG users can be banned
Only Steam users can be banned
Ban prevents player from joining game
Banned player can still join game but are prevented from playing
Host has access to joiner Steam/GOG IDs inherently
Player must pass its SteamID to the host to see if they are banned
Users can be banned mid-game
Bans must be manually placed in a ban file

Further Explanation
Mods that claim to feature a ban system (or that secretly include one) require that mission script on the client machine collect the user's SteamID via injecting native code to access the SteamAPI and then exfiltrate that data to the host. It is possible that a GOG player may have their Steam client's currently logged in SteamID exposed in this case even though it has nothing to do with the game. The banning action is done via a "trigger packet" where the player that receives this packet from the host is prevented from interacting with the game world and from seeing chat via the mission script holding them at a high altitude map coordinate and flooding their chat with garbage text. Note that this requires that the banned client's machine cooperate with the banning as it is mission code that is performing both the SteamID self reporting and "ban" action so this could be bypassed by a clever player. This method has several dangers as well as the "trigger packet" can be forged and be used to trigger the "ban" payload on any player. It is also possible that the mission code handling the an could be updated to use use native injections to perform more dangerous "ban" action such as deleting game files if the mod creator wanted to push such an update. Additionally, because of how BZ98R handles joining modded games players who have not agreed to have this code run on their machine will automatically download and install the mod containing it.

This patch does none of this and instead properly prevents a banned user from joining a session by kicking the user on the host machine's join even handler. No custom code needs to be run on the banned player's machine nor will they be forced to download code they do not wish to have. To remove bans in the patch the host must remove the banned user from the "banlist.txt" file in the game directory while the game is closed. This file will be generated by the game when run and will always be initially generated empty. Do note that banned users will not be kicked automatically when initially banned as the banned state is only checked when joining. Please be sure to also kick a user after banning them to remove them from your game. A solution to this is being investigated.

Notes on Favorite Maps
If any maps are favorited they will appear under a new "Favorites" map filter at the top of the filter list on the filter drop-down. To add maps to your favorites edit the map_favorites.txt in the game directory. This file should appear after running the game once with the patch. This file allows you to add specific maps in specific mods or all maps in a specific mod to your favorites list. Currently this process is very manual but I hope to have some in game or other tool to make it easier in the future.

Notes on the Map Filter file
The maplist.txt file is kept in the patch's workshop folder. Modders can override this file's affect on their maps by adding the appropriate fields to their map's ini file (which will be documented soon). The maplist.txt file contains several possible directives: F, O, K, M, G, S, and X. Feel free to offer changes.
F directives indicate visual only map type changes applied before map filtering. These move misclassified maps into their correct filter category. For example, if a map is incorrectly labeled as KOTH and an FS directive relabels the map as Strategy the filter logic will consider the map as if it was always type S rather than K. This will not correct the map options which will still be those of a KOTH type map.
O directives indicate visual only map type changes applied after map filtering. These control map icons and text color. Type F implies this directive as well. For example, an OP directive applied to a DM map will cause it to appear as type P or Pilot Deathmatch while still being filtered as a DM by the standard map filter logic.
K directives kill a map from the list so it can never appear. This is for use on maps that will crash the game if selected or are not real maps intended for play.
G directives define custom Game Mode filters with localized text and sets the currently active filter.
M directives define custom Mod filters with localized text and sets the currently active filter.
S directives set the currently active filter to "Special" for use on one-off odd-ball maps.
X directives add a mod's maps to the currently active filter. The special value "*" can be used for map filename or game type.

The full list of map types currently supported is as follows:
[A] Action MPI (Stock)
[B] *unmapped*
[C] Custom
[D] Deathmatch (Stock)
[E] *unmapped*
[F] Capture the Flag
[G] Race
[H] *unmapped*
[I] *unmapped*
[J] *unmapped*
[K] King of the Hill (Stock)
[L] Loot
[M] Mission MPI (Stock)
[N] *unmapped*
[O] *unmapped*
[P] Pilot/Sniper DM
[Q] Squad Deathmatch
[R] Capture the Relic
[S] Strategy (Stock)
[T] *unmapped*
[U] *unmapped*
[V] *unmapped*
[W] Wingman Strategy
[X] Other/Tool/Test
[Y] *unmapped*
[Z] *unmapped*
Adding custom filters and map types to your maps
All map types and filters are defined by the patch's maplist.txt file and other associated assets. This file also contains overrides for maps across multiple mods to allow proper compatibility if those mods do not take advantage of Community Patch features. It is always better for mods and maps to apply these features themselves rather than rely on the internal overrides of the patch as these overrides will lag behind mod updates.

Map ini file settings
Valid values for typeFix are 'S', 'M', 'D', 'A', 'K', or 'X', where 'X' is special.
Valid values for typeOverride are any defined stock or extended map type.

You can see a list of all currently valid filters in the bzcp.log file in the game folder near the start of the ACTIVITY section. New game mode and mod filters can be requested and once added will be available for use by any map.

Example 1: A broken map that crashes when selected
[BZCP] ignore = true // hide this map (why do you even exist)

Example 2: An SBP mod Wingman Strategy map
There are many maps in SBP that errantly set their type as "K" to make them easier to find. The new filters in this patch make such actions unnecessary so the map type is corrected.
[BZCP] typeFix = "S" // only needed if the map type is set as "K" for some reason when it's not valid typeOverride = "W" // display the map as "W" type filter1 = "CUST_MOD_SBP" filter2 = "CUST_GM_WINGMAN_STRATEGY"

Example 3: Maps that are tools and dummies
(This is the one non-stock type valid in typeFix)
[BZCP] typeFix = "X" //typeOverride = "X" // (implied by typeFix)

Example 4: A very special one of a kind map that doesn't fit a category
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=737650359
[BZCP] typeOverride = "C" filter1 = "Special"