IMPORTANT note on Powder Toy Patcher

  • Videogamer555
    20th Sep 2011 Member 0 Permalink
    With the release of the new version of TPT (61.2) part of my program Powder Toy Patcher no longer works. Specifically the part that sets the temperature of the plasma released by hitting NBLE with electricity. PTP's control for setting that TPT constant no longer works, and though I haven't discovered it yet, it likely breaks some other part of TPT. I'll have a new version out soon of PTP which will fully work work with the new version of TPT.


    I have devised a new technique which hopefully will make releasing a new version of PTP for every new version of TPT, an obsolete tactic. I used a hex editor to check the next 16 bytes after the file position of the constant in question (or the previous 16 bytes before, based on which constant is in question). I've found that this technique guaranties it will accurately find the location in powder.exe for a given constant, and will ONLY find that location. It seems that this is enough to be a unique "signature" of the needed file location, and unless some dramatic change is made to TPT, this technique should work for all future versions of TPT and should work also with most of the older versions of TPT as well, except for maybe the first few versions of TPT which even had a visibly different layout of the game's window (and possibly would work even with mods of TPT, though I haven't checked that yet).

    This autodetect feature will be released in the next version of PTP.
  • MasterMind555
    20th Sep 2011 Member 0 Permalink
  • Neospector
    20th Sep 2011 Member 0 Permalink
    @MasterMind555 (View Post)
    Everyone who has the program...?
  • kerbal1234
    20th Sep 2011 Member 0 Permalink
    @MasterMind555 (View Post)
    many people. i was quite interested.
  • Videogamer555
    20th Sep 2011 Member 0 Permalink
    Why does this get moved to Mods section. This program is not a source code modification to TPT, or even a tutorial on how to hex edit TPT. It's just a program that is capable of modifying the powder.exe file. Not sure why this ended up in the TPT Mods section. Oh well.
  • Pilihp64
    20th Sep 2011 Developer 0 Permalink
    It is a modification of powder toy, whether compiled or not. Mod section fits it well. (I didn't move it though)
  • Videogamer555
    20th Sep 2011 Member 0 Permalink
    Ok, I finally made that update. Here's PTP 2.0
    http://www.mediafire.com/?j4897qtpsuej2i1

    It now determines the the locations of where the constants are stored in the file Powder.exe by checking the preceding 8 bytes (as in the case with explosive pressure constant) or the next 16 bytes (as is the case with the temperature constants). This accurately allows it to set all of the constants it should, in both versions 61.1 and 61.2 of TPT. I hope it will hold for the next version of TPT as well.

    After updating TPT, you'll need to restart PTP, as it makes the determination of the offsets in the file to the constants at the moment PTP loads (not during any other time as it's running, though I may add a "recheck offsets" button in the next version, I just wanted to get this update out as soon as possible as it was an immediately needed fix when I saw that some of the offsets did indeed change in each next version of TPT).


    PS: If this fails to work in any future version of TPT I'll switch to a different system by checking the first 1024 bytes of TPT as a signiture of the version number of it (each version's EXE file is going to have some unique changes in that much space that should let me determine which version it is) and thereby determine what offsets would be needed. I'd then need to store a table of offsets for each constant so that the version number would be tell the program which position in the table to use to get the file location for that constant in that version of TPT. It would require again updates every time a new version came out, and that would put more burden on me as a programer to keep my program up to date. Thus that would be a last resort.
  • Ximon
    20th Sep 2011 Administrator 0 Permalink
    I would prefer it if you kept to just a single thread.
  • Videogamer555
    20th Sep 2011 Member 0 Permalink
    I would but, the system used in the forum is that you can't post again in a thread if the last post in that thread was already made by you. This means that when I announce an update to my software, if I already announced a previous update, and nobody replied, then I can't post again in that thread. I can edit my post to add the extra info yes, but that doesn't bump the thread back to the top of the threads list.

    Whenever an update to a piece of software is made, the thread containing this announcement should be bumped to the top of the list, so others using that software can easily find the latest update. Since that was not possible, when I came out with an update and nobody had replied to my previous update, since I wanted to make sure my latest update could be accessed by all, I was forced to make a new thread. That guarantied that my latest update was going to be in a thread at the top of the threads list. That way others using my software would indeed be able to easily find the latest update.
  • plead-for-destruction
    20th Sep 2011 Member 0 Permalink
    @Videogamer555 (View Post)
    i understand that, im sitting round waiting for an answer to my mod (just updated it) for 3D powder, but i cant bump it since the last post was mine
Locked by Simon: Keep to one thread, also UTT