Is it possible for, if the player loses a boss battle a certain amount of times, a photo will be put in their save file or maybe a folder will be made

I want to make something so that if the player loses the boss fight a certain amount of times, a file will be created with pictures of the enemy mocking them.

How would I go towards doing that ?
the first partz is easy: in the boss event with the battle processing, have a variable be counted in the "can lose" branch and check how high it is afterwards.

The second part is possible but requires javascript knowledge to create and write the file, and I can't help there.
the first partz is easy: in the boss event with the battle processing, have a variable be counted in the "can lose" branch and check how high it is afterwards.

The second part is possible but requires javascript knowledge to create and write the file, and I can't help there.
Thank you anyway
Where is the picture coming from? It would have to be in the game files somewhere. Also, how do you want the player to see it?
I could see the save file version of your ask happening if you use a Save plugin like CGMZ_SaveFile .


Would take some JS, but Should be doable
Where is the picture coming from? It would have to be in the game files somewhere. Also, how do you want the player to see it?
I want so that it will appear in the game files after the player loses a battle a certain amount of times, and it will be an Easter egg meaning they have to manually checked the game files to do it

I could see the save file version of your ask happening if you use a Save plugin like CGMZ_SaveFile .


Would take some JS, but Should be doable
Alright thank you
I want so that it will appear in the game files after the player loses a battle a certain amount of times, and it will be an Easter egg meaning they have to manually checked the game files to do it
Then wouldn't it already be in the game files somewhere, you would just move it to the save folder? Or is this an online/browser game and you want to download an image to the player's PC?
Then wouldn't it already be in the game files somewhere, you would just move it to the save folder? Or is this an online/browser game and you want to download an image to the player's PC?
The game will be a downloaded game, and if the only way is for the photos to be in the game files already,then the question would be is there a way for the images to be hidden meaning the player can't see it until they lose a certain amount of times?
The game will be a downloaded game, and if the only way is for the photos to be in the game files already,then the question would be is there a way for the images to be hidden meaning the player can't see it until they lose a certain amount of times?
Depending on how you wanna do it, this could be super easy. If you want the picture to be an item that the player selects from the inventory that is easy. You can just silently put an item into the player's inventory with eventing and when the player selects the item, have the item's effect show the picture.
Depending on how you wanna do it, this could be super easy. If you want the picture to be an item that the player selects from the inventory that is easy. You can just silently put an item into the player's inventory with eventing and when the player selects the item, have the item's effect show the picture.
I will probably do this if manual selection won't work, but is there a way to hide the image in game files until they lose 100 times?
I will probably do this if manual selection won't work, but is there a way to hide the image in game files until they lose 100 times?
This sounds like a security risk.

Probably the safest and easiest way to do this is to hide the relevant file in the game's pictures folder (so somewhere they would never think to check) and then copy it into the save folder.

Doki Doki Literature Club the visual novel did something like this more than once, and also reacted if it couldn't find certain game files. But even these were possible security risks (such as using the 'eval' command in JavaScript without knowing that someone can pass malicious code to the game using it improperly in a plugin)

What I don't know when the javascript is involved is:

1) If this can move files outside the folder structure the game project already specifies in the corescripts (probably can because plugins exist at all)

2) How this will work if you copy the file into a save folder when the file itself is already encrypted in the RPGMaker project on release, e.g. the file copied into the save folder could still be encrypted which does no good.

This is just theorycrafting but it seems like editing the save file image (such as the actor portrait) might be an easier and more clever way of achieving the same effect, with a switch to stop messing with the save file image later.

A key item is probably a more elegant way to go about this unless your game is specifically going for some meta humor/effect like DDLC did though. A key item would also require no javascript, just a variable to track 100 losses. The player is also much more likely to stumble on it, but 100 losses still keeps it as an easter egg hidden by the final product encryption.
This sounds like a security risk.

Probably the safest and easiest way to do this is to hide the relevant file in the game's pictures folder (so somewhere they would never think to check) and then copy it into the save folder.

Doki Doki Literature Club the visual novel did something like this more than once, and also reacted if it couldn't find certain game files. But even these were possible security risks (such as using the 'eval' command in JavaScript without knowing that someone can pass malicious code to the game using it improperly in a plugin)

What I don't know when the javascript is involved is:

1) If this can move files outside the folder structure the game project already specifies in the corescripts (probably can because plugins exist at all)

2) How this will work if you copy the file into a save folder when the file itself is already encrypted in the RPGMaker project on release, e.g. the file copied into the save folder could still be encrypted which does no good.

This is just theorycrafting but it seems like editing the save file image (such as the actor portrait) might be an easier and more clever way of achieving the same effect, with a switch to stop messing with the save file image later.

