This module does not appear to work with the .wad files from the latest version of the League Alpha Client.
AKPWebDesign opened this issue · 5 comments
Could you give more details?? What's the alpha client version?
I sure can! Let me know if you need anything I might have missed.
Node version: 6.2.1
Alpha client version: v0.4-2581801.2581470
File location: LOLPBE\RADS\projects\league_client\releases\installer\deploy\Plugins\rcp-fe*\assets.wad
The code I'm using to attempt to extract is as follows:
const path = require('path');
const minimist = require('minimist');
const wad = new (require('lol-wad-parser'))();
var args = minimist(process.argv.slice(2));
if(!args.i) {console.error('input file required!'); process.exit(0);}
if(!args.o) {console.error('output location required!'); process.exit(0);}
var inPath = path.resolve(args.i);
var outPath = path.resolve(args.o);
wad.extract(inPath, outPath, (e) => {
if(e) {console.error(e);} else {console.log('done.');}
process.exit(0);
});
The error I'm getting is as follows:
> node wad.js -i rcp-fe-plugin-runner/assets.wad -o plugin-runner/
buffer.js:830
throw new RangeError('Index out of range');
^
RangeError: Index out of range
at checkOffset (buffer.js:830:11)
at Buffer.readUInt32LE (buffer.js:892:5)
at Parser.module.exports.XP.Class._read.value (/Plugins/node_modules/binary-buffer-parser/lib/index.js:234:62)
at Parser.module.exports.XP.Class.uint32 (/Plugins/node_modules/binary-buffer-parser/lib/index.js:163:25)
at module.exports (/Plugins/node_modules/lol-wad-parser/lib/parse.js:31:33)
at FileReader.module.exports.fileParser.parse (/Plugins/node_modules/lol-wad-parser/lib/index.js:16:13)
at Object.apply (/Plugins/node_modules/expandjs/lib/function/apply.js:45:68)
at WadParser.XP.Class._do.value (/Plugins/node_modules/lol-file-parser/lib/parser.js:103:24)
at /Plugins/node_modules/lol-file-parser/lib/parser.js:64:30
at /Plugins/node_modules/lol-file-parser/lib/parser.js:113:25
The file structure must have changed. Unfortunately I don't have access to the PBE alpha client, got only the standard one which is at v0.3. Could you upload the file you are having problems with so I can take a look?
Sure thing. I've attached a .zip file which includes two example files that won't open using this package: wad.zip
Additionally, you can grab the alpha client installer from Riot's CDN here, if you're interested in taking a look. You'll have to have the PBE client installed, and you'll need a PBE account to log in, but afaik, the alpha client downloads everything it needs without you needing to log in, so you can probably still look at its file structure without needing the account.
They updated the file version and structure indeed. Updated the parser, it should be good to go now.
Let me know if you encounter any other problems,
Cheers.