BlackAlpha Posted February 2, 2013 Share Posted February 2, 2013 (edited) EDIT: Nevermind, failed experiment... Edited February 2, 2013 by BlackAlpha Link to comment Share on other sites More sharing options...
johnnylump Posted February 3, 2013 Share Posted February 3, 2013 (edited) Any tips on saving bytes? Probably a good place to start compiling them: 24 01 --> 26 ... (when 24 01 is representing a a byte constant)24 00 --> 252C 01 --> 26 (I think?)2C 00 --> 25 (I think?) Edit ... y'know, I'm not even sure these work. Edited February 5, 2013 by johnnylump Link to comment Share on other sites More sharing options...
johnnylump Posted February 5, 2013 Share Posted February 5, 2013 (edited) The new version of UE Explorer (1.2) makes script rewriting a lot easier. No more trial and error and multiplying indexes on jumps or virtual size. The key is "view tokens" mode. Each line starts with the address that a jump should point to. All the extra made necessary by index reads is already included. If your virtual size is too high or just right, the address of the final, end of script line tells you the virtual size minus 1. (The missing 1 is the end of script byte). So after decompiling your modified script, if the end of script line is numbered "0x16c," your virtual size should be changed to 16d. This doesn't work if your virtual size is too low; the script cuts off before it reaches the e-o-s line. Raise it to something above where you expect it to be, and check again. Edited February 5, 2013 by johnnylump Link to comment Share on other sites More sharing options...
twinj Posted February 5, 2013 Author Share Posted February 5, 2013 Said this already! ;) You must of missed it. Link to comment Share on other sites More sharing options...
johnnylump Posted February 5, 2013 Share Posted February 5, 2013 Said this already! ;) You must of missed it. Well, then, it bears repeating :) Link to comment Share on other sites More sharing options...
bokauk Posted February 5, 2013 Share Posted February 5, 2013 (edited) Said this already! ;) You must of missed it. Well, then, it bears repeating :)I must have missed it too, so I'm glad you repeated it! :) I've been working with switch statements, which are a nightmare to manually calculate the jumps for each case. No doubt your tip will save me a bunch of time, not to mention headaches! Thanks :) EDIT:I think bytes/integers with a value of 0 or 1 are compiled as [25] and [26] respectively anyway, rather than [24 00], [2C 00] or [1D 00 00 00 00] etc. As far as what I've seen, but I could be wrong though :) Consider removing "non-essential" functionality, such as multiplayer related. It's still tricky squeezing out those few essential bytes in some cases though. Edited February 5, 2013 by bokauk Link to comment Share on other sites More sharing options...
Recommended Posts