Modding Help Having an item not to collide with the player

Discussion in 'Starbound Modding' started by Baleine, Dec 10, 2013.

  1. Baleine

    Baleine Big Damn Hero

    Hello,

    I've add an item in-game, but I can"t figure out why, when I lay it, then player have to jump over the item instead of passing through (like a chair or a table, it's in the background).

    I don't understand what makes my item to collide with the player.

    I haven't seen anything neither in the .object file nor in the .frame file and I'm gonna assume the .png has something to do with it, but I can't figure out why since I've properly set a transparency (created the file with GIMP).

    Can you help me there ?
     
  2. FoolsPower

    FoolsPower Subatomic Cosmonaut

    Your explanation wasn't very clear, but i'll give it a go

    if you have
    Code:
    "collision" : "platform"
    or some variant of that in the .object file, remove it. It should make it so you can walk through it.
     
  3. Campaigner

    Campaigner Giant Laser Beams

    Can you post your .object and .frames files as code?
     
  4. Machai

    Machai Void-Bound Voyager

    If we look at the woodencraftingtable1.object file

    Code:
    {
      "objectName" : "woodencraftingtable1",
      "rarity" : "Common",
      "objectType" : "interactable",
      "interactAction" : "OpenCraftingInterface",
      "interactData" : {
        "config" : "/interface/windowconfig/craftingtable.config",
        "filter" : [ "craftingtable", "plain" ]
      },
      "printable" : false,
      "description" : "An expert craftsman could make a great... crafting table... on this.",
      "shortdescription" : "Wooden Crafting Table",
      "race" : "generic",
      "category" : "crafting",
      "price" : "200",
    
      "apexDescription" : "A table with a bunch of tools for a craftsman.",
      "avianDescription" : "A chance to display one's ability to create.",
      "floranDescription" : "Floran ussse table. Make nice thingss.",
      "glitchDescription" : "Inspired. Crafting module activated.",
      "humanDescription" : "I can use materials I've found here to create new things.",
      "hylotlDescription" : "A chance to create.",
    
      "inventoryIcon" : "woodencraftingtable1icon.png",
      "orientations" : [
        {
          "dualImage" : "woodencraftingtable1.png:<color>",
    
          "imagePosition" : [-16, 0],
          "frames" : 1,
          "animationCycle" : 1.0,
    
          "spaceScan" : 0.1,
          "anchors" : [ "bottom" ],
          "collision" : "platform"
    
        }
      ]
    }
    at the end we see
    Code:
    "collision" : "platform"
    I assume this is what makes it behave like a wooden platform. You pass in front of it and can jump on top/drop down through it.
     
  5. Baleine

    Baleine Big Damn Hero

    Thanks for your concern with my problem guys. I'm sorry I didn't answer earlier, I had to get some sleep and now I'm at work.

    However, here are my files :
    OBJECT FILE
    Code:
    {
        "objectName" : "towel",
        "rarity" : "common",
        "category" : "furniture",
        "description" : "Always know where your towel is.",
        "shortdescription" : "Towel",
        "race" : "generic",
        "printable" : true,
        "price" : "5",
        "learnBlueprintsOnPickup" : ["towel"],
    
      "inventoryIcon" : "towelicon.png",
      "orientations" : [
        {
          "dualImage" : "towel.png:<color>",
    
          "imagePosition" : [-24, 0],
          "frames" : 1,
          "animationCycle" : 0.5,
    
          "spaceScan" : 0.1,
          "anchors" : [ "bottom" ],
          "collision" : "platform"
        }
      ],
    
      "objectType" : "interactable",
      "interactAction" : "sitdown",
      "sitFlipDirection" : false,
      "sitPosition" : [0, 15]
    }
    FRAME FILE
    Code:
    {
    
      "frameGrid" : {
        "size" : [48, 4],
        "dimensions" : [1, 1],
        "names" : [
          [ "default" ]
        ]
      }
    }
    
    I fiddled a lot with these files in order to try pretty much anything. At first, the image was 48x16 and I tried to crop it, but the effect is the same.
    I think I tried with and without the "collision" : "platform" thingy, but I'm not 100% sure
     
  6. FoolsPower

    FoolsPower Subatomic Cosmonaut

    It's most definitely "collision" : "platform"
     
  7. Baleine

    Baleine Big Damn Hero

    You were right indeed, but I failed to detect that when I fiddled with the file because I encountered a strange glitch.
    Now, in the place where I originally laid the towel the first time, there is a invisible platform I can jump on. This prevented me from seeing the difference after removing the collision instruction.

    Ok, now it's working, thank you guys.


    On a side note, would anyone here have an nice pixel art of a towel laid down ? (Mine really sucks, I'm abysmal for that duty)
     

Share This Page