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

Add several useful blueprint modding functions #6669

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

lL1l1
Copy link
Contributor

@lL1l1 lL1l1 commented Feb 20, 2025

Description of the proposed changes

  • Add a function that allows creating hot-reloadable blueprint modding functions, in contrast to hooking ModBlueprints which requires a full session restart.
  • Using "__nil" in a merge blueprint value sets the field to nil. This greatly simplifies anything involving such bps.
  • Document the old way of adding/removing categories from blueprints.
  • Add a function to add categories to a blueprint.
  • Add a function to safely merge changes into weapon blueprints (since bp.Weapon is an array).
    • Add a way to do this from inside a merge blueprint. I added this since such a way exists for categories too. It's different from the function in that it's easier to understand is more contained, while the function can be applied programmatically.

Testing done on the proposed changes

Using the debug blueprint file works as expected.

Additional context

These are useful things I made while working on the SACU rebalance mod.

Checklist

  • Changes are annotated, including comments where useful
  • Changes are documented in the changelog for the next game version

Gives lua access to all blueprints (like `ModBlueprints`) but using a hot-reloadable per-source format instead of a hook format (which requires session restart to reload).
This helps handle the array issues of the Categories table
This allows setting blueprint fields to `nil` by defining a field as `"__nil"`, which saves a lot of complexity compared to setting fields to `false` to remove them.
@lL1l1 lL1l1 added type: enhancement feature: mod compatibility related to FAF compatibility with mods labels Feb 20, 2025
@lL1l1 lL1l1 marked this pull request as ready for review February 20, 2025 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: mod compatibility related to FAF compatibility with mods type: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant