Open Maj-ew opened 11 months ago
Hi @Maj-ew,
Based on the logs you provided it looks like the package installed successfully. Are you experiencing any other issues with it?
I tried it again everything fresh I guess? Deleted everything in C:\Users\ernes\AppData\Roaming\npm then deleted WC3MapTranslator-4.0.0 folder (not sure if this is everything I should delete to make clean reinstall of this module) then redownloaded your latest release, unpacked and did this: (also here is all log)
PS J:\> cd "J:\warcraft 333\Warcraft\map\patchwork"
PS J:\warcraft 333\Warcraft\map\patchwork> npm i -g patchwork-mapconverter
added 33 packages in 3s
3 packages are looking for funding
run `npm fund` for details
npm notice
npm notice New patch version of npm available! 10.2.3 -> 10.2.5
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.2.5
npm notice Run npm install -g npm@10.2.5 to update!
npm notice
PS J:\warcraft 333\Warcraft\map\patchwork> npm install --save wc3maptranslator@3.0.2
added 3 packages in 2s
PS J:\warcraft 333\Warcraft\map\patchwork> npx patchwork-mapconverter war2json "J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\war3map.w3i" "J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\W3I.json" -td "J:\warcraft 333\Warcraft\map\patchwork\TriggerData.txt"
2024-01-02 10:31:07.755 DEBUG main command: war2json
2024-01-02 10:31:07.758 DEBUG main arguments: J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\war3map.w3i, J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\W3I.json
2024-01-02 10:31:07.759 DEBUG main options: {"importsFolderName":"imports","triggerData":"J:\\warcraft 333\\Warcraft\\map\\patchwork\\TriggerData.txt","ignore":"patchwork.ignore","sourceFolder":"src","customScriptExtension":".lua","guiExtension":".json","containerInfoExtension":".ini","commentExtension":".txt","mapHeader":"header"}
2024-01-02 10:31:07.759 INFO TriggerDataLoader Loading trigger data from J:\warcraft 333\Warcraft\map\patchwork\TriggerData.txt npx patchwork-mapconverter war2json "J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\war3map.w3i" "J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\W3I.json" -td "J:\warcraft 333\Warcraft\map\patchwork\TriggerData.txt"
2024-01-02 10:39:17.589 DEBUG main command: war2json
2024-01-02 10:39:17.592 DEBUG main arguments: J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\war3map.w3i, J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\W3I.json
2024-01-02 10:39:17.592 DEBUG main options: {"importsFolderName":"imports","triggerData":"J:\\warcraft 333\\Warcraft\\map\\patchwork\\TriggerData.txt","ignore":"patchwork.ignore","sourceFolder":"src","customScriptExtension":".lua","guiExtension":".json","containerInfoExtension":".ini","commentExtension":".txt","mapHeader":"header"}
2024-01-02 10:39:17.593 INFO TriggerDataLoader Loading trigger data from J:\warcraft 333\Warcraft\map\patchwork\TriggerData.txt
2024-01-02 10:39:17.598 INFO War2Json Converting Warcraft III binaries in J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\war3map.w3i and outputting to J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\W3I.json
2024-01-02 10:39:17.600 INFO War2Json:InfoTranslator-0 Processing J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\war3map.w3i
2024-01-02 10:39:17.622 FATAL main
RangeError The value of "offset" is out of range. It must be >= 0 and <= 734. Received 737
error stack:
• buffer boundsError
internal\buffer:88
• buffer Buffer.readInt32LE
internal\buffer:392
• \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\wc3maptranslator\W3Buffer.ts W3Buffer.readInt
\Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\wc3maptranslator\W3Buffer.ts:13
• \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\wc3maptranslator\translators\InfoTranslator.ts InfoTranslator.warToJson
\Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\wc3maptranslator\translators\InfoTranslator.ts:400
• \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\converter\War2JsonService.ts processFile
\Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\converter\War2JsonService.ts:25
•
• \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\converter\War2JsonService.ts Object.convert
\Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\converter\War2JsonService.ts:195
• \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\index.ts Command.<anonymous>
\Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\index.ts:89
PS J:\warcraft 333\Warcraft\map\patchwork>
@ChiefOfGxBxL tried 1.1.0 version too but not working tbh idk what's up am I installing it wrong?
PS J:\warcraft 333\Warcraft\map\patchwork\WC3MapTranslator-4.0.0> npm install --save wc3maptranslator@1.1.0
npm WARN deprecated tslint@6.1.3: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
added 327 packages, and audited 328 packages in 15s
16 packages are looking for funding
run `npm fund` for details
21 vulnerabilities (6 moderate, 10 high, 5 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues possible (including breaking changes), run:
npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
PS J:\warcraft 333\Warcraft\map\patchwork\WC3MapTranslator-4.0.0> npx patchwork-mapconverter war2json "J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\war3map.w3i" "J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\W3I.json" -td "J:\warcraft 333\Warcraft\map\patchwork\TriggerData.txt"
2024-01-06 23:38:26.757 DEBUG main command: war2json
2024-01-06 23:38:26.760 DEBUG main arguments: J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\war3map.w3i, J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\W3I.json
2024-01-06 23:38:26.760 DEBUG main options: {"importsFolderName":"imports","triggerData":"J:\\warcraft 333\\Warcraft\\map\\patchwork\\TriggerData.txt","ignore":"patchwork.ignore","sourceFolder":"src","customScriptExtension":".lua","guiExtension":".json","containerInfoExtension":".ini","commentExtension":".txt","mapHeader":"header"}
2024-01-06 23:38:26.760 INFO TriggerDataLoader Loading trigger data from J:\warcraft 333\Warcraft\map\patchwork\TriggerData.txt
2024-01-06 23:38:26.813 INFO War2Json Converting Warcraft III binaries in J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\war3map.w3i and outputting to J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\W3I.json
2024-01-06 23:38:26.850 INFO War2Json:InfoTranslator-0 Processing J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\war3map.w3i
2024-01-06 23:38:26.877 FATAL main
RangeError The value of "offset" is out of range. It must be >= 0 and <= 734. Received 737
error stack:
• buffer boundsError
internal\buffer:88
• buffer Buffer.readInt32LE
internal\buffer:392
• \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\wc3maptranslator\W3Buffer.ts W3Buffer.readInt
\Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\wc3maptranslator\W3Buffer.ts:13
• \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\wc3maptranslator\translators\InfoTranslator.ts InfoTranslator.warToJson
\Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\wc3maptranslator\translators\InfoTranslator.ts:400
• \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\converter\War2JsonService.ts processFile
\Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\converter\War2JsonService.ts:25
•
• \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\converter\War2JsonService.ts Object.convert
\Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\converter\War2JsonService.ts:195
• \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\index.ts Command.<anonymous>
\Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\index.ts:89
PS J:\warcraft 333\Warcraft\map\patchwork\WC3MapTranslator-4.0.0>```
@Maj-ew Is the above output for an older war3map file (i.e. one for an older map)?
Would you mind sharing the file you're trying to translate? I'm guessing there's a version mismatch between the war3map file and what's supported by the version of WC3MapTranslator you've installed. I can help debug / troubleshoot if I can see the war3map file.
So I got same issue as people before so I installed 4.0.0 as u adviced then downgraded but still it doesn't work. I don't know if downgrade was 100% successful. Here is log