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

[invader-extract] Try and reset defaulted values on extraction. #185

Open
Aerocatia opened this issue Oct 22, 2020 · 1 comment
Open

[invader-extract] Try and reset defaulted values on extraction. #185

Aerocatia opened this issue Oct 22, 2020 · 1 comment
Labels
invader-extract The issue has to do with invader-extract

Comments

@Aerocatia
Copy link
Collaborator

Aerocatia commented Oct 22, 2020

As more cases get found where default values can be influenced by other variables, it might be better to try and reset values to zero on extraction so the tag better matches what it probably was before it was built.

To do this we would have to check if the current value in a field matches what it would have been defaulted to had it been zero under current circumstances, and if so, set the value to zero.

A case where this is important is sound tags. Some values could have been defaulted differently based on the sound class, and if these values are pre-set in the extracted tag it would cause changing the sound class afterwards to have a different effect than if it had been changed in the original tag.

side note, I think invader-sound defaults things when remaking a tag, we might need to have it not do that.

@Aerocatia Aerocatia added the invader-extract The issue has to do with invader-extract label Oct 22, 2020
@SnowyMouse
Copy link
Owner

SnowyMouse commented Oct 22, 2020

This is doable, I'm not sure it's a good idea to assume the original tag was 0 in all cases.

As you know, there are values that get defaulted even when they aren't 0, so there is no way to retrieve this information. Invader typically warns about these, of course, but they are still more-or-less modified.

Also, there are entire structures that get added by default, such as pathfinding spheres. For pathfinding spheres, one would have to figure out which object referenced the collision model, and this has a chance of failing if multiple objects reference the same collision model, as at that point, we wouldn't know if they intended for the pathfinding sphere to be that big for everything or if they just let the map builder do it.

Also, of course, resetting defaulted values doesn't necessarily make it like the original tag. Some tags, even Bungie tags, have the values set to the default value in the original tag file, so now it will actually match less.

I think it would be better to do this on a case-by-case basis. Have some values get reverted but not all.

@SnowyMouse SnowyMouse added this to the Complete Editing Kit milestone Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invader-extract The issue has to do with invader-extract
Projects
None yet
Development

No branches or pull requests

2 participants