![]() |
#1 |
Moderator
Code Moderator
Join Date: Feb 2006
Posts: 1,405
![]() ![]() ![]() ![]() |
![]() Changelog:
0.4 Added a few unit tests Various bug fixes including deallocation issue 0.3 Port to vJass. No more location lists. 0.2 fixed broken sample name hashing routine 0.1 initial release I got tired of hand writing save systems from scratch for aftermath everytime we wanted to change a few values, so I wrote this automated system. Features: - Flexible. Can generate codes of any length using integer data from zero to around twenty nine million. - *Space optimal. Guaranteed to pack your code into as few characters as mathematically possible, assuming all possibilities for saving are equiprobable - Fast - *Creates few excess strings - Simple interface - *Save code character sets can be any length - Configurable hash checking: A random code will work with a probability you specify * items are advantages over Vex's system. The main advantage of Vex's system is that it has been tested far more heavily. It takes some of the hell out of hand tuning a homegrown save system which can take up a day even if you are familiar with the math involved. If someone knows all the characters that are valid in a bnet name, please let me know. Remember, the best you can hope for is helping honest users remain honest. Last edited by PipeDream : 10-06-2007 at 09:35 PM. |
![]() |
![]() |
Sponsored Links - Login to hide this ad! |
|
![]() |
#2 |
I smell like 1337 sauce.
|
![]() letters a-z, numbers 0-9, _, -, ., are the only characters allowed in b.net names i believe.
__________________ |
![]() |
![]() |
![]() |
#3 |
obey
|
![]() a!=A soo
a-z A-Z 0-9 and chars |
![]() |
![]() |
![]() |
#4 |
Free Software Terrorist
Technical Director
|
![]() Checked the code and the only reason not to approve this or the heap are the screenshots or rather the lack of it. S= log of omega probably has a meaning but that really won't help here, could you make a simple screenshot of the generated code ? and for the arrays system take a screenshot of the array's code, better syntax highlighted and post that, cause that cow doesn't help as an screenshot.
__________________ |
![]() |
![]() |
![]() |
#5 |
Moderator
Code Moderator
Join Date: Feb 2006
Posts: 1,405
![]() ![]() ![]() ![]() |
![]() Sure. Those adequate?
__________________Equation is a reference to information entropy. Number of chars required is proportional to the logarithm of the number of states your system can be in. This system is supposed to get that constant as small as possible. |
![]() |
![]() |
![]() |
#6 |
User
Join Date: Aug 2004
Posts: 59
![]() |
![]() Your save engine is confusing. It says First create him a savecode:
local location savecode = Savecode_new() Now store the data in it. The way to store data is to pack it in an integer, taking a value from 0 to n, including n. Then call Why dont u just include the trigger required for it? I dont know jass and this is not clear please clarify. |
![]() |
![]() |
![]() |
#7 |
Free Software Terrorist
Technical Director
|
![]() I think he expects you to use all JASS, you can't blame him anyways
__________________ |
![]() |
![]() |
![]() |
#8 |
User
Join Date: Nov 2005
Posts: 18
![]() |
![]() Is there no way to just declare the variables you want saved in JASS by using a simple copy and paste and then set them in GUI? I freaking hate JASS so much. Or at least create an example that actually saves something instead of just displaying a random code..
Last edited by Kratos : 07-29-2007 at 04:53 AM. |
![]() |
![]() |
![]() |
#9 |
Free Software Terrorist
Technical Director
|
![]() How about you begin loving Jass. Or you learn Jass, or you try not to use a system that requires you to know Jass?
__________________ |
![]() |
![]() |
![]() |
#10 |
Moderator
Code Moderator
Join Date: Feb 2006
Posts: 1,405
![]() ![]() ![]() ![]() |
![]() *waves goodbye to location lists* 0.3, vJassified
__________________BTW, at this point the non vJass version has been tested heavily in NOTD Aftermath, so I can encourage use of 0.2. 0.3 is only probably fine. |
![]() |
![]() |
![]() |
#11 | |
Alpha Male of Wc3c
Official Map Reviewer
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#12 |
User
Join Date: Oct 2003
Posts: 150
![]() |
![]() Can you by any chance give an example of how to save say a hero's inventory? Cause i am not exactly sure you seem to have an example set up to save only integers ranging from # to n only. Not sure how an item would fit in there.
|
![]() |
![]() |
![]() |
#13 |
Moderator
Code Moderator
Join Date: Feb 2006
Posts: 1,405
![]() ![]() ![]() ![]() |
![]() A simple approach would be to give each item type a unique number from 0 to n. Loop through the hero's inventory, look up the item type number for each item, save the number.
__________________Charged items will present complications. |
![]() |
![]() |
![]() |
#14 | |
I blink, therefore I am.
Join Date: Sep 2006
Posts: 1,812
![]() ![]() ![]() ![]() |
![]() While trying to figure out how the system works, I believe I have ran across a slight problem. Saving a code simotaneous times within the vJass version, without loading in-between, causes the system to op in s__BigNum_MulSmall. The modified example is as follows, which will display the error with War3Err.
__________________
I believe it has something to do with not clearing the lists entirely. Of course, I have not been able to completely understand the system, but this is what I understand. |
|
![]() |
![]() |
![]() |
#15 |
Moderator
Code Moderator
Join Date: Feb 2006
Posts: 1,405
![]() ![]() ![]() ![]() |
![]() Thanks for letting me know. If someone needs this fixed, let me know, but it should not affect saves. Or, use the location version.
__________________ |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
|