What Lua is
Lua [pronounced LOO-ah means “Moon” in Portuguese] is a lightweight, high-level, and fast programming language. It was designed to be embedded in other applications and used as an extension or scripting language. Lua has a simple syntax and provides powerful features like dynamic typing, automatic memory management, and coroutines. It is often used in video games, embedded systems, and other scenarios where performance and ease of integration are important.
How Lua works in Hero Realms
Hero Realms has built in support to develop Lua scripts but on the Steam version. You can play a saved/created script any device. Using a combination of basic Lua libraries and Hero Realms specific libraries, players can created their own playable versions of the game. You can make anything from new market cards or custom scenarios all the way up making completely new classes.
Once a script is created, the creator can upload it and send out challenges to other players. Once those games are finished, the other user can save the script to their favorites list and be able to send out their own challenges using the saved script. The more this exchange occurs, the more people will have the script. It is the only way to share them.
Saving a Script to your Favorites.
Once you accept a challenge from the creator of a script and the game has finished, you can find it in your game history. Choose the “Add to Favorites” option, and it will be added to your list so you can send challenges with it (keep reading for those details).
How to Send Challenges with Saved Scripts
There are two methods to start games with scripts, challenges when you want to send it to a specific person and the custom game lobby when you don’t care who will accept it.
-
Challenges
-
- From the online game lobby, choose the “Challenge” footer button.
- Choose an opponent/expansions/your hero as normal.
- Set the game type to “Custom”
- Then choose the “Challenge” footer button.
-
- On the next screen, you can choose the script you want to use.
- Double Health and No Heroes are built-in official scripts.
- My scripts are all of the scripts you made.
- The “My Favorites” option will open a list of any script you saved previously from other people.
- Select the script you want to use and the challenge will be sent.
-
-
Custom Game Lobby
-
- From the online game lobby click the “Custom Games” lobby.
- As of 12/21/23, there is now a listing of “Popular” scripts that you can send challenges without needing to have the script saved ahead of time. Select one and then hit “Start Game” to use one.
- If you want to use a script that is not already in the list, choose the “New Game” footer button.
- The challenge screen will open
- Choose the hero/expansions you want to use
- Then hit “Start Game” and this will put the game into the lobby for anybody else to accept.
- Select “Tap to Change” to choose the script from your list like in a challenge as normal.
- From the online game lobby click the “Custom Games” lobby.
How to create your own scripts
If you want in on the content creation action then your starting point is here. There is also a #lua-scripts channel on the Realms Rising Discord server that is a great way to get started or have your specific questions answered by not only the community but also actual WWG developers.
I will be creating some more “How to” articles in this category in the future but if you have any questions in the meantime, find me on the Realms Rising Discord server!