├── .gitignore ├── LICENSE ├── README.md ├── index.html ├── js ├── main.js ├── preload.js ├── renderer.js └── rm_load.js ├── package-lock.json ├── package.json └── styles.css /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Diagnostic reports (https://nodejs.org/api/report.html) 7 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 8 | 9 | # Runtime data 10 | pids 11 | *.pid 12 | *.seed 13 | *.pid.lock 14 | 15 | node_modules 16 | 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RPGMaker Save Editor 2 | 3 | This is a tool for editing RPGMaker save files. It currently supports save files written by RPG Maker MZ (.rmmzsave), but support for other versions of RPGMaker is planned for the future. 4 | 5 | It uses Node.js for the backend and Electron for the GUI, which means you can interact with it using `npm`. 6 | 7 | ## Installation and running 8 | ### Clone the repository 9 | ``` 10 | git clone https://github.com/nathan-b/rmse 11 | ``` 12 | ### Install dependencies 13 | ``` 14 | npm install 15 | ``` 16 | ### Run 17 | ``` 18 | npm start 19 | ``` 20 | 21 | ## Loading a save file 22 | 23 | You can load a save file into RMSE either by dragging and dropping from your file browser or by clicking on the friendly green box and selecting your save file from the resulting dialog box. 24 | 25 | ## Editing the save file 26 | 27 | Hopefully the interface is fairly straightforward. 28 | 29 | Each section can be collapsed or expanded by clicking on it. 30 | 31 | Edited values do not take effect until you click one of the save buttons. 32 | 33 | ### Editing inventory 34 | 35 | The inventory sections (items, armor, weapons) only show the current contents of your inventory. If you would like to add a new item that you currently don't have, you can use the dropdown box below each section to choose an item to add. 36 | Selecting an item and then clicking the 'Add' button will add that item to your inventory with a quantity of 1. You can then increase the quantity further if you would like. 37 | 38 | If an inventory section does not show up, this is because your party currently does not have any of that type of inventory. 39 | 40 | ### Editing characters 41 | 42 | You can currently only edit characters who are in your active party. The ability to edit characters not currently in your party is a possible future enhancement. Let me know if this functionality would be useful, and that might inspire me to work on it :). 43 | 44 | Note that for most games, the given character attributes are additive on top of what the character's attributes already are based on their current level. This means that the values you see in RMSE will not match the values you see inside the game. This is 45 | normal and expected. 46 | 47 | Not all games use every character attribute, but the save files still include these attributes. Do not be alarmed if you see an attribute your game does not use. All is fine. Remain calm. 48 | 49 | ### Editing variables 50 | 51 | Variables are internal values and switches used by the game and are not normally exposed to the user. As a result, they can sometimes have strange or uninteligible names. Be aware that messing with values inside the variables section has a fairly high 52 | likelihood of messing up your save in some way. Use with caution, and maintain backups. 53 | 54 | ## Saving the file 55 | 56 | You can either overwrite the file you just loaded or save the file under a new name. For backup purposes, it's a good idea to create a new file when you're first editing, in case something goes wrong. 57 | 58 | ### Dumping raw JSON 59 | 60 | RMSE can both save and load the raw JSON values used by the save file. This functionality will probably not be useful to you, but it might under a few circumstances: 61 | * Your game uses a custom plugin that RMSE doesn't read, and you want to edit those values. 62 | * You want to edit something that RMSE doesn't load (such as characters not in the active party). 63 | * You wish to explore the save file or edit it by hand, and you just need RMSE to unpack the save file for you. 64 | 65 | Once you have dumped the raw JSON and then edited it, you can open the file using the normal way (by dropping it or selecting it) and load it back into RMSE. At that point, use Save as... to save it as a new (or existing) save file inside your 66 | game directory. 67 | 68 | NOTE: For technical reasons, you can't save the file outside the game's directory. RMSE needs to use the game directory to figure out how to save the file. However, if you don't want to save the file in the saves directory, you can save it somewhere else 69 | inside the game directory. This restriction does not apply to JSON files, which can be saved wherever you please. 70 | 71 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | RPGMaker Save Editor 8 | 9 | 10 |

RPGMaker Save Editor

11 |
12 |
13 |

Drop your files here!

14 |
15 |
16 | 17 |
18 | 19 |
20 | 21 |
22 |
23 | 24 |
25 |

26 |
27 | 28 |
29 | 30 |


31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /js/main.js: -------------------------------------------------------------------------------- 1 | const { 2 | app, 3 | BrowserWindow, 4 | ipcMain, 5 | dialog 6 | } = require('electron'); 7 | const path = require('path'); 8 | const fsprom = require('fs').promises; 9 | const rm_loader = require('./rm_load.js'); 10 | 11 | // Create the UI 12 | function createWindow() { 13 | const mainwin = new BrowserWindow({ 14 | width: 1000, 15 | height: 1200, 16 | webPreferences: { 17 | nodeIntegration: false, 18 | preload: path.join(__dirname, 'preload.js') 19 | } 20 | }); 21 | 22 | mainwin.loadFile('index.html'); 23 | mainwin.webContents.openDevTools(); 24 | } 25 | 26 | function getWindow() { 27 | if (BrowserWindow.getAllWindows().length === 0) { 28 | return null; 29 | } 30 | return BrowserWindow.getAllWindows()[0]; 31 | } 32 | 33 | // Message handlers 34 | ipcMain.handle('load_file', async (event, file_path) => { 35 | return rm_loader.load(file_path); 36 | }); 37 | 38 | ipcMain.on('get_version', (event) => { 39 | event.returnValue = app.getVersion(); 40 | }); 41 | 42 | ipcMain.handle('save_file', async (event, file_path, json_str, rm_root) => { 43 | if (file_path.length === 0) { 44 | // Empty string => Open Save As dialog 45 | file_path = dialog.showSaveDialogSync({ 46 | title: 'Select a location to save the file', 47 | defaultPath: rm_root 48 | }); 49 | } 50 | if (!file_path) { 51 | return ''; 52 | } 53 | return await rm_loader.save(file_path, json_str, rm_root); 54 | }); 55 | 56 | ipcMain.handle('open_file', async (event) => { 57 | [file_path] = dialog.showOpenDialogSync(getWindow(), { 58 | title: 'Select a file to open', 59 | properties: ['openFile'] 60 | }); 61 | if (file_path) { 62 | return rm_loader.load(file_path); 63 | } 64 | }); 65 | 66 | ipcMain.handle('dump_json', async (event, json_str, rm_root) => { 67 | const file_path = dialog.showSaveDialogSync(getWindow(), { 68 | title: 'Select a location to save the raw JSON', 69 | defaultPath: rm_root 70 | }); 71 | if (!file_path) { 72 | return ''; 73 | } 74 | 75 | try { 76 | await fsprom.writeFile(file_path, json_str); 77 | } catch (err) { 78 | console.error('Failed to write JSON file: ' + err); 79 | return ''; 80 | } 81 | return file_path; 82 | }); 83 | 84 | 85 | // Entrypoint 86 | app.whenReady().then(() => { 87 | createWindow() 88 | 89 | app.on('activate', function() { 90 | // On macOS it's common to re-create a window in the app when the 91 | // dock icon is clicked and there are no other windows open. 92 | if (BrowserWindow.getAllWindows().length === 0) createWindow() 93 | }) 94 | }) 95 | 96 | // Exit handler 97 | app.on('window-all-closed', function() { 98 | if (process.platform !== 'darwin') app.quit() 99 | }) 100 | -------------------------------------------------------------------------------- /js/preload.js: -------------------------------------------------------------------------------- 1 | const { 2 | contextBridge, 3 | ipcRenderer, 4 | webUtils 5 | } = require('electron'); 6 | 7 | const path_basename = (p) => p.substring(p.lastIndexOf(path.sep) + 1); 8 | 9 | // Set up APIs for sandboxed environment 10 | contextBridge.exposeInMainWorld('ipc_bridge', { 11 | path_for_file: (file) => webUtils.getPathForFile(file), 12 | load_file: (file_path, callback) => { 13 | ipcRenderer.invoke('load_file', file_path).then((result) => { 14 | callback(path_basename(file_path), result); 15 | }); 16 | }, 17 | open_file: (callback) => { 18 | ipcRenderer.invoke('open_file').then((result) => { 19 | callback(path_basename(result.savefile), result); 20 | }); 21 | }, 22 | save_file: (file_path, json_str, rm_root, callback) => { 23 | ipcRenderer.invoke('save_file', file_path, json_str, rm_root).then((result) => { 24 | callback(result); 25 | }); 26 | }, 27 | dump_json: (json_str, rm_root, callback) => { 28 | ipcRenderer.invoke('dump_json', json_str, rm_root).then((result) => { 29 | callback(result); 30 | }); 31 | }, 32 | version: () => { 33 | return ipcRenderer.sendSync('get_version'); 34 | } 35 | }); 36 | 37 | window.addEventListener('DOMContentLoaded', () => { 38 | 39 | }); 40 | -------------------------------------------------------------------------------- /js/renderer.js: -------------------------------------------------------------------------------- 1 | // Runs in sandbox 2 | 3 | // Set the text of the given element 4 | function set_text(selector, text) { 5 | const element = document.getElementById(selector); 6 | if (element) element.innerText = text; 7 | else console.log("Bad did happen"); 8 | } 9 | 10 | /** 11 | * One item within a section. 12 | * This type of item is for objects associated with a single value. 13 | * 14 | * The item owns the ability to update its value by reading from the DOM and 15 | * then writing to the JSON object representing the savefile. 16 | */ 17 | class value_item { 18 | constructor(owner, field, label) { 19 | this.curr_val = owner[field]; 20 | this.jobj = owner; 21 | this.field = field; 22 | this.type = typeof owner[field]; 23 | this.labeltext = label; 24 | } 25 | 26 | create_DOM() { 27 | let parent = document.createElement('div'); 28 | parent.classList.add('item'); 29 | let label = document.createElement('p'); 30 | label.classList.add('label'); 31 | label.textContent = this.labeltext; 32 | let input = document.createElement('input'); 33 | input.setAttribute('type', 'text'); 34 | input.classList.add('value'); 35 | input.value = this.curr_val; 36 | 37 | // Save the element for later 38 | this.input_elem = input; 39 | 40 | parent.appendChild(label); 41 | parent.appendChild(input); 42 | 43 | return parent; 44 | } 45 | 46 | update_value() { 47 | var newval = ''; 48 | if (this.type == 'number') { 49 | newval = Number(this.input_elem.value); 50 | } else if (this.type == 'boolean') { 51 | newval = Boolean(this.input_elem.value); 52 | } else { 53 | // YOLO string 54 | newval = this.input_elem.value 55 | } 56 | this.jobj[this.field] = newval; 57 | } 58 | 59 | reset_value() { 60 | this.input_elem.value = this.curr_val; 61 | } 62 | } 63 | 64 | /** 65 | * One item within a character section. 66 | * This type of item is for characters and their stats. 67 | * 68 | * The item owns the ability to update its value by reading from the DOM and 69 | * then writing to the JSON object representing the savefile. 70 | */ 71 | class character_item { 72 | constructor(actor, context) { 73 | this.actor = actor; 74 | this.ctx = context; 75 | } 76 | 77 | create_DOM() { 78 | let parent = document.createElement('div'); 79 | parent.classList.add('section-content'); 80 | parent.classList.add('character-content'); 81 | let header = document.createElement('h3'); 82 | header.classList.add('character-name'); 83 | header.textContent = this.actor._name; 84 | parent.appendChild(header); 85 | 86 | // These three values are the current levels 87 | Object.entries(this.ctx.current).forEach((entry) => { 88 | let [idx, value] = entry; 89 | let subvalue = document.createElement('div'); 90 | subvalue.classList.add('item'); 91 | subvalue.classList.add('character-item'); 92 | 93 | let sublabel = document.createElement('p'); 94 | sublabel.classList.add('label'); 95 | sublabel.textContent = value.name; 96 | subvalue.appendChild(sublabel); 97 | 98 | let subinput = document.createElement('input'); 99 | subinput.setAttribute('type', 'text'); 100 | subinput.classList.add('value'); 101 | subinput.value = this.actor[idx]; 102 | subvalue.appendChild(subinput); 103 | 104 | parent.appendChild(subvalue); 105 | 106 | value['elem'] = subinput; 107 | }); 108 | 109 | // And of course these have to be just subtly different from the above 110 | this.ctx.static.forEach((value, idx) => { 111 | let subvalue = document.createElement('div'); 112 | subvalue.classList.add('item'); 113 | subvalue.classList.add('character-item'); 114 | 115 | let sublabel = document.createElement('p'); 116 | sublabel.classList.add('label'); 117 | sublabel.textContent = value.name; 118 | subvalue.appendChild(sublabel); 119 | 120 | let subinput = document.createElement('input'); 121 | subinput.setAttribute('type', 'text'); 122 | subinput.classList.add('value'); 123 | subinput.value = this.actor._paramPlus[idx]; 124 | subvalue.appendChild(subinput); 125 | 126 | parent.appendChild(subvalue); 127 | 128 | value['elem'] = subinput; 129 | }); 130 | 131 | return parent; 132 | } 133 | 134 | update_value() { 135 | Object.entries(this.ctx.current).forEach((entry) => { 136 | let [idx, value] = entry; 137 | this.actor[idx] = Number(value['elem'].value); 138 | }); 139 | 140 | this.ctx.static.forEach((value, idx) => { 141 | this.actor._paramPlus[idx] = Number(value['elem'].value); 142 | }); 143 | } 144 | 145 | reset_value() { 146 | Object.entries(this.ctx.current).forEach((entry) => { 147 | let [idx, value] = entry; 148 | value['elem'].value = this.actor[idx]; 149 | }); 150 | 151 | this.ctx.static.forEach((value, idx) => { 152 | value['elem'].value = this.actor._paramPlus[idx]; 153 | }); 154 | } 155 | } 156 | 157 | /** 158 | * One section of the savefile. 159 | * Sections are delimited by headers and group logical collections of items. 160 | * 161 | * Sections do not create their own values (because that is owned by the 162 | * higher-level parsing code that understands savefiles), but they own the 163 | * created values. 164 | */ 165 | class section { 166 | constructor(name) { 167 | this.name = name; 168 | this.items = []; 169 | } 170 | 171 | add_item(item) { 172 | this.items.push(item); 173 | } 174 | 175 | add_extras(extras_arr) { 176 | this.extras = extras_arr; 177 | } 178 | 179 | create_DOM() { 180 | let section_div = document.createElement('div'); 181 | section_div.classList.add('section'); 182 | let header = document.createElement('h2'); 183 | header.classList.add('section-header'); 184 | header.classList.add('expanded'); 185 | header.textContent = this.name; 186 | let section_content = document.createElement('div'); 187 | section_content.classList.add('section-content'); 188 | let extras_div = document.createElement('div'); 189 | 190 | // Enable expand / collapse behavior 191 | header.onclick = function(event) { 192 | if (event.target.classList.contains('expanded')) { 193 | event.target.classList.remove('expanded'); 194 | event.target.classList.add('collapsed'); 195 | section_content.classList.add('section-hidden'); 196 | extras_div.classList.add('section-hidden'); 197 | } else { 198 | event.target.classList.add('expanded'); 199 | event.target.classList.remove('collapsed'); 200 | section_content.classList.remove('section-hidden'); 201 | extras_div.classList.remove('section-hidden'); 202 | } 203 | }; 204 | 205 | section_div.appendChild(header); 206 | section_div.appendChild(section_content); 207 | this.items.forEach((item) => { 208 | section_content.appendChild(item.create_DOM()); 209 | }); 210 | 211 | // Add dropdown for extra items, if desired 212 | if (this.extras) { 213 | extras_div.classList.add('extras'); 214 | // Add a label 215 | let extras_label = document.createElement('p'); 216 | extras_label.classList.add('extras'); 217 | extras_label.textContent = 'Add to inventory: '; 218 | extras_div.appendChild(extras_label); 219 | 220 | // Create the dropdown list 221 | let select_list = document.createElement('select'); 222 | select_list.classList.add('extras'); 223 | 224 | // Create and append the options 225 | this.extras.forEach((extra) => { 226 | let option = document.createElement('option'); 227 | option.context = extra; 228 | option.text = extra.name; 229 | select_list.appendChild(option); 230 | }); 231 | extras_div.appendChild(select_list); 232 | 233 | // Create the button 234 | let btnadd = document.createElement('button'); 235 | btnadd.onclick = (event) => { 236 | let val = select_list.options[select_list.selectedIndex].context; 237 | // Add the item to the JSON object 238 | val.obj[val.id] = 1; 239 | 240 | // Create the new item 241 | let item = new value_item(val.obj, val.id, val.name) 242 | this.add_item(item); 243 | 244 | // Add to the DOM 245 | section_content.appendChild(item.create_DOM()); 246 | }; 247 | btnadd.textContent = 'Add item'; 248 | extras_div.appendChild(btnadd); 249 | 250 | section_div.appendChild(extras_div); 251 | } 252 | 253 | return section_div; 254 | } 255 | 256 | update_values() { 257 | this.items.forEach((item) => { 258 | item.update_value(); 259 | }); 260 | } 261 | 262 | reset_values() { 263 | this.items.forEach((item) => { 264 | item.reset_value(); 265 | }); 266 | } 267 | } 268 | 269 | function build_item_table(json) { 270 | let item_table = []; 271 | json.forEach((item, index) => { 272 | if (item.name.length != 0) { 273 | item_table[index] = { 274 | 'name': item.name, 275 | 'description': item.description 276 | }; 277 | } 278 | }); 279 | return item_table; 280 | } 281 | 282 | function build_attribute_context() { 283 | let ctx = { 284 | static: [], 285 | current: {} 286 | }; 287 | 288 | ctx.current['_hp'] = { 289 | 'name': 'Current HP' 290 | }; 291 | ctx.current['_mp'] = { 292 | 'name': 'Current MP' 293 | }; 294 | ctx.current['_tp'] = { 295 | 'name': 'Current TP' 296 | }; 297 | ctx.static[0] = { 298 | 'name': 'Max HP' 299 | }; 300 | ctx.static[1] = { 301 | 'name': 'Max MP' 302 | }; 303 | ctx.static[2] = { 304 | 'name': 'Attack' 305 | }; 306 | ctx.static[3] = { 307 | 'name': 'Defense' 308 | }; 309 | ctx.static[4] = { 310 | 'name': 'Magic Attack' 311 | }; 312 | ctx.static[5] = { 313 | 'name': 'Magic Defense' 314 | }; 315 | ctx.static[6] = { 316 | 'name': 'Agility' 317 | }; 318 | ctx.static[7] = { 319 | 'name': 'Luck' 320 | }; 321 | 322 | return ctx; 323 | } 324 | 325 | /** 326 | * Loads one set of value_items from the json. 327 | * 328 | * RPGM tends to store related values in maps. This is for things like inventory 329 | * sections. This is a helper function to read these name, value pairs and load 330 | * them as sections in the section array. 331 | */ 332 | function load_section(name, json_parent, section_arr, ctx, extras) { 333 | let section_obj = new section(name); 334 | 335 | if (Object.entries(json_parent).length > 0) { 336 | Object.entries(json_parent).forEach(entry => { 337 | const [id, quantity] = entry; 338 | 339 | // Perform context lookup, if available 340 | let name = String(id); 341 | if (ctx[id]) { 342 | name = ctx[id].name; 343 | } 344 | 345 | // Create the item in the section 346 | section_obj.add_item(new value_item(json_parent, id, name)); 347 | }); 348 | if (extras) { 349 | section_obj.add_extras(extras); 350 | } 351 | section_arr.push(section_obj); 352 | } 353 | } 354 | 355 | /** 356 | * RPGM treats some things (like the internal variables) differently 357 | * from others (like inventory items). This is annoying, but whattaya 358 | * gonna do? 359 | * 360 | * This function is almost the same as the above, with two differences: 361 | * 1. It iterates over an array instead of object entries 362 | * 2. It ignores entries whose value is null 363 | */ 364 | function load_array_section(name, json_parent, section_arr, ctx) { 365 | let section_obj = new section(name); 366 | 367 | if (json_parent.length > 0) { 368 | json_parent.forEach((value, idx) => { 369 | if (value) { 370 | // Perform context lookup, if available 371 | let name = String(idx); 372 | if (ctx[idx]) { 373 | name = ctx[idx]; 374 | } 375 | // Create the item in the section 376 | section_obj.add_item(new value_item(json_parent, idx, name)); 377 | } 378 | }); 379 | section_arr.push(section_obj); 380 | } 381 | } 382 | 383 | /** 384 | * The party object only contains items which are currently in the inventory. As 385 | * the user might reasonably want to add new items not currently owned, this 386 | * function will produce a list of those new items. 387 | * 388 | * item_ctx is an array of items, while item_obj associates item IDs with 389 | * quantities. 390 | */ 391 | function load_extra_items(item_obj, item_ctx) { 392 | let extra_items = []; 393 | item_ctx.forEach((item) => { 394 | if (item && 395 | item['name'] && 396 | item['name'].length > 0 && 397 | item['name'][0] != '-' && 398 | !item_obj[item.id]) { 399 | extra_items.push({ 400 | 'name': item['name'], 401 | 'id': item['id'], 402 | 'obj': item_obj 403 | }); 404 | } 405 | }); 406 | return extra_items; 407 | } 408 | 409 | /** 410 | * This function is only necessary because older version of RPGMaker do 411 | * strange and awkward things with the JSON. 412 | */ 413 | function get_rm_arr(obj, field) { 414 | let arr = obj[field]; 415 | 416 | if (Array.isArray(arr)) { 417 | return arr; 418 | } 419 | 420 | arr = arr['@a']; 421 | 422 | if (Array.isArray(arr)) { 423 | return arr; 424 | } 425 | 426 | return null; 427 | } 428 | 429 | function inventory_section(name, json_obj, context, sections) { 430 | let ctx_obj = {}; 431 | let item_extras = null; 432 | if (context) { 433 | ctx_obj = JSON.parse(context); 434 | item_extras = load_extra_items(json_obj, ctx_obj); 435 | } 436 | load_section(name, json_obj, sections, ctx_obj, item_extras); 437 | } 438 | 439 | /** 440 | * Build the sections for the editor. 441 | * This function handles the semantic section building, while the section and 442 | * item classes handle building the actual UI. 443 | */ 444 | function build_sections(json, context) { 445 | let sections = []; 446 | if ('party' in json) { 447 | // Common section 448 | let common = new section('Common'); 449 | common.add_item(new value_item(json['party'], '_gold', 'Gold')); 450 | common.add_item(new value_item(json['party'], '_steps', 'Steps')); 451 | sections.push(common); 452 | 453 | // Character section 454 | 455 | // Note: attributes seem to be fixed in the RPGMaker code itself rather 456 | // than defined in the game data. I don't know if the game can 457 | // change the definition of these fields, but they are hard-coded 458 | // at https://dev.azure.com/je-can-code/RPG%20Maker/_git/rmmz?path=/test-bed/js/rmmz_objects.js&version=GC865a2d06c3b3459496ec380577156ea8ddfb511e&line=2402&lineEnd=2403&lineStartColumn=1&lineEndColumn=1&lineStyle=plain&_a=contents 459 | let party = new section('Characters'); 460 | // Build the character sections for every character in the party 461 | let party_actors = get_rm_arr(json['party'], '_actors'); 462 | party_actors.forEach((actor_idx) => { 463 | let party_ctx = build_attribute_context(); // Performs the mapping described above 464 | let actor_arr = get_rm_arr(json['actors'], '_data'); 465 | party.add_item(new character_item(actor_arr[actor_idx], party_ctx)); 466 | }); 467 | sections.push(party); 468 | 469 | // Inventory 470 | inventory_section('Items', json['party']['_items'], context['items'], sections); 471 | inventory_section('Weapons', json['party']['_weapons'], context['weapons'], sections); 472 | inventory_section('Armor', json['party']['_armors'], context['armors'], sections); 473 | } 474 | 475 | // Variables section 476 | if ('variables' in json) { 477 | let var_ctx = {}; 478 | if (context['variables']) { 479 | let var_json = JSON.parse(context['variables']); 480 | var_ctx = var_json.variables; 481 | } 482 | load_array_section('Variables', get_rm_arr(json['variables'], '_data'), sections, var_ctx); 483 | } 484 | 485 | return sections; 486 | } 487 | 488 | /** 489 | * The "palette" is the floating div containing the buttons the user can use to 490 | * (for example) save changes and otherwise interact with the system. 491 | * 492 | * Takes a context object structured like so: 493 | * { 494 | * 'filename' => Base name of the file (for printing) 495 | * 'savefile' => Full path to the save file 496 | * 'rm_root' => Root RPGMaker directory path 497 | * 'object' => Parsed JSON object 498 | */ 499 | function build_palette(sections, fdata) { 500 | let palette = document.getElementById('palette'); 501 | 502 | let savebtn = document.createElement('button'); 503 | savebtn.textContent = 'Overwrite ' + fdata['filename']; 504 | savebtn.classList.add('palette-button'); 505 | savebtn.onclick = (event) => { 506 | handle_save(fdata['savefile'], fdata['object'], fdata['rm_root'], sections); 507 | } 508 | 509 | let saveasbtn = document.createElement('button'); 510 | saveasbtn.textContent = 'Save as...'; 511 | saveasbtn.classList.add('palette-button'); 512 | saveasbtn.onclick = (event) => { 513 | handle_save('', fdata['object'], fdata['rm_root'], sections); 514 | } 515 | 516 | let jdumpbtn = document.createElement('button'); 517 | jdumpbtn.textContent = 'Dump raw JSON'; 518 | jdumpbtn.classList.add('palette-button'); 519 | jdumpbtn.onclick = (event) => { 520 | dump_json(JSON.stringify(fdata['object']), fdata['rm_root']); 521 | } 522 | 523 | let resetbtn = document.createElement('button'); 524 | resetbtn.textContent = 'Revert all changes'; 525 | resetbtn.classList.add('palette-button'); 526 | resetbtn.onclick = (event) => { 527 | sections.forEach((section) => { 528 | section.reset_values(); 529 | }); 530 | } 531 | 532 | palette.appendChild(savebtn); 533 | palette.appendChild(saveasbtn); 534 | palette.appendChild(jdumpbtn); 535 | palette.appendChild(resetbtn); 536 | } 537 | 538 | function dump_json(obj, rm_root) { 539 | window.ipc_bridge.dump_json(obj, rm_root, (status) => { 540 | if (status.length > 0) { 541 | set_text('status', 'Dumped raw JSON to ' + status); 542 | } else { 543 | set_text('status', 'Could not dump raw JSON!'); 544 | } 545 | }); 546 | } 547 | 548 | function handle_save(outfile, json, rm_root, sections) { 549 | set_text('status', 'Saving ' + outfile); 550 | // This will update the json object to contain the new values 551 | sections.forEach((section) => { 552 | section.update_values() 553 | }); 554 | 555 | // Now save the json 556 | window.ipc_bridge.save_file(outfile, JSON.stringify(json), rm_root, (status) => { 557 | if (status.length > 0) { 558 | set_text('status', 'Saved ' + status); 559 | } else { 560 | set_text('status', 'Error saving ' + outfile); 561 | } 562 | }); 563 | } 564 | 565 | /** 566 | * Parse the JSON data, load each section, and create the DOM. 567 | * 568 | * Receives a context object structured like so: 569 | * { 570 | * 'savefile' => Full path to the save file 571 | * 'rm_root' => Root RPGMaker directory path 572 | * 'json_txt' => The decoded but unparsed JSON from the save file 573 | *
=> Things like item and variable definitions 574 | * 575 | * Produces a context object structured like so: 576 | * { 577 | * 'filename' => Base name of the file (for printing) 578 | * 'savefile' => Full path to the save file 579 | * 'rm_root' => Root RPGMaker directory path 580 | * 'object' => Parsed JSON object 581 | */ 582 | function handle_file_load(filename, context_obj) { 583 | set_text('status', 'Handling file load for ' + filename); 584 | 585 | if (!context_obj) { 586 | console.error('File load failed for ' + filename); 587 | return; 588 | } 589 | let fdata = {}; 590 | let json_txt = context_obj['json_txt']; 591 | fdata['filename'] = filename; 592 | fdata['savefile'] = context_obj['savefile']; 593 | fdata['rm_root'] = context_obj['rm_root']; 594 | fdata['object'] = JSON.parse(json_txt); 595 | 596 | let sections = build_sections(fdata['object'], context_obj); 597 | const content_div = document.getElementById('content'); 598 | 599 | sections.forEach((section) => { 600 | content_div.appendChild(section.create_DOM()); 601 | }); 602 | 603 | build_palette(sections, fdata); 604 | hide_dropzone(); 605 | } 606 | 607 | /* 608 | * Code flows: 609 | * - File load 610 | * drop_handler (renderer.js) => Get the file path 611 | * ipc_bridge.load_json (preload.js) => Send file path to IPC 612 | * load_rm_file (main.js) => Call into rm_load library 613 | * rm_loader.load (rm_load.js) => Read and decode file, return ctx obj 614 | * handle_file_load (renderer.js) => Build the sections, create DOM 615 | * 616 | * - File save 617 | * onclick (build_palette) (renderer.js) 618 | * handle_save (renderer.js) => Update JSON 619 | * ipc_bridge.save_file (preload.js) => Send JSON to IPC 620 | * save_file (main.js) => Call into rm_load library 621 | * rm_loader.save (rm_load.js) => Encode and write the file 622 | * callback (handle_save) (renderer.js) => Write status 623 | * 624 | * "Use electron" they said. "It will make things easy" they said... 625 | */ 626 | 627 | function hide_dropzone() { 628 | const dz = document.getElementById('receive_file'); 629 | dz.classList.add('dropzone-hidden'); 630 | } 631 | 632 | // Handlers for drag 'n' drop 633 | function drop_handler(ev) { 634 | ev.preventDefault(); 635 | for (var i = 0; i < ev.dataTransfer.items.length; ++i) { 636 | if (ev.dataTransfer.items[i].kind === 'file') { 637 | let file = { 638 | path: window.ipc_bridge.path_for_file(ev.dataTransfer.items[i].getAsFile()), 639 | } 640 | 641 | set_text('status', 'Loading file ' + file.path); 642 | window.ipc_bridge.load_file(file.path, handle_file_load); 643 | } 644 | } 645 | } 646 | 647 | function drag_handler(ev) { 648 | ev.preventDefault(); 649 | ev.stopPropagation(); 650 | } 651 | 652 | function click_handler(ev) { 653 | window.ipc_bridge.open_file(handle_file_load); 654 | } 655 | 656 | window.addEventListener('DOMContentLoaded', (event) => { 657 | // Enable drag 'n' drop 658 | let dropzone = document.getElementById('receive_file'); 659 | dropzone.addEventListener('drop', drop_handler); 660 | dropzone.addEventListener('dragover', drag_handler); 661 | dropzone.addEventListener('click', click_handler); 662 | 663 | // Write the footer 664 | const version = window.ipc_bridge.version(); 665 | let footer = document.getElementById('footer'); 666 | footer.textContent = 'RPGMaker Save Editor v' + version; 667 | }); 668 | -------------------------------------------------------------------------------- /js/rm_load.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const fsprom = fs.promises; 3 | const path = require('path'); 4 | 5 | class null_codec { 6 | constructor(rm_root) { 7 | this.rm_root = rm_root; 8 | } 9 | 10 | decode(savefile_path) { 11 | const json = fs.readFileSync(savefile_path, { 12 | encoding: 'utf-8' 13 | }); 14 | return json; 15 | } 16 | 17 | encode(json_str) { 18 | return json_str; 19 | } 20 | } 21 | 22 | class pako_codec { 23 | constructor(pako_path) { 24 | this.pako = require(pako_path); 25 | } 26 | 27 | decode(savefile_path) { 28 | const zipdata = fs.readFileSync(savefile_path, { 29 | encoding: 'utf-8' 30 | }); 31 | const json = this.pako.inflate(zipdata, { 32 | to: "string" 33 | }); 34 | return json; 35 | } 36 | 37 | encode(json_str) { 38 | return this.pako.deflate(json_str, { 39 | to: "string", 40 | level: 1 41 | }); 42 | } 43 | } 44 | 45 | class lz_codec { 46 | constructor(lz_path) { 47 | this.lzstring = require(lz_path); 48 | } 49 | 50 | decode(savefile_path) { 51 | const zipdata = fs.readFileSync(savefile_path, { 52 | encoding: 'utf-8' 53 | }); 54 | const json = this.lzstring.decompressFromBase64(zipdata); 55 | return json; 56 | } 57 | 58 | encode(json_str) { 59 | return this.lzstring.compressToBase64(json_str); 60 | } 61 | } 62 | 63 | function get_rm_root(curr_path) { 64 | // I'm not super familiar with RPGMaker so I don't know if this function is 65 | // 100% reliable. I also don't know if this will work on Windows with its 66 | // weird paths. YOLO 67 | if (fs.existsSync(path.join(curr_path, 'Game')) || 68 | fs.existsSync(path.join(curr_path, 'nw')) || 69 | fs.existsSync(path.join(curr_path, 'Game.exe')) || 70 | fs.existsSync(path.join(curr_path, 'nw.exe'))) { 71 | // This is currently the rm root! 72 | return curr_path; 73 | } 74 | 75 | let updir = path.dirname(curr_path); 76 | if (updir == curr_path) { 77 | // End the recursion 78 | return null; 79 | } 80 | 81 | return get_rm_root(updir); 82 | } 83 | 84 | function build_codec(file_path, rm_root) { 85 | let pakopath = path.join(rm_root, 'js', 'libs', 'pako.min.js'); 86 | let lzpath = path.join(rm_root, 'www', 'js', 'libs', 'lz-string.js'); 87 | let codec = null; 88 | 89 | if (path.extname(file_path) == '.json') { 90 | codec = new null_codec(rm_root); 91 | } else if (fs.existsSync(pakopath)) { 92 | // Build pako decodec 93 | codec = new pako_codec(pakopath); 94 | } else if (fs.existsSync(lzpath)) { 95 | // Build lz-string decodec 96 | codec = new lz_codec(lzpath); 97 | } 98 | 99 | return codec; 100 | } 101 | 102 | /** 103 | * Get the context for the savefile. 104 | * 105 | * A save file needs some context from the game engine to make sense. This 106 | * context is stored in JSON files in certain locations within the game 107 | * directory. This function will pull those files and pass them with the 108 | * savefile data. 109 | */ 110 | function get_context(file_path) { 111 | let context = { 112 | savefile: file_path 113 | }; 114 | 115 | // Find the data directory 116 | let savedir = path.dirname(file_path); 117 | let maindir = path.dirname(savedir); 118 | let datadir = path.join(maindir, 'data'); 119 | if (!fs.existsSync(datadir)) { 120 | console.error('Could not find data dir for ' + file_path); 121 | return {}; 122 | } 123 | 124 | // Load the context 125 | let context_files = { 126 | items: path.join(datadir, 'Items.json'), 127 | armors: path.join(datadir, 'Armors.json'), 128 | weapons: path.join(datadir, 'Weapons.json'), 129 | variables: path.join(datadir, 'System.json') 130 | }; 131 | 132 | Object.entries(context_files).forEach((entry) => { 133 | [key, filepath] = entry; 134 | if (fs.existsSync(filepath)) { 135 | context[key] = fs.readFileSync(filepath, { 136 | encoding: 'utf-8' 137 | }); 138 | } 139 | }); 140 | 141 | return context; 142 | } 143 | 144 | function load(file_path) { 145 | let rm_root = get_rm_root(file_path); 146 | if (rm_root === null) { 147 | console.error('Could not find RPGMaker root dir...aborting'); 148 | // Could possibly prompt user? 149 | return null; 150 | } 151 | let codec = build_codec(file_path, rm_root); 152 | let json = codec.decode(file_path); 153 | let context = get_context(file_path); 154 | 155 | context['json_txt'] = json; 156 | context['rm_root'] = rm_root; 157 | return context; 158 | } 159 | 160 | async function save(file_path, json_str, rm_root) { 161 | let codec = build_codec(file_path, rm_root); 162 | let strdata = codec.encode(json_str); 163 | 164 | try { 165 | await fsprom.writeFile(file_path, strdata); 166 | } catch (err) { 167 | console.log('Error saving file ' + file_path + ': ' + err); 168 | return ''; 169 | } 170 | return file_path; 171 | } 172 | 173 | exports.load = load; 174 | exports.save = save; 175 | exports.get_rm_root = get_rm_root 176 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rpgmaker_save_editor", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "rpgmaker_save_editor", 9 | "version": "1.0.0", 10 | "license": "MIT", 11 | "devDependencies": { 12 | "electron": "^35.1.4" 13 | } 14 | }, 15 | "node_modules/@electron/get": { 16 | "version": "2.0.3", 17 | "resolved": "https://registry.npmjs.org/@electron/get/-/get-2.0.3.tgz", 18 | "integrity": "sha512-Qkzpg2s9GnVV2I2BjRksUi43U5e6+zaQMcjoJy0C+C5oxaKl+fmckGDQFtRpZpZV0NQekuZZ+tGz7EA9TVnQtQ==", 19 | "dev": true, 20 | "license": "MIT", 21 | "dependencies": { 22 | "debug": "^4.1.1", 23 | "env-paths": "^2.2.0", 24 | "fs-extra": "^8.1.0", 25 | "got": "^11.8.5", 26 | "progress": "^2.0.3", 27 | "semver": "^6.2.0", 28 | "sumchecker": "^3.0.1" 29 | }, 30 | "engines": { 31 | "node": ">=12" 32 | }, 33 | "optionalDependencies": { 34 | "global-agent": "^3.0.0" 35 | } 36 | }, 37 | "node_modules/@sindresorhus/is": { 38 | "version": "4.6.0", 39 | "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", 40 | "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", 41 | "dev": true, 42 | "license": "MIT", 43 | "engines": { 44 | "node": ">=10" 45 | }, 46 | "funding": { 47 | "url": "https://github.com/sindresorhus/is?sponsor=1" 48 | } 49 | }, 50 | "node_modules/@szmarczak/http-timer": { 51 | "version": "4.0.6", 52 | "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", 53 | "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", 54 | "dev": true, 55 | "license": "MIT", 56 | "dependencies": { 57 | "defer-to-connect": "^2.0.0" 58 | }, 59 | "engines": { 60 | "node": ">=10" 61 | } 62 | }, 63 | "node_modules/@types/cacheable-request": { 64 | "version": "6.0.3", 65 | "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", 66 | "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", 67 | "dev": true, 68 | "license": "MIT", 69 | "dependencies": { 70 | "@types/http-cache-semantics": "*", 71 | "@types/keyv": "^3.1.4", 72 | "@types/node": "*", 73 | "@types/responselike": "^1.0.0" 74 | } 75 | }, 76 | "node_modules/@types/http-cache-semantics": { 77 | "version": "4.0.4", 78 | "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", 79 | "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", 80 | "dev": true, 81 | "license": "MIT" 82 | }, 83 | "node_modules/@types/keyv": { 84 | "version": "3.1.4", 85 | "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", 86 | "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", 87 | "dev": true, 88 | "license": "MIT", 89 | "dependencies": { 90 | "@types/node": "*" 91 | } 92 | }, 93 | "node_modules/@types/node": { 94 | "version": "22.14.0", 95 | "resolved": "https://registry.npmjs.org/@types/node/-/node-22.14.0.tgz", 96 | "integrity": "sha512-Kmpl+z84ILoG+3T/zQFyAJsU6EPTmOCj8/2+83fSN6djd6I4o7uOuGIH6vq3PrjY5BGitSbFuMN18j3iknubbA==", 97 | "dev": true, 98 | "license": "MIT", 99 | "dependencies": { 100 | "undici-types": "~6.21.0" 101 | } 102 | }, 103 | "node_modules/@types/responselike": { 104 | "version": "1.0.3", 105 | "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz", 106 | "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==", 107 | "dev": true, 108 | "license": "MIT", 109 | "dependencies": { 110 | "@types/node": "*" 111 | } 112 | }, 113 | "node_modules/@types/yauzl": { 114 | "version": "2.10.3", 115 | "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", 116 | "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", 117 | "dev": true, 118 | "license": "MIT", 119 | "optional": true, 120 | "dependencies": { 121 | "@types/node": "*" 122 | } 123 | }, 124 | "node_modules/boolean": { 125 | "version": "3.2.0", 126 | "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz", 127 | "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==", 128 | "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", 129 | "dev": true, 130 | "license": "MIT", 131 | "optional": true 132 | }, 133 | "node_modules/buffer-crc32": { 134 | "version": "0.2.13", 135 | "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", 136 | "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", 137 | "dev": true, 138 | "license": "MIT", 139 | "engines": { 140 | "node": "*" 141 | } 142 | }, 143 | "node_modules/cacheable-lookup": { 144 | "version": "5.0.4", 145 | "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", 146 | "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", 147 | "dev": true, 148 | "license": "MIT", 149 | "engines": { 150 | "node": ">=10.6.0" 151 | } 152 | }, 153 | "node_modules/cacheable-request": { 154 | "version": "7.0.4", 155 | "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", 156 | "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", 157 | "dev": true, 158 | "license": "MIT", 159 | "dependencies": { 160 | "clone-response": "^1.0.2", 161 | "get-stream": "^5.1.0", 162 | "http-cache-semantics": "^4.0.0", 163 | "keyv": "^4.0.0", 164 | "lowercase-keys": "^2.0.0", 165 | "normalize-url": "^6.0.1", 166 | "responselike": "^2.0.0" 167 | }, 168 | "engines": { 169 | "node": ">=8" 170 | } 171 | }, 172 | "node_modules/clone-response": { 173 | "version": "1.0.3", 174 | "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", 175 | "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", 176 | "dev": true, 177 | "license": "MIT", 178 | "dependencies": { 179 | "mimic-response": "^1.0.0" 180 | }, 181 | "funding": { 182 | "url": "https://github.com/sponsors/sindresorhus" 183 | } 184 | }, 185 | "node_modules/debug": { 186 | "version": "4.4.0", 187 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", 188 | "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", 189 | "dev": true, 190 | "license": "MIT", 191 | "dependencies": { 192 | "ms": "^2.1.3" 193 | }, 194 | "engines": { 195 | "node": ">=6.0" 196 | }, 197 | "peerDependenciesMeta": { 198 | "supports-color": { 199 | "optional": true 200 | } 201 | } 202 | }, 203 | "node_modules/decompress-response": { 204 | "version": "6.0.0", 205 | "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", 206 | "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", 207 | "dev": true, 208 | "license": "MIT", 209 | "dependencies": { 210 | "mimic-response": "^3.1.0" 211 | }, 212 | "engines": { 213 | "node": ">=10" 214 | }, 215 | "funding": { 216 | "url": "https://github.com/sponsors/sindresorhus" 217 | } 218 | }, 219 | "node_modules/decompress-response/node_modules/mimic-response": { 220 | "version": "3.1.0", 221 | "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", 222 | "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", 223 | "dev": true, 224 | "license": "MIT", 225 | "engines": { 226 | "node": ">=10" 227 | }, 228 | "funding": { 229 | "url": "https://github.com/sponsors/sindresorhus" 230 | } 231 | }, 232 | "node_modules/defer-to-connect": { 233 | "version": "2.0.1", 234 | "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", 235 | "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", 236 | "dev": true, 237 | "license": "MIT", 238 | "engines": { 239 | "node": ">=10" 240 | } 241 | }, 242 | "node_modules/define-data-property": { 243 | "version": "1.1.4", 244 | "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", 245 | "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", 246 | "dev": true, 247 | "license": "MIT", 248 | "optional": true, 249 | "dependencies": { 250 | "es-define-property": "^1.0.0", 251 | "es-errors": "^1.3.0", 252 | "gopd": "^1.0.1" 253 | }, 254 | "engines": { 255 | "node": ">= 0.4" 256 | }, 257 | "funding": { 258 | "url": "https://github.com/sponsors/ljharb" 259 | } 260 | }, 261 | "node_modules/define-properties": { 262 | "version": "1.2.1", 263 | "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", 264 | "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", 265 | "dev": true, 266 | "license": "MIT", 267 | "optional": true, 268 | "dependencies": { 269 | "define-data-property": "^1.0.1", 270 | "has-property-descriptors": "^1.0.0", 271 | "object-keys": "^1.1.1" 272 | }, 273 | "engines": { 274 | "node": ">= 0.4" 275 | }, 276 | "funding": { 277 | "url": "https://github.com/sponsors/ljharb" 278 | } 279 | }, 280 | "node_modules/detect-node": { 281 | "version": "2.1.0", 282 | "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", 283 | "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", 284 | "dev": true, 285 | "license": "MIT", 286 | "optional": true 287 | }, 288 | "node_modules/electron": { 289 | "version": "35.1.4", 290 | "resolved": "https://registry.npmjs.org/electron/-/electron-35.1.4.tgz", 291 | "integrity": "sha512-8HjE2wqxY//T09Of8k1eTpK/NeTG2FkTyRD+fyKXmec4wZVscGgZcmWFC0HYN4ktyHAjtplpxdFXjtqRnvzBMg==", 292 | "dev": true, 293 | "hasInstallScript": true, 294 | "license": "MIT", 295 | "dependencies": { 296 | "@electron/get": "^2.0.0", 297 | "@types/node": "^22.7.7", 298 | "extract-zip": "^2.0.1" 299 | }, 300 | "bin": { 301 | "electron": "cli.js" 302 | }, 303 | "engines": { 304 | "node": ">= 12.20.55" 305 | } 306 | }, 307 | "node_modules/end-of-stream": { 308 | "version": "1.4.4", 309 | "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", 310 | "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", 311 | "dev": true, 312 | "license": "MIT", 313 | "dependencies": { 314 | "once": "^1.4.0" 315 | } 316 | }, 317 | "node_modules/env-paths": { 318 | "version": "2.2.1", 319 | "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", 320 | "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", 321 | "dev": true, 322 | "license": "MIT", 323 | "engines": { 324 | "node": ">=6" 325 | } 326 | }, 327 | "node_modules/es-define-property": { 328 | "version": "1.0.1", 329 | "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", 330 | "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", 331 | "dev": true, 332 | "license": "MIT", 333 | "optional": true, 334 | "engines": { 335 | "node": ">= 0.4" 336 | } 337 | }, 338 | "node_modules/es-errors": { 339 | "version": "1.3.0", 340 | "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", 341 | "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", 342 | "dev": true, 343 | "license": "MIT", 344 | "optional": true, 345 | "engines": { 346 | "node": ">= 0.4" 347 | } 348 | }, 349 | "node_modules/es6-error": { 350 | "version": "4.1.1", 351 | "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", 352 | "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", 353 | "dev": true, 354 | "license": "MIT", 355 | "optional": true 356 | }, 357 | "node_modules/escape-string-regexp": { 358 | "version": "4.0.0", 359 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 360 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 361 | "dev": true, 362 | "license": "MIT", 363 | "optional": true, 364 | "engines": { 365 | "node": ">=10" 366 | }, 367 | "funding": { 368 | "url": "https://github.com/sponsors/sindresorhus" 369 | } 370 | }, 371 | "node_modules/extract-zip": { 372 | "version": "2.0.1", 373 | "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", 374 | "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", 375 | "dev": true, 376 | "license": "BSD-2-Clause", 377 | "dependencies": { 378 | "debug": "^4.1.1", 379 | "get-stream": "^5.1.0", 380 | "yauzl": "^2.10.0" 381 | }, 382 | "bin": { 383 | "extract-zip": "cli.js" 384 | }, 385 | "engines": { 386 | "node": ">= 10.17.0" 387 | }, 388 | "optionalDependencies": { 389 | "@types/yauzl": "^2.9.1" 390 | } 391 | }, 392 | "node_modules/fd-slicer": { 393 | "version": "1.1.0", 394 | "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", 395 | "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", 396 | "dev": true, 397 | "license": "MIT", 398 | "dependencies": { 399 | "pend": "~1.2.0" 400 | } 401 | }, 402 | "node_modules/fs-extra": { 403 | "version": "8.1.0", 404 | "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", 405 | "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", 406 | "dev": true, 407 | "license": "MIT", 408 | "dependencies": { 409 | "graceful-fs": "^4.2.0", 410 | "jsonfile": "^4.0.0", 411 | "universalify": "^0.1.0" 412 | }, 413 | "engines": { 414 | "node": ">=6 <7 || >=8" 415 | } 416 | }, 417 | "node_modules/get-stream": { 418 | "version": "5.2.0", 419 | "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", 420 | "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", 421 | "dev": true, 422 | "license": "MIT", 423 | "dependencies": { 424 | "pump": "^3.0.0" 425 | }, 426 | "engines": { 427 | "node": ">=8" 428 | }, 429 | "funding": { 430 | "url": "https://github.com/sponsors/sindresorhus" 431 | } 432 | }, 433 | "node_modules/global-agent": { 434 | "version": "3.0.0", 435 | "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-3.0.0.tgz", 436 | "integrity": "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==", 437 | "dev": true, 438 | "license": "BSD-3-Clause", 439 | "optional": true, 440 | "dependencies": { 441 | "boolean": "^3.0.1", 442 | "es6-error": "^4.1.1", 443 | "matcher": "^3.0.0", 444 | "roarr": "^2.15.3", 445 | "semver": "^7.3.2", 446 | "serialize-error": "^7.0.1" 447 | }, 448 | "engines": { 449 | "node": ">=10.0" 450 | } 451 | }, 452 | "node_modules/global-agent/node_modules/semver": { 453 | "version": "7.7.1", 454 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", 455 | "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", 456 | "dev": true, 457 | "license": "ISC", 458 | "optional": true, 459 | "bin": { 460 | "semver": "bin/semver.js" 461 | }, 462 | "engines": { 463 | "node": ">=10" 464 | } 465 | }, 466 | "node_modules/globalthis": { 467 | "version": "1.0.4", 468 | "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", 469 | "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", 470 | "dev": true, 471 | "license": "MIT", 472 | "optional": true, 473 | "dependencies": { 474 | "define-properties": "^1.2.1", 475 | "gopd": "^1.0.1" 476 | }, 477 | "engines": { 478 | "node": ">= 0.4" 479 | }, 480 | "funding": { 481 | "url": "https://github.com/sponsors/ljharb" 482 | } 483 | }, 484 | "node_modules/gopd": { 485 | "version": "1.2.0", 486 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", 487 | "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", 488 | "dev": true, 489 | "license": "MIT", 490 | "optional": true, 491 | "engines": { 492 | "node": ">= 0.4" 493 | }, 494 | "funding": { 495 | "url": "https://github.com/sponsors/ljharb" 496 | } 497 | }, 498 | "node_modules/got": { 499 | "version": "11.8.6", 500 | "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", 501 | "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", 502 | "dev": true, 503 | "license": "MIT", 504 | "dependencies": { 505 | "@sindresorhus/is": "^4.0.0", 506 | "@szmarczak/http-timer": "^4.0.5", 507 | "@types/cacheable-request": "^6.0.1", 508 | "@types/responselike": "^1.0.0", 509 | "cacheable-lookup": "^5.0.3", 510 | "cacheable-request": "^7.0.2", 511 | "decompress-response": "^6.0.0", 512 | "http2-wrapper": "^1.0.0-beta.5.2", 513 | "lowercase-keys": "^2.0.0", 514 | "p-cancelable": "^2.0.0", 515 | "responselike": "^2.0.0" 516 | }, 517 | "engines": { 518 | "node": ">=10.19.0" 519 | }, 520 | "funding": { 521 | "url": "https://github.com/sindresorhus/got?sponsor=1" 522 | } 523 | }, 524 | "node_modules/graceful-fs": { 525 | "version": "4.2.11", 526 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", 527 | "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", 528 | "dev": true, 529 | "license": "ISC" 530 | }, 531 | "node_modules/has-property-descriptors": { 532 | "version": "1.0.2", 533 | "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", 534 | "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", 535 | "dev": true, 536 | "license": "MIT", 537 | "optional": true, 538 | "dependencies": { 539 | "es-define-property": "^1.0.0" 540 | }, 541 | "funding": { 542 | "url": "https://github.com/sponsors/ljharb" 543 | } 544 | }, 545 | "node_modules/http-cache-semantics": { 546 | "version": "4.1.1", 547 | "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", 548 | "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", 549 | "dev": true, 550 | "license": "BSD-2-Clause" 551 | }, 552 | "node_modules/http2-wrapper": { 553 | "version": "1.0.3", 554 | "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", 555 | "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", 556 | "dev": true, 557 | "license": "MIT", 558 | "dependencies": { 559 | "quick-lru": "^5.1.1", 560 | "resolve-alpn": "^1.0.0" 561 | }, 562 | "engines": { 563 | "node": ">=10.19.0" 564 | } 565 | }, 566 | "node_modules/json-buffer": { 567 | "version": "3.0.1", 568 | "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", 569 | "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", 570 | "dev": true, 571 | "license": "MIT" 572 | }, 573 | "node_modules/json-stringify-safe": { 574 | "version": "5.0.1", 575 | "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", 576 | "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", 577 | "dev": true, 578 | "license": "ISC", 579 | "optional": true 580 | }, 581 | "node_modules/jsonfile": { 582 | "version": "4.0.0", 583 | "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", 584 | "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", 585 | "dev": true, 586 | "license": "MIT", 587 | "optionalDependencies": { 588 | "graceful-fs": "^4.1.6" 589 | } 590 | }, 591 | "node_modules/keyv": { 592 | "version": "4.5.4", 593 | "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", 594 | "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", 595 | "dev": true, 596 | "license": "MIT", 597 | "dependencies": { 598 | "json-buffer": "3.0.1" 599 | } 600 | }, 601 | "node_modules/lowercase-keys": { 602 | "version": "2.0.0", 603 | "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", 604 | "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", 605 | "dev": true, 606 | "license": "MIT", 607 | "engines": { 608 | "node": ">=8" 609 | } 610 | }, 611 | "node_modules/matcher": { 612 | "version": "3.0.0", 613 | "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz", 614 | "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==", 615 | "dev": true, 616 | "license": "MIT", 617 | "optional": true, 618 | "dependencies": { 619 | "escape-string-regexp": "^4.0.0" 620 | }, 621 | "engines": { 622 | "node": ">=10" 623 | } 624 | }, 625 | "node_modules/mimic-response": { 626 | "version": "1.0.1", 627 | "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", 628 | "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", 629 | "dev": true, 630 | "license": "MIT", 631 | "engines": { 632 | "node": ">=4" 633 | } 634 | }, 635 | "node_modules/ms": { 636 | "version": "2.1.3", 637 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 638 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 639 | "dev": true, 640 | "license": "MIT" 641 | }, 642 | "node_modules/normalize-url": { 643 | "version": "6.1.0", 644 | "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", 645 | "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", 646 | "dev": true, 647 | "license": "MIT", 648 | "engines": { 649 | "node": ">=10" 650 | }, 651 | "funding": { 652 | "url": "https://github.com/sponsors/sindresorhus" 653 | } 654 | }, 655 | "node_modules/object-keys": { 656 | "version": "1.1.1", 657 | "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", 658 | "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", 659 | "dev": true, 660 | "license": "MIT", 661 | "optional": true, 662 | "engines": { 663 | "node": ">= 0.4" 664 | } 665 | }, 666 | "node_modules/once": { 667 | "version": "1.4.0", 668 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 669 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", 670 | "dev": true, 671 | "license": "ISC", 672 | "dependencies": { 673 | "wrappy": "1" 674 | } 675 | }, 676 | "node_modules/p-cancelable": { 677 | "version": "2.1.1", 678 | "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", 679 | "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", 680 | "dev": true, 681 | "license": "MIT", 682 | "engines": { 683 | "node": ">=8" 684 | } 685 | }, 686 | "node_modules/pend": { 687 | "version": "1.2.0", 688 | "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", 689 | "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", 690 | "dev": true, 691 | "license": "MIT" 692 | }, 693 | "node_modules/progress": { 694 | "version": "2.0.3", 695 | "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", 696 | "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", 697 | "dev": true, 698 | "license": "MIT", 699 | "engines": { 700 | "node": ">=0.4.0" 701 | } 702 | }, 703 | "node_modules/pump": { 704 | "version": "3.0.2", 705 | "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", 706 | "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", 707 | "dev": true, 708 | "license": "MIT", 709 | "dependencies": { 710 | "end-of-stream": "^1.1.0", 711 | "once": "^1.3.1" 712 | } 713 | }, 714 | "node_modules/quick-lru": { 715 | "version": "5.1.1", 716 | "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", 717 | "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", 718 | "dev": true, 719 | "license": "MIT", 720 | "engines": { 721 | "node": ">=10" 722 | }, 723 | "funding": { 724 | "url": "https://github.com/sponsors/sindresorhus" 725 | } 726 | }, 727 | "node_modules/resolve-alpn": { 728 | "version": "1.2.1", 729 | "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", 730 | "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", 731 | "dev": true, 732 | "license": "MIT" 733 | }, 734 | "node_modules/responselike": { 735 | "version": "2.0.1", 736 | "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", 737 | "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", 738 | "dev": true, 739 | "license": "MIT", 740 | "dependencies": { 741 | "lowercase-keys": "^2.0.0" 742 | }, 743 | "funding": { 744 | "url": "https://github.com/sponsors/sindresorhus" 745 | } 746 | }, 747 | "node_modules/roarr": { 748 | "version": "2.15.4", 749 | "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz", 750 | "integrity": "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==", 751 | "dev": true, 752 | "license": "BSD-3-Clause", 753 | "optional": true, 754 | "dependencies": { 755 | "boolean": "^3.0.1", 756 | "detect-node": "^2.0.4", 757 | "globalthis": "^1.0.1", 758 | "json-stringify-safe": "^5.0.1", 759 | "semver-compare": "^1.0.0", 760 | "sprintf-js": "^1.1.2" 761 | }, 762 | "engines": { 763 | "node": ">=8.0" 764 | } 765 | }, 766 | "node_modules/semver": { 767 | "version": "6.3.1", 768 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", 769 | "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", 770 | "dev": true, 771 | "license": "ISC", 772 | "bin": { 773 | "semver": "bin/semver.js" 774 | } 775 | }, 776 | "node_modules/semver-compare": { 777 | "version": "1.0.0", 778 | "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", 779 | "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==", 780 | "dev": true, 781 | "license": "MIT", 782 | "optional": true 783 | }, 784 | "node_modules/serialize-error": { 785 | "version": "7.0.1", 786 | "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz", 787 | "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==", 788 | "dev": true, 789 | "license": "MIT", 790 | "optional": true, 791 | "dependencies": { 792 | "type-fest": "^0.13.1" 793 | }, 794 | "engines": { 795 | "node": ">=10" 796 | }, 797 | "funding": { 798 | "url": "https://github.com/sponsors/sindresorhus" 799 | } 800 | }, 801 | "node_modules/sprintf-js": { 802 | "version": "1.1.3", 803 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", 804 | "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", 805 | "dev": true, 806 | "license": "BSD-3-Clause", 807 | "optional": true 808 | }, 809 | "node_modules/sumchecker": { 810 | "version": "3.0.1", 811 | "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz", 812 | "integrity": "sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==", 813 | "dev": true, 814 | "license": "Apache-2.0", 815 | "dependencies": { 816 | "debug": "^4.1.0" 817 | }, 818 | "engines": { 819 | "node": ">= 8.0" 820 | } 821 | }, 822 | "node_modules/type-fest": { 823 | "version": "0.13.1", 824 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", 825 | "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", 826 | "dev": true, 827 | "license": "(MIT OR CC0-1.0)", 828 | "optional": true, 829 | "engines": { 830 | "node": ">=10" 831 | }, 832 | "funding": { 833 | "url": "https://github.com/sponsors/sindresorhus" 834 | } 835 | }, 836 | "node_modules/undici-types": { 837 | "version": "6.21.0", 838 | "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", 839 | "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", 840 | "dev": true, 841 | "license": "MIT" 842 | }, 843 | "node_modules/universalify": { 844 | "version": "0.1.2", 845 | "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", 846 | "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", 847 | "dev": true, 848 | "license": "MIT", 849 | "engines": { 850 | "node": ">= 4.0.0" 851 | } 852 | }, 853 | "node_modules/wrappy": { 854 | "version": "1.0.2", 855 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 856 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", 857 | "dev": true, 858 | "license": "ISC" 859 | }, 860 | "node_modules/yauzl": { 861 | "version": "2.10.0", 862 | "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", 863 | "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", 864 | "dev": true, 865 | "license": "MIT", 866 | "dependencies": { 867 | "buffer-crc32": "~0.2.3", 868 | "fd-slicer": "~1.1.0" 869 | } 870 | } 871 | } 872 | } 873 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RPGMaker Save Editor", 3 | "version": "1.0.0", 4 | "description": "Save file editor for RPGMaker games", 5 | "main": "js/main.js", 6 | "scripts": { 7 | "start": "electron ." 8 | }, 9 | "author": "Nathan Baker", 10 | "license": "MIT", 11 | "devDependencies": { 12 | "electron": "^35.1.4" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /styles.css: -------------------------------------------------------------------------------- 1 | div.dropzone { 2 | background-color: green; 3 | } 4 | 5 | div.dropzone-hidden { 6 | display: none; 7 | } 8 | 9 | p.droptext { 10 | text-align: center; 11 | color: white; 12 | background-color: inherit; 13 | } 14 | 15 | p.label { 16 | text-align: right; 17 | } 18 | 19 | div.palette { 20 | position: fixed; 21 | bottom: 5px; 22 | right: 30px; 23 | z-index: 99; 24 | border: 2px solid lightblue; 25 | border-radius: 5px; 26 | padding: 15px; 27 | 28 | display: grid; 29 | grid-auto-flow: column; 30 | grid-gap: 10px; 31 | } 32 | 33 | div.status { 34 | position: fixed; 35 | bottom: 5px; 36 | left: 10px; 37 | z-index: 99; 38 | border: 2px solid lightblue; 39 | border-radius: 5px; 40 | background-color: white; 41 | } 42 | 43 | div.extras { 44 | padding-top: 5px; 45 | } 46 | 47 | button.palette-button { 48 | 49 | } 50 | 51 | .character-name { 52 | text-align: center; 53 | } 54 | 55 | .section-header { 56 | 57 | } 58 | 59 | .expanded::before { 60 | content: '\25BC'; 61 | padding-right: 10px; 62 | padding-left: 0px; 63 | } 64 | 65 | .collapsed::before { 66 | content: '\25B8'; 67 | padding-right: 10px; 68 | padding-left: 0px; 69 | } 70 | 71 | div.content { 72 | text-align: left; 73 | display: grid; 74 | } 75 | 76 | div.section { 77 | 78 | } 79 | 80 | div.section-content { 81 | display: grid; 82 | grid-template-columns: repeat(auto-fit, 320px); 83 | grid-row-gap: 5px; 84 | } 85 | 86 | div.section-hidden { 87 | display: none; 88 | } 89 | 90 | div.character-content { 91 | grid-template-columns: repeat(auto-fit, 175px); 92 | grid-row-gap: 0px; 93 | } 94 | 95 | div.item { 96 | display: grid; 97 | grid-column-gap: 10px; 98 | grid-template-columns: 150px 150px; 99 | grid-auto-rows: 2em; 100 | align-items: center; 101 | } 102 | 103 | div.character-item { 104 | /* Override column sizes from item above */ 105 | grid-template-columns: 100px 75px; 106 | } 107 | 108 | input.value { 109 | line-height: 2em; 110 | } 111 | --------------------------------------------------------------------------------