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

Rework Loadout/Upgrade System #11

Closed
FranticFairy opened this issue Jan 16, 2025 · 1 comment
Closed

Rework Loadout/Upgrade System #11

FranticFairy opened this issue Jan 16, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@FranticFairy
Copy link
Owner

The current loadout/upgrade system works... buuuut it's a bit of a mess, all things considered.

Between a massive nested switch statement and the wonky way I'm storing unit defaults and the completely lack of both Documentation and AI support, there's a lot to be desired still.

There is, however, a potential alternative, though it both needs testing for feasiblity and ideally support from Robosturm in the form of #1863 and potentially #1864; have seperate, "hidden" units that the Upgrade/Loadout function transforms the unit into upon being built, using the 'transformUnit' function.

These hidden units would hold all the stats for the upgraded units, allowing me to handle some things such as unlocking actions and increasing defense/range much more cleanly, and perhaps even make it possible to add fake AI support; it's possible to give the AI a different build-list from buildings, so it's possible to allow the AI to build these upgraded units directly. It would be a buff for them, but frankly, they need it.

And depending on how ACTION_BUILD_UNITS manages to bring up wiki pages, perhaps there's value in keeping these hidden units on the wiki, just so that it's possible to provide info on what the upgrades actually do.

The downside of this is that there'll be plenty extra unit files, and I'll need to touchup the unit.js and the battleanimations to account for things using the sprites of other things, but I think it'd be a net improvement.

@FranticFairy FranticFairy added the enhancement New feature or request label Jan 16, 2025
@FranticFairy
Copy link
Owner Author

On a side-note, this would also fix #3, and potentially #10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant