Python text-script

  • pali6
    18th Apr 2011 Member 0 Permalink
    I really like python so when I saw that there is/will be a python console in powder toy I had to compile it by myself. And I hope that I am not alone, because I made this (interesting) script in python for wrting pixelated text in powder toy. All instructions are in few first lines of file, but most important is to have powder toy with python console, if you want I can upload my executable, but I am using linux and I think that linux users often can compile it without help (and I am too lazy to crosscompile it for windows). Please, if there is someone with windows client with python console, uploading executable it would be a good idea.
    Here is small example of functions of this script (you'd better download it, because online screenshot is old).

    And finaly download link: http://pali6.info/my/pttext.py
    PS. I hope this isn't disallowed, I read only about image plotting, but if this is against the rules I apologize.
  • dnerd
    18th Apr 2011 Member 0 Permalink
    hmm... very nice, i was trying this in C, but was having problems, could you pastebin the python script you used?
  • pali6
    18th Apr 2011 Member 0 Permalink
    At the bottom of post is link, but if you need pastebin, here is link: http://pastebin.com/M9nhw9UG .
  • dnerd
    18th Apr 2011 Member 0 Permalink
    Very nice work, nice method...
  • pali6
    18th Apr 2011 Member 0 Permalink
    It isn't complicated, I used this font before in C++ so I just formated it to Python and code was simple. Now I am thinking about some regular expressions for replacing particles (change all metal next to wifi to pscn, remove all neutrons touching deut...)
  • Pilihp64
    18th Apr 2011 Developer 0 Permalink
    technically it IS plotting, it achieves exactly the same thing as an image plotter, like the rules save, plotted text.
    although the tools you have is more for text and not images, its not far off.
    you can distribute and show, but keep it private to keep it off in-game browser.
  • cctvdude99
    18th Apr 2011 Member 0 Permalink
    @cracker64
    So... We aren't really allowed to put this in our saves? =(
  • Pilihp64
    18th Apr 2011 Developer 0 Permalink
    i don't think a little would hurt, just don't go crazy with it...
    like a save with just text, bleh, if you use it just as a description for something, sure.
    i mean, this is why we added the python console, might as well use it if you can.
  • cctvdude99
    18th Apr 2011 Member 0 Permalink
    @cracker64
    K, now all I need is to A) get my compiler working, or B) get one with python console enabled.
    Lol. This could be kinda hard.
  • pali6
    18th Apr 2011 Member 0 Permalink
    I added warning in return of functions to don't go crazy with it, is it okay now?
Locked by cracker64: use lua, and necrooo