Using autotester with CJW's save system

I mentioned in this thread that autotester doesn’t get on with CJW’s new save system (released January 9th) due to the *sm commands not being recognised. If you’re using notepad++ for coding, these macros will *comment and un *comment out the offending commands which should make testing simpler.

The linked code ( should be put inbetween the tags within the shortcut.xml found in your appdata (or application data folder) for notepad ++. On my PC (windows 8) the path for this file is : C:\Users\Kirsty\AppData\Roaming\otepad++

Note these are very basic macros (literally a recording of find and replace routine), and it’s possible to keep *commenting out the commands so you could end up with *comment*comment*sm_init - if this is the case, you just have to run the uncomment macro until all *comments have been removed. I don’t know enough about notepad++ macros to record anything more sophisticated I’m afraid!

Additionally, I added the following line to the beginning of my stats in the mygame.js file:

/\*Save system variables - to be turned on during testing ONLY\*/
savemod_slot_0: false
, savemod_slot_1: false
, savemod_slot_2: false
, savemod_slot_3: false

These should be commented out when testing is done (although I’m not sure if they’ll impact the save system if left live?). Also, you’ll need to add as many variables in as you do have save slots.

@fantom and @Marius both expressed an interest in this, but I didn’t want to clutter up @CJW’s original post(

Anyway, hope this is helpful to those interested.

1 Like

Great! Although… IF you can, why don’t you record yourself finding and replacing the commands?

Find: *sm_save (match whole word)
Replace: *sm_save with *comment*sm_save

^Comment Macro

vUncomment Macro

Find: *comment*sm_save (match whole word)
Replace: *comment*sm_save with *sm_save

It just means that you aren’t capable of double commenting, not a big deal, but if it’s not too hard to do it might be worth it! Thanks again for pointing this out and devising a solution :slight_smile:

EDIT: Just realized that is probably exactly what you already did -.-’
Just the ‘match whole word’ bit, if you can include that it’d be good. I don’t know much about Notepad++ macros.

Thanks for sharing with everyone! This certainly makes the long auto-test process much easier.

@CJW - hah, that’s exactly what I did. I’m okay with VBA, but notepad++ macros are completely different from that - using ‘match whole word only’ in the find and replace screen still identifies the *sm_save even if it’s been commented…yesterday was the first time I used them, so my knowledge is very minimal.

If I could figure out how to check if *comment*sm_save exists before commenting it again, that would do the trick.

Thanks, @bawpie. This works great!

@Marius - glad they work. :slight_smile: