Ind 945 Posted January 11, 2014 (edited) Hercules: 1st 2014 MEGAPATCH Helloooo! Starting 2014 with a boom, yet another outstanding patch from Hercules! Patch Item #1: Scripting Level UP Char and account variables overhaul They're no longer limited to #define ACCOUNT/GLOBAL_REG_NUM, they're now limitless Their storage capabilities have received a colossal improvement, each numeric variable now uses at least 1/10 the memory it did previously, and we achieved it while increasing speed, simply outstanding as expected from us. Thanks to their quantity no longer being limited, char and account variables now support arrays, i.e. setarray #accreg[y],...; Saving and loading procedures have been improved outstandingly! for instance, previously, if you had 100 char regs but only one had been modified or deleted, map server would need to send all of them and char server would have to re-insert all of them; now only modified or deleted ones are saving, increasing saving speed of both map and char server procedures and decreasing inter-server bandwidth by dinosaur steps. Magnificent Array Improvement (to all variable types) Size limit modified from 127 to ...2 billion! Speed of countless array operations have been improved thanks to new array handling, e.g. whereas previously upon deleting any array it'd set its 127 possible values to 0 (regardless of how many values it actually had) now it only deletes as many members as it possesses getarraysize (the-oh-misleading-function since it returns the arrays' highest index) has been sped up as well thanks to this, and it no longer wastes script stack room on every interaction And the futureThis improvement has open way for many other amazing features, for example, Haruna has designed a foreach implementation for scripting among some other useful enhancements Global account variable handling redesign To clarify, this is that ancient type used on multiple-char-server setups, ##varname, which are present in all servers an accounts logs into, as opposed to #varname which, while account-wide, are considered 'local' to a char server. Saving and loading have been modified to match char/local-acc variable new design, on its own it already is a major speed boost and bandwidth saver, however, it has also improved login servers overall processing speed, thanks to its processing no longer being attached to ordinary account handling, this means that all operations that required login server to use an accounts data (i.e. login/pincode change/ban/block/etca) have been sped up, and use less memory. '.', '.@' and ''' variables write operation speed up trying to write ''' variables outside instances will now print warnings instead of silently doing nothing runtime read/write operations of global/temporary(@) char variables, as well as account variables, have been considerably sped up, whereas previously it'd run a str lookup to find a match for read/write it now uses the variable id, furthermore it now relies on DBMaps to handle the lookup (whereas previously it was a normal loop). Database tables overhaulWe've analysed global reg data storage and we've decided that it not only is a memory waste, it is a processing one as well due to how int and str variables share the same storage, we've analysed global reg data for a number of large servers and have identified most variables are numbers, by a outstanding majority, with that in mind, this patch introduces 6 tables that will improve this drastically. You'll notice this patch's SQL upgrade file will take care of this, and thus migrate the data properly into the new tables. Special Thanks To: Haruna ! <3 wouldn't have gotten half of it done if it weren't for Haru, thank you so much sensei! jaBote, for proposing it! Emistry Yommy Streusel Patch Item #2: @autotrade Persistency Also known as: @at merchants survive server crashes/restart, as soon as the server starts again they're re-spawned. May be disabled on src/config/core.h by commenting out AUTOTRADE_PERSISTENCY Special Thanks To: Haruna! Michieru, this feature wouldn't be out now if it weren't for him, lets all thank him! Dekamaster/Nightroad for helping me on this features original design, 3-4 years ago. Thank you master <3! Link'u! Commit Upgrade files #1 (Autotrade) #2 (Scripting Level UP) Edited February 7, 2017 by Ridley 31 Sneaky, ossi0110, Nameless2you and 28 others reacted to this Quote Share this post Link to post Share on other sites
Jezu 25 Posted January 11, 2014 Aweeeeeeeeeeeeeeeeesssooommmmeeee !!! Specially, on the 127 to 4 billion! & @at new features! Thanks a lot for this Ind! and for those devs who helped this to make it possible! Quote Share this post Link to post Share on other sites
quesoph 105 Posted January 11, 2014 oh god thank you Quote Share this post Link to post Share on other sites
Emistry 145 Posted January 11, 2014 one of the best megapatch =) Quote Share this post Link to post Share on other sites
ossi0110 200 Posted January 11, 2014 love it ! Quote Share this post Link to post Share on other sites
Judas 100 Posted January 11, 2014 awesome job guys! Quote Share this post Link to post Share on other sites
EriNa_KillerSoul 9 Posted January 11, 2014 A W E S O M E! Quote Share this post Link to post Share on other sites
Neo-Mind 264 Posted January 11, 2014 Well thats starting off with a bang indeed Let the festivities BEGIN 1 evilpuncker reacted to this Quote Share this post Link to post Share on other sites
Patskie 88 Posted January 11, 2014 Speechless! Did i really just saw 4 billion @_@ <3 Quote Share this post Link to post Share on other sites
jaBote 438 Posted January 11, 2014 In fact it was truly limitless on the tests, but I think Ind and Haruna decided to cap it because of the huge amount of resources it started to consume per entry beyond that point. Quote Share this post Link to post Share on other sites
KeyWorld 87 Posted January 11, 2014 Welcome 2014. Great job. 1 JulioCF reacted to this Quote Share this post Link to post Share on other sites
Zezicla 2 Posted January 11, 2014 2014 rocks +1 Quote Share this post Link to post Share on other sites
evilpuncker 503 Posted January 11, 2014 oh. my. God. AWESOME! Quote Share this post Link to post Share on other sites
Thunderbolt 3 Posted January 11, 2014 Goddddddddd !!! Quote Share this post Link to post Share on other sites
orange 4 Posted January 11, 2014 HOLY MOTHER OF ALL COWS!!!!! thats an amazing stuff!!! seriously 127 to 4 billion???? thats insanely crazy!!!! and not to forget, i love the @at feature too!! Quote Share this post Link to post Share on other sites
Igniz 8 Posted January 11, 2014 I'm in love again..... Quote Share this post Link to post Share on other sites
Yamzkie 22 Posted January 11, 2014 Awesome improvement... keep it up!! Quote Share this post Link to post Share on other sites
Yommy 265 Posted January 11, 2014 Ind, you are just one badass mofo <3 thank you to everyone who helped make this possible Quote Share this post Link to post Share on other sites
jTynne 101 Posted January 11, 2014 @implode Yay! Yay, yay, yay! Can't wait to experience these soon enough. Excellent per usual, friends! Quote Share this post Link to post Share on other sites
Vy Low 11 Posted January 11, 2014 Awesome patch Ind!!! Quote Share this post Link to post Share on other sites
Jedzkie 58 Posted January 11, 2014 Excellent! Quote Share this post Link to post Share on other sites
ShogS 0 Posted January 11, 2014 OMO nice patch Quote Share this post Link to post Share on other sites
Mhalicot 392 Posted January 12, 2014 Swanamanice Quote Share this post Link to post Share on other sites