• 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?".
  • Staff applications for our PokéCommunity Daily and Social Media team are now open! Interested in joining staff? Then click here for more info!
  • 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: Daily Dig Spots (Essentials 21.1)

  • 9
    Posts
    93
    Days
    • They/Them
    • UK
    • Seen Dec 8, 2024
    With much help from the community at large, I bring to you my first script/plugin: Daily Dig Spots!

    With the 'Shovel' item, you can dig away at dig spots and gather all sorts of treasure. At default, this includes multiple valuable items that were (practically) exclusive to the 'Let's Go!' titles, and a few other misc. items.

    Of course, this is completely customisable, so go and change it to your heart's content!

    Installation Guide:

    1. Download the zip file linked here: Google Drive Link!
    2. Extract the files to your computer, and put them into projects root folder.
    You can also integrate the PBS into your items.txt file, as it's only one item.
    3. Now to create the Script, and then add the Event in-game!


    Adding the Script to 'Script Editor' in RPG Maker XP:

    1. For convenience, I recommend creating a new space for this script, so long as it's above "Main".
    2. Copy in the following script:
    Code:
    def chooseRandomItem(qty=1)
      # Array of items
      commonItems = [
      :EVERSTONE,
      :SOFTSAND,
      :HARDSTONE,
      :STRETCHYSPRING
      ]
    
      uncommonItems = [
      :CHALKYSTONE,
      :MARBLE,
      :LONEEARRING,
      :POLISHEDMUDBALL,
      :BEACHGLASS,
      :SILVERLEAF
      ]
    
      rareItems = [
      :REVIVE,
      :TROPICALSHELL,
      :GOLDLEAF,
      :ULTRABALL,
      :ETHER
      ]
    
      # Randomly select item from above array
      randValue = rand(99)
        if randValue < 15
    #code for rare item
          pbReceiveItem(rareItems[rand(0...rareItems.length)],qty)
      elsif randValue <49
    #code for uncommon one
          pbReceiveItem(uncommonItems[rand(0...uncommonItems.length)],qty)
      else
    #code for common one
        pbReceiveItem(commonItems[rand(0...commonItems.length)],qty)
        end
      end

    ---

    Creating the Event:

    Page 1: This should have the overworld graphic you want (ie: DIGSPOT) to mark the treasure location.
    This also includes the script: ChooseRandomItem , which was explained how to add in the previous section.

    Essentially, copy as below, and change it up as you like:
    [PokeCommunity.com] Daily Dig Spots (Essentials 21.1)

    Page 2: This is how the event will appear while waiting for the next chance to get another item.

    Note: You can change the graphic to be whatever you want, if you want it to be visible during this time. Just uncheck "[ ] Through" though, in the bottom left so players can activate it to show the dialogue in the event window.
    [PokeCommunity.com] Daily Dig Spots (Essentials 21.1)

    Page 3: You want to copy the Event commands exactly as-is to make the event activable once per day.

    You can also change the Switch conditions for this event to use a different time-scale as you wish.
    [PokeCommunity.com] Daily Dig Spots (Essentials 21.1)


    And... that's it!

    Credits:
    PBS data: Zozustellation

    Item Sprites provided by Bulbapedia, as is their descriptions and most items' value.

    Shovel sprite: GandalfHardCore, on itch.io, from their 16x16 items asset pack.

    Scripting Help:

    - The Essentials Wiki: https://essentialsengine.miraheze.org/wiki/Events

    - Source Code:
    - Troubleshooting: the Eevee Expo Discord - sonicover, willow_lee, wrigty12

    Encouragement for posting this resource: theforbiddenapplin
     
    Back
    Top