Weapon Canvas - SuedOnAIM/RF_CustomHUD_Edits GitHub Wiki

Weapon Canvas

image
WeaponHUD consists of:

  • WeaponName displays the current weapon's name.
  • WeaponSprite displays the current weapon's UI sprite.
  • NumericalAmmo houses the scripts for ammo counts.
  • CurrentAmmo displays the current weapon's ammo count. The number turns red as the magazine gets closer to zero.
  • SpareAmmo displays the current weapon's spare ammo count.
  • FireSprite displays your weapon's fire mode (semi-automatic or automatic.) Switches sprites depending on the weapon's setting. Assign sprites in the WeaponHUD data container. The included example sprites switches from 4 bullets (full auto) to 1 bullet (semi auto).
  • FireText displays your weapon's fire mode as text. Can change displayed text in the CustomHUD_Weapon.lua script.
    image
  • HeatText displays your weapon's current heat level if the weapon uses heat. Hides itself when the weapon does not use heat.
  • SightMode displays your weapon's current sight level if the weapon uses sight modes. Hides itself when the weapon does not use sight modes.

MilSim Canvas

image
The most significant object of the MilSim Canvas is the MinimalistAmmoDisplay object and its children.

  • MinimalistAmmoDisplay houses the script to display ammo counts
  • CurrentAmmo describes your current weapon's ammo count. It works by dividing the current ammo by the magazine size. The percentage from the formula determines what description to use.
    image
  • MagCount displays how many full magazines your current weapon has. It works by dividing the spare ammo by the magazine size then rounding to the nearest whole number.
    image

Everything else is basically the same as the normal weapon canvas. just read the text above lol

QuickThrow HUD Elements

image The QuickThrow HUD elements do not have a canvas of their own, so you will need to place them inside a canvas.
I recommend placing it within the WeaponCanvas.

  • Each QuickSlot represents where the QuickThrow UI will be located.
  • Sprite represents the thrown item's UI weapon sprite. Count, x, and KeyBind are all textboxes. Count and x represent how many of that thrown item is in the player's loadout. KeyBind shows the player's keybinds for quickly throwing as defined in QuickThrow's mutator configuration.
  • When the player only has one QuickThrow compatible weapon equipped, only QuickSlot#3 will be used. If only two compatible weapons, then QuickSlot#3 and QuickSlot#2 will be used.
  • ThrowModeText is only used for Apsel's Arsenal Overhaul's grenades. It displays how far the player is going to throw one of Arsenal Overhaul's grenades.

Mutator Configuration

image
Configuration requires:
Bool id: weaponHUDVisibility