CMND - Enters console commands

  • CubicApocalypse
    8th Nov 2012 Member 6 Permalink

    I know something similar to this has been added to Minecraft, but it could also be useful in TPT. CMND, simply put, enters console commands when sparked. PROP can be used to set elements' properties, but it can only be activated manually. The console can also be used, but that suffers from the same problem. Only one particle of PROP can be placed at once, similarly to lightning or signs. When placed, a sign-like text box appears where you type in a console command. This CMND particle will perform that command every time it receives electricity. Its uses include:

     

    "Banning" certain types of particles from saves. If you have a supposedly radioactive, postapocalyptic landscape, and you don't want plants to be able to grow, set up a CMND particle and a battery to !set type plnt none.

     

    Self-destructing mechanisms. Currently, self-destructing computers or drawings need to be packed with explosives in order to explode. And, the explosion might not destroy the whole thing. The solution? Put a few CMND particles somewhere, set them to replace the elements of your target (or everything, if you'd like the whole screen to blow up) with explosives, and set the explosives' temperature to something over 5000. Boom goes the Death Star pixel art.

     

    Spawning or removing platforms. The !create command can be placed in a grid (or a row to save space) of CMND particles so you can have a stickman spawn platforms where you want them. If you've decided you don't want the platform, !set its material to none, or blow it up like above. You can use this for walls, too.

     

    The !quit command is banned from uploads, for obvious reasons.

  • The_Tallgeese
    8th Nov 2012 Member 0 Permalink

    Very good idea. Since it's impossible to set variables for particles that haven't been spawned/drawn yet, placing a particle of CMND with a battery hooked up to it and the aforementioned command(s) already loaded would work wonders. 

     

    This would be extremely helpful when it comes to using CLNE, especially if you want all of the particles that come out of that pixel of CLNE to have the same ctype/tmp/temp/etc.

     

    Nice one.

     

  • Uberness
    8th Nov 2012 Member 2 Permalink

    This has been suggested since the console was created, lol.

  • The_Tallgeese
    8th Nov 2012 Member 0 Permalink

    Yeah, I've heard that on-the-fly property-editing tools have been suggested multiple times over the years. Just wondering; after all this time, how come they haven't been implemented yet? Is such a tool that hard to code?

  • Box-Poorsoft
    8th Nov 2012 Banned 0 Permalink
    This post is hidden because the user is banned
  • NUCLER_FOX
    8th Nov 2012 Member 0 Permalink

    It's Brillent good idea too.

  • boxmein
    8th Nov 2012 Former Staff 0 Permalink
    @CubicApocalypse (View Post)
    Suggested lots of times.
    If lua then lua security holes too, because Lua allows very fancy OS related stuff to be done. And its syntax is flexible so one can't ban it.
    Without lua, there's a speed issue. How many console blocks may be allowed? Also, the commands need to be saved like a sign, that is precisely why signs are limited. Can't let saves grow too large.
  • jacob1
    8th Nov 2012 Developer 0 Permalink
    I asked Simon about this once, he said no. I forgot the exact reason, but I think it was that he didn't want people to be able to do things like this (maybe because not everyone understands the console), and also, there is nowhere to store strings. I was going to add it to my mod sometime though. It will convert things like !set type all DMND into numbers (like set might be a ctype of 1, DMND a tmp2 of 28, all a tmp of 256...), and save it that way. I already have PWHT which can flood fill any property to any element in ways like that.

    And lua would never be included in saves, but I don't think that's what you are asking. I actually do allow lua code to be included in saves in my mod, using a lua sandbox that only allows functions I said it could use.
  • CubicApocalypse
    8th Nov 2012 Member 0 Permalink

    @boxmein (View Post)

     So, no Lua then. If the number of CMND particles needs to be limited, I'd say the limit should be 100 particles. Still enough to spawn a small platform.

  • boxmein
    8th Nov 2012 Former Staff 0 Permalink
    @CubicApocalypse (View Post)
    Fair enough. @jacob1 does cool stuff, he'll write it in no time and improve it even!
Locked by jacob1: rejected