marzent / IINACT

A Dalamud plugin to run the FFXIV_ACT_Plugin in an ACT-like enviroment with a heavily modified port of Overlay Plugin
https://www.iinact.com
GNU General Public License v3.0
182 stars 41 forks source link

getVersion call is hardcoded to return 4.2.0 #35

Closed xpdota closed 1 year ago

xpdota commented 1 year ago
            RegisterEventHandler("getVersion", (msg) => {
                var version = repository.GetOverlayPluginVersion();
                return JObject.FromObject(new {
                    version = version.ToString()
                });
            });

This calls into:

        public Version GetOverlayPluginVersion() {
            return new Version(4, 2, 0);
        }

The purpose of adding this call to OP was to allow clients to know what OP functionality is available, but returning a hardcoded version that doesn't match up with the OP version that IINACT is wrapping makes it incompatible.

marzent commented 1 year ago

A fixed release of IINACT will always have a hardcoded version of OverlayPlugin; question is which version number makes the most sense here.

... makes it incompatible.

In what sense do you have an example?

I believe the danger of an overlay not working because of it expecting a current version is much higher than it not working by receiving a too high version.

Also the version of OverlayPlugin IINACT ships is very different from current upstream and was developed independently before the current non-ngld fork even existed.

Granted, it is being kept up to date with OverlayPlugin/OverlayPlugin changes (sometimes substantially altered), so it could report any version number in line with it; or maybe even a 2.X series because it is based on modern .NET

xpdota commented 1 year ago

Example: A new log line is introduced, and a trigger is able to give a better callout for a particular mechanic if it has this line available. If not, it needs to fall back to a more basic callout (example: P8S2 tower colors come from MapEffect lines, so you could directly tell the player whether to stand in the tower or not, but without that you have to tell them which color towers to stand in). The version is a convenient way to check if the user has a new enough OverlayPlugin version to support these lines.

marzent commented 1 year ago

Fixed with https://github.com/marzent/IINACT/commit/6a11fde7edfccb6f8097fcb45351dd6d2987422f

I didn't really like this change at first since it does require a solid auto-updating mechanism, but it does make sense.

xpdota commented 1 year ago

Thank you!