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

Enabling/customizing Mystery Gifts in a fangame tweak

ISNorden

Teddiursa
  • 154
    Posts
    12
    Years
    I finally got RMXP and the latest Essentials to run together on my PC. Before I try designing a brand-new fangame, though, I thought of tweaking some existing favorites. The easiest debug-mode tweak I've tried so far is adding items and Pok?mon as Mystery Gifts; now I want to enable them for players who don't have debug mode handy. How would I do each of these --

    1. Turn Mystery Gift access on when the trainer has cleared the first gym, and notify the player that they've unlocked gifts for the first time (without introducing a separate NPC; the posted questionnaire/delivery guy in the Mart should do the job).
    2. Make sure that any Pok?mon awarded as Mystery Gifts get the current player data (name, gender, ID numbers) for the original trainer by default. In debug mode, any Mystery Gift with even one preset stat keeps my "playtest character" as the OT; is there a way around this that won't leave my friends stuck with single-digit IV's on a 30th level Lucario?
     
    So, for your first question, it's a matter of setting
    Code:
    $Trainer.mysterygiftaccess=true
    in a script command in your event. All other cutscene-y stuff is on you though.
    As for the second, find this line in script section PScreen_MysteryGift:
    Code:
        gift[2].obtainMode=4   # Fateful encounter
    Under it, put
    Code:
          gift[2].trainerID   = $Trainer.id
          gift[2].ot          = $Trainer.name
          gift[2].otgender    = $Trainer.gender
          gift[2].language    = $Trainer.language
     
    Thank you for the code snippets; I have a few more questions:

    • Does the code above go into a new script (created from scratch) or one that already exists in Essentials?
    • How do I check whether the player has cleared the first Gym, and turn on gifts if the answer is yes?
    • Is there a tutorial for displaying a plain text message if the player interacts with a tile onscreen? (Example: Player looks at a sign posted at the Pok? Mart counter, and can read a message about qualifying for Mystery Gifts.)

    (I'm completely new at this; please excuse my ignorance! :blush: )
     
    Don't worry about it, everyone's gotta start somewhere.
    The code snippet above goes in an existing script section PScreen_MysteryGift. Just find the line and paste the new code under it.
    You can check if the player has cleared a gym by either checking a switch that you set when you cleared the gym, or (more sensibly in my opinion) check if $Trainer.badges[0] is true, provided you've set it when the gym leader was defeated.
    Finally, while I don;t have any specific tutorial, you can just place an event on top of the tile with the sign that has no graphic. I think the PC in the pokecenter does this, if you need an example.
     
    Back
    Top