• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • 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.

[Other] Layered Trainer Script

  • 215
    Posts
    12
    Years
    • Seen Jul 14, 2020
    Alright so I am working on a script for my game and I was wondering if someone would be able to help me. What I want is, when you run into a trainer, he will battle you. Pretty simple right? However the difficult part is getting his pokemon to change depending on how far you have progressed through the game. For example, if 0x4012 is set to 0x0, you will fight a weak pokemon. However, if 4012 is set to 0x1, you will fight something stronger. This is the script that I have.
    Spoiler:


    See, I am doing this using JPANs hack applier. In order to make the JPANs hack applier option work, you need to set the 'Unknown' value to be anything but 00. So in this case mine is set to 01. The script works perfectly fine except for one thing. Once you finish the battle, you can talk to the trainer and everything is normal. However once you leave the map and come back the trainer spots you again, does the talking, but doesn't do the battle. I don't want that to happen. The trainer should NEVER spot you again. The trainer should just be standing there and will say "Talking 3" if you talk to him. Anyone know how to fix this issue? If you are still confused please let me know and I will explain in more detail.

    Please only answer if you have a good understanding of JPANs hack applier. I feel like I am a pretty decent hacker and this error isn't something simple.
     
    Thats because a normal trainer when beaten sets the trainer option as off basically. Where as Jpans engine will keep seeing you even though you have beaten him. What you may have to do is have a hidden sprite under the current one that only has the talking script and then a level script that will check your vars then hide/show the sprites according to if you need to battle or not. This should work, it may be a little odd, but it should work.
     
    Thats because a normal trainer when beaten sets the trainer option as off basically. Where as Jpans engine will keep seeing you even though you have beaten him. What you may have to do is have a hidden sprite under the current one that only has the talking script and then a level script that will check your vars then hide/show the sprites according to if you need to battle or not. This should work, it may be a little odd, but it should work.

    Or edit JPAN's routine.
     
    Back
    Top