Suggestion for CRAY(any powered element)

  • Schicko
    17th Feb 2017 Member 0 Permalink

    (This is for builds > Snapshot 56) Just wondering, wouldn't it be possible to change TPT such that the normal state of a powered element is off with life zero when placed so that CRAY would also make them turned off, then change the life of CRAY(any powered element) to 10 for all currently existing saves using a lua script or some other form of automation (backing up the database beforehand in case anything goes awry), so no saves are broken for the next part. This will enable you to alter CRAY such that it also copies its life if it is 0 as it currently isn't able to for builds > Snapshot 56. This would enable users to make inactive powered elements from afar, potentially saving a lot of space for future saves and allowing for better control of elements in electronics saves since the only other sane way of doing it right now is by copying premade parts that are turned off using DRAY which takes up a lot of space if you want to copy a lot of parts, instead of making them using CRAY (another method would involve layered DRAY with different tmp2 which would just be a headache to work with, and can't be moved by piston). Thanks for taking the time to read through my suggestion! Hope you consider it.

  • LBPHacker
    17th Feb 2017 Developer 0 Permalink

    In fact, you wouldn't even need to run a script through all the saves to patch CRAY particles for that. TPT can tell what version a save is from and temporarily "migrate" the save to the current version by patching fields. I think this is possible, no idea why it hasn't been done yet. Lemme check the source.

     

    EDIT: Oh well, I just found out. https://github.com/simtr/The-Powder-Toy/issues/386

    Edited 3 times by LBPHacker. Last: 17th Feb 2017
  • Schicko
    17th Feb 2017 Member 0 Permalink

    @LBPHacker (View Post) Ah I forgot about PHOT and the like. Well if like you said that fields can be easily patched, then can the life field of CRAY(radioactive beam element) be patched to what it usually is when placed down manually? Same goes for any other life of things made by CRAY: the life of CRAY(thing) could be patched to the normal life of thing as if it was just placed down.

    Edited once by Schicko. Last: 17th Feb 2017
  • LBPHacker
    17th Feb 2017 Developer 0 Permalink

    Sure, but that's exactly what I was implying. The problem here is that CRAY[ctype=PHOT, life=0] is expected to create living, moving PHOT.

  • Schicko
    17th Feb 2017 Member 0 Permalink

    @LBPHacker (View Post)

    What I'm trying to get to is why not use a script/similar to change CRAY[ctype=PHOT/whatever element, life=0] to CRAY[ctype=PHOT/whatever element, life=600/whatever's usual life value when placed down] or whatever the normal life of PHOT is for all current saves. That way, you can change CRAY such that, in future saves, you can have CRAY(GPMP) with life 0 or 10 which would make inactive or active GPMP respectively, without breaking current saves since the life of the CRAY would've been changed by the script/similar to values that would make them act as if they do today, eg, the current saves containing CRAY(PHOT) with life 0 would be changed to CRAY(PHOT) with life 600/whatever and CRAY(GPMP) with life 0 would be changed to CRAY(GPMP) with life 10, etc.