• 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!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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.

[Scripting Question] Rival in PWT Script

  • 51
    Posts
    10
    Years
    • Seen Jan 8, 2023
    Hello,
    Sorry for my question, but i need your help!
    I would like to add the rival in PWT script, but I don't know how to insert the version variable in the script. Can you help me?
    Thanks for all 🤗
     
    Just add your rival to the list of Trainers.
     
    Ok, but the form of rival (1,2 or 3) automatically appear? Or in the script you need to add some "if..."?
    Thanks 😁
     
    Ok, but the form of rival (1,2 or 3) automatically appear? Or in the script you need to add some "if..."?
    Thanks 😁

    You can see where to put that number here in the comment they provide above "def fetchTournamentList" (where "trainer variable" is):
    Code:
    # trainer_entry[trainertype,trainername,endspeech_loose,endspeech_win,trainer variable,lobby text (optional), text before battle (optional), text after battle (optional)]
     
    ok, i understand.
    My question is how to make the variable be conditioned by the variable "choosing starter". So that, when I challenge him, he has training based on my starter and not random.
    Does it do it automatically, or do I have to add something myself? Thanks 😄
     
    ok, i understand.
    My question is how to make the variable be conditioned by the variable "choosing starter". So that, when I challenge him, he has training based on my starter and not random.
    Does it do it automatically, or do I have to add something myself? Thanks 😄

    You can use "$game_variables[XXX]" where "XXX" is the number of the variable if you want to do this in the script (you're probably not using the team your rival first uses in the PWT, so you could do something like "$game_variables[XXX]+6" if you wanted it to use the third battle's teams for example).
     
    Could such a thing work?

    def pbTrainerBattle(trainerid,trainername,endspeech,
    doublebattle=false,trainerparty=0,canlose=false,variable=nil)
    if $game_variables[007]==2 && val.include?("Komor")
    next 2
    if $game_variables[007]==3 && val.include?("Komor")
    next 3
    end
    end
    end
     
    Last edited:
    Could such a thing work?

    def pbTrainerBattle(trainerid,trainername,endspeech,
    doublebattle=false,trainerparty=0,canlose=false,variable=nil)
    if $game_variables[007]==2 && val.include?("Komor")
    next 2
    if $game_variables[007]==3 && val.include?("Komor")
    next 3
    end
    end
    end

    I don't think so, but maybe. "next" is usually used for skipping iterations in loops I believe. I would recommend just doing something like this in the PWT script:
    "trainer_entry[trainertype,trainername,endspeech_loose,endspeech_win,$game_variables[007],lobby text (optional), text before battle (optional), text after battle (optional)]"
     
    Hi! In this case? Thanks for your help 😃

    def pbPWTLoadTrainer(trainerid,trainername,variable=1)
    trainers=load_data("Data/trainers.dat")
    case $game_variables[007] && trainername= "Komor"
    when 1
    variable=1
    when 2
    variable=2
    when 3
    variable=3
    end
     
    Hi! In this case? Thanks for your help 😃

    def pbPWTLoadTrainer(trainerid,trainername,variable=1)
    trainers=load_data("Data/trainers.dat")
    case $game_variables[007] && trainername= "Komor"
    when 1
    variable=1
    when 2
    variable=2
    when 3
    variable=3
    end

    Oh maybe you're on a different version of the script than me because I don't see the method you're using here. I was talking about making changes in "def fetchTournamentList" but maybe you don't have that.
     
    Hi!
    I have the ultimate version.
    I created this script thanks to the old version (I have them all) 😂
     
    Hi!
    I have the ultimate version.
    I created this script thanks to the old version (I have them all) 😂

    Hmm the only one I could find to use was the Simple Pokemon World Tournament script, but if there's another one maybe I'd like to check that out as well. Do you happen to still have a link to that one's page?
     
    Back
    Top