• 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.

Having a bit of an unexpected dilemma with the PC

59
Posts
6
Years
    • Seen May 12, 2022
    So, I have a bit of a problem with the PC. Mainly, I would like the player to be able to hold on to certain pokemon both for story reasons, and side quest reasons - and well, I've planned for awhile that the game was going to be centered around the player using a popplio to get over certain environments and hazards like this:
    bubblefloat.gif
    (ignore the bubble at the start, its meant to be hidden via move route but its stubborn)
    - and if the player decides to release them and save, the game becomes unwinnable and it messes up the planned story a bit. I've kind of been really fond of this idea for awhile, but I feel like it might have to get scrapped for technical reasons unless I either remove PC's (which is definitely not going to happen) or I find some way for the player to re-obtain him if he gets released. Anyone have any ideas?
     

    Ego13

    hollow_ego
    311
    Posts
    6
    Years
  • So, I have a bit of a problem with the PC. Mainly, I would like the player to be able to hold on to certain pokemon both for story reasons, and side quest reasons - and well, I've planned for awhile that the game was going to be centered around the player using a popplio to get over certain environments and hazards like this:
    View attachment 83325
    (ignore the bubble at the start, its meant to be hidden via move route but its stubborn)
    - and if the player decides to release them and save, the game becomes unwinnable and it messes up the planned story a bit. I've kind of been really fond of this idea for awhile, but I feel like it might have to get scrapped for technical reasons unless I either remove PC's (which is definitely not going to happen) or I find some way for the player to re-obtain him if he gets released. Anyone have any ideas?

    I've got some good news and some bad news:
    The good news is that, for my game, I already modified the PC script to make sure that the player cannot release certain Pokemon types under certain conditions. It really isn't too hard.

    The bad news is:
    You would have to adapt the script for your purposes. But since your special Popplio is a species on it's own, it shouldn't be too hard.

    The script section you need is called PScreen_PokemonStorage in v17 and PScreen_Storage in v.16

    find
    Code:
     def pbRelease(selected,heldpoke)
        box = selected[0]
        index = selected[1]
        pokemon = (heldpoke) ? heldpoke : @storage[box,index]
        return if !pokemon
        if pokemon.isEgg?
          pbDisplay(_INTL("You can't release an Egg."))
          return false
        elsif pokemon.mail
          pbDisplay(_INTL("Please remove the mail."))
          return false
        end
        if box==-1 && pbAbleCount<=1 && pbAble?(pokemon) && !heldpoke
          pbDisplay(_INTL("That's your last Pokémon!"))
          return
        end
    and right benath it add
    Code:
    if isConst?(pokemon.species,PBSpecies,:#InternalPopplioNameHere)    
    pbDisplay(_INTL("You can't release this awesome Popplio!"))
    	  return
    	  end

    Now this should work regardless of wether the Popplio is in a box, in your party or is being held.
    I haven't tested if this actually works with this example (since my version is a bit more specific).


    As for making it obtainable again you would have to activate a switch or set a variable as soon as you release it, which means you would have to check for it anyways (probably can be done at the same place) and then later you would have an event that depends on this switch/variable. You might need to store the move set and stats as well which probably requires a bit more coding.
     
    59
    Posts
    6
    Years
    • Seen May 12, 2022
    Dude, thank you so much! I feel like an idiot though, I made a thread about wanting to have the daycare working and I didn't even think to try checking out the egg code. I'll try and see if I can get it working when I have time late.
     
    Back
    Top