Modding Help Material ID documentation

Discussion in 'Starbound Modding' started by OmnipotentEntity, Apr 9, 2014.

  1. OmnipotentEntity

    OmnipotentEntity Code Monkey Forum Administrator

    MaterialIDs are stored internally as a 16-bit unsigned integer and simply has this definition:

    typedef uint16_t MaterialId;
    Which means that valid materialID values exist in the range 0-65535, as numbers above this are not representable as a 16-bit integer.

    Previously, you could specify any 64-bit number as a material ID, and it would simply be cast to a MaterialID. However due to a bug (compiler bug? implementation defined behavior?) with inconsistent casting we were forced to force you to explicitly use a materialID within this range (which is where it all mapped to anyway.)

    Easiest way to find what your materialID should be is to simply type "yourMatID mod 65536" into google, and google will tell you. Example: 847837

    Material IDs should be unique and within this range.

    However, there are reserved Material IDs, Any MatID from 65520-65535 (inclusive) is a MetaMaterial. MetaMaterials are used internally by the engine to build things like Dungeons or Ships, or as chunks load, or to represent empty space. Any materialID specified above this number will throw an exception.

    There are three major sanity checks for MaterialIDs when loaded.

    1. Is the materialID between 0 and 65535
    2. Is the materialID not in the range of metamaterials
    3. Is the materialID not already in use

    Everything I just said also applies to ModIDs, if you're making Tile Mods as well.
  2. The | Suit

    The | Suit Agent S. Forum Moderator

    Thanks - sure it will help alot.
    Also to help the maddness a randomly picking your Material ID's the starfoundry guys started a page on Starbounder

    To register your Material ID's to prevent conflicts.
    It's better to register the ID's you have only used.
  3. Sevidra

    Sevidra Existential Complex

    Oooh info on the numbers whee! I needed this, thank you Omni.

    Also, swatelite, I wanted to register my little mods' materials, but I've never messed with a wiki before. Is there an email we use to register them? Do we have to get wiki-mod priveleges before we can add them? Or is there a form? Little confused, but I want to be a good mod-neighbor. :)

  4. The | Suit

    The | Suit Agent S. Forum Moderator

  5. Armed Mosquito

    Armed Mosquito Phantasmal Quasar

    Thanks for this information!
  6. Vegetable Lamb

    Vegetable Lamb Existential Complex

  7. IHart

    IHart Scruffy Nerf-Herder

    we need a new page for 1.0 mods
  8. lazarus78

    lazarus78 The Waste of Time

    Why? The IDs haven't changed.
  9. Vegetable Lamb

    Vegetable Lamb Existential Complex

    Castlevania mod is using 12900-12999, and asked over on the steam workshop to be added to the list. FYI.
  10. bk3k

    bk3k Oxygen Tank

    I should probably add my own into the wiki at a point.
  11. lazarus78

    lazarus78 The Waste of Time

    Then they can add themselves to the list. It is a wiki.

    The list is not official, it is purely to help avoid conflicts.
  12. IHart

    IHart Scruffy Nerf-Herder

    a lot of the ids claimed there are from mods that have not been updated, some of the listed vanilla ids arent even correct. I suppose it isnt necessary to start a new one, but it is need of a good swift kick in the pants.
  13. lazarus78

    lazarus78 The Waste of Time

    The list is unofficial. If someone wants to use IDS from an unupdated mod, absolutely nothing is stopping them.
  14. bk3k

    bk3k Oxygen Tank

    I'll tell you that a very large block of those IDs is gonna come active again soon ;)
    Mostly because I got tired of waiting for someone else to revive something I want revived.
  15. IHart

    IHart Scruffy Nerf-Herder

  16. bk3k

    bk3k Oxygen Tank

    You know that one probably does fit me well. But IIRC a while back someone was on the case... and I haven't heard anything in a long time. I believe the original authors did sign off on someone bringing it back and I love coding. So I should consider it.

    While that was a good guess, "simulatoralive's Hull Plating Blocks and More" is the correct answer. I'm resolving a few issues that have popped up. I need to adjust a few things that don't exist anymore to match things that do. Some things in the last version where incomplete and I'm completing them. Mostly I've completely changed ALL the namespaces to avoid mod conflicts(necessarily because I already know some that conflicted). Also I optimized the images to make it smaller.

    5,760 files and I'm nearly done (except for whatever problems surely exist) and I probably should make a custom workbench(s) too(and adjust every recipe to use it instead of vanilla). I'm simply not going to test so much stuff on my own, so I'll have to rely on people reporting problems and then I'll address them.

    Yeah this project doesn't fit me well as I'm just not a natural pixel artist... so it isn't really going to grow under me, but it's already huge enough yet dead, so better me than no one. Some had expressed interest but then probably gave up because of the file count where as mass editing doesn't faze me.
    Last edited: Jan 2, 2017

Share This Page