So I was wondering if it's possible to have the enemy duplicate and edit save files.

I was wondering if it would be possible for an enemy to duplicate your save file then delete the original and modify the new one. For example add distractions to their battle to make it more difficult. Or maybe just generally modify your save files so it's as if you did stuff that you didn't. Maybe the player would have to manually delete stuff from the game to win similar to ddlc.

I already have a plugin that would allow you to delete save files but is there something like what I have described ?

In summary just being able to modify the players save files.

It's pretty common in most games where the player can get multiple endings so I was wondering if it's possible in RPG maker mz
Everything the player has done is kept track of by you, the developer, in some way. Either you're using switches, or self switches, or variables to track game progress. There is no need to change any save file. Modifying them is dangerous, one mistake in code and the whole thing doesn't work anymore at all, and speaking as a player, if I'm a couple of hours into a game and it broke my save file, it'd have to be a real interesting game to make we want to start over again.

Use common events, modify your switches/variables/in game items/etc using that, leave the save file alone, and attach the common event to the skill the monster uses.
Everything the player has done is kept track of by you, the developer, in some way. Either you're using switches, or self switches, or variables to track game progress. There is no need to change any save file. Modifying them is dangerous, one mistake in code and the whole thing doesn't work anymore at all, and speaking as a player, if I'm a couple of hours into a game and it broke my save file, it'd have to be a real interesting game to make we want to start over again.

Use common events, modify your switches/variables/in game items/etc using that, leave the save file alone, and attach the common event to the skill the monster uses.
I have made sure to tell the player in the game to always use multiple save files so as long as the player listens then they should be fine and come back somewhere closer to the battle. This is for a boss battle by the way and thank you
It can only be done with javascript knowledge and has a big problem added:
Most player's antivirus will prevent certain file operations, because to an antivirus there is no difference between a HTML5-game modifying files and a website infecting the computer with a virus.

Because that is how the websites do that - writing on your computer without your knowledge.
And depending on the specific computer's security settings that might be blocked completely.


Just for clarification: in your other topic you asked for creating a file, not modifying an existing file. Modifying requires reading the file, and that is blocked again to prevent spying compared to writing a new file.
It can only be done with javascript knowledge and has a big problem added:
Most player's antivirus will prevent certain file operations, because to an antivirus there is no difference between a HTML5-game modifying files and a website infecting the computer with a virus.

Because that is how the websites do that - writing on your computer without your knowledge.
And depending on the specific computer's security settings that might be blocked completely.


Just for clarification: in your other topic you asked for creating a file, not modifying an existing file. Modifying requires reading the file, and that is blocked again to prevent spying compared to writing a new file.
I see thank you
Most player's antivirus will prevent certain file operations, because to an antivirus there is no difference between a HTML5-game modifying files and a website infecting the computer with a virus.

Because that is how the websites do that - writing on your computer without your knowledge.
And depending on the specific computer's security settings that might be blocked completely.


Just for clarification: in your other topic you asked for creating a file, not modifying an existing file. Modifying requires reading the file, and that is blocked again to prevent spying compared to writing a new file.
That's not really true, as least when it comes to save data.

In case of browser games, you're of course not allowed direct access to the user's filesystem, but you don't need it. Save data is stored in the browser's localstorage, to modify it you interface with the browser in exactly the save way as when saving/loading the game. Every website has complete control over its data that's stored there.

In case of local games, if a user somehow had antivirus settings this aggressive they wouldn't be able to save the game in the first place. In order to save the game in an existing slot, you need to:
1. Read the contents of that file
2. Create a new file that's a backup of the existing one (in case the next step fails midway)
3. Overwrite the existing file with new save data
4. Delete the backup file (if step 3 was successful)
Manipulating these files the way OP asks for is no different. In fact, they can probably do this using existing functions for loading and saving the game.
That and you if weren't allowed to read files, your game wouldn't be able to start in the first place


With that aside, I think the simplest way to do this is to use an autosave plugin if you don't want to use JavaScript for it. Instead of duplicating the save file, deleting the original and modifying the new one, simply modify the existing one and force a save with an autosave plugin. For added effect you can use plugins that modify how saves look like to make it appear as if the enemy saved the game and not the player.

Original thread: https://forums.rpgmakerweb.com/threads/so-i-was-wondering-if-its-possible-to-have-the-enemy-duplicate-and-edit-save-files.162548/