1. Please be advised of a few specific rules and guidelines for this section.

RELEASED Hidden Doors [Deleted]

Discussion in 'Furniture and Objects' started by amirmiked12, Apr 3, 2017.

Thread Status:
Not open for further replies.
  1. amirmiked12

    amirmiked12 Spaceman Spiff

    amirmiked12 submitted a new mod:

    Hidden Doors - Adds some Block bases Hidden doors

    Read more about this mod...
     
  2. amirmiked12

    amirmiked12 Spaceman Spiff

  3. amirmiked12

    amirmiked12 Spaceman Spiff

  4. bk3k

    bk3k Oxygen Tank

    I'll tell you

    Code:
      "closedMaterialSpaces" : [
        [
          [ 0, 0 ],
          "dirt"
        ],
        [
          [ 0, 1 ],
          "dirt"
        ],
        [
          [ 0, 2 ],
          "dirt"
        ],
        [
          [ 0, 3 ],
          "dirt"
        ],
        [
          [ 0, 4 ],
          "dirt"
        ]
      ],
    
    That would cover a door that is 1x5. You would need to adjust for any offset, but why even have an offset on such objects? Of course you'd need more spaces to cover larger doors but it works the same.

    What will happen when you add that to your objects is that when "closed", you will have "dirt" tiles in those spaces rather than the standard "metamaterial:door" tile that's normally there(to create the collision). So instead of using an invisible tile paired with a PNG to "hide" the door, you can use an invisible PNG file with the actual tiles. Here's the advantages to this.

    1. Easier. No need to screen shot and adjust over and over til you get it right. Just trade out "dirt" for "castlewalls2" when you want a hidden room in your castle etc.
    2. Always seamless. You will really notice with things that have no border between themselves but put a border when other tiles(or nothing) is there.
    3. They will be treated by the game as real tiles. You can til the dirt(if you really wanted to) etc. Doors made of tiles that glow will themselves glow.
    4. NPCs look for "metamaterial:door" which lets them know there is a door to open. That could be undesirable for hidden doors. As is, they WILL open your doors. But with my suggestion, they will not. They'll just see standard tiles,
    5. You can use any tile. Yes any tile. So you can do some semi-interesting things with that.

    In case you're curious, you CAN also use "openMaterialSpaces" too. An as yet unreleased update to my "blocks and objects" mod has a "door" that isn't a door. It is an energy platform that appears when a player is very near, and doesn't exist the rest of the time. But in this case it is animated so rather than the tile method I'm suggesting to you, I do this.
    Code:
      "openMaterialSpaces" : [
        [
          [ 0, 0 ],
          "metamaterial:objectplatform"
        ],
        [
          [ 1, 0 ],
          "metamaterial:objectplatform"
        ],
        [
          [ 2, 0 ],
          "metamaterial:objectplatform"
        ],
        [
          [ 3, 0 ],
          "metamaterial:objectplatform"
        ],
        [
          [ 4, 0 ],
          "metamaterial:objectplatform"
        ]
      ],
    
    Plus my animated image.

    edit:
    That aside, you might as well make some hatches too.

    Also I recommend adding this line
    Code:
      "noAutomaticDoors" : true,
    
    That will affect things when Automatic Doors is installed. Doors with that in their object's JSON will not be automatic(most other doors will be by default). This will have no effect when Automatic Doors is not installed. No one wants a "secret door" that opens itself for every intruder nearby.
     
    Last edited: Apr 4, 2017
  5. amirmiked12

    amirmiked12 Spaceman Spiff

    I don't even know how you this stuff but thanks a lot... I will use them.and where should I add this line cause I'm not very expert at coding and stuff .I mean should I add it to the end of the my object
     
  6. bk3k

    bk3k Oxygen Tank

    There is no particular spot. But standard JSON rules apply. If adding that to the end, remove the last comma. If putting somewhere in the middle, you'd want the comma. Possibly this is easier to read(but is the same thing).

    Code:
      "closedMaterialSpaces" : [
        [ [0, 0], "dirt" ],
        [ [0, 1], "dirt" ],
        [ [0, 2], "dirt" ],
        [ [0, 3], "dirt" ],
        [ [0, 4], "dirt" ]
      ],
    
    edit:

    In case that isn't clear. [0, 4] etc is a coordinate relative to the object's bottom left corner. [0, 0] being that corner and [0, 4] being the 5th tile up from the corner.

    edit2:

    The above is for a 1x5 tile door. A 2x5 tile door looks like this.
    Code:
      "closedMaterialSpaces" : [
        [ [0, 0], "dirt" ],
        [ [0, 1], "dirt" ],
        [ [0, 2], "dirt" ],
        [ [0, 3], "dirt" ],
        [ [0, 4], "dirt" ],
        [ [1, 0], "dirt" ],
        [ [1, 1], "dirt" ],
        [ [1, 2], "dirt" ],
        [ [1, 3], "dirt" ],
        [ [1, 4], "dirt" ]
      ],
    
     
    Last edited: Apr 4, 2017
  7. amirmiked12

    amirmiked12 Spaceman Spiff

    This mod has been removed and is no longer available for download.
     
Thread Status:
Not open for further replies.

Share This Page