const POGOProtos = require('pogo-protos'); const fs = require('fs'); const gamemaster = fs.readFileSync('externals/pokemongo-game-master/versions/latest/GAME_MASTER.protobuf'); const decoded = POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.decode(gamemaster); fs.writeFileSync(`gamemaster_${ decoded.timestamp_ms }.json`, JSON.stringify(decoded, null, 2));