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

Dynamic Trainer Battle Script Building #5938

Draft
wants to merge 42 commits into
base: upcoming
Choose a base branch
from

Conversation

u8-Salem
Copy link

@u8-Salem u8-Salem commented Jan 3, 2025

Provides a framework for dynamically generating trainer battle scripts and reworks how trainer battle parameters are stored

Description

I provided an in-depth explanation here

Short version:

In the current version different variations of trainerbattles such as playing the encounter music or not are handled as entirely different trainer battle types. This introduces a framework to dynamically build the trainer battle script, depending on the provided parameters. So if the parameter for 'play music' is given, then that part of the script will be executed vise versa.
Also allows for easy extension and introduction of new variations (e.g. applying some movement to the trainer before the battle starts).

Also consolidates all parameters into a struct that lives in EWRAM and is easily accessible and mutable.

Also makes first steps to more clearly separate different types into these categories:

  • normal trainer battles (single/doubles/approaching)
  • multi trainer battles (single/double/wild)
  • facility trainer battles (trainer hill/battle facilities)
  • special trainer battles (e-reader/secret base)

Images

example of a simple modification with this framework:
script_building_example

Feature(s) this PR does NOT handle:

  • does not handle rework of non-normal trainer battles
  • see Scope section of the above linked document

Things to note in the release changelog:

  • not sure what should go here tbh.
  • probably link to the tutorial document when its done

Discord contact info

u8.salem

include/battle_setup.h Outdated Show resolved Hide resolved
@Pawkkie Pawkkie added the type: big feature A feature with big diffs and / or high impact / subjectivity / pervasiveness label Jan 3, 2025
@u8-Salem u8-Salem marked this pull request as ready for review January 4, 2025 18:26
@u8-Salem u8-Salem marked this pull request as draft January 7, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

3 participants