• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

[Custom Feature Question] Simulated Npc vs Npc Battles

  • 5
    Posts
    2
    Years
    • Seen Nov 24, 2023
    Hi guys, I was hoping someone might be able to provide me with some help?
    I am wanting to have, "Trainer A" walk into a room, stop at "Trainer B", the program to run a simulated battle between the two of them (we dont need to be able to see it happen). If "Trainer A" wins they continue forward. If they lose they turn around and leave the room.
    I am fine with the eventing to make them enter, and then to do the conditional of if win or if lose, then the next steps. Just not sure how to make two NPCs fight each other.
    I have seen a script for that should work, however it was written for v17 and was partially updated to v19. But I am using v20, and I don't know how to go about adapting it, nor setting it up.
    (broken link removed)
    This is the resource, if it can be of assistance?
    But really any method of making them run a simulated battle would be fantastic.

    Its probably a long shot, but thought no harm in asking!
    Thanks in advance.
     
    Hi guys, I was hoping someone might be able to provide me with some help?
    I am wanting to have, "Trainer A" walk into a room, stop at "Trainer B", the program to run a simulated battle between the two of them (we dont need to be able to see it happen). If "Trainer A" wins they continue forward. If they lose they turn around and leave the room.
    I am fine with the eventing to make them enter, and then to do the conditional of if win or if lose, then the next steps. Just not sure how to make two NPCs fight each other.
    I have seen a script for that should work, however it was written for v17 and was partially updated to v19. But I am using v20, and I don't know how to go about adapting it, nor setting it up.
    (broken link removed)
    This is the resource, if it can be of assistance?
    But really any method of making them run a simulated battle would be fantastic.

    Its probably a long shot, but thought no harm in asking!
    Thanks in advance.

    There is no premade way in my experience.
    In Essentials v18, I helped another user do it. You can probably adapt the code to v20 if you find the functions that do the same:

    https://www.pokecommunity.com/posts/10333578

    After that, you just have to check the value that the battle returns at the end to determine which trainer won.
     
    Thanks! I will take a look at getting this to work soon. Hopefully it doesn't prove too difficult.
     
    Back
    Top