List of issues
: WARNING - support of the decompiler is now VERY LIMITED. There are no active developers. This means waiting times in the issue tracker are very long and mostly depend on community. Sorry for the inconvenience.
#1044 Add Offset number to exported DoAction filenames
In similar nature to #774 (in that feature request ticket, I requested to add depth to exported PlaceObjects to get a better ordered / diff friendly export output), I'd find useful if DoAction tags get their offsets (which is currently displayed in the UI) as part of the exported filename (like "DoAction_5426601.as") instead of the sequential number they are getting now. The SWFs I'm decompiling right now have multiple DoActions in a single frame, and they are getting no useful order in the exported tree with the sequential numbers they are getting (no order criteria?), even tho their offsets seem to have a meaningful order (I'm guessing they are DoActions are executed in that order?) BTW, just in case this matters, I'm using the commandline ("-export scripts") to get the exported files, and tried versions 601 stable and nightly build 880). Thanks for your time.
But if you have 2 different version of your swf, for example: ATG_-_Reconstruction.v1696.swf and ATG_-_Reconstruction.v1697.swf the offset numbers will be different. It is not so diff friendly. Are you sure you want this? Is the order different when you export the same swf multiple times?
Yes, that would be useful anyways. Even tho each SWF get different IDs and offset for each object in different versions, it seems that same objects are given IDs *in the same order* in different versions. So, sorting the code by IDs I get a diff-friendly output. Like I said in #774: "I made a python script to join all the exported code in a single file, sorting by the IDs generated in the folders/files." (I should add I remove IDs too) See ATG_-_Reconstruction.v1710.txt and ATG_-_Reconstruction.v1711.txt, if you diff them, you'd see that the differences are minor. And many of hunks that present differences are from DoAction reordering. I'm not exactly sure in what order are these sequencial numbers given, but I'd find it useful if it is based on their Offset (or they are given their offset), the same way it is sorted in FFdec GUI. Good Luck
Is the order the same every time when you export the same file?
Yes, the order of assigned by the sequential numbers for DoActions are the same for each export, they don't seem random, but I'm not sure what's the criteria, definitely not by Offset. Or did you ask about another ordering?
Please try the latest nightly build. Now the numbers should follow the node order in the GUI tree. Which should be ordered by the position in the swf (=offset, but not really used this value, just added in the read order) I not really like the idea to add the offsets to the filename. The offset number is a too low level thing. The problem was that the files were exported in "random" order, so sometimes the 2nd DoAction was exported first, and the first became DoAction_2 The "random" order was because of the HashSet. First all the files that needed for the export was added to a HashSet, then a loop exported all of them in the order which was returned by the HashSet.getKeys method. Of course the algorithm behind the HashSet class is not random, this is why you get the same result when you export the same file.
Yeah I don't mind about the number the objects get as far as they are ordered by Offset. Thanks, the change is working as expected and it helps a lot, now the diffs show only code changes I'll attach the files just in case you wanna take a look at the new result. You can close this :D