Powder Toy Patcher

  • Videogamer555
    17th Sep 2011 Member 0 Permalink
    This isn't a creation made in TPT, but rather a creation made FOR TPT. It is a simple program I made in Visual Basic that alters some of the constants in TPT. It lets you set these constants to whatever you want. It's called Powder Toy Patcher (from here on will be referred to as PTP).

    Download it from http://www.mediafire.com/?2hm95ag7p1xodmt

    Here's how to use it:

    0. Download PTP, and copy it into the same folder as your Powder.exe from TPT

    1. Make sure that TPT isn't running. (optional at this point, but must be done before step 4)

    2. Start PTP.

    3. Set any of the constants that you can alter from PTP (the values shown whenever PTP is started up are the default TPT values)

    (if you didn't do step 1 before, do it now)

    4. Press "Patch EXE" to apply these changes to Powder.exe
    4b. Close PTP (optional)

    5. Run TPT and use the elements effected by your change.

    6. To reset the default constant values in TPT, first make sure that TPT is closed, then close PTP (skip this if you did step 4b), and then restart PTP so the TPT's default values are in the text fields of PTP, and lastly press Patch EXE.



    The constants which can be altered are:

    Explosive Pressure (pressure released by a single particle of an explosive element upon ignition)

    Plasma Temperature (temperature of element PLSM when placed directly, and temperature of the plasma released by ETRD in an electric arc)

    Nble Plsm Temperature (temperature generated by plasma from ionizing NBLE with electricity)

    I hope to add more too, such as the temperature released by an explosive exploding (although I have yet to find the address in the Powder.exe file where that constant is stored)



    This patcher was made to work with the latest version of TPT (as of 9/15/2011) which is Ver 61.1. It may or may not work with other versions of TPT. It all depends on exactly (down to 1-byte accuracy) where the constants in question are stored in the Powder.exe file.
  • plead-for-destruction
    17th Sep 2011 Member 0 Permalink
    @Videogamer555 (View Post)
    well it works and its virus free according to avast
  • jenn4
    17th Sep 2011 Member 0 Permalink
    Did you ment to say: "It works fine." with youda style, or "Well. At least it works."?
  • Videogamer555
    17th Sep 2011 Member 0 Permalink
    I did this for all those (including myself) who wanted high pressure explosive elements. Now you can just turn C-4 and all other explosives into high pressure explosives (though if the pressure is too high some saves get broken because the explosives cause more damage that they should for some saves). And this way you will never have to demand that the devs give you pressure explosives again. The setting of plasma temperatures are just something else I added that I thought might be useful.
  • Xenocide
    17th Sep 2011 Former Staff 0 Permalink
    Please use a better file host, such as http://minus.com/ for file uploads.

    Its not required, but some people may be interested to see the source code.
  • MasterMind555
    17th Sep 2011 Member 0 Permalink
    @Videogamer555 (View Post)
    I facepalmed at "Visual Basic"
  • Videogamer555
    17th Sep 2011 Member 0 Permalink

    MasterMind555:

    @Videogamer555!164006
    I facepalmed at "Visual Basic"

    It works and doesn't need super high speed processing like you'd get with C or ASM.



    Also here's the source:

    Dim ExpPress As Single
    Dim PlsmTemp As Single
    Dim NblePlsmTemp As Single

    Private Sub Command1_Click()
    If IsNumeric(Text1.Text) = False Then Text1.Text = 0.25
    If IsNumeric(Text2.Text) = False Then Text2.Text = 10000
    If IsNumeric(Text3.Text) = False Then Text3.Text = 3226.85
    ExpPress = Text1.Text
    PlsmTemp = Text2.Text + 273.15
    NblePlsmTemp = Text3.Text + 273.15
    Open App.Path & "\Powder.exe" For Binary As #1
    Put #1, &H19AF24 + 1, ExpPress
    Put #1, &H16B390 + 1, PlsmTemp
    Put #1, &H79F1B + 1, NblePlsmTemp
    Close #1
    End Sub
  • Videogamer555
    17th Sep 2011 Member 0 Permalink
    Oh, and here's a save I made that depends on setting TPT's NBLE PLSM Temperature constant using PTP for the save to work as it should (without the patch there'll be no explosion, just a fire). Read instructions in the description and comments on the save file's webpage
  • baizuo
    17th Sep 2011 Member 0 Permalink
    Nice, but what can it do?