Skip to content

Debug tools for extension developers

Toast edited this page Jan 4, 2024 · 2 revisions

TARDIS Debug Pointer

How to use:

  • run console command tardis2_debug_pointer in the console to spawn the pointer entity
  • move the pointer with a physgun to get it to the required position
  • click the pointer with the "USE" key (default: E) to output its coordinates into the console

Options:

  • model - sets the model of the pointer
  • part - sets the model of the pointer to the model of a specific part
  • scale X - sets the scale of the pointer to X
  • pos X Y Z - spawns the pointer at the specific coordinates related to the current interior (only works INSIDE the TARDIS)
  • ang X Y Z - sets the initial angle of the pointer

The options may follow each other. Examples:

tardis2_debug_pointer model models/hunter/plates/plate.mdl scale 0.5
tardis2_debug_pointer part tardis2010_wibblylever pos 20.4 100 0
tardis2_debug_pointer pos 0 0 100 ang 0 -90 180 scale 1.5

TARDIS Lamps Debugger

How to use:

  • Toggled by a convar (console variable) called tardis2_debug_lamps
  • If set to 1 in the console (tardis2_debug_lamps 1), it will make existing TARDIS lamps appear as lamp entities
  • Respawning the TARDIS is required for it to take effect
  • lamp entities can be moved around with a physgun, the "C" context menu and the color tool can help you set them up
  • click the lamp with the "USE" key (default: E) to generate the code for adding this lamp into this current state into the TARDIS (the code will be printed into the console)
  • to disable this, set the convar to 0 (tardis2_debug_lamps 0)
  • NOTE: unlike projected lights, the lamp debug entities don't support the shadows parameter and will always have them enabled

Output example:

{
	color = Color(255, 125, 35),
	texture = "effects/flashlight/soft",
	fov = 156.36363220215,
	distance = 661.45452880859,
	brightness = 0.75,
	pos = Vector(6.7666015625, 42.2294921875, 164.078125),
	ang = Angle(28.094324111938, 94.355094909668, -131.17744445801),
},

TARDIS TextureSet generator

How to use:

  • Toggled by a convar (console variable) called tardis2_debug_textures (1 to enable, 0 to disable)
  • If enabled, spawning the TARDIS will print to the console a list of all its submaterials in a TextureSet format

Output example:

Interior textures:

{"self", 0, "models/cem/toyota_smith/ceiling"},
{"self", 1, "models/cem/toyota_smith/ceilingmesh"},
{"self", 2, "models/cem/toyota_smith/ceilingl_a"},
{"self", 3, "models/cem/toyota_smith/ceilingl_b"},

...

Interior part textures:

{"door", 0, "models/doctorwho1200/toyota/2013/exterior"},
{"door", 1, "models/doctorwho1200/toyota/2013/stjohn"},
{"door", 2, "models/doctorwho1200/toyota/2013/windows"},
{"toyota_audio_system", 0, "models/cem/toyota_smith/details"},
{"toyota_balls", 0, "models/cem/toyota_smith/details"},
{"toyota_bouncy_lever", 0, "models/cem/toyota_smith/details"},
{"toyota_console_details", 0, "models/cem/toyota_smith/details"},
{"toyota_console_details", 1, "models/cem/toyota_smith/detailsm"},
{"toyota_console_scanner", 0, "models/cem/toyota_smith/screen"},
{"toyota_console_scanner", 1, "models/cem/toyota_smith/console"},
...

TARDIS Debug Portal's

How to use:

  • run console command tardis2_debug_portals in the console to open a menu
  • NOTE: this works both inside or outside the TARDIS

Options:

  • actions - either print the portal to the console or reset the portal to its default values
  • 3D - changes the thickness of the portal (can be inverted)
  • size - changes the height or the width of the portal
  • pos X Y Z - changes the position of portal
  • ang pitch yaw roll - changes the angle of the portal

TARDIS debug messages

How to use:

  • to enable debug messages, set console variable tardis2_debug to 1 (0 to disable).
  • the messages appear in the console by default. To make them appear in chat, set convar tardis2_debug_chat to 1 (0 to disable)
  • while scripting any TARDIS behaviour, use tardisdebug(...) or TARDIS:Debug(...) function to print absolutely ANYTHING
  • the function can have any number of arguments of any type, including tables: tardisdebug(anything, anything, anything, ...)
  • values will be printed for both SERVER and CLIENT separately

TARDIS Power / Warning state toggle

  • tardis2_debug_power toggles the power in your TARDIS
  • tardis2_debug_warning switches the TARDIS between 10% and 100% of health

Both only work for server administrators We recommend using these only for debugging effects in different states, not for everyday gaming (since it might ruin the gameplay)