• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Save/Load System GUI

Status
Not open for further replies.
Level 31
Joined
Jul 10, 2007
Messages
6,306
You can't just cnp it into your map. It's very easy to use if you know vjass though :\.

Sadly, a good GUI system isn't possible because of GUI's limitations. Some people have attempted to make a good one that could compete with save/load with snippets, including myself, but nobody has been able to do it, which is why there is currently no approved GUI system.


If you know a little math, you can get away without using a full save/load system.

JASS:
local Base base = Base["0123456789"]
local BigInt i = BigInt.create(base)
call i.add(5,0)
call i.multiply(12)
call i.add(11,0)

Getting the values out
JASS:
local integer value1 = i.divide(12)
local integer value2 = i.toInt()

But you can only go so far with plain BigInts. Advanced save/load gets harder to do.

Anyways, xorkatoss, if you are doing rather standard save/load, like saving a hero's inventory and saving item charges and saving a player's resources, that's extremely easy to do. You can save all of that stuff with like 4 lines of code >.<, lol.

If your stuff is very easy to do and you do your own catalogs, I'm sure people will be willing to just provide the code for you since it only takes a couple of minutes to write up. If you want some crazy whacked out stuff like hero specific items that require heroes of a certain level that fit into certain slots in a custom inventory or have certain restrictions, then I doubt people are going to want to help out as that stuff is very complicated and takes many, many hours to code ;D.


Anyways, just to give you an idea of how easy the easy stuff is to do
JASS:
call SaveInventory(stack, unit, catalog)
call SaveHeroXP(stack, unit, 0)
call SaveItemCharges(stack, unit, chargeTable, perishableTable)
call SaveUnitLoc(stack, unit)
call SaveUnitFacing(stack, unit)
call SaveUnitLife(stack, unit)
call SaveUnitMana(stack, unit)
call SaveHeroStats(stack, unit, GetHeroLevel(unit))
call SaveHeroAbilities(stack, unit, abilityCatalog)
call stack.push(CompressInt(GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD)), CompressInt(1000000))

edit
I just had an idea for a basic GUI system... for simple stuff only o-o.

Just allow the user to enable or disable what they want to save and they are done ^)^.
 
Level 20
Joined
Jul 12, 2010
Messages
1,717
You can't just cnp it into your map. It's very easy to use if you know vjass though :\.

Sadly, a good GUI system isn't possible because of GUI's limitations. Some people have attempted to make a good one that could compete with save/load with snippets, including myself, but nobody has been able to do it, which is why there is currently no approved GUI system.


If you know a little math, you can get away without using a full save/load system.

JASS:
local Base base = Base["0123456789"]
local BigInt i = BigInt.create(base)
call i.add(5,0)
call i.multiply(12)
call i.add(11,0)

Getting the values out
JASS:
local integer value1 = i.divide(12)
local integer value2 = i.toInt()

But you can only go so far with plain BigInts. Advanced save/load gets harder to do.

Anyways, xorkatoss, if you are doing rather standard save/load, like saving a hero's inventory and saving item charges and saving a player's resources, that's extremely easy to do. You can save all of that stuff with like 4 lines of code >.<, lol.

If your stuff is very easy to do and you do your own catalogs, I'm sure people will be willing to just provide the code for you since it only takes a couple of minutes to write up. If you want some crazy whacked out stuff like hero specific items that require heroes of a certain level that fit into certain slots in a custom inventory or have certain restrictions, then I doubt people are going to want to help out as that stuff is very complicated and takes many, many hours to code ;D.


Anyways, just to give you an idea of how easy the easy stuff is to do
JASS:
call SaveInventory(stack, unit, catalog)
call SaveHeroXP(stack, unit, 0)
call SaveItemCharges(stack, unit, chargeTable, perishableTable)
call SaveUnitLoc(stack, unit)
call SaveUnitFacing(stack, unit)
call SaveUnitLife(stack, unit)
call SaveUnitMana(stack, unit)
call SaveHeroStats(stack, unit, GetHeroLevel(unit))
call SaveHeroAbilities(stack, unit, abilityCatalog)
call stack.push(CompressInt(GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD)), CompressInt(1000000))

edit
I just had an idea for a basic GUI system... for simple stuff only o-o.

Just allow the user to enable or disable what they want to save and they are done ^)^.
well since i only want to save hero exp and items i should post a request so ppl can just give me a vJass code to CnP?
i tried to learn vJass but for me a simple vJass line is like this = "qedijfgkbrgbwzxnmapqhndsfvrgrgsre" xD

Nice Nestharus, I don't think he'll get into vJASS. But its interesting for me lol.
you are right about that, i won't :p
only thing i can do with vJass is CnP codes >.<

EDIT:
edit
I just had an idea for a basic GUI system... for simple stuff only o-o.

Just allow the user to enable or disable what they want to save and they are done ^)^.
that's pretty much what im looking for :D
any chance you are going to make that system soon?
 
Last edited:
Level 4
Joined
Aug 5, 2011
Messages
99
or u can use acehart's system... like evryone else :D link
easy to use, the jass part is just to copy-paste, all the things u gotta change are gui.. isnt optimal probably, but for you it will do :D
 
Level 20
Joined
Jul 12, 2010
Messages
1,717
as i said i need a system to save hero exp so this one won't do, anyway thnx for trying to help me +rep

or u can use acehart's system... like evryone else :D link
easy to use, the jass part is just to copy-paste, all the things u gotta change are gui.. isnt optimal probably, but for you it will do :D
thnx, this is just what im looking for!!:D +rep
 
Status
Not open for further replies.
Top