Create
Josbird

Hero Select Anywhere (now with role customization)

This code is over 6 months old. The code may have expired and might no longer function.

A fully featured if somewhat elaborate hero select screen that can be used in any mode. Simply hold Reload to change heroes.

I tried to retain as much functionality from default hero select as possible:

  • The list of all heroes is automatically sorted alphabetically within their role on game start
  • I did my best to make it capable of accomodating new heroes in the future
  • Double clicking to quick select a hero is supported
  • The select screen properly shows each player's allowed heroes

You can freely use this in your own mode (in fact, I created it primarily for others to use it). Here are some compatibility notes to keep in mind:

  • Currently, the script uses 2 effects and 30 texts to render the hero select screen. These are created on game start and never destroyed, so keep in mind you will have reduced entity/text budgets.
  • There are Workshop Settings to turn off pieces of the hero select screen if you are running into text budget issues.
    • The Lightweight Mode setting overrides the rest of the text settings and reduces total text usage to 2 + 1 per 4 heroes in the game (so currently, 10). It also changes hero confirmation from double clicking or clicking "Continue" to simply clicking once on the hero.
  • You can use this module to enable hero selection when Respawn As Random Hero is on. Make sure to enable the "Respawn As Random Hero" Compatibility Workshop Setting, otherwise the game will override hero selection.
  • Module script stats:
    • Element count: 7170*
    • Global variable slots: 107-127
    • Player variable slots: 124-127
    • Subroutine slots: 125-127
  • As of 3/28/2021, you can now edit hero roles.
    • Look for the rule named [HeroSelectAnywhere.del] (Subroutine) Define hero arrays
    • Simply edit the global arrays TankHeroes/DamageHeroes/SupportHeroes and the hero select screen will automatically group and sort them in the appropriate role.
    • A non-executing example is included in the subroutine.

* I recognize that this is a pretty substantial number. If there is enough interest I can make a version similar to Lightweight Mode with no settings but a smaller overall script size.


Questions or concerns? Contact me on Discord via Josbird#1908 or on Twitter via @Josbird_

Categories: Tools
Heroes: D.va, Orisa, Reinhardt, Roadhog, Sigma, and 27 more...
Created at:
Last updated:
Current version: 1.1.0

Snippet

Loading...

Users Also Like

Similar Codes

Join the Workshop.codes Discord