PC controls for android by Cracker1000

  • Cracker1000
    4th Jan 2023 Member 6 Permalink


    Cracker1000 PC control mod

     The above image is just a general representation of the script interface and might change/ appear different   with upcoming updates*


    As the big title suggests, this script (or lua mod) allows you to use some of the most widely used features and modes from the PC version of the game on android. Below is the list of stuff it offers.


    *Ability to change brush shape and size

    *Tools: Line tool (also supports changing fan wall strength), Flood fill and box draw tool.

    *Toggles for debug mode, performance, cross hair, resetting spark and pressure.

    *Simulation tools: Allows you to use options like redo, undo and advance simulation frame by frame.

    *Other features not listed here.


    Link to the script

    Latest version: v6.0


    Steps to install/ update the script:

    Recommended way:

    In order to install the script you will have to open the console (second button from top on right corner) and just type this "tpt.getscript(214,"autorun.lua",1)" the bold text without quotes and then enter it.

    You will see a new button on the right hand side. Click it to open the script menu.


    Installing using script manager:

    If you have script manager installed on your android port, you can search for PC controls in the manager and install the script from there too.


    Do give suggestions or feedback, there'sa dedicated feedback button provided in the script too. Thanks to @jacob1 for helping with fan tool.

    Edited 7 times by Cracker1000. Last: 9th June
  • BluBubblz
    5th Jan 2023 Member 0 Permalink

    Hello! Thank you so much for this mod! It's so useful.


    However, I am experiencing a severe problem with it. Most of the text (all excluding the one in the buttons, like Circle and Simulation), outline boxes (cyan and red), and the horizontal dashed line under the sliders is shifted down and to the right by a lot. To help you visualize it, the ON/OFF indicator for the Simulation button only begins below the lower right corner of the Feedback button, and I can only see about four pixels in height of this text because it cuts off with the window border.

    My screen resolution is 854x534. Android (11) Samsung SM-T520 Tablet. I can still use your amazing mod with this issue, but it's still super annoying.


    Edited to add: Can't place zoom window when line tool is enabled.


    And now I have 2 questions:


    1. What is the Performance button for? I suppose it boosts FPS?

    2. How do I change the HUD properties if I want to see ctype?

    Edited 6 times by BluBubblz. Last: 5th Jan 2023
  • Cracker1000
    5th Jan 2023 Member 0 Permalink

    @BluBubblz (View Post)

     Which version of android port are you using? You must be on v1.15 or higher in order for the script to work.


    Line or any other tool disables mouse click in order to work, you you can't use stuff like zoom or stamp while they are on. You can however place the zoom window first and then turn on the tool. It's just how it works.


    1. Yes, the performance mode is* supposed to increase the framerate but only by a little bit. It just selects a different view mode and adjusts the draw cap. Should be more noticeable on saves with a lot of moving stuff.


    2. There's a debug mode option under script settings. Turn it on to see all the additional information about particles.


    Lastly, can I get a screenshot of how the misaligned window graphics look like on your tablet?

  • BluBubblz
    5th Jan 2023 Member 0 Permalink

    Hi! I updated to version 97 and it fixed it.


    I knew what debug mode was when I first commented, but it only shows type, temp, life, tmp, pressure, particle id, x, and y (in that order). No ctype, tmp2, or other properties.

    Edited 2 times by BluBubblz. Last: 5th Jan 2023
  • Cracker1000
    5th Jan 2023 Member 0 Permalink

    @BluBubblz (View Post)

     .tmp2 is shown only if the element actually uses that property Also, .ctype is shown next to the element name in hud if your cursor is exactly above that element.


    You might want to turn on hover mode if you want to read those properties without accidentally setting the ctype or drawing anything.

  • MarkHuss
    18th Jan 2023 Member 0 Permalink

    Thank you for this fantastic script.


    I have come upon an error.

    When I activate cross-hair mode, I get the error: @63, attempt to index global 'graphics' (a function value)


    I am using the latest version, as checked 5 mins ago


    In the script, upon changing "graphics" for "gfx" in the whole drawcoord() function, the error disappears.


    Now I need an explanation, as I thought, gfx was simply a shorthand for "graphics", like ui vs interface, for example.

  • Cracker1000
    18th Jan 2023 Member 0 Permalink

    @MarkHuss (View Post)

    This isn't really a problem with the script, we suspect it's some other script that's causing this issue. I would like you to check and list all the other lua scripts you have installed here.

  • MarkHuss
    18th Jan 2023 Member 0 Permalink

    @Cracker1000 (View Post)


    This is interesting.

    The only downloaded script I had was yours.

    The rest was a brunch of my own newbie test and WIP scripts.  

    Maybe my scripting is so bad that it confused the lua interpreter?!


    So I tried to deactivate them systematically, and I found the culprit.


    I dont understand, as it seems to me to an insignifiant test script, where the only gfx function is not even called...




    Please give me your diagnostic...

  • jacob1
    18th Jan 2023 Developer 0 Permalink
    @MarkHuss (View Post)
    At the very end you have
    function graphics(i, colr, colg, colb)

    This creates a function in the global scope called "graphics", which overwrites whatever else had that name. You should always define all functions and variables in the local scope instead, to prevent accidentally overwriting api functions or things from other scripts.

    local function graphics(i, colr, colg, colb)
  • MarkHuss
    18th Jan 2023 Member 0 Permalink

    @jacob1 (View Post)

     Duly noted.


    That explains some other problems I encountered.

    Thank you!