pvpokemon/src/scripts/convertGameMasterToJson.js
2019-02-10 18:17:32 -05:00

7 lines
373 B
JavaScript

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));