Scripts & Tutorials This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.


Reply
 
Thread Tools
  #1    
Old January 5th, 2016 (7:21 PM). Edited January 9th, 2016 by mej71.
mej71's Avatar
mej71 mej71 is offline
  • Moderator
 
Join Date: Mar 2014
Location: Omnipresence
Gender: Male
Posts: 1,226
This set of scripts allows you to invoke mildly customizable challenge rules and clauses
Please install the following scripts in new sections above the main, in this order.
Challenge Modes
Challenge Mode Selection
Pokemon Randomizer
Ability Randomizer
Move Randomizer
Item Randomizer

Download these graphics, then Unzip the folder into Graphics/Pictures

This script also requires my Inverse + Sky Battles script to work
You can call the challenge selection with the script
Code:
ChallengeSelection.new
I would recommend doing this during your intro or something to that effect.
Also, be sure to install this font, and give credit to both myself and JV, who's nuzlocke script was expanded upon.

Currently available Modes and their subclauses
  • Nuzlocke
    • Dubious Clause - Can opt to not catch a species you already own
    • PP Clause - Pokecenters don't heal your pokemon's PP
      • No PP Items - PP items are not usable
      • PP Token - Allow PP Tokens to be added or used
    • Encounter Tokens - You can earn tokens that give you the option to catch another encounter (you will have to give these tokens manually
      • After Gift
      • After Gym - both of these subclauses do nothing on their own, but are for you to use in your gym events or gift events to check whether or not to add a token
    • Revive Tokens - Similarly, you can give tokens that allow for a pokemon to be revived
      • After Gift
      • After Gym - both of these subclauses do nothing on their own, but are for you to use in your gym events or gift events to check whether or not to add a token
    • Shiny Clause - Shinies can be caught even if you already encountered a pokemon there
  • No Running - You cannot run from wild battles
  • Randomize
    • Randomize Battles - Choose one of the following options
      • Pure Random - randomly generated each time
      • Set Random - randomly generated at the end of the script, and will give repeatable random encounters
      • Set Psuedo-Random - same as set random, but attempts to swap pokemon with others of similar BST
    • Randomize Gifts- Choose one of the following options.
      • Pure Random - randomly generated each time
      • Set Random - randomly generated at the end of the script, and will give repeatable random encounters
      • Set Psuedo-Random - same as set random, but attempts to swap pokemon with others of similar BST
    • Randomize Events- Choose one of the following options
      • Pure Random - randomly generated each time
      • Set Random - randomly generated at the end of the script, and will give repeatable random encounters
      • Set Psuedo-Random - same as set random, but attempts to swap pokemon with others of similar BST
    • Randomize Items - items given or bought in the mart are randomized. Note that this also uses a set random.
    • Randomize Moves - Pokemon's learnsets are randomized. TM's are not randomized
    • Random Abilities - Pokemon's abilities are randomized
  • No Evolutions - Your pokemon can't evolve
  • Solo Run - You can only use your first pokemon
  • Inverse Locke (requires my Inverse battles script) - all battles are inverse battles
  • No Items - You can't use items
  • No TMs - You can't use TMs

Explaination of what Set Random is:
Pretty much like how some randomizers for ROM hacks work. It just switches all the encounters and stuff around. It a trainer has a Beedrill, and it gets randomized to Pidgey, it's always a Pidgey.

More notes:
If you do not select a sub-clause for the pokemon randomizers, they will be set to Pure Random
The differentiation between gift and encounter pokemon can obviously not be determined by me, that will be up to you to implement. The Random Battlers setting is used unless specified otherwise. Also note that if you do not have event or gift pokemon randomizers selected, any mon in one of these encounters or gifts won't be randomized

List of codes to check clauses:
Code:
$PokemonGlobal.nuzlocke
$PokemonGlobal.dubiousClause
$PokemonGlobal.shinyClause
$PokemonGlobal.catchTokens
$PokemonGlobal.encounterTokens
$PokemonGlobal.ppTokens
$PokemonGlobal.reviveTokens
$PokemonGlobal.catchTokenAfterGymLeader
$PokemonGlobal.catchTokenAfterGiftPokemon
$PokemonGlobal.encounterTokenAfterGymLeader
$PokemonGlobal.encounterTokenAfterGiftPokemon
$PokemonGlobal.reviveTokenAfterGymLeader
$PokemonGlobal.reviveTokenAfterGiftPokemon
$PokemonGlobal.ppClause
$PokemonGlobal.allowPPItems
$PokemonGlobal.encounterPureRandom
$PokemonGlobal.encounterSetRandom
$PokemonGlobal.encounterPsuedoRandom
$PokemonGlobal.giftPureRandom
$PokemonGlobal.giftSetRandom
$PokemonGlobal.giftPsuedoRandom
$PokemonGlobal.eventPureRandom
$PokemonGlobal.eventSetRandom
$PokemonGlobal.eventPsuedoRandom
$PokemonGlobal.randomMoves
$PokemonGlobal.randomAbilities
$PokemonGlobal.randomItems
$PokemonGlobal.noRunningLocke
$PokemonGlobal.noEvoLocke
$PokemonGlobal.soloLocke
$PokemonGlobal.inverseLocke
$PokemonGlobal.noItemsLocke
$PokemonGlobal.noTMLocke
Edit: Added in a bit of optimization for smaller screens. This was designed around a 720x480 screen, so some options will still span beyond the bar. Can't really do much about that part.
Edit 2: Fixed a couple things, if you're having issues please recopy the scripts.
Edit 3: Fixed a minor problem with how the psuedo-BST hash generates itself

Video of the script in action
Reply With Quote

Relevant Advertising!

  #2    
Old January 18th, 2016 (8:29 AM). Edited January 19th, 2016 by Maruno.
TACHAN TACHAN is offline
     
    Join Date: Jan 2010
    Gender: Female
    Posts: 198
    Thanks you very much mej71 :)!

    I'm sorry for double post, but I just want Nuzlocke option in my game. Is there any way to disable Randomize and those other things?
    Randomize breaks events with pbHasSpecies?(::PBSpecies::CATERPIE)
    Reply With Quote
      #3    
    Old January 19th, 2016 (3:59 PM).
    BlackOutG5's Avatar
    BlackOutG5 BlackOutG5 is offline
       
      Join Date: Jul 2015
      Gender: Male
      Nature: Bold
      Posts: 78
      I'm pretty dumb when it comes to linking maps! so when you need more Nuzlocke maps give a brief idea of what its suppose to look like?

      =begin
      NUZLOCKEMAPS = [
      [5,21],
      [2,7,12]
      ]
      =end
      Reply With Quote
        #4    
      Old January 19th, 2016 (4:56 PM).
      mej71's Avatar
      mej71 mej71 is offline
      • Moderator
       
      Join Date: Mar 2014
      Location: Omnipresence
      Gender: Male
      Posts: 1,226
      Quote:
      Originally Posted by TACHAN View Post
      Thanks you very much mej71 !

      I'm sorry for double post, but I just want Nuzlocke option in my game. Is there any way to disable Randomize and those other things?
      Randomize breaks events with pbHasSpecies?(:BSpecies::CATERPIE)
      JV has a Nuzlocke only script, which is what this is based on, you can use that.

      Quote:
      Originally Posted by BlackOutG5 View Post
      I'm pretty dumb when it comes to linking maps! so when you need more Nuzlocke maps give a brief idea of what its suppose to look like?

      =begin
      NUZLOCKEMAPS = [
      [5,21],
      [2,7,12]
      ]
      =end
      =begin and =end are how you do multiline comments in ruby
      what's inside this comment is an example of what to put, but remove the comments.
      Reply With Quote
        #5    
      Old January 20th, 2016 (3:15 AM).
      BlackOutG5's Avatar
      BlackOutG5 BlackOutG5 is offline
         
        Join Date: Jul 2015
        Gender: Male
        Nature: Bold
        Posts: 78
        So I can remove all of it and the game will work just fine or just remove =begin and =end I just don't know how to continue the map insertion patter. ex [1,2],[3,4,5],[?,?] or [?,?,?] ya know?
        Reply With Quote
          #6    
        Old January 20th, 2016 (8:16 AM).
        Rot8er_ConeX's Avatar
        Rot8er_ConeX Rot8er_ConeX is offline
           
          Join Date: May 2015
          Location: The Dissa Region
          Gender: Male
          Posts: 823
          Quote:
          Originally Posted by BlackOutG5 View Post
          So I can remove all of it and the game will work just fine or just remove =begin and =end I just don't know how to continue the map insertion patter. ex [1,2],[3,4,5],[?,?] or [?,?,?] ya know?
          If you want Maps 3 and 7 to be the same physical location, then do this

          Code:
          NUZLOCKEMAPS=[
          [3,7],
          ]
          __________________
          Features of Pokemon Entropy

          The black circular "doodles" in the lower right corner of my avatar are actually my username written in Gallifreyan. Yes I'm a Whovian.
          Reply With Quote
            #7    
          Old January 20th, 2016 (1:04 PM).
          BlackOutG5's Avatar
          BlackOutG5 BlackOutG5 is offline
             
            Join Date: Jul 2015
            Gender: Male
            Nature: Bold
            Posts: 78
            OHHHH so I don't want anymaps to be in the same location I just put any random map ID's in there and anymap that has a mapconnection lets say Route 2 and 3 I don't put them in there but if Route 4 had 2 maps connected then put it in there. OK! thanks!
            Reply With Quote
              #8    
            Old January 23rd, 2016 (7:29 AM).
            TACHAN TACHAN is offline
               
              Join Date: Jan 2010
              Gender: Female
              Posts: 198
              If born a Pokemon from an egg, the game is closed:

              (16.1 Version)
              Quote:
              Exception: NoMethodError
              Message: undefined method `setMessageSprites' for Kernel:Module
              Challenge Modes:620:in `pbMain'
              PScreen_EggHatching:158:in `pbStartScreen'
              PScreen_EggHatching:170:in `pbHatchAnimation'
              PScreen_EggHatching:167:in `pbFadeOutInWithMusic'
              PSystem_Utilities:884:in `pbFadeOutIn'
              PSystem_Utilities:884:in `pbFadeOutInWithMusic'
              PScreen_EggHatching:167:in `pbHatchAnimation'
              PScreen_EggHatching:188:in `pbHatch'
              PScreen_EggHatching:215
              PScreen_EggHatching:203:in `each'
              Reply With Quote
                #9    
              Old January 23rd, 2016 (9:14 AM).
              mej71's Avatar
              mej71 mej71 is offline
              • Moderator
               
              Join Date: Mar 2014
              Location: Omnipresence
              Gender: Male
              Posts: 1,226
              Quote:
              Originally Posted by TACHAN View Post
              If born a Pokemon from an egg, the game is closed:

              (16.1 Version)
              Remove that line, that's all.
              Reply With Quote
                #10    
              Old January 23rd, 2016 (9:46 AM).
              TACHAN TACHAN is offline
                 
                Join Date: Jan 2010
                Gender: Female
                Posts: 198
                Quote:
                Originally Posted by mej71 View Post
                Remove that line, that's all.
                Line deleted, but now this happens if I want to put nickname when born a pokemon
                [QUOTE]Exception: NameError
                Message: undefined local variable or method `species' for #
                Reply With Quote
                  #11    
                Old February 7th, 2016 (6:46 PM).
                Leon Draceus's Avatar
                Leon Draceus Leon Draceus is offline
                Palette Works Leader
                   
                  Join Date: Nov 2015
                  Location: Ho Chi Minh City, Vietnam
                  Gender: Male
                  Nature: Lonely
                  Posts: 138
                  What's wrong with your links? Please check it again.
                  __________________
                  Reply With Quote
                    #12    
                  Old February 13th, 2016 (3:03 PM).
                  Anova's Avatar
                  Anova Anova is offline
                     
                    Join Date: Jan 2016
                    Location: Las Vegas
                    Gender: Female
                    Nature: Impish
                    Posts: 31
                    I got an error in v16.1
                    Script 'Pokemon Randomizer' line 122: NoMethodError occurred.

                    undefined method `encounterPureRandom' for nil:NilClass
                    __________________
                    I believe in Jesus Christ my Savior.
                    God the Son, Yeshua Hamashiach

                    Reply With Quote
                      #13    
                    Old February 20th, 2016 (1:58 AM).
                    bimbimthiensu bimbimthiensu is offline
                       
                      Join Date: Jul 2013
                      Gender: Male
                      Posts: 46
                      Quote:
                      Originally Posted by Anova View Post
                      I got an error in v16.1
                      Script 'Pokemon Randomizer' line 122: NoMethodError occurred.

                      undefined method `encounterPureRandom' for nil:NilClass
                      i have same error in v15.1 with gen 6 add-on(old version for v15-15.1)
                      it not work with some titlescreen of Luka's titlescreen
                      Reply With Quote
                        #14    
                      Old March 20th, 2016 (7:48 PM).
                      Trikeboy's Avatar
                      Trikeboy Trikeboy is offline
                         
                        Join Date: Mar 2009
                        Gender:
                        Posts: 102
                        I'm getting this issue when encountering a wild Pokemon:

                        ---------------------------
                        Pokemon Essentials
                        ---------------------------
                        Exception: ArgumentError
                        Message: wrong number of arguments(7 for 5)
                        Challenge Modes:336:in `challenge_init'
                        Challenge Modes:336:in `clauses_initialize'
                        Inverse and Sky Battles:491:in `initialize'
                        Inverse and Sky Battles:45:in `new'
                        Inverse and Sky Battles:45:in `pbWildBattle'
                        PField_Field:1371:in `pbBattleOnStepTaken'
                        PField_Field:1395:in `pbOnStepTaken'
                        Game_Player:484:in `update_old'
                        Walk_Run:76:in `update'
                        Scene_Map:104:in `update'

                        I call the script during the intro like this:

                        Code:
                        Show Choices:Yes, No
                        When [Yes]
                          Script:ChallengeSelection.new
                        
                        When [No]
                          Text: Just a classic game then.
                        
                        Branch End
                        The challenge screen loads fine and seems to take the input. It doesn't matter if I chose yes or no, I still get the error. Do you have any suggestions?
                        __________________
                        I don't use "uber" Pokemon, I don't calculate stat values, I don't breed my way to perfection, and I don't care about natures. I catch my Pokemon the way they are, and treat them like individuals instead of brainless drones. If you use this philosophy, copy & paste this into your signature.
                        Reply With Quote
                          #15    
                        Old April 2nd, 2016 (12:29 AM). Edited April 2nd, 2016 by mej71.
                        mej71's Avatar
                        mej71 mej71 is offline
                        • Moderator
                         
                        Join Date: Mar 2014
                        Location: Omnipresence
                        Gender: Male
                        Posts: 1,226
                        Quote:
                        Originally Posted by bimbimthiensu View Post
                        i have same error in v15.1 with gen 6 add-on(old version for v15-15.1)
                        it not work with some titlescreen of Luka's titlescreen
                        This was broken with the Gen 5 and 6 style screens, but is fixed now. Update your scripts please.

                        Quote:
                        Originally Posted by Trikeboy View Post
                        I'm getting this issue when encountering a wild Pokemon:

                        -------------
                        Try rereading the instructions. You missed a crucial "required" step.
                        Reply With Quote
                          #16    
                        Old April 2nd, 2016 (9:09 PM).
                        Mutant Yoshi Mutant Yoshi is offline
                           
                          Join Date: May 2014
                          Gender: Male
                          Nature: Timid
                          Posts: 150
                          Quote:
                          Originally Posted by mej71 View Post
                          If you soft reset, the pokemon shown in these screens may be randomized if your challenge selections allow it. Therefore, I've added a setting to specify a game switch that lets you turn this off.
                          Code:
                          $game_switches[TEMP_DISABLE_RANDOMIZERS_SWITCH] = true
                          Turn this on and then off before and after the title screen
                          Where specifically in the code? I'm not sure where specifically to add it and whenever I try, I get errors.
                          Reply With Quote
                            #17    
                          Old April 2nd, 2016 (9:33 PM).
                          mej71's Avatar
                          mej71 mej71 is offline
                          • Moderator
                           
                          Join Date: Mar 2014
                          Location: Omnipresence
                          Gender: Male
                          Posts: 1,226
                          Quote:
                          Originally Posted by Mutant Yoshi View Post
                          Where specifically in the code? I'm not sure where specifically to add it and whenever I try, I get errors.
                          Luka has added the necessary code to the Title Screen script
                          Reply With Quote
                            #18    
                          Old April 17th, 2016 (3:10 AM).
                          Trikeboy's Avatar
                          Trikeboy Trikeboy is offline
                             
                            Join Date: Mar 2009
                            Gender:
                            Posts: 102
                            I found my error, I had the sky battles script after the challenge mode scripts. I put the script before those and it has worked.
                            __________________
                            I don't use "uber" Pokemon, I don't calculate stat values, I don't breed my way to perfection, and I don't care about natures. I catch my Pokemon the way they are, and treat them like individuals instead of brainless drones. If you use this philosophy, copy & paste this into your signature.
                            Reply With Quote
                              #19    
                            Old 3 Days Ago (9:16 PM). Edited 3 Days Ago by SylveonMakesGames.
                            SylveonMakesGames SylveonMakesGames is offline
                               
                              Join Date: Nov 2017
                              Posts: 3
                              Items/Item Randomizer are not working in the Overworld. I have EBS and Modular Menu as well, if it helps. So if you know how to fix it please help. Most of the problem is in the first script as well.
                              Reply With Quote
                              Reply

                              Quick Reply

                              Join the conversation!

                              Create an account to post a reply in this thread, participate in other discussions, and more!

                              Create a PokéCommunity Account

                              Sponsored Links
                              Thread Tools

                              Posting Rules
                              You may not post new threads
                              You may not post replies
                              You may not post attachments
                              You may not edit your posts

                              BB code is On
                              Smilies are On
                              [IMG] code is On
                              HTML code is Off

                              Forum Jump


                              All times are GMT -8. The time now is 4:10 PM.