It does. It's helped me spot a pattern. All the problemmed scripts use the global object to store and retrieve things.
Ian, is there some reason why this would not work anymore? I know I should move over to that GlobalStoreDictionary object (or whatever it's name is) at some point, but I haven't done so yet.
Thanks for bringing these problems to my attention, Allan. Craig On 02/11/2013 22:10, Allan Thompson wrote:
Hi Craig, Austen mentioned the load capacity issue. I also noticed a problem with revert. It says that the unit had not changed so it cannot revert back. The move unit script works fine. Actually changing the unit works, just not the reverting thing. AS for the team toggle, it does change the team on the permenant charm I got, but for the temp charm, it says it doesn't know the original team so the duration doesn't work. That is about as much as I use so far. I am hoping this helps you out. al -----Original Message----- From: ian-reeds-games-bounce@xxxxxxxxxxxxx [mailto:ian-reeds-games-bounce@xxxxxxxxxxxxx] On Behalf Of Allan Thompson Sent: Saturday, November 02, 2013 5:43 PM To: ian-reeds-games@xxxxxxxxxxxxx Subject: [ian-reeds-games] Re: Dev 40: Huge save game improvements and some new bugs Lol, it doesn't sound like you failed at all, grin. Thanks for tackleing that problem. I use Craig's scripts quite a bit, so I am going to test them out and see what might work and what might not, etc. al -----Original Message----- From: ian-reeds-games-bounce@xxxxxxxxxxxxx [mailto:ian-reeds-games-bounce@xxxxxxxxxxxxx] On Behalf Of Ian Reed Sent: Saturday, November 02, 2013 4:46 PM To: ian-reeds-games@xxxxxxxxxxxxx Subject: [ian-reeds-games] Dev 40: Huge save game improvements and some new bugs Hi all! Several months ago I attempted to fix the problems with saving and loading. I spent several days on it and in the end couldn't get the new system working. After dev 39 I attacked the problem again from a different angle, and failed again. Fortunately that new angle brought me to better understand the problem. So I had a third attempt at it and I'm very happy to say that saving and loading is now very fast and much more memory efficient. I'm thinking this may solve all the out of memory exceptions people would get when saving. I used Allan's first Warlords map for testing and my focus was on getting the save game size down as much as I could, which in turn helped the speed of saving and loading. My test case was to open Allan's map, then save to see how big the file came out. Here are my results: Save game size was: 23847 KB now: 2295 KB Saving and loading times in seconds was: save game 4.0822478 load game 22.2466055 Now: save game 0.160851 load game 0.2320303 As you can see the new saved game size is less than one tenth of the original. And the time it takes to load is 95.8 times faster than previously. It turns out there were some gross memory inefficiencies that started with the feature that let you do things like attack_health_inflict directly in a unit file, and later compounded by random damage and healing. So while these inefficiencies were my fault I'm quite glad to have them greatly reduced. I wish I could have fixed it ages ago, but I'm just not that smart, smile. As with many updates old saves will not work in the new version and this is especially true this time. I had to change a good amount of code to get these benefits, and whenever I change a lot of code it is likely new bugs will appear. I've played through simple fight and defeating your dark side without any errors. I've also played the first warlords map enough to kill some orcs. So if you're interested in helping me find the bugs feel free to update and give it a shot. If you're sick of all the bugs then don't get dev 40. Wait for dev 42 or so, smile. And a special apology to Craig as I had to make all the unused point objects null in order to reduce save game size. Sorry if this breaks your scripts. Thanks for your patience. Ian Reed