From 20b25774feec2f1e173dbc6b4882a956a111f55e Mon Sep 17 00:00:00 2001 From: JezuzLizard Date: Tue, 14 Apr 2020 14:57:03 -0700 Subject: [PATCH] added debug mod for debugging scripts Only supports _zm_ai_dogs for now. More scripts will be added soon. --- debugging mod/_zm_bot.gsc | 20 ++++++++++++++++++++ debugging mod/readme.md | 16 ++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 debugging mod/_zm_bot.gsc create mode 100644 debugging mod/readme.md diff --git a/debugging mod/_zm_bot.gsc b/debugging mod/_zm_bot.gsc new file mode 100644 index 0000000..28d9d1a --- /dev/null +++ b/debugging mod/_zm_bot.gsc @@ -0,0 +1,20 @@ +init() +{ + debug_tracker(); +} + +debug_tracker() +{ + numberOfScriptsBeingLogged = 0; + if ( !isDefined( level.debugLogging ) ) + { + level.debugLogging = 1; + } + if ( isDefined( level.custom_zm_ai_dogs_loaded ) && level.custom_zm_ai_dogs_loaded ) + { + level.debugLogging_zm_ai_dogs = 1; + numberOfScriptsBeingLogged++; + } + level.player_starting_points = 1000000; +} + diff --git a/debugging mod/readme.md b/debugging mod/readme.md new file mode 100644 index 0000000..456f24f --- /dev/null +++ b/debugging mod/readme.md @@ -0,0 +1,16 @@ +# Debug mod + +Due to the lack of developer mode in bo2 I decided to go ahead and make my own debugging method. +Basically, I use this script called _zm_bot.gsc to act as a developer mode for the scripts. +What is does it override the typical _zm_bot.gsc logic, and replaces it with global variables that when active enable logprint() functions throughout supported scripts. + +**Currently only the following scripts are supported**: +``` +_zm_ai_dogs.gsc +``` + +## How it Works + +Compile _zm_bot.gsc as _zm_bot.gsc and place it in maps/mp/zombies. It automatically has the debug variables set to 1 so it will be active. +It works by writing to the log useful events that may need monitoring in order to determine broken aspects of the script. +To disable it simply remove the mod or modify the vars in the mod.