Gamergotten / Infinite-runtime-tagviewer

61 stars 18 forks source link

Rounding Values #140

Open Sey-C opened 6 months ago

Sey-C commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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

Gamergotten commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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 commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

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