Login
Create

Hero Select Anywhere (now with role customization)

ZTEEA

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_

Code Snippet

Loading...
Fullscreen
Copy to clipboard

Other Codes part of Modular utilities

View collection

1 Comments

Log in or Sign up to place a comment.

Update Log (2)

Added the ability to edit roles in the following rule:

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.

Elo Hell Logo_H-M-Dark
Join the Elo Hell Workshops Discord
Workshop.codes - Background image