A key item is probably a more elegant way to go about this unless your game is specifically going for some meta humor/effect like DDLC did though. A key item would also require no javascript, just a variable to track 100 losses. The player is also much more likely to stumble on it, but 100 losses still keeps it as an easter egg hidden by the final product encryption.
Doki doki is actually my inspiration for this lol. If this is true, then I would probably edit the saved file image. If I was to do that do you have an idea how ?

I could see the save file version of your ask happening if you use a Save plugin like CGMZ_SaveFile .


Would take some JS, but Should be doable
Could you add more context to that please ?
I will probably do this if manual selection won't work, but is there a way to hide the image in game files until they lose 100 times?
By hide in the game files, you mean make it so people can't just brows the files in explorer? There sure is, but it's 100% outside of your personal abilities.
By hide in the game files, you mean make it so people can't just brows the files in explorer? There sure is, but it's 100% outside of your personal abilities.
That was why I suggested doing this as a silently added key item instead.

It's entirely possible to in an event just +1 a key item that is scripted to display this taunting photo when a tracked variable hits 100, without giving the player a message stating they had the item added to their inventory.

It preserves it inside the project (because if the project is paid it will be compiled encrypted), it's less of a potential security risk (by passing the game malicious code using a modified version of the external file) and it preserves the feel the user is going for even if it's meta-humor.

With DDLC you had to intentionally have a reason to be browsing the game folder to find this, and then the light bulb would go on in your head if you couldn't progress in DDLC to do things like remove .chr files (whereupon if the game checks for the presence of the file it would not error out but rather branch to a different path for more meta consequences). In RPGMaker terms in order for this method to work with an unencrypted project, it would have to track variables in global.sav and such, something most games already do for things like recollection mode and NG+.

Unfortunately the way DDLC implemented this was also a security risk. For an RPGMaker game that will be encrypted anyway, it's simpler to silently add in a key item and make it clear why the user got said key item. It would still have the same effect as stumbling over it browsing the game's project folder without decrypting the project, and the project's encryption would hide the image file from the user appropriately until the easter egg is triggered.

Anything other than what I described is both beyond the user's technical capability but also overthinking the issue and risking making the project unstable if a file path error occurs. It's not one of those things that can be told to the user 'how' to do this without going into a long lecture on the 'why' and I'm getting pretty close already.
What if I hide it in another file like actors file for example, then It gets moved to a more obvious file
By hide in the game files, you mean make it so people can't just brows the files in explorer? There sure is, but it's 100% outside of your personal
Maybe there's a way to have the base parts of the picture in the game files, then have the game compile them all through layers, text, and event placements on a map, then screencap that map and save the screenshot compilation.
Maybe there's a way to have the base parts of the picture in the game files, then have the game compile them all through layers, text, and event placements on a map, then screencap that map and save the screenshot compilation.
I don't exactly know how to do that but thanks. Would it work if I hid the photos in a folder they wouldn't expect or can't access, then the photo gets moved from that folder into a different more obvious one after they lose 100 times ?
That was why I suggested doing this as a silently added key item instead.

It's entirely possible to in an event just +1 a key item that is scripted to display this taunting photo when a tracked variable hits 100, without giving the player a message stating they had the item added to their inventory.

It preserves it inside the project (because if the project is paid it will be compiled encrypted), it's less of a potential security risk (by passing the game malicious code using a modified version of the external file) and it preserves the feel the user is going for even if it's meta-humor.

With DDLC you had to intentionally have a reason to be browsing the game folder to find this, and then the light bulb would go on in your head if you couldn't progress in DDLC to do things like remove .chr files (whereupon if the game checks for the presence of the file it would not error out but rather branch to a different path for more meta consequences). In RPGMaker terms in order for this method to work with an unencrypted project, it would have to track variables in global.sav and such, something most games already do for things like recollection mode and NG+.

Unfortunately the way DDLC implemented this was also a security risk. For an RPGMaker game that will be encrypted anyway, it's simpler to silently add in a key item and make it clear why the user got said key item. It would still have the same effect as stumbling over it browsing the game's project folder without decrypting the project, and the project's encryption would hide the image file from the user appropriately until the easter egg is triggered.

Anything other than what I described is both beyond the user's technical capability but also overthinking the issue and risking making the project unstable if a file path error occurs. It's not one of those things that can be told to the user 'how' to do this without going into a long lecture on the 'why' and I'm getting pretty close already.
I see them I will probably do the key item then, thanks
What if I hide it in another file like actors file for example, then It gets moved to a more obvious file
If you want to completely prevent a player from finding it inside the game files itself, well then you can't. (Not that I mean it's impossible, just you specifically have about a year of study to get there.
If you want to completely prevent a player from finding it inside the game files itself, well then you can't. (Not that I mean it's impossible, just you specifically have about a year of study to get there.
Can an event be made that changes the file location then when they get to 100?

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-for-if-the-player-loses-a-boss-battle-a-certain-amount-of-times-a-photo-will-be-put-in-their-save-file-or-maybe-a-folder-will-be-made.162549/