• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Custom Feature Question] Constant resetting penalty

32
Posts
8
Years
    • Seen May 6, 2020
    In my quest to make a difficult pokemon game with consequences, I realized/remembered that players could mitigate most of the difficulty in the game through resets.

    So I was wondering if there was a way to curb that by creating a cost associated with resetting the game. Something like, when you restart, it costs the player 5% of their money, then saves the game.

    Something to that effect.

    In a perfect world, I could do something like negate the penalty if you have obtained a new badge since the last reset or something like that, but anything helps.
     

    Poq

    144
    Posts
    6
    Years
    • Seen Aug 28, 2021
    The problem with this is how can you tell when someone is resetting versus when they just need to save and come back later. As an alternative, you could make the game autosave after a loss or after key plot points so that resetting is pointless. Either way, you'll probably annoy your players, but that's part of what challenging games inevitably do anyway.
     
    87
    Posts
    7
    Years
    • Seen Nov 22, 2023
    In PScreen_PauseMenu, search for "if screen.pbSaveScreen"
    Note: There will be two places, paste the following under BOTH places.
    Code:
    # Player is charged a 5% fee for saving
    if $game_variables[27]>=1
         $game_variables[27]-=1
    else
         $Trainer.money-=($Trainer.money*5/100)
    end

    Notice two things.
    1. I am using variable 27 as a check to see whether the fee will be imposed or not.
    Think of these as free passes. Perhaps a player can earn these, or as you mentioned, earn 1 whenever they defeat a gym leader - it is up to you.

    2. By using ($Trainer.money*5/100), there is a 5% fee. You can modify that value to your liking.



    A personal note on how you should approach this.
    The idea is great but as mentioned by Poq, it can be a nuisance.
    Perhaps only enable the variable (set it to 0), whenever the player enters a map that is abusable by resetting.
    Disable the variable (set it to any value greater than 0), whenever the player is in any regular map.

    Updated the script to include a proper check.
     
    Last edited:
    1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    The problem with this is how can you tell when someone is resetting versus when they just need to save and come back later. As an alternative, you could make the game autosave after a loss or after key plot points so that resetting is pointless. Either way, you'll probably annoy your players, but that's part of what challenging games inevitably do anyway.

    Simple! Just remove Save and only provide Save+Quit, there were plenty of games in the past that worked like this (and maybe some still do, I dunno).

    Delete the save file immediately after the player chooses continue… Or more seriously you can set a variable and save the game whenever the player continues, unset that variable when they use save+quit, and check if that variable is set when they continue (to detect soft-resetting without catching "legitimate" saving).
     
    32
    Posts
    8
    Years
    • Seen May 6, 2020
    To be honest, I think that there's no perfect solution, but I can bite the bullet and accept it being a mild nuisance.

    Also, the problem isn't the Save itself, it's loading the game over and over again off of *one* save.

    Disabling saves before entering a long area would work, actually, but only if the hard area is long enough that saving just outside of it is not trivial. So I think it can't work for me here.

    //

    To avoid this issue of it being a punishment for people who just need a break, the penalty could be especially small. Maybe 2%? Just enough that it deters people from resetting like 12 times, but not so bad that people feel punished for needing to go to class.

    //

    So, it would probably need to be like this:
    Every time you start the game, you lose ~2% and then it autosaves. I think that works?
     
    Last edited:
    1,805
    Posts
    7
    Years
  • Also, the problem isn't the Save itself, it's loading the game over and over again off of *one* save.

    Unless people have this game open constantly there is no reason for that! Even on challenging games you're given multiple attempts to solve a challenging puzzle. If you want just make it a nuzlocke and put in hard level cap for each area so people just don't have to grind to be stronker than the competition.

    Code:
    To avoid this issue of it being a punishment for people who just need a break, the penalty could be especially small. Maybe 2%? Just enough that it deters people from resetting like 12 times, but not so bad that people feel punished for needing to go to class.
    
    So, it would probably need to be like this:
    Every time you start the game, you lose ~2% and then it autosaves. I think that works?

    that's still a lot of game money. games are meant to be played over and over, and even on the most hardcore games on the market (this goes beyond pokemon) don't punish the player for being human. they punish if they don't respond to the challenge or fail when there is actual skill involved.

    and honestly I'd just leave my game open all the time if this was a thing.


    EDIT: otherwise, just do what MGriffin suggested and remove the SAVE function from the pause screen and start a new adventure from the load screen if there is a save file in progress, and have the game autosave at x points. That way they can't hard-reset until they defeat your game, and can't arbitrarily go back if they forgot their potions and whatnot. As the developer you have complete control of their movement and what items they have access to, so instead of backtracking have it be a cave that once you enter the exit closes, and will only reopen once you clear it, etc.
     
    Last edited:
    32
    Posts
    8
    Years
    • Seen May 6, 2020
    Unless people have this game open constantly there is no reason for that! Even on challenging games you're given multiple attempts to solve a challenging puzzle. If you want just make it a nuzlocke and put in hard level cap for each area so people just don't have to grind to be stronker than the competition.

    Maybe I should elaborate on my mission here.

    In a game like D&D, if your party's healer or warrior dies, they are dead. No resets, no take-backs. Consequences are final, no matter how attached you were to how things were going. That's what I want.
    So I don't mind if someone needs multiple attempts to solve an ice puzzle or whatever. That's fine.
    But I want a game where the consequences of failure (in battle) are actually scary. Failing should count for something.

    If someone can just reset at no cost because their starter was taken out, that is antithetical to what I'm trying to accomplish. I want people to feel invested and like there is always something at stake without hoping they follow some internal honor code.

    Side note: I think the grinding that comes with traditional Nuzlocke-ing makes for a really poor game experience. I don't want us to just grind for free or out of necessity. In fact, I want people to actively weigh the costs of trying to grind (potentially having their party members harmed) to be weighed against the EXP benefits.


    that's still a lot of game money. games are meant to be played over and over, and even on the most hardcore games on the market (this goes beyond pokemon) don't punish the player for being human. they punish if they don't respond to the challenge or fail when there is actual skill involved.

    and honestly I'd just leave my game open all the time if this was a thing.

    I think I came up with a solution.

    Is there a way for the game to set a variable when you load, then autosave? This variable would be reset to zero when you complete some story relevant task and set to 1 every time the game loads. The aforementioned tasks should be relatively frequent, like beating gyms and/or discovering new map areas. In my head, I see repurposing those pokemon statues you see in every gym into events that reset the variable to zero.

    So let's say you beat Misty, which resets the variable to zero, and then you save the game + quit for the day.
    Tomorrow, you load the game. We see the variable is at zero, and no penalty happens. The variable is then set to 1, and the game autosaves. Now if you just run into some rando trainer who KOs your starter and you reset the game, the game will see that the variable was at 1 and penalize you. However, once you get to Lt. Surge, the variable is set back to zero.

    This way, you get one free save per "area", which should be adequate for normal play. It might be annoying if you start and or some reason get interrupted, but if I can space them out to be every half hour to an hour of playtime, then it should be fine.

    The statue idea sounds really amazing to me, actually. I just don't know how to tell the game to check the variable or how to autosave on startup.
     
    Last edited:
    178
    Posts
    10
    Years
  • Even if you manage to make an autosave feature, this will not entirely solve your problem.
    I mean, the player can just make an backup copy of the save before he starts to reset to get the desired outcome (solving a puzzle as an example).

    So let's say you beat Misty, which resets the variable to zero, and then you save the game + quit for the day.
    Tomorrow, you load the game. We see the variable is at zero, and no penalty happens. The variable is then set to 1, and the game autosaves. Now if you just run into some rando trainer who KOs your starter and you reset the game, the game will see that the variable was at 1 and penalize you. However, once you get to Lt. Surge, the variable is set back to zero.
    It seems like a good idea and I can see it working, but, like I said above, it's not impossible to bypass it.
     
    32
    Posts
    8
    Years
    • Seen May 6, 2020
    I suppose I don't know how the save options work within the program. Do you mean someone goes outside the game and duplicates the save file from like the desktop?

    If that's the case, then I am indeed stumped. I suppose I'm forced to rely on my player's ignorance/laziness in that case. Which is just the facts of reality.

    Assuming there's nothing else that can be done, I still don't mind having the functionality in my game.
     
    178
    Posts
    10
    Years
  • Do you mean someone goes outside the game and duplicates the save file from like the desktop?
    That's exactly what I meant and that's why I said it's impossible to prevent the player from cheating. Unless there is a way to change the folder where the save is (this I know is possible) AND hide it from the player, as in he don't have any kind of access to it, your best bet is trusting the player to play the game as intended.
    It might be done if you can encrypt the file, but I don't know of any script for this particular task.
    The close to encryption that I know isthis tutorial, but that's for the entire game encryption (which I never tested).
     
    Last edited:
    32
    Posts
    8
    Years
    • Seen May 6, 2020
    I think I am ok with just trusting that the player will play the game as intended. Thinking about it further, I think that this trust could work in a large majority of cases.

    For one, having a clearly worded mission statement that this is a difficult game may prime people to try and beat it as a personal challenge.
    Keeping the reset penalty small may feel like a "fair" tax for failure, and keeping it away from normal reset behavior should keep the feelings of resentment from creeping up.

    In the meantime, I can work on my game. I'm in no rush to get the code immediately and the idea seems both good and easy for the more experienced coders here, so if the thread falls by the wayside I'll just post the question again when I'm closer to completion.
    In like 2020...

    EDIT:
    Just so I know how this forum works, if I had a question about adjusting the weakness/resistance and critical hit multipliers, should that also get a "custom features" tag or does it fall under a different umbrella?
     
    Last edited:
    178
    Posts
    10
    Years
  • Since weakness/resistance/critical hit are all already built in Essentials, I would use the "Scripting Question" tag, considering that you just want to adjust them.

    From the rules
    Code:
    [B]Scripting Question: If you're trying something new with scripting but it's not quite working out, feel free to make a thread with this prefix. Please only use this prefix if you've tried something and have a general idea what you're doing.[/B]
    Custom Feature Question: If you have a new idea but you don't know have the first clue how to implement it, use this prefix.
    I think it would fit Scripting more. Custom Feature would be for making something entirely different from what we already have on default essentials and the custom scripts in the tutorials section.
     
    285
    Posts
    5
    Years
    • Seen Oct 1, 2023
    Even if you find a way to make the save file invisible to players and make the game autosave after a loss, players can and frequently do reset the game when they are about to losing a battle. This would mean that unless you implement something that penalizes the player for quitting the game during battle (which would probably be difficult), they won't lose anything. The only penalty one can successfully enforce is not allowing the player to save. I believe there is a switch that can be turned on that prevents the player from saving the game. You could use this, but it would only probably be in important sections of the game.

    I was also thinking about implementing something like this in my game. I am thinking about turning on the switch that allows the player to save before they enter an important dungeon like a gym. This switch would remain on until the player successfully defeats the gym leader. This would mean that the player would have to completely redo all gym puzzles if they reset the game after attempting the gym. If the player doesn't reset the game, they will be able to keep playing, but paying prize money each time they lose a battle. The player also won't have to solve all the gym puzzles again if they don't reset.

    You just have to be careful not to give too long of a period where the player can't save. I think a gym is a good time segment that can be completed in one sitting, so the player doesn't have to worry about losing too much progress. I would either autosave the game before taking away the option to save the game or warn the player that they won't be able to save the game after a certain point.
     
    Last edited:
    32
    Posts
    8
    Years
    • Seen May 6, 2020
    Yeah, the save points may be too tricky and could pose a hamfisted constraint on the game.
    But the "check for variable, penalize if variable exists, then tick up variable" idea would perform a similar purpose without the hard line.

    Figuring out how to make the game hard is hard.
     
    Back
    Top