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

Rounding Values #140

Open
Sey-C opened this issue Feb 27, 2024 · 10 comments
Open

Rounding Values #140

Sey-C opened this issue Feb 27, 2024 · 10 comments

Comments

@Sey-C
Copy link

Sey-C commented Feb 27, 2024

Is there a particular reason that the values in tag files get rounded to two decimal places in IRTV? Is there some way to change this to see the full value of a decimal like you can for legacy games in Assembly?

For instance, if you're looking at autoaim angles for a gun in the weapon tags, you can only see two decimal places worth of precision. Since those angles are given in radians, it creates a situation where you can only determine the default value of the parameter to within about 0.5 degrees of its true value (e.g. both 0.025 and 0.0349 radians get rounded to 0.03). Any values less than 0.005 get rounded to 0 as well.

@Connor-jt
Copy link
Contributor

i dont recall there being any intentional rounding, nor should there be
it would probably be when the floating-point numbers are converted to strings, that it would round anything

im not sure if this issue occurs with the other tools, but there are other tools out there for viewing tag data if thats all you're trying to do

@Sey-C
Copy link
Author

Sey-C commented Feb 27, 2024

It also affects values that have been edited and poked in menus that are expanded, collapsed, then expanded again. For example, this (fire recovery time):

IRTV Before

becomes this:

IRTV After

It just affects how the value is displayed though. It doesn't change the actual effect that the poke has on the game. Do you happen to know where in the code the floats would be getting converted? What are the alternatives for viewing tag data in Infinite?

@Connor-jt
Copy link
Contributor

It also affects values that have been edited and poked in menus that are expanded, collapsed, then expanded again

this makes sense, as it doesn't cache values in any way, so they're just re-read and rounded when its reopened

Do you happen to know where in the code the floats would be getting converted

https://github.com/Gamergotten/Infinite-runtime-tagviewer/blob/master/Interface/Controls/TagEditorControl.xaml.cs#L769
it looks like it could be either tostring's fault, or the memory dll's fault here
most likely tostring is the cause though

What are the alternatives for viewing tag data in Infinite

in order of most usable to least usable,

probably the most feature complete and usable of the tools
https://github.com/Coreforge/infiniteExplorer

UI is a little lacking but it'll probably do the job
https://github.com/urium1186/HIRT (i have no clue where you're supposed to download this from, nor whether its even compile-able)

potentially functional tool with a nicer UI
https://github.com/Z-15/Halo-Infinite-Tag-Editor

unfinished tool
https://github.com/Codename-Atriox/TagEditor

im not sure whether any of those tools work right out of the box though

@Sey-C
Copy link
Author

Sey-C commented Feb 27, 2024

Awesome, thanks
I'll take a look at this stuff

@Gamergotten
Copy link
Owner

Closing as this is basically a non-issue, having the length of the decimal being customizable would be nice, but possibly impractical.
A better solution might be to have a dedicated type for angle types, so that it can show degrees instead of radians.

@Sey-C
Copy link
Author

Sey-C commented Mar 15, 2024

Any solution would be appreciated. I think this especially impacts the angle values that get rounded to zero, and I've seen instances where people mistakenly believe certain weapons have no headshot prio angle or error angle cones, for example

@Connor-jt
Copy link
Contributor

if you find/create a solution (there might be a decimal length variable in the to string thing), then you're welcome to make a pull request with the changes
otherwise i dont think anyone is going to go through the effort

@Sey-C
Copy link
Author

Sey-C commented Mar 17, 2024

Yeah, fair enough. I figured I'd bring this issue up in case it was just an oversight with a simple fix, but I'm not trying to twist anyone's arm over a free tool.

I tried messing around with the formatting of the tostring code that you suggested, but the only thing I managed to accomplish was to add extra zeros to the end of the decimals lol. I'm fairly out of my depth when it comes to this stuff, so I don't know if I'm missing something or the issue lies elsewhere.

tostring edit

@Sey-C
Copy link
Author

Sey-C commented Mar 18, 2024

Oh, one other thing I forgot to mention. This issue also prevents users from being able to revert to the original value of these rounded numbers. The tool reverts the parameters back to the rounded values, not the original values.

For example, the Bandit Evo has an autoaim angle of 2 degrees, which is about 0.0349 radians. This value gets displayed as 0.03 radians in IRTV, but the behavior of the gun still correctly matches 0.0349 radians in-game. However, if you change this value then try to revert it back, it changes the actual value to 0.03 (or 1.72 degrees), making it less than it should be, and causes the gun to behave differently than it did to start with. That's probably not that surprising, but I figured it was worth mentioning.

@Gamergotten
Copy link
Owner

yeah that does sound unintentional
reopening, i'll check it out with the next update if the tool can even work after EAC is added

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

3 participants