• Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
Resource icon

v21.1 [v16/v17/v18/v19/v20/v21] Cable Club 3.7

This resource pertains to version 21.1 of Pokémon Essentials.
Fixed the issues causing incorrect data for Pokémon with forms to be saved in the server_pokemon.txt file by the processor script.
Also fixes the def moves= issue kind of technically caused by DBK if you allow Sketch to be used online.
  • Like
Reactions: ProChamCham
  • Newly created UI
    • General Overhaul to be easier to add features to all versions, Team Preview
  • Added Rulesets feature and *.rules files
  • Added Developer defined win and lose texts for online battles
  • Added Triple battles to v18+
  • Prevented item duplication/deletion exploits by taking items off a mon mid battle or in a summary screen
  • Fixed Sketched moves appearing invalid
  • Overhauled server_pokemon.txt format, with conversion python script
  • Added compatibility with [MUI] Improved Mementos, Deluxe Battle Kit, [DBK] Z-Power, [DBK] Dynamax, and [DBK] Terastallization add-on
    • If bugs only happens online, it's a Cable Club issue. If it happens offline too, it's the other plugin's issue.
The RecordMixer now has a "prepareData" property, to set up variables before they are written or parsed.

A new RecordMixer example has been added to the thread, an implementation of Gen 2's Mystery Gift feature.

The v16\17\18 version of the script was missing the Event that triggered when the online trainer type was changed. The feature has also been documented in the user manual.
Mini update that adds some optional requirements as PLA Battle Styles and Focus Meter System must be loaded before the Cable Club, so that it can patch a fix so online battles can work.
If you downloaded it between the last update and now, redownload it.
v21 ported very nicely, with a grand total of 4 new lines to get it to work with the same code as v20. And none of them were AI related. It was Record Mixer.

All versions get a bump up in version number, and some long standing bugs are fixed.
The biggest, affecting all versions, is a struggle related bug fix. So move data is sent differently now.

v16\v17\v18 versions get a fancy new MersenneTwisterRandom class, much like the Random class used by v19+ versions of the script, to avoid unknown aspects changing the rand value underneath the Cable Club, causing desyncs.

The download now features a cute User Manual PDF, much like the one for Secret Bases Remade. This is much cleaner than the way the thread is now.

Finally, v20 is compatible with Essentials Deluxe, ZUD Mechanics, Terastal Phenomenon, Focus Meter System, and PLA Battle Styles online. If you get an error with the Script that can not be reproduced offline, please report it to me. But I am not fixing any errors with these scripts themselves.
  • Like
Reactions: ProChamCham
This version fixes desyncing issues for all versions due to forfeiting.
It also fixes longstanding desyncing issues in v16 and v17, in which moves with altered priorities would cause the battlers to move in different orders on both sides, due to the altered priority being applied to the incorrect index.

All versions also get a minor reorganization with the forfeit bug fix, so all data is sent in a single package. This also separates battle mechanics from being sent for every battler in battle. This change would make it easier to implement additional battle mechanics, such as Z Moves, Dynamax, or Terastal Phenomenon. I am still in the process of testing such additions for bugs (not many but there are a few still), but it is possible and has already been done.

Finally, a change from v3.2 that I failed to point out, I added GameStats to online for v20 projects.
This version fixes bugs relating to desyncing, as well as post battle clean up.

The v16/v17/v18 version of the script now gains the Record Mixer feature, as I was back in the script anyways

The server now features proper logging features, and logs to a file, server.log. It defaults to level INFO, but you can pass a lower level with --log=LEVEL, where LEVEL is a logging level constant (see python docs).
With this update, the v20 and v19 versions of the scripts are now up to v3.1 and v2.2 respectively.
This update reorganizes the plugin folder and adds Record Mixing. Record Mixing allows for the transfer of data between games, and other scripts can implement their own Record Mixing registrations if so they desire.

Unfortunately, the v16/17/18 version of the script is missing a critical component to implement this feature, so officially, they are now Legacy versions, meaning that they will only receive bug fix updates from this point onwards.
Unofficially though, if you copied class HandlerHashBasic from v20, and the respective 005_RecordMixer.rb file, you could still implement the record mixer by referencing def self.connect_to

Some corrections were made to the server scripts in all versions to prevent crashes.
Sure, v20 has been out for a while, but I've been very busy. But now I'm free.
And that means updates, and with is, a new major number, because I'm pretty sure that's how SemVer works, and I can't be bothered to double check.

I know that trades and battles still work of course, and I haven't reintroduced previously fixed bugs insofar as I'm aware, based off the bug fix comments I left in the code.

v20 already has a sufficient version of mkxp-z so you do not need to update your mkxp-z version like with v19.

I technically only tested it with v20.1.

No new features client side.
Server side, it now sends the game version, so you can decline players on an out of date version of the game.
Both versions of the script get an update here. v19.1 goes to 2.1, while v16-18 goes to 1.6, because we got some changes!

First on the list, Online Trainer Types. Since the Union Room used to assign trainer types for an overworld, this is basically that. You can call pbChangeOnlineTrainerType to have a premade method that works with the ONLINE_TRAINER_TYPE_LIST array. It uses the text that the Psychic in DPPt had.

ONLINE_TRAINER_TYPE_LIST is an array of arrays or symbols. An array would use the value of the trainer's gender to gender lock certain trainer types. The regular symbol is not gender locked.

With this change, I also streamline how data is sent to the server. Normally, the trainer type is passed around every time it's needed. Now, we only send it once, while we search for a partner, and save that result.

YOU HAVE TO UPDATE YOUR PYTHON SERVER BECAUSE OF THIS CHANGE!

Also added, an optional serverinfo.ini file, for if you want to let your players set up their own servers. Of course, they will still need the PBS files, same as any server. The ini file contains up to 2 lines, a HOST = X.X.X.X line, and a PORT = XXXX line. Technically you can have more, but only the last HOST and PORT will work. These override the settings in the script. You don't need to define both in the file either.
Makes testing easier too.

serverinfo.ini:
host=127.0.0.1
port=9999
serverinfo.ini:
port=9998
serverinfo.ini:
Back
Top