Hidden Text
![[PokeCommunity.com] Simple Pokémon World Tournament system [PokeCommunity.com] Simple Pokémon World Tournament system](https://luka-sj.com/downloads/pwt/img/battle_logo.png)
Hidden Text
DISCLAIMER
Compatible with Essentials v17.x.
The following plug-in adds PWT functionality akin to Gen 5's Black2/White2. The plug-in comes with created example maps and events, but is highly customizable, as it does not rely too heavily on script modification to create the visual scene.
Carefully read all the instructions. Please give credits when using the plug-in.
USING THE SCRIPT
Getting the new system to work can be a little tricky, but follow these instructions and you will have no issues. The script has been written with only one goal in mind: to be completely plug and play.
Either use the EPI to automatically download and install the plug-in, or manually install the linked Utilities Script and then the PWT plug-in.
Before we go any further, it is really important that you import the provided PWT Lobby and Stadium maps into your Essentials project. To do so, please follow this tutorial that guides you through the process of doing so. These example maps contain all the necessary events to run the PWT, and each important event has been properly labeled and commented (from within the Event Editor).
How to configure your PWT system
The
tournament_list
variable is an array (found inside the def fetchTournamentList
) which contains all your possible Tournament branches, and trainer entries. The formatting is as following:- The first two entries in the array are of type 'String': first one specifying the Tournament branch name, the second specifying a script condition that unlocks the Tournament when true (the condition value can be left as an empty String, meaning that the Tournament will be unlocked from the start).
- The next entries in the list of type 'Array', which contain bracket information. Each array can be split into: [ trainer_type, trainer_name, end_speech_loose, end_speech_win, trainer_id (variant), lobby_text (optional), text_before_battle (optional), text_after_battle (optional) ]
- You need to have at least 8 Trainer (Array) entries in order for your Tournament branch to be valid.
- After you've finished defining the trainers for your current Tournament branch, you can start the next one by again defining two String entries, one for the branch name, and one for its unlocking condition.
- For the individual trainers, to have them appear on the map, you need to have the trcharXXXimage in your'Graphics/Characters/'folder (where XXX denotes the 3 digit ID of the trainer type).
The Lobby sample map has a simple counter event which starts the PWT system using the
startPWT
command. The Lobby map also contains a sample event which is reserved to be the event for potential PWT trainers that show up in the lobby. The constant PWT_LOBBY_EVENT
needs to correspond to the event ID of the event you're reserving for the Lobby trainers (in the sample map this event has an ID of 6). There are no manual transfers to the PWT stadium map through events. Instead, this is handled through the PWT_MAP_DATA
constant. This constant is an array which contains the following information: [pwt_stadium_map_id, transfer_x_position, transfer_y_position]
. This constant will define where the player gets transferred after they've successfully registered for a Tournament. The Stadium sample map has 5 key sample events. The first is an event reserved for the opposing trainer. This event gets referenced using the
PWT_OPP_EVENT
constant, so make sure the event ID number corresponds to the value in the constant.The next event is a reserved Auto-run event that initializes the continuation of the PWT system after the map transfer. The PWT resumes using a simple $PWT.continue script command. This event doesn't have to have a specific ID number, as long as its trigger is set to Auto-run.
The third event is reserved for the mini-scoreboard, and is referenced with the
PWT_SCORE_BOARD_EVENT
constant. This constant must contain the appropriate ID number of the scoreboard event. This event is only used as a means of positioning the mini-scoreboard on the map. The mini-scoreboard is of 6 x 3 (map units) dimensions, and its event has to be placed in the top left corner of where you'd like your mini-scoreboard to be rendered.The next event handles the movement of all the entities on the PWT stadium. This event is referenced using the
PWT_MOVE_EVENT
constant, so its ID has to match this value. The event itself is comprised of 5 different event pages, which dictate which segment of movement to apply. Its trigger has to be set to 'Parallel Process' otherwise it won't work. The different event pages are triggered using self switches, and have been appropriately commented for you to build your trainer movement control. Please make sure to go through the individual pages to learn more.The final event gets referenced through the
PWT_FANFARE_EVENT
constant and its contents handle any kind of special cutscene you would like to build for when the player wins the PWT. This event's contents are optional (apart from the command that turns its Self Switch off), and will not influence the system if they're not present. Successfully beating a Tournament branch will yield 3 battle points which can then be fetched using
$Trainer.battle_points
should you wish to add any extra functionality for those. Additionally, each win gets recorded. These wins get stored in a hash which can be accessed through $Trainer.pwt_wins["Tour Tournament branch name"]
, and can likewise be used for any extra functionality later on (such as unlocking new Tournaments based on the number of wins of a previous one).
Last edited: