• 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?".
  • 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] V18: Gaining no EXP for battles?

  • 6
    Posts
    4
    Years
    • Seen Jun 18, 2022
    Hello there, thanks for taking the time to read!

    I'm currently trying to figure out how to script a switch that will turn off EXP for certain battles (Challenge battles in my game that provide cool prizes) as the battles end up leaving playtesters far too over leveled for later areas, but I'm not quite sure where to even begin in the current version of essentials. If someone could help direct me, I would be extremely grateful.
     
  • 658
    Posts
    7
    Years
    In v18 you need to write setBattleRule("canLose").
    It's "can't lose" by default, meaning you'll black out and run back to a Poké Centre if you lose.
    The rules are at the top of script section PField_Battles.
    The rules:
    "single", "1v1", "1v2", "2v1", "1v3", "3v1","double", "2v2", "2v3", "3v2", "triple", "3v3"
    "canlose"
    "cannotlose"
    "canrun"
    "cannotrun"
    "roamerflees"
    "noexp"
    "noMoney"
    "switchstyle"
    "setstyle"
    "anims"
    "noanims"
    "terrain"=> (something from PBBattleTerrains)
    "weather"=> (something from PBWeather)
    "environment" =>(something from PBEnvironment)
    "backdrop"=>filename
    "base" =>filename
    "outcomevar"=>variable number
    "nopartner"

    So what you need to do is before these challenge battles have the Script Command setBattleRule("noexp") before the command for the battle.
     
    Last edited:
  • 6
    Posts
    4
    Years
    • Seen Jun 18, 2022
    Ah, I see the battle rules, but I'm not quite sure how to insert it in a trainer event.
     
  • 6
    Posts
    4
    Years
    • Seen Jun 18, 2022
    Yeah just inserting that into the trainer event doesn't work at all. I can read, please don't insult me.
     

    DarrylBD99

    Content Creator and Game Developer
  • 321
    Posts
    4
    Years
    In v18 you need to write setBattleRule("canLose").
    It's "can't lose" by default, meaning you'll black out and run back to a Poké Centre if you lose.
    The rules are at the top of script section PField_Battles.
    The rules:
    "single", "1v1", "1v2", "2v1", "1v3", "3v1","double", "2v2", "2v3", "3v2", "triple", "3v3"
    "canlose"
    "cannotlose"
    "canrun"
    "cannotrun"
    "roamerflees"
    "noexp"
    "noMoney"
    "switchstyle"
    "setstyle"
    "anims"
    "noanims"
    "terrain"=> (something from PBBattleTerrains)
    "weather"=> (something from PBWeather)
    "environment" =>(something from PBEnvironment)
    "backdrop"=>filename
    "base" =>filename
    "outcomevar"=>variable number
    "nopartner"

    So what you need to do is before these challenge battles have the Script Command setBattleRule("noexp") before the command for the battle.

    Question, can we initialize more than one battle rule? If so, how can we do so? Do we just declare setBattleRule() more than once or put all the battle rules inside one setBattleRule() declaration.
     
    Back
    Top