rl-item-mod 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/index.js +19 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,6 +13,16 @@ A powerful, user-friendly Node.js CLI tool for performing visual asset swaps in
|
|
|
13
13
|
- **Automated Backups**: Automatically backs up original game assets before patching, with a one-click CLI restore feature.
|
|
14
14
|
- **Item Database**: Uses a built-in `items.json` database for fuzzy-searching and mapping in-game item names directly to their underlying UPK files.
|
|
15
15
|
|
|
16
|
+
## ⚠️ Warning - Some Swaps Will Crash the Game
|
|
17
|
+
|
|
18
|
+
> **Swapping certain asset types is not yet fully supported and will cause Rocket League to crash on load.** This is a known limitation of the current version and is being worked on. Until a fix is released, avoid swapping the following:
|
|
19
|
+
|
|
20
|
+
> Thumbnails in general cause a lot of crashes, as well as bodies and goal explosions.
|
|
21
|
+
|
|
22
|
+
> If a swap you attempt causes a crash, you should validate game files, and when a crash occurs on an item use the **Restore backups** as shown in this screenshot
|
|
23
|
+
|
|
24
|
+
<img width="571" height="298" alt="image" src="https://github.com/user-attachments/assets/e09d09eb-1e0e-499c-9ddd-74fea68163d0" />
|
|
25
|
+
|
|
16
26
|
## Installation
|
|
17
27
|
|
|
18
28
|
### Prerequisites
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Command } from 'commander';
|
|
3
3
|
import * as fs from 'fs';
|
|
4
4
|
import * as path from 'path';
|
|
5
|
-
import {
|
|
5
|
+
import { spawnSync } from 'child_process';
|
|
6
6
|
import inquirer from 'inquirer';
|
|
7
7
|
import { UPKFile } from './upk.js';
|
|
8
8
|
import { resolvePackagePath, searchAssets } from './assets.js';
|
|
@@ -83,9 +83,25 @@ async function runInteractiveWizard() {
|
|
|
83
83
|
try {
|
|
84
84
|
const pythonScriptPath = path.resolve(__dirname, '../python/rl_asset_swapper.py');
|
|
85
85
|
backupFile(target.path);
|
|
86
|
-
const cmd = `python "${pythonScriptPath}" --no-gui --target "${target.item.name}" --donor "${source.item.name}" --no-preserve-header-offsets --overwrite --donor-dir "${cookedDir}" --output-dir "${cookedDir}"`;
|
|
87
86
|
console.log(`\nExecuting Python offset-shifter...`);
|
|
88
|
-
|
|
87
|
+
const result = spawnSync('python', [
|
|
88
|
+
pythonScriptPath,
|
|
89
|
+
'--no-gui',
|
|
90
|
+
'--target', target.item.name,
|
|
91
|
+
'--donor', source.item.name,
|
|
92
|
+
'--no-preserve-header-offsets',
|
|
93
|
+
'--overwrite',
|
|
94
|
+
'--donor-dir', cookedDir,
|
|
95
|
+
'--output-dir', cookedDir
|
|
96
|
+
], { stdio: ['inherit', 'inherit', 'pipe'], encoding: 'utf8' });
|
|
97
|
+
if (result.stderr && result.stderr.trim()) {
|
|
98
|
+
console.error('\n--- Python Error Output ---');
|
|
99
|
+
console.error(result.stderr.trim());
|
|
100
|
+
console.error('---------------------------');
|
|
101
|
+
}
|
|
102
|
+
if (result.status !== 0) {
|
|
103
|
+
throw new Error(`Python script exited with code ${result.status}`);
|
|
104
|
+
}
|
|
89
105
|
console.log('SUCCESS: Visual Swap complete! Restart your game to see your new item.');
|
|
90
106
|
}
|
|
91
107
|
catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rl-item-mod",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A comprehensive CLI tool for safely applying visual asset swaps to Rocket League UPK files with full encryption and binary offset handling.",
|
|
6
6
|
"main": "dist/index.js",
|