PokePrinny
Project VS
- 4
- Posts
- 4
- Years
- He/Him
- USA
- Seen Jun 20, 2022
I feel like there's something already in the scripts I can use for this but I'm having trouble putting it together so here goes:
In my game each gym is essentially it's own Battle Tower Facility (meaning they are all "battle towers" but each has its own trainer/pokemon pool). I have tried to mirror the battle tower scripts as best as I could but there isn't much guidance on the section. I can put most of the event together through conditional branches and loops but the one issue I can't overcome is getting the system to generate trainers from my own challenge type.
So my question is this:
How do I create a battle challenge, or multiple, that can generate a set of trainers similar to the Battle Tower scripts?
From my tests, I know that the below script is what generates the teams:
pbBattleChallenge.set("towersingle",7,
pbBattleTowerRules(false,false))
I can change the 7 to modify the number of trainers in the set and I was also able to create my own Challenge in trainerlists.txt along with the corresponding tr/pm files, but i think this is where I'm getting stuck:
pbBattleTowerRules
This is my current attempt at creating my own "Rules"
def pbBlueGymRules(double,openlevel)
ret=PokemonChallengeRules.new
if openlevel
ret.setLevelAdjustment(OpenLevelAdjustment.new(60))
else
ret.setLevelAdjustment(CappedLevelAdjustment.new(50))
end
ret.addPokemonRule(StandardRestriction.new)
ret.addTeamRule(SpeciesClause.new)
ret.addTeamRule(ItemClause.new)
ret.addBattleRule(SoulDewBattleClause.new)
ret.setDoubleBattle(double)
return ret
end
But that's about as far as I have been able to figure out. I looked at it with a friend and he mentioned the "pbGenerateBattleTrainer" script but I can't completely understand the section (it's located in OrgBattle section of the scripts). Maybe a breakdown of this section or just how to modify the generator logic to work for each gym would suffice?
Any help is appreciated! Sorry if the post is long-winded, I've just really put thought and time into it :)
*version 18.1*
In my game each gym is essentially it's own Battle Tower Facility (meaning they are all "battle towers" but each has its own trainer/pokemon pool). I have tried to mirror the battle tower scripts as best as I could but there isn't much guidance on the section. I can put most of the event together through conditional branches and loops but the one issue I can't overcome is getting the system to generate trainers from my own challenge type.
So my question is this:
How do I create a battle challenge, or multiple, that can generate a set of trainers similar to the Battle Tower scripts?
From my tests, I know that the below script is what generates the teams:
pbBattleChallenge.set("towersingle",7,
pbBattleTowerRules(false,false))
I can change the 7 to modify the number of trainers in the set and I was also able to create my own Challenge in trainerlists.txt along with the corresponding tr/pm files, but i think this is where I'm getting stuck:
pbBattleTowerRules
This is my current attempt at creating my own "Rules"
def pbBlueGymRules(double,openlevel)
ret=PokemonChallengeRules.new
if openlevel
ret.setLevelAdjustment(OpenLevelAdjustment.new(60))
else
ret.setLevelAdjustment(CappedLevelAdjustment.new(50))
end
ret.addPokemonRule(StandardRestriction.new)
ret.addTeamRule(SpeciesClause.new)
ret.addTeamRule(ItemClause.new)
ret.addBattleRule(SoulDewBattleClause.new)
ret.setDoubleBattle(double)
return ret
end
But that's about as far as I have been able to figure out. I looked at it with a friend and he mentioned the "pbGenerateBattleTrainer" script but I can't completely understand the section (it's located in OrgBattle section of the scripts). Maybe a breakdown of this section or just how to modify the generator logic to work for each gym would suffice?
Any help is appreciated! Sorry if the post is long-winded, I've just really put thought and time into it :)
*version 18.1*