itemgen = {} function itemgen.create(type, commands) local object = {} for i=1, #commands do object[commands][i][1] = commands[i][2] end return object end function itemgen.createFromWorld(id) item = {} item.name = World.map.items[id][1] return item end