@KaleoOmega No, I understood what you meant, what I mean is that if the game know there are 10 streetpass tags, why doesn't the game set it to 10 instead of one? I guess we'll never know.
About streetpasses, I've checked:
- Streetpass tags start at 0x593F.
- Each tag is 104 (0x68) bytes long. There are eleven tags, the first one being the tag you streetpass to others, and the other 10 the received tags.
- Others tags start at 0x059A7 ( 104*10 bytes long = 1040 bytes)
- Tags end at 0x5DB6
- Empty tags are effectively 0x00, so setting 0x59A7-5DB6 to 0x00 removes all streetpass tags.
I might be able to implement a checkbox in the editor to clear streetpass tags. and another to set streetpasses, no need to bother SciresM (unlike pokemon shuffle, this save data has fixed offsets).
Your current script does
NOT fully erase the tags, since you got the tag size wrong.
Here's a simplified version of your script that fully deletes the tags, with comments (just to store the info somewhere in case this isn't added to the editor):
Python 2.7, won't work on python 3
Code:
import sys;
with file(sys.argv[1], 'r+b') as fh:
print ('Setting streetpass number to 0...');
fh.seek(0x05967);
fh.write('\x00\x00'); # Max is '\x0F\x27'
print ('Deleting streetpass tags...');
i = 0
while i < 0x68*10: # Each tag is 104 bytes long (0x68)
fh.seek(0x059A7+i); # Streetpass tags start at 0x593F, but the first tag is the user tag, 0x593F+0x68 = 0x59A7
fh.write('\x00');
i = i+1
print ('Patching done. Enjoy :)');
I've attached a convert python to exe script, just drag and drop savedata.bin to bat file.
ps: I think I would have been easier to code it in C than searching how to convert python to exe...