Earlier Versions
Name | Size | Uploaded | Game Version | Downloads | |
Example Map release | 115.02 KB | Dec 27, 2010 | - | 583 | Download |
Save/ Load Library release | 209.27 KB | Dec 27, 2010 | - | 267 | Download |
Description
NOTE: This Project has not been updated for patch 1.2. Bank security is not implemented at the present time.
Hero Saving and Loading System
What is it and what does it do?
This is a dialog based system which manages the saving and loading of heroes with a bank file over multiple sessions. This system was primarily developed for use with an RPG type of map.
Features
Supports up to 14 players
3 Slots for the Saved Heroes (which can be easily increased)
Simplified Interface
Easy to Implement
How do I use it?
This system should be really easy to implement. I am confident that it will work as soon as you implement it, however you will likely want to change some things first.
All you have to do to install it is modify the bank name used for the map and the spawn point variable location to set up the core functionality for the map.
To add to the hero selection, there will be a bit of extra effort required, however it should still be relatively straight forward.
Installation
1. If you have created a new map, remove some of the Melee Initialization triggers (especially the victory/ defeat one, it's annoying).
2. Open the trigger editor and make sure libraries are visible.
3. From the menu go to Data -> Library -> Import Library. Select this library from the file chooser.
4. Modify the variable SpawnPoint to whatever point in your map you want the hero to appear at after the selection process.
5. Replace BankName in various actions in Initialization with whatever you want to name your bank.
6. Installation is finished. You will now have to customize it to suit your needs.
IMPORTANT:
For each player you are going to allow in the game, you MUST preload and synchronize the bank for them. Unfortunately this will require a manual process, which is why I did it only 4 times.
Customize
To add more heroes to the hero selection, you will have to:
• Increase the size of the variable SelectHeroDialogItems. Ensure that the minimum size of this array is 1 (i.e. 0 for cancel and 1 for random).
• In the trigger Initialization create a dialog button for each hero you want to select.
• In the trigger Dialog Actions adding a new case to the switch with the appropriate action for selecting a hero.
• In the function Randomize Hero add a new case to the switch for each hero you want randomized and increase the range of integers of which the random hero is determined from (in the if statement).
To increase the amount of slots you must add additional dialog buttons for the save and load dialogs and add more cases to the switch statement in Dialog Actions.
When you call the functions Save Hero and Load Hero, the second parameter decides the save slot. All you have to do is put in which ever slot you want and it should work.
Known Issues and Bugs
Due to the way Blizzard saves the items in a unit's inventory into a bank, if you use charges and then save and reload the hero it is refreshed to maximum.
If you experience any issues when using this system, please let me know! I have not tested it with more than 3 players and the recent tweaks and modifications have only been tested by me in single player mode.
License
This library is free to use by anyone and is also free to modify as well.
Credit is not required if/ when you use this in your map.
Do not attempt to charge anyone for the download or use of this library.
Do not redistribute it under your name unless modified extensively.
If you modify it and re-release it, give credit to myself for the initial system.
Add a comment