Modding Help How to use custom signs in dungeon files?

Discussion in 'Starbound Modding' started by Zappity, Dec 24, 2015.

  1. Zappity

    Zappity Big Damn Hero

    There is a program that converts png images to sign json item. I'm wondering how can I implement a custom made sign, to a .dungeon file, so I can use it as a brush in starstructor. (If even possible) Thanks!
     
  2. Monijir

    Monijir Scruffy Nerf-Herder

    Best Answer
    As long as it's defined by parameters you can use it in a dungeon.
    You just have to add the parameters like they do to objects elsewhere in the dungeon files and use the object 'customsign' as your starting point. Something like this might work:
    Code:
      {
      "value" : [220, 220, 220, 255],
      "comment" : "If this works I'm magic",
      "brush" : [ [ "clear" ], [ "object", "customsign", { "direction" : "left", "parameters" :  PASTE THAT JSON STUFF HERE  } ] ]
      },
    
    I kind of doubt that will work since you said you use it to add to your inventory. If the JSON is basically just arguments for a /spawnitem command (my suspicion) then you'll need to pick out the specific parameters that pertain to the object itself rather than the item and add those in manually.

    Code:
      {
      "value" : [220, 220, 220, 255],
      "comment" : "whatever",
      "brush" : [ [ "clear" ], [ "object", "customsign", { "direction" : "left", 
        "parameters" :  {
            "signData" : PASTE FROM JSON,
            "lightData" : PASTE FROM JSON,
            "signLight" : PASTE FROM JSON,
            "signBacking" : PASTE FROM JSON, 
            "frameColors" : PASTE FROM JSON } } ] ]
      },
    
    
    Hopefully you get the idea. This is just what I glarked from customsign.lua. Paste the contents of the .json file (use code brackets please) and I'll try to write my best guess for getting this to work.
     
  3. Monijir

    Monijir Scruffy Nerf-Herder

    If your program creates a .object file then you can just replace an existing brush's "object" field with the name of your sign (under "name" in the .object file). Starbound has official support for the tiled editor now so there shouldn't be a need to use starstructor any longer. If you've all ready done most of you dungeon the old way (.dungeon brushes and .png files / starstructor), you don't have to start all over with the new way (.json maps). I published a small dungeon mod that has an example of how to mix and match the old way with the new way.
     
  4. Zappity

    Zappity Big Damn Hero

    The signs are in the form of .json files. They use parameters to get a certain image, but i'm trying to figure out how to implement it in the dungeon file. I would use Tiled, but I can't find a download for it, plus it sounds like there is a huge learning curve to it :/
     
  5. Monijir

    Monijir Scruffy Nerf-Herder

    I don't understand what you mean by "sign json item". I assumed you meant a Starbound object. It would help if you pointed to the program you were talking about, but with nothing else to go on e I would say the answer to your question is just no.
     
  6. Zappity

    Zappity Big Damn Hero

    Here is the program. it's not .object files. Your supposed to place them in your inventory using starcheat.
     
  7. Narks

    Narks Scruffy Nerf-Herder

    you cant
     
  8. Monijir

    Monijir Scruffy Nerf-Herder

    Best Answer
    As long as it's defined by parameters you can use it in a dungeon.
    You just have to add the parameters like they do to objects elsewhere in the dungeon files and use the object 'customsign' as your starting point. Something like this might work:
    Code:
      {
      "value" : [220, 220, 220, 255],
      "comment" : "If this works I'm magic",
      "brush" : [ [ "clear" ], [ "object", "customsign", { "direction" : "left", "parameters" :  PASTE THAT JSON STUFF HERE  } ] ]
      },
    
    I kind of doubt that will work since you said you use it to add to your inventory. If the JSON is basically just arguments for a /spawnitem command (my suspicion) then you'll need to pick out the specific parameters that pertain to the object itself rather than the item and add those in manually.

    Code:
      {
      "value" : [220, 220, 220, 255],
      "comment" : "whatever",
      "brush" : [ [ "clear" ], [ "object", "customsign", { "direction" : "left", 
        "parameters" :  {
            "signData" : PASTE FROM JSON,
            "lightData" : PASTE FROM JSON,
            "signLight" : PASTE FROM JSON,
            "signBacking" : PASTE FROM JSON, 
            "frameColors" : PASTE FROM JSON } } ] ]
      },
    
    
    Hopefully you get the idea. This is just what I glarked from customsign.lua. Paste the contents of the .json file (use code brackets please) and I'll try to write my best guess for getting this to work.
     
  9. Mackinz

    Mackinz The Waste of Time

  10. Zappity

    Zappity Big Damn Hero

    It worked! Thank you for the help!
     

Share This Page