Null Element

  • Joda123
    24th Apr 2012 Member 0 Permalink
    I just had an idea, why not create a "null" element? It would go in the Special list, and at first it would come out as gray. When created, a window could come out and ask you what you want the values to be, for example there could be a text box that shows the source code or something.

    Basically what I'm asking for is an element that has no values, but can edited in-game where you can change the code for that one or for all the particles in the game, say make an INST-PTCT hybrid particle.

    Just an idea
  • mniip
    24th Apr 2012 Developer 0 Permalink
    No you cant do that, values are defined for whole ptype row, so you cant do single particle with different behavior
  • AngrySpam
    24th Apr 2012 Member 0 Permalink
    @mniip
    Thats not the only problem...how would this work in public saves? Unless the person who's trying to open the save has theie NULL element set to all the same properties as in the save .. wouldnt it just show up as dust in the save? (like they do in mods)
    @joda123
    Would you be able to make a bunch of pixels in a row without having to set props. for every one?
    If so, how could you have two particles of it with different properties? :S
    tip tip turray!!
  • boxmein
    24th Apr 2012 Former Staff 0 Permalink
    @Joda123 (View Post) The Powder Toy is programmed in C, it may be quite hard to make a runtime-editable element that's fast. It can be accomplished by Lua, but not C.
    @AngrySpam (View Post) And there's the save problem.
  • Joda123
    24th Apr 2012 Member 0 Permalink
    @AngrySpam (View Post)
    Well, it would be awesome if we could program it to be that way, to save the settings for all the null particles until the settings are changed.

    @boxmein (View Post) and
    @mniip (View Post) 

    I never really thought of that (I'm not much of a programmer) =/

    And now I just thought of this, if we created the null particle, wouldn't that make every other single particle now useless? xD
  • boxmein
    24th Apr 2012 Former Staff 0 Permalink
    @Joda123 (View Post)
    Basically... if one would save the Lua code for the null element, the os library would provide much entertainment for users to exploit(os.system() allows for system control like deleting files and changing disk names et cetera). Sure we could filter the calls, but there are many ways one can call upon the os library. Why not just disable the library at all? That could work, right? Probably...

    Yeah, the multi-particle would allow for so much more, but it's going to overshadow other elements. Need more wifi channels? NULL to the rescue! Need powered portal with heat transfer? NULL is on the way!

    @mniip (View Post)
    You sure the ptypes[][] is immutable?
  • Catelite
    25th Apr 2012 Former Staff 0 Permalink
    Actually null element technically already exists. It fills all the element spaces that aren't being used, and has different element properties depending on a lot of varying things.

    And generally causes game-breaking unpleasant things most of the time.
  • mniip
    25th Apr 2012 Developer 0 Permalink
    Basically... if one would save the Lua code for the
    null element, the os library would provide much
    entertainment for users to exploit(os.system()
    allows for system control like deleting files and
    changing disk names et cetera)...

    use sandboxes
    You sure the ptypes[][] is immutable?

    i never said it was :?