Tutorial Basic Object Implementation: A Tutorial

Discussion in 'Starbound FAQs, Q&A, and General Help' started by mollygos, May 14, 2013.

  1. Akyh

    Akyh Orbital Explorer

    It's not a programming language but a standard data format. So the Starbound program can read all data included in this file easily.
     
  2. Iroza

    Iroza Phantasmal Quasar

    That doesn't mean Darkbound team straight away rejects all mod samples from off-team modders if they are quality work, right ? (off-team modders could get credit as special thanks if their work is added to the mod.)
     
  3. Gloan

    Gloan Poptop Tamer

    Thanks for the understanding
     
  4. It's specifically JSON (as stated in one of the screenshots in the first post).
     
    Axe Garian likes this.
  5. cvbbot

    cvbbot Pangalactic Porcupine

    I bet we're already having people making a crapton of items to try out as soon as beta comes out.
    I know i will
    Edit
    Oh boy, lovely Lua! Can we have some samples already? Pleeaaase
     
  6. Pentarctagon

    Pentarctagon Over 9000!!!

    True, but the individual files are still very small, and having multiple very/fairly small files seems like unnecessary fragmentation (from the editing perspective) than having it all in one file. I suppose it might just be my personal preference though, I like having things centralized so I don't have to keep switching between files.

    Gifs could be very useful. Given that the game as a whole is going for a pixelated look, there isn't as much of a reason to use transparency as a fade out into the background, so partial transparency isn't as much of as issue as it could have been. Gifs can also greatly reduce the size of an image with only a few colors compared to a png.
     
  7. eShredder

    eShredder Subatomic Cosmonaut

    On one hand. Boy oh boy am I happy that modding (or content add-on) is "already available". Thank you tons, Molly!

    On the other hand. Oh Goddess in heaven! All the countless of hours I will spend on this. Good bye, social life. :cry:
     
    Axe Garian and vlamer12 like this.
  8. Argthrond

    Argthrond Oxygen Tank

    How did i missed this?! :DD
     
  9. Aralicia Moran

    Aralicia Moran Void-Bound Voyager

    I can understand your point. Personally, I don't really care about fragmentation, since I'm used to work with tens if not hundreds of files. But, given that the format is easily readable, I would not be surprised to see many "item creator" programs appear quickly post-release; file fragmentation would then be a moot point.

    Actually, gif wouldn't reduce the size that much, because png is able to work with either a palette (like GIF) or Truecolor. In fact, for bigger images than the gear example, it would be the reverse, since PNG use a more efficient compression algorithm.
    For example, I took the gear image of the tutorial (80 x 16). Saved as a png : 362 bytes; as a gif : 320 bytes. Gif is a bit better.
    The same image, doubled in size (160 x 32). Saved as a png : 480 bytes; as a gif : 734 bytes. PNG is clearly better.
    And 160 x 32 isn't that big, it could be a 10 frame animation about the size of a character.
    (Side note : even if we make a thousand images like this, it would result to less than 0.25 Mb difference between the format. That's not much.)
    (Side note 2 : using truecolor, the png size would have been 790 bytes and 880 bytes)

    That said, transparency wouldn't have to be used for fading, that's true, but it could be useful for many semi-transparent materials (glass, liquids, veils, energy fields...) that could be placed on the foreground but still let us (partially) see the background.

    So I guess I'll keep my recommendation as is. I'm not opposed to having gif support, but I don't think it is really important.

    Did you know ? PNG is also able to embed user-defined metadata, meaning that the content of the .frame, .obj and .objitem files could have been saved within the png file ! (but it would have been impractical to edit)
     
  10. Supergeek

    Supergeek Scruffy Nerf-Herder

    Someone needs to create an object warehouse website, sort of like Github or something, but for Starbound mods.

    You need a pixel editor, text editor, and starting templates which specify which files are needed for what type of mod, and give a starting point for the code. You can tag your creation with things like Plant, Animal, Decoration, Art, blue, animated, steampunk, fantasy, etc. You create a mod, save it to the database, and tag it so people can find it when they search for things. The community votes on submissions so you can sort by popularity and quality, and the site will automatically produce a zip file for you to download when you want it. You can tag mods as "installed" and post your server info, if you have one.

    Who owns StarboundMods.com?
     
  11. eShredder

    eShredder Subatomic Cosmonaut

    I am diggin' the idea. But I would assume that the website would need a very efficient server that is able to stand high traffic. Either way; I want such a site!
     
  12. Aralicia Moran

    Aralicia Moran Void-Bound Voyager

    Right now, and at least untils the March next year, a client of dreamhost.com
    That said, starboundmods.net and starbound-mods.com are available, for exemple.

    And I concur with eShredder, such a site would be great.
     
  13. harnackam

    harnackam Ketchup Robot

    Man, I can't wait!
    omnom.png Made by me!
     
    Axe Garian likes this.
  14. Eight

    Eight Pangalactic Porcupine

    If anyone's interested, I'm working on a program that creates the .object .frames and .objitem files for you (using the defaults, it takes about 30 seconds). And it creates a small file that can be used to load the object on another computer. (eventually it will be able to load multiple files, each object is saved with the 2 sprites and a text document with all the data needed to create the object)

    it's on gitHub if anyone wants to try it. (if there are any bugs, send me a PM so I can fix it. Remember it's still a work in progress)
     
    Axe Garian and Crystan like this.
  15. Pentarctagon

    Pentarctagon Over 9000!!!

    With what image and with which programs?

    edit - did some testing of my own and you seem to be right.
     
    Axe Garian likes this.
  16. Eight

    Eight Pangalactic Porcupine

    I've got pre-made objects to save as a single file now :), and it can import all the object files from a selected folder.
     
  17. Aralicia Moran

    Aralicia Moran Void-Bound Voyager

    I was wondering, does the game parser support file containing keys it doesn't use ? It could be used to add metadata to item files.
    Code:
    {
      "source": {
        "module" : "Super Gears Mod",
        "author" : "Mollygos"
      }
     
      "objectName": "sewergear",
      "description" : "snip",
    // [...]
    }
    Something like that would be usefull for collaborative mods (Darkbound ?) since we could know the specific author for each item. Nice for mod merging (especially in case of conflicts), or to keep trace of the original mods in compilations.

    Nice, but wouldn't be better to use a standard archive format for pre-made object (like tar) ? It would help with file compatibility between multiple tools (from different authors). Especially since you used python. I've nothing against the language (it's pretty good), but Python isn't installed by default on Windows. So there will probably be windows-only tools.
     
    Axe Garian likes this.
  18. Eight

    Eight Pangalactic Porcupine

    There aren't any other simmilar programs that I know of, so I've been using a format designed for my program, but it wouldn't be that hard to add support for other file types.

    Couldn't they just download it?


    And here's a pre-made file of the sewer gear in the tutorial: sewergear.png
    (I thought it'd be a good idea for the file to use the inventory icon)
     
    Axe Garian likes this.
  19. Aralicia Moran

    Aralicia Moran Void-Bound Voyager

    For now, yes, but I'm pretty sure. In the future ? probably not. If we take terraria & MC communities as reference (and Skyrim modders, etc...), they tend to be multiple tools for the same usage.

    1. "use this .py (but you have to download and install Python before)"
    2. "use this .exe"
    Most Windows people would probably take the second choice.

    Very nice, but it would be even better if it was compliant with the PNG specification, since it allow to embed user-defined data (yes, I'm annoying :p).
     
    Axe Garian likes this.
  20. Eight

    Eight Pangalactic Porcupine

    So a zip/tar with the .object, .frames, .objitem, <object>.png and <object>Icon.png?

    I found a programs to convert .py to .exe files. (i'd rather not though)

    Can you have another image as metadata though?
    I don't think of it as a png (more like png + png + txt), I just used .png so the icon would show up (it did with .pmf but the image preview was blury).
    But i'll see if It's possible (even though it's working now anyway)
    EDIT: the reason I saved it like that is so it's easier to seperate the images and text.

    it's not that annoying...it's feedback
     
    Axe Garian likes this.

Share This Page