Blueprints and code altering them
- Dominant language
- Lua
- Stars
- 264
- Forks
- 260
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 21
Description
This is not a bug in general but rather a conceptual reflection on things that are currently finding their way into the game code or are already present. It's about circumventing the unit's blueprints (BP) through the code, also known as normalizing.
Making adjustments in the overall Blueprint (BP) is generally good, but I don't see any valid reason to override anything via the code beyond or during the initial blueprint loading phase.
Blueprints are meant to be the source of truth. They should be the only source of truth. Quoting from the Wiki:
> Its purpose is to accurately and unambiguously capture all the geometric features of a product or a component. The end goal of an engineering drawing is to convey all the required information that will allow a manufacturer to produce that component.
While SC's blueprints are not exactly drawings, everything inside the unit's directory combined can be considered as such. That's how the creators designed this game, and it's also the reason why we can do so much today. If any piece of code tries to "bend" anything here and there, blueprints become less and less the source of truth. For example, see this commit: https://github.com/FAForever/fa/commit/93dac72c2385854d0ea0fd610b672576a9522cf1#r133218656
Let's consider this as a moment to pause and reflect on where we're heading with such changes. This is not a "rant" but a call to rethink our approach.
I'm not against any changes in units at all, but they should be done in blueprints whenever possible. If not, at least a fair effort should be made to attempt to put it in blueprints.
Ejs
Contributor guide
Research direction
Start by reading commit 93dac72c2385854d0ea0fd610b672576a9522cf1 and its discussion, then compare the referenced code changes with the affected unit blueprints and unit directories. Done would require an agreed approach for keeping blueprints authoritative and a defined, project-wide scope for changing existing code that alters them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- game-dev
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100