Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pet Mod Support (Alternatium [PMOTS]) #1936

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Pet Mod Support (Alternatium [PMOTS]) #1936

wants to merge 4 commits into from

Conversation

yakatk1012
Copy link

Hello,

I tried my best coding teambuilder support for Alternatium, and to make a template for future PMOTS/Leader's Choice Pet Mods to follow. There's only two things that are missing right now:

  1. The custom Pokemon do not show up in the formats. You have to type them in to make them show up, and they do not show the correct tier.
  2. The formats repeat themselves multiple times. I do not know what is causing this.

Let me know if you have any suggestions!

Add initial teambuilder support for PMOTS/Leader's Choice (not showing, yet)
Add everything except for support for custom Pokemon for Alternatium

// process.stdout.write("\n ");
for (const genIdent of [...GENS, ...DOUBLES, ...VGC, ...NFE, ...STADIUM, ...OTHER]) {
const isLetsGo = (genIdent === 7.1);
const isBDSP = (genIdent === 8.6 || genIdent === -8.6);
const isPMOTS = (genIdent === 8.7);
const isLC = (genIdent === 8.8);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LC means little cup in most context, use isPetModLC here please

Comment on lines 548 to 563
} else if (isPMOTS) {
BattleTeambuilderTable['alternatium'] = {};
BattleTeambuilderTable['alternatium'].learnsets = {};
BattleTeambuilderTable['alternatium'].tiers = tiers;
BattleTeambuilderTable['alternatium'].items = items;
BattleTeambuilderTable['alternatium'].overrideTier = overrideTier;
BattleTeambuilderTable['alternatium'].monotypeBans = monotypeBans;
BattleTeambuilderTable['alternatium'].formatSlices = formatSlices;
} else if (isLC) {
BattleTeambuilderTable['randomdex'] = {};
BattleTeambuilderTable['randomdex'].learnsets = {};
BattleTeambuilderTable['randomdex'].tiers = tiers;
BattleTeambuilderTable['randomdex'].items = items;
BattleTeambuilderTable['randomdex'].overrideTier = overrideTier;
BattleTeambuilderTable['randomdex'].monotypeBans = monotypeBans;
BattleTeambuilderTable['randomdex'].formatSlices = formatSlices;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not make these tables just say 'pmots' and 'petmodlc'

Comment on lines 603 to 605
if (isPMOTS) {
return ["OU"];
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isnt necessary, it uses the default gen 8 table (which includes OU)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Alternatium's case, it only contains OU mons, so this is necessary.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it’s not, look at how nfe does it

Comment on lines 909 to 972
const BDSPLearnsets = Dex.mod('gen8bdsp').data.Learnsets;
for (const id in BDSPLearnsets) {
const species = Dex.mod('gen8bdsp').species.get(id);
if (species.isNonstandard && !['Unobtainable', 'CAP'].includes(species.isNonstandard)) continue;
const learnset = BDSPLearnsets[id].learnset;
BattleTeambuilderTable['gen8bdsp'].learnsets[id] = {};
const PMOTSLearnsets = Dex.mod('alternatium').data.Learnsets;
for (const id in PMOTSLearnsets) {
const species = Dex.mod('alternatium').species.get(id);
const learnset = PMOTSLearnsets[id].learnset;
BattleTeambuilderTable['alternatium'].learnsets[id] = {};
for (const moveid in learnset) {
BattleTeambuilderTable['alternatium'].learnsets[id][moveid] = '8';
}
}
const LCLearnsets = Dex.mod('randomdex').data.Learnsets;
for (const id in LCLearnsets) {
const species = Dex.mod('randomdex').species.get(id);
const learnset = LCLearnsets[id].learnset;
BattleTeambuilderTable['randomdex'].learnsets[id] = {};
for (const moveid in learnset) {
BattleTeambuilderTable['gen8bdsp'].learnsets[id][moveid] = '8g';
BattleTeambuilderTable['randomdex'].learnsets[id][moveid] = '8';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

._. why are you removing bdsp support

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my bad, I overlooked that

@@ -1046,7 +1102,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
// Mods
//

for (const mod of ['gen7letsgo', 'gen8bdsp']) {
for (const mod of ['gen7letsgo', 'gen8bdsp', 'alternatium', 'randomdex']) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is more server-side, but we should probably make these mod files pmots and pmlc to make support consistent in future cases

@@ -1057,13 +1113,41 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
for (const id in modData.Pokedex) {
const modEntry = modData.Pokedex[id];
const parentEntry = parentData.Pokedex[id];
if (typeof parentEntry === 'undefined') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (typeof parentEntry === 'undefined') {
if (!parentEntry) {

Added back BDSP support for learnsets (sorry!) and changed things up to be more in line with general PMOTS/Leader's Choice support. Also changed isLC to isPetModLC for clarification.
@yakatk1012
Copy link
Author

I'd like to point out that the custom Pokemon added by Alternatium show up if you search for them in other formats.

BDSP:
deoxys_customs_bdsp

National Dex:
deoxys_customs_natdex

I am not sure how to disable this.

Make PMOTS only show OU mons, while making all other mons illegal.
@AnnikaCodes
Copy link
Collaborator

AnnikaCodes commented Jul 25, 2022

Alternatium isn't a pet mod playable on the server any more so I am going to mark this as a draft.

@AnnikaCodes AnnikaCodes marked this pull request as draft July 25, 2022 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants