Well I am still lost ... I am still having the trouble with the pokemon sticking in their dynamax form and nothing seems to work. Also for some reason I can't call a specific Pokemon in a raid den, how do you call a specific Pokemon? Can you give me a clear example?
Sure.
This is the full script for running a max raid, with all of the possible parameters. You don't have to use all of them, however. I explain how each one works in my update post.
Code:
pbMaxRaid(size,rank,pkmn,loot,field,gmax,hard)
The "pkmn" parameter controls the species of the raid. You can determine the species in several ways.
Method 1: Map spawn. Leave "pkmn" set as "nil", and the raid will attempt to spawn a random species that appears on the encounter table of your current map.
Example:
No parameters are set, so the raid will attempt to spawn a battle under the default raid size (set with MAXRAID_SIZE), with a random rank (scaled to your badge count), vs a random species that may spawn naturally on your current map. If your current map has no random encounters, it will just spawn Ditto.
Method 2: Pokedex number. Just input a number associated with a Pokemon species in place of "pkmn", and the raid will attempt to spawn that species.
Example:
This will attempt to create a Pikachu raid with a random star rank (scaled to your badge count), and the raid size will default to whatever you set MAXRAID_SIZE to.
Method 3: Pokemon internal name. Input the internal name of a species in place of "pkmn", and the raid will attempt to spawn that species.
Example:
This will attempt to create a 2v1 battle 5-star Gengar raid. Gengar may or may not spawn in its Gigantamax form.
Method 4: Array (Type only)
Example:
Code:
pbMaxRaid(1,6,[:PSYCHIC])
This will attempt to create a 1v1 Legendary raid (rank 6) vs a random Psychic-type legendary.
Method 5: Array (Habitat included)
Example:
Code:
pbMaxRaid(3,1,[:GRASS,2])
This will attempt to create a 3v1 one-star raid vs. a random Grass-type found in the Forest habitat.
Method 6: Array (Regional Dex included)
Example:
Code:
pbMaxRaid(1,nil,[:WATER,4,0])
This will attempt to create a 1v1 raid of a randomly scaled rank vs. a random Water-type found in the Sea habitat, but only those that appear in the Kanto Dex (or whatever regional Pokedex you have set as "0").
Combine this with the other parameters I left out to create unique raid combinations. Here's some more examples:
Code:
pbMaxRaid(3,5,:EXEGGUTOR,nil,[1,0,5])
This will spawn a 3v1 5-star Exeggutor raid in Sunny weather on the Puddle environment for a tropical theme. If you set this raid event on a map set as region "1" (or whatever region number you set ALOLA_REGION to in the MaxRaidEvents settings), Exeggutor will spawn in its Alolan form, instead.
Code:
pbMaxRaid(nil,nil,[:BUG,2,1],:SILVERPOWER,[2,2,10])
This will spawn a raid with the default battle size and a rank randomly scaled to your badge count, vs. a random Bug-type found in the Forest habitat in the Johto Pokedex (or whatever regional Pokedex you have set as "1"). The raid will reward 1 Silver Powder as a bonus reward for clearing it. The battle will also take place in the Rain, with Grassy Terrain set, and in a Forest environment.
Code:
pbMaxRaid(1,5,[:ICE,4],[:MYSTICWATER,3],[4,3,3],true)
This will spawn a 1v1 5-star raid vs. a random Ice-type found in the Sea habitat. The raid will reward 3 Mystic Waters as a bonus reward for clearing it. The battle will take place in Hail, with Misty Terrain set, and in the Still Water environment. If the species selected happens to have a Gigantamax form (Lapras, for example), it will always spawn in that form when it appears in the raid.
Code:
pbMaxRaid(2,3,:PIKACHU,:LIGHTBALL,[2,1],true,true)
This will spawn a 2v1 3-star raid vs. Pikachu. The raid will reward 1 Light Ball as a bonus reward for clearing it. The battle will take place in Rain, with Electric Terrain set. The environment isn't set, so it will default to a Cave environment. Pikachu will always spawn in its Gigantamax form, and Hard Mode is enabled.
Code:
pbMaxRaid(1,1,nil,:ORANBERRY)
This will spawn a 1v1 one-star raid vs a random species that naturally appears on your current map, and awards 1 Oran Berry for clearing it. Perfect for an early-game introduction to raiding.
PLEASE NOTE:
If you input criteria into the
pbMaxRaid script that would be impossible to create (Mewtwo in a 1-star raid, for example), the raid will only ever spawn Ditto (or whatever species you have included in the RAID_DEFAULT setting). So please keep that in mind. Use the Max Raid Database included with this project to see which species can spawn with which criteria put in place, and plan your raid dens accordingly.