Sandcastle-Builder
Sandcastle-Builder copied to clipboard
Something's wrong with dragons
I don't know how any of this works, but:
After closing and reloading:
and then after closing and reloading again:
Looks like on loading dragons are getting spread out by a NP.
source https://www.reddit.com/r/SandcastleBuilder/comments/3x6n6c/40_kitty_genocide_simulator_2015/cy23vxk
Is this to do with support for dragons on negative NPs? In any case it looks like it's losing half of them on every save-load, by halving the frequency at which they appear (or doubling the wavelength)
Are the dragons maybe being sent to imaginary NPs by mistake upon loading, or saving?
This could also potentially be caused by having an outdated copy of persist.js. Maybe. I dunno. But it's possible, since this user is also getting an issue relating to changes to how I handle time, which shouldn't be happening unless a file is out of date, also potentially persist.js.
Someone else reports the same problem (not sure to what extent) so it's probably more than just a rare random interaction.
We can call it Dragon Halving, in reference to the Dragon Doubling in ADOM. (A feature where letting a dragon pick up gold caused it to drop twice as much gold. I think that might have been fixed too.)
Well I'm gonna go to bed and hope to wake up to find a fix in 8 hours.
Maybe there will still be some surviving dragons by then :P
I haven't tested the actual live, but this does not seem to happen on my fork. Since the only difference is the new momentjs stuff (I assume; whatever the last 10 or so commits are), I'm guessing whatever broke dragons is in there. Be back shortly with a fix, I hope. Edit: reviewed the diff, no earthly idea what could have broken it.
Edit2: OP confirmed my branch does not have this issue. Could you have accidentally forgotten a spot when adding MomentJS?
I think I found the reason why dragons were disappearing. NPdataFromString was checking if version was <4.001. After I changed it to 4 everything seemed to work just fine (had the same problem as OP)
Syntech: Did it work for loading as well as importing? Someone in the reddit post seemed to only have the issue with one of those.
I tried to import and I get told that I am trying to load into version 4 from version 4.001.
I think the <4.001 rather than <4 mismatched check would cause that issue as going from 3.667 to 4.x adds the t1i timeline and there is a legacy load method that should only run once to load the old 1,2,3 set but if you save right away before doing anything in the t1i timeline the new save looks like 1,1.1empty,2,2.1empty,3,3.1empty. I think what's happening there is the new set is saved and then loaded up again with the legacy method so that you get, 1,2(1.1empty),3(2),4(2.1empty) and it stops after X iterations rather than the termination of the savestring.
Looks like this was more complicated than I thought.