• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • 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.

Script: Monotype Challenge - v21.1 port

Willow-lee

#1 Mew and Slither Wing Fan
  • 16
    Posts
    1
    Years
    Do you want to add a little more challenge to your game? Besides Nuzlocke and Level Caps? How about rewarding your players for completing your game with just one type or for completing the entire Pokédex with a single type? I have the solution for you!

    for future reference, v20.1 is not guaranteed to work, as it is not on my to-do list atm.
    (because I have no idea how scripts work in it)

    Download


    Unfortunately, the Plugin does not yet have its own UI, just a list of texts with listed types.


    I warn that it was only tested on a fresh copy of Essentials v21.1, custom scripts or certain Plugins may cause errors that I am unable to replicate.


    Installation Guide

    • first, download the file in Downloads and extract it to your Plugins folder.
    • make sure that you have the latest version of the Hotfixes for v21.1 installed (1.0.9).
    • open the Script Editor and look for this section in Item_BattleEffects:
    Ruby:
    if battler.semiInvulnerable?
          scene.pbDisplay(_INTL("It's no good! It's impossible to aim at a Pokémon that's not in sight!")) if showMessages
          next false
        end
    • right below this line, add this script:
    Ruby:
        species = GameData::Species.get(battler.species)
        if !species.usable_monotype?
          type = GameData::Type.get($PokemonGlobal.monotype).real_name
          scene.pbDisplay(_INTL("You can't catch this Pokémon in a monotype #{type} challenge!"),) if showMessages
          next false
        end
    • save and recompile.

    Known Issues and Goals

    • Currently, adding Pokémon of other Types through the Debug Menu and testing them in battle causes an error, but this is not relevant to the player. (trying to fix it)
    • Pokémon of other types do not disobey, but again, the player cannot have Pokémon of other types.
    • In the future, I will try to create my own UI so that it won't just be texts.

    Plugin's Functions

    The setting PREVOS_INCLUDED is to allow for Pokemon that gain or change Types on evolving. For example, in a Fire run, you would still be able to use Eevee, because it can evolve into Flareon.
    • pbChooseMono - has the player choose the Type to use, or none at all. (The list is pulled from the Types database, you shouldn't have to do anything to adjust it for new Types you add)
    • pbMonoActive? - returns True if Monotype rules are in place. You could use this as a Global Switch by naming a switch s:pbMonoActive?
    • pbSetMonoVariables(X) - sets game variable X to the ID number of the Type being used- 0 for Normal, 1 for Fighting, and so on. (Unfortunately, since variables are 0 by default, you'll have to either combine it with pbMonoActive? or, if you don't think it'll be too confusing, add 1 to the variable again and just work with the values offset).
    • pbEndMono - removes the challenge rules. It doesn't do anything else. be sure to give any prizes or anything before you take them off.
    • The script call $PokemonGlobal.monotype will return the internal name of the Type being used.

    While a Monoytpe Challenge run is in play:
    • If a Pokemon isn't eligible for the run (has the required Type or can evolve into the required Type), the player can't receive it through Gifts (Egg or Standard), through Catching (will get a message like when you try to catch in Doubles), or through Trading.
    • Every script that gives a Pokemon will return False if it can't be used in the Monotype Challenge. Be sure to avoid any potential Softlocks for the player!
    • Pokemon can only evolve if their evolution is eligible for the run. This should, to my knowledge, account for all stages in a chain - for example, you can obtain Caterpie in a mono Flying run, because it will evolve into Metapod, which will evolve into Butterfree.

    Spoiler: Credits
     
    Back
    Top