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

Trainer Party Pools #5731

Open
wants to merge 24 commits into
base: upcoming
Choose a base branch
from
Open

Trainer Party Pools #5731

wants to merge 24 commits into from

Conversation

hedara90
Copy link
Collaborator

@hedara90 hedara90 commented Nov 28, 2024

Description

Allows trainers to generate their party from a curated pool of pokemon defined in the trainer party.
This feature changes nothing about trainers.party or trainers.h if it's not used.
To use this feature, simply define a Party Size that lower than the amount of defined pokemon for the trainer in trainers.party or .partySize and .poolSize in traners.h where poolSize is larger than partySize and matches the number of defined pokemon.
Optionally Pool Rules can be defined for the trainer to change which rules should be applied to the trainer.

Mons in the pool can have tags that change how the party is picked from the pool.
If a mon has the tag Lead the first mon in the party will be picked from all the pool members with this tag.
If a mon has the tag Ace the last member of the party will be picked from all the pool members with this tag.
Other tags can be marked as POOL_TAG_REQUIRED in struct PoolRules poolRules which will force that tag to be included as early as possible. (Not completely implemented right now)

Rules for the pools also include forcing unique species or NatDex numbers and unique items.
Items can also be excluded from the item uniqueness with a list.

Pool max size is currently set to 64 in trainerproc. But party generation is limited to a maximum size of 255 since index 255 is used for "No mon chosen yet".

Images

trainerPool

Things to note in the release changelog:

  • Documentation on how to use this can be found under docs/tutorials/how_to_trainer_party_pool.md

Discord contact info

hedara

@hedara90 hedara90 added the new-feature Adds a feature label Nov 28, 2024
src/battle_main.c Outdated Show resolved Hide resolved
@hedara90
Copy link
Collaborator Author

Preliminarily ready for review.
Things left to do:

  • Tests
  • Implement pool verification

Replacement trainer for Tiana for testing.

=== TRAINER_TIANA ===
Name: TIANA
Class: Lass
Pic: Lass
Gender: Female
Music: Female
Double Battle: Yes
AI: Check Bad Move
Party Size: 3
Pool Rules: Weather Doubles

Zigzagoon
Level: 4
IVs: 0 HP / 0 Atk / 0 Def / 0 SpA / 0 SpD / 0 Spe

Shroomish
Level: 4
IVs: 0 HP / 0 Atk / 0 Def / 0 SpA / 0 SpD / 0 Spe

Psyduck
Level: 4
IVs: 0 HP / 0 Atk / 0 Def / 0 SpA / 0 SpD / 0 Spe

Shellder
Level: 4
IVs: 0 HP / 0 Atk / 0 Def / 0 SpA / 0 SpD / 0 Spe

Mew
Level: 4
IVs: 0 HP / 0 Atk / 0 Def / 0 SpA / 0 SpD / 0 Spe
Tags: Ace

Giratina
Level: 4
IVs: 0 HP / 0 Atk / 0 Def / 0 SpA / 0 SpD / 0 Spe
Tags: Ace

Vulpix
Ability: Drought
Level: 4
Tags: Lead / Weather Setter

Torkoal
Ability: Drought
Level: 4
Tags: Lead / Weather Setter

Bulbasaur
Ability: Chlorophyll
Level: 4
Tags: Lead / Weather Abuser

Cherrim
Level: 4
Tags: Lead / Weather Abuser

@hedara90 hedara90 marked this pull request as ready for review December 16, 2024 21:46
@hedara90
Copy link
Collaborator Author

(Almost) ready for review, just missing pool verification.
Very much usable, assuming all pools are valid, worst case they can be padded with random mons.
Documentation is in docs/tutorials/how_to_trainer_party_pool.md

@pkmnsnfrn pkmnsnfrn added the type: big feature A feature with big diffs and / or high impact / subjectivity / pervasiveness label Dec 20, 2024
@hedara90
Copy link
Collaborator Author

Ready for review.
Do not merge before #5337

@hedara90
Copy link
Collaborator Author

Split all the pool functions into its own file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature Adds a feature type: big feature A feature with big diffs and / or high impact / subjectivity / pervasiveness
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants