Skip to content

How To customize Mech HUD Variables

Subject9x edited this page Sep 16, 2020 · 6 revisions

One part of building the player's HUD for battleMETAL involves customizing console and game variables in the mech data. This can be found towards the bottom of any common/data/mechs/ file like the balaket.

note battleMETAL uses compiler pragmas to only compile certain code for certain modules:

'#ifndef CSQC' = don't compile for the client code in csprogs.dat

make sure when using pragmas to always close any if with a following #endif!

#ifdef CSQC

  • self.weaponmodel = "q3mdl/mechs/balaket/balaket_view.md3";

    • overrides Quake's stock gun model, this is the cockpit struts mesh.
  • self.hud_model = "q3mdl/mechs/balaket/balaket_hud.obj";

    • new for battleMETAL this is the mesh for the HUD panel display.

Player pitch limits are set here, with max of 90 degrees for either limit.

  • self.pitchMax = 30; //pitch down limit

  • self.pitchMin = -35;//pitch up limit

These are stock Quake view variables. Below each is their corresponding console var which you can use -tab- to autocomplete and see how they're used. I'm not entirely sure how these variables work for values, I mostly eye-balled the values to get my preferred setups.

  • self.hud_rollangle = 4;

    • cl_angle
  • self.hud_bob = 0.03;

    • cl_bob
  • self.hud_bob_cycle = 0.5;

    • cl_bobcycle
  • self.hud_bob_up = 0.15;

    • cl_bobup
  • self.hud_bob_model = 1;

    • cl_bobmodel
  • self.hud_bob_side = 0.09;

    • cl_bobmodel_side
  • self.hud_bob_speed = 6;

    • cl_bobmodel_speed
  • self.hud_bob_model_up = 0.1;

    • cl_bobmodel_up

#endif