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

Non-Removable Pokemon

Dylanrockin

That guy
276
Posts
12
Years
    • Seen Jun 9, 2016
    How exactly would I go about having a Pokemon in my party irremovable, like you can't move it to the PC or release it or anything related to that.
     

    Nickalooose

    --------------------
    1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    Depends on why you would want to stop that happening...
    Is it your starter you want to stop from releasing or placing in PC?
     

    Dylanrockin

    That guy
    276
    Posts
    12
    Years
    • Seen Jun 9, 2016
    Depends on why you would want to stop that happening...
    Is it your starter you want to stop from releasing or placing in PC?

    Yes, the starter is main plot point in the game, and I do not want the player to be able to put it away at any point.
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,285
    Posts
    16
    Years
  • Adding a partyonly variable to Pokémon is quite simple (it's the same as shinyflag). Preventing a Pokémon with this variable set to true would also be quite simple. The hardest part would be preventing it from being stored in the PC, especially in the "Move" PC mode where you can freely move Pokémon around between party and storage.

    The best bet would be preventing it from being picked up at all (not even to rearrange it in the party while in the PC). This would require a bit of fiddling with a couple of menus to prevent the "Move"/"Deposit" interact options from appearing in the PC (not an overly easy thing to do since they're more hard-coded than perhaps they should be).

    Then there's preventing the Pokémon from being traded, but you won't need to worry about that if you don't have any trades where the Pokémon could be used. There's also preventing it from being put in the Day Care Centre, which might not be difficult (I don't recall exactly how it works).
     

    Nickalooose

    --------------------
    1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    Okay, what Maruno said is obviously right... So making a trade with the starter is stupid since that would be your mistake, so avoid that.

    To make the PC thing though, I'd use if and elsif commands probably...

    EDIT

    So I decided to take a look... Here's what I come up with.

    In PokemonStorage.
    First things first, you don't want to release the Pokémon, who would...
    So find:
    Code:
        if pokemon.egg?
          pbDisplay(_INTL("You can't release an Egg."))
          return false
    And directly BELOW, return false, paste this.
    Code:
        elsif pokemon.obtainMap==STARTER_MAP_ID
          pbDisplay(_INTL("You can't release your starter Pokémon!"))
          return false
    Now we'll want to make it so you can't store the Pokémon.
    So find: "def pbStore(selected,heldpoke)"
    And paste BELOW, index=selected[1].
    Code:
    #    allows --->pokemon<--- to call a Pokémons detail, obtainMap, Hp etc.
        pokemon=(heldpoke)?heldpoke:@storage[box,index]
    Then a couple lines down, below (I'll stop emphasizing below now), pbDisplay(_INTL("That's your last Pokémon!")), paste.
    Code:
        elsif pokemon.obtainMap==STARTER_MAP_ID
          pbDisplay(_INTL("Can't deposit your starter!"))
    Now find "def pbHold(selected)", and paste below:
    Code:
        if box==-1 && pbAble?(@storage[box,index]) && pbAbleCount<=1
          pbDisplay(_INTL("That's your last Pokémon!"))
          return
        end
    This:
    Code:
        if box!=-1 && pokemon.obtainMap==STARTER_MAP_ID
          pbDisplay(_INTL("That's your starter Pokémon!"))
          return
        end
    Then find def pbSwap(selected), and below the line, index=selected[1], paste:
    Code:
        pokemon=(@heldpkmn)?@heldpkmn:@storage[box,index]
    Then a few lines down, below:
    Code:
        if box==-1 && pbAble?(@storage[box,index]) && pbAbleCount<=1 && !pbAble?(@heldpkmn)
          pbDisplay(_INTL("That's your last Pokémon!"))
          return false
        end
    Paste:
    Code:
        if pokemon.obtainMap==STARTER_MAP_ID
          pbDisplay(_INTL("That's your starter Pokémon!"))
          return false
        end
    Now find, def pbPlace(selected), and below, index=selected[1], paste:
    Code:
        pokemon=(@heldpkmn)?@heldpkmn:@storage[box,index]
    Then a few lines down find:
    Code:
        if box!=-1 && index>[email protected](box)
          pbDisplay("Can't place that there.")
          return
        end
    And paste below that:
    Code:
        if box!=-1 && pokemon.obtainMap==STARTER_MAP_ID
          pbDisplay(_INTL("Can't place your starter Pokémon there!"))
          return
        end
    Then in the SETTINGS section, add a line STARTER_MAP_ID = [insert the map ID you receive you starter Pokémon]
    To find the map ID, there is a couple things you can do.
    A) In the bottom right hand corner is a number, name and size.
    Could look like this: 001: Pallet Town (25 x 25).
    The red number is what you want excluding 0's... So in this example, STARTER_MAP_ID = 1.
    B) Right click your map and view properties, its at the top of the window.

    And you're done... Let me know how that turns out for you.

    And yes, I realize I could've just pasted the whole of my PokemonStorage but I have a lot of custom things that could potentially cause errors during gameplay.

    I haven't looked at DayCare or nothing yet.
    EDIT.
    In saying that, you could probably just use conditional branches within the event.
     
    Last edited:

    Pharetra

    zzzz
    451
    Posts
    12
    Years
    • Seen Apr 22, 2024
    I was interested in this subject too, and although Nickaloose's method works, it isn't very specific (e.g. all Pokémon obtained on that map won't be able to be released, so Pokémon that hatched there won't be either). So I came up with a more specific method.

    Instead of
    elsif pokemon.obtainMap==STARTER_MAP_IDuse
    elsif pokemon.species==PBSpecies:: (Internal_Name of the Pokémon)
    Do this for all starter Pokémon including their evolutions ;)
     

    Nickalooose

    --------------------
    1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    I forgot to mention that, but more than likely, the starters would have been received from a professor, in a lab, where the only other obtainable Pokémon are the counter-starter Pokémon... So I neglected to say and since there was no reply about it being otherwise, I figured it was irrelevant to add such a line for the sake of it.

    However, your line makes it more complicated since you'd need to add up to 9 extra or states, like Charmander, Squirtle, Bulbasaur, then their evos, and/or, Chikorita, Typhlosion, Turtwig, Prinplup... It's extra hassle... But needed if you receive a starter on a map with encounters, of course... I see no reason otherwise.

    You could just add:
    && pokemon.obtainMode!=1
    If you're concerned about egg hatching Pokémon.
     
    Last edited:
    5
    Posts
    11
    Years
    • Seen Jul 17, 2013
    Okay, I really want to implement this in my game, as the starter Pokemon is central to the plot (just like Dylanrockin). I tried this three times, twice with my game, and once with a fresh copy of Essentials...I can't get this working. I followed Nickalooose point for point, and even tried P-sign's method, but nothing stopped me from being able to store the starter in the PC. I triple checked the map ID as well. I'm usually very good at figuring out RPG Maker issues, but since this is so code-dependent, it's a bit out of my league. Any help would be greatly appreciated!

    EDIT: Okay, I got P-Sign's method to work, and I am ridiculously happy about it. I am curious still as to why I couldn't get Nickalooose's map-method to work, but either way I'm stoked. Thanks so much for your contributions!
     
    Last edited:

    Nickalooose

    --------------------
    1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    STARTER_MAP_ID needs to be defined.
    If you've replaced all the STARTER_MAP_ID's with the species thing, and it worked, then that's your problem.
     
    5
    Posts
    11
    Years
    • Seen Jul 17, 2013
    I did "define" it, but I forgot to remove the brackets. I'm sure that was the problem.

    So it looked like STARTER_MAP_ID = [1]

    changed to:

    STARTER_MAP_ID = 1

    I'm guessing that would fix it.

    Thanks again for the support!
     

    Dylanrockin

    That guy
    276
    Posts
    12
    Years
    • Seen Jun 9, 2016
    Sorry I haven't said anything about this, I've been busy, but so far I'm having troubles with it. I deposited my starter, it deposited, not what was supposed to happen. However releasing it does give me the message that I am not supposed to release my starter. I'm not sure what I did wrong with the script, but I can deposit, but not release; most odd.
     

    Dylanrockin

    That guy
    276
    Posts
    12
    Years
    • Seen Jun 9, 2016
    It worked fine for me, any other edits you have added?

    Not any that I can think of, this is the code that I have from line 240-261

    Spoiler:
     
    Back
    Top