• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Solved] Save function doesn't works

Status
Not open for further replies.
Level 1
Joined
Mar 28, 2018
Messages
4
I tried to fix the save function for epic heroes on this script to learn more about save sytems but didn't manage to... normal heroes save & load fine.

What happens: After getting 300 PvP rank, you can then go to an area to 'upgrade' your hero to get a better one (your hero turns into an epic hero), but the save system for Epic Heroes aren't working, you always get the same code whenever you save, doesn't matters the Hero/equipment, just changing depending on your nick.

When you try to load the code the hero doesn't loads. So I guess that the Epic Hero save code is a null code. The system's probably not detecting your Hero when you save as an Epic Hero. To help you out on that the epic heroes unit codes are:
H00A
H008
H009
O005
O004
U00B
E000
E003
N015
H00B
E001

Uploaded the script file & map if you wanna check something else.
 

Attachments

  • war3map.j
    563.7 KB · Views: 50
  • Ragos_ORPG_8.25_pvp.w3x
    617.4 KB · Views: 34

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,208
Did you remember to update all variable references to the hero when you replace its type? The GUI replace function removes the existing unit and makes a new one, leaving all variable references to the old unit unchanged unless explicitly changed. Without doing this the save system might try to save effectively a null unit rather than your epic hero.

Depending on how the save system works you might need to extend its tables to include the new unit types. For better compression instead of storing a 32bit type id number they instead store a considerably smaller look up table index, where the look up table contains all saveable hero types. Unless the hero type is added to such a lookup table then the system might not be able to save them.
 
Level 1
Joined
Mar 28, 2018
Messages
4
Did you remember to update all variable references to the hero when you replace its type? The GUI replace function removes the existing unit and makes a new one, leaving all variable references to the old unit unchanged unless explicitly changed. Without doing this the save system might try to save effectively a null unit rather than your epic hero.

Depending on how the save system works you might need to extend its tables to include the new unit types. For better compression instead of storing a 32bit type id number they instead store a considerably smaller look up table index, where the look up table contains all saveable hero types. Unless the hero type is added to such a lookup table then the system might not be able to save them.

Hi. Sorry for the late reply. I finally got it (after hours and hours trying)!!!! At first I didn't understand what you meant but now I get it... thank you very much dude.
 
Status
Not open for further replies.
Top