Powder Toy Patcher

  • Videogamer555
    17th Sep 2011 Member 0 Permalink
    Try lighting off some C4 after having used this program to set the explosive pressure to 256, or put some plasma up on some metal after using this program to set the plasma temperature to 1000000000 degrees.
  • TheWiseEyes
    17th Sep 2011 Banned 0 Permalink
    This post is hidden because the user is banned
  • alecnotalex
    17th Sep 2011 Member 0 Permalink
    Wait a minute... If you can alter TPT's constants from an outside program, could you make a whole new settings menu, just totally outside of TPT? If you could, I might want to try that...
  • Videogamer555
    17th Sep 2011 Member 0 Permalink
    Updated version is now released. This is version 1.1 of PTP.
    http://www.mediafire.com/?n3qz5owm535ya5o

    I've now added this feature:
    it can now set the constant for the temperature of the FIRE element when spawned as a raw element. This constant also sets the temperature of the flames that are produced when O2 burns, when COAL burns, and when BCOL burns.
    It also has labels on the form that state when setting a constant what other things are effected by that constant so you can more accurately tell what effects you will get when patching Powder.exe with a given set of changed constants.





    alecnotalex:

    Wait a minute... If you can alter TPT's constants from an outside program, could you make a whole new settings menu, just totally outside of TPT? If you could, I might want to try that...


    Unfortunately it's not that simple. Some theings seem to be grouped in different ways.

    Hitting NBLE with electricity produces plasma determined by one constant.

    But the plasma as a raw element (PLSM) is controlled by a different constant. And the plasma that results from an electrical arc between 2 particles of ETRD is controlled by the same constant as the raw element PLSM.

    Now if all plasmas were controlled by one constant, or each plasma had a fully separate constant, then a full fleged external control panel might be worth it. However as it is, my small control panel which sets just a few of the more interesting constants, is more than enough for experimenters to play around with.

    As it is, I can't even figure out what sets the temperature of the flames resulting from igniting an explosive compound.
  • code1949
    17th Sep 2011 Member 0 Permalink
    @Videogamer555 (View Post)
    So essentially this is pretty much a TPT element hacking tool right?
  • Videogamer555
    17th Sep 2011 Member 0 Permalink

    code1949:

    @Videogamer555!163992
    So essentially this is pretty much a TPT element hacking tool right?


    I guess you could call it that, but hacking usually has a negative meaning (like hackining someone's online banking account, or playing a hacked version of an online game to cheat, hacking an Xbox so it will play pirated games, or a hacked version of a piece of software otherwise regular so it will drop malware on a computer).

    So I really don't like to call this a "hacking tool".
  • Marte2007
    17th Sep 2011 Member 0 Permalink
    @Videogamer555 (View Post)
    This is "legal hacking"
  • Videogamer555
    17th Sep 2011 Member 0 Permalink
    I now am releasing version 1.2 of PTP.
    http://www.mediafire.com/?b282kttod63e4mc

    In this version I've added +Inf, -Inf, and NaN options to the 3 temperature constants that it can alter. I discovered +Inf because of smp255's thread "SparkCoal!" that explained how to get +inf, and along with a couple experiments of my own I discovered how to get -Inf and NaN.

    Smp255's thread "SparkCoal!" is at https://powdertoy.co.uk/Discussions/Thread/View.html?Thread=10513




    .:UPDATE:.
    I now am releasing version 1.3 of PTP.
    http://www.mediafire.com/?k9ew8j4ubxnoxtv

    I've now added PHOT (photons) to the elements that PTP can alter the temperature of. Unlike the others though, it can't be set to + or - infinity. However it can be set to NaN, so that's the only extra option available for PHOT temperature unfortunately.
  • sam123486
    17th Sep 2011 Member 0 Permalink
    I get this error:

    Runtime Error 75:
    Path/file access error

    Edit: Fixed it! I feel dumb. I had it running when I patched it. It works great, now my C-4 can be realistic!
  • Videogamer555
    17th Sep 2011 Member 0 Permalink
    Ok, I finally made that update. Here's PTP 2.0
    http://www.mediafire.com/?j4897qtpsuej2i1

    It now automatically 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.