Skip to content

[ENHANCEMENT] Increase Flexibility of InjectTableX Functions #114

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

Open
Draxiss314 opened this issue Apr 21, 2025 · 1 comment
Open

[ENHANCEMENT] Increase Flexibility of InjectTableX Functions #114

Draxiss314 opened this issue Apr 21, 2025 · 1 comment

Comments

@Draxiss314
Copy link

Draxiss314 commented Apr 21, 2025

Describe the problem which requires a new feature.

The InjectTableX functions fail to account for changes in the number or positions of columns implemented by other mods. I will use the InjectTableItemStats as an example for the rest of this issue, but this applies to any of the functions:

The current InjectTableItemStats() function is currently not coded to account for changes in the number or positions of attributes in the, nor recognize any additional custom attributes supplied by the user. If a modder wants to create additional attributes affectable by items (as demonstrated in my Thirst Resistance Example mod), they risk incompatibility with other mods, depending on load order. While I can account for mismatched row length and position in my code when my code, anyone else's who adds items to the game using InjectTableItemStats() will cause potential crashes.

Describe the solution you'd like

Ideally, I'd like to see InjectTableItemStats() be able to take in additional arguments, account for changes in attribute position, and account for changes in the number of attribute entries per row. This doesn't just help keep modding more compatibility friendly, but also helps future-proof against changes to vanilla Stoneshard.

Describe alternatives you've considered if any

Let users change the load order so people who add custom attributes can elect to go last.

Honestly however, if InjectTableItemStats() wants to be prioritized over manual table injection, it should be more robust.

Additional context

I quickly whipped up a fork to show what I mean:
InjectTableItemStats
InjectTableMobsStats
InjectTableSkillsStats
InjectTableArmor
InjectTableNewColumn (for generating new columns or moving columns around)
InjectTableWeapons

Note: I haven't actually tested these as I can't build MSL on Linux, which is why I didn't just straight-up ask to push to your branch. Also don't know if this is the most efficient way to go about this, but it's definitely A way.

@Draxiss314 Draxiss314 changed the title [ENHANCEMENT] Increase the flexibility of InjectTableItemStats() to Account of Attribute Positions [ENHANCEMENT] Increase the flexibility of InjectTableX Functions Apr 21, 2025
@Draxiss314 Draxiss314 changed the title [ENHANCEMENT] Increase the flexibility of InjectTableX Functions [ENHANCEMENT] Increase Flexibility of InjectTableX Functions Apr 21, 2025
@Draxiss314
Copy link
Author

Draxiss314 commented Apr 21, 2025

I made a fork with new and/or changed functions to demonstrate what I mean.

I'd build and test it myself but it really doesn't want to build on Linux right now.

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

No branches or pull requests

1 participant