Getting a list of all in game items

  • I've poked around in the API for a bit but I can't seem to locate a way to get a list of all in-game items. Something along the lines of (short itemID, int variation, string name) would work. I need a full list so prices can be assigned to each item for my economy mod.


    Does anyone know how to get this?

  • You can find all items in the definitions database of the game. Just open the "commons.jar" in your data subfolder with a zip program (e.g. WinRar), navigate into the commons/definitions subfolder, there you find a file called "definitions.db". You can extract this file and open it with an SQL editor (e.g. Navicat). Inside this database file you find a table called "Items", this table contains all items with their according id.
    About the variation, basically it's just relevant for blocks or construction elements (determining the texture).


    Alternatively here is an overview of the current items in the game:

  • Thanks! I think I have a working solution now. I just copied the data from your spoiler, created a csv, and created a couple functions to import from and export to/from csv. I did find that the API is missing a getItemAttribute() function. I need this to price the workbenches and other objects. I worked around the issue by converting the item to a string and using regex to strip out the attribute.

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!