Zero-K icon indicating copy to clipboard operation
Zero-K copied to clipboard

Mod vs vanilla ZK hotkey propagation issues

Open sprunk opened this issue 5 years ago • 7 comments

https://zero-k.info/Battles/Detail/1220853 apparently happens for Rafal's Conches here (reproduction idea: watch replay, /cheat /team N). I haven't heard of people reproducing it for non-Conches so far.

sprunk avatar Oct 21 '21 12:10 sprunk

Note that X actually appeared in Integral Menu on Morph button.

CarabusX avatar Oct 21 '21 12:10 CarabusX

We've discovered the hotkey inside zk_keys, this means that something must be adding it via epicmenu.

Some guesses:

  • maybe one of the mods adds this. Somebody was doing a "morph everything" mod. Maybe it adds the hotkey or relies on some old version.
  • maybe a map? Heavily doubt so but some speedmetals have those free fusions, maybe they morph or something.

If we don't find anything, then we can add an ultra-crude if action == "morph" and key == "x" then debug.traceback() end line to epicmenu hotkey handler.

sprunk avatar Oct 21 '21 13:10 sprunk

Apparently dyth's mod https://zero-k.info/Mods/Detail/11 contains a zk_keys file with that entry. Presumably what happens is it gets loaded from the mod but saved to the user's disk.

sprunk avatar Oct 21 '21 13:10 sprunk

Yes I confirmed that it is added to local LuaUI\Configs\zk_keys.lua after playing that mod, then stays here, and then appears in normal ZK.

CarabusX avatar Oct 21 '21 14:10 CarabusX

I think the correct way to solve this would be to replace zk_keys.lua with _keys.lua. Epicmenu and everything else that uses zk_keys would need updating.

GoogleFrog avatar Oct 22 '21 06:10 GoogleFrog

What if mods don't change their shortname (i.e. they are still "zk")?

What about propagation? I think mods should still use zk_keys (as in, whatever your vanilla settings are) at least as an input, because if somebody rebinds keys to something they shouldn't have to rebind everything from scratch in a mod.

sprunk avatar Oct 22 '21 09:10 sprunk

If mods use shortname "zk" then we can very reasonably be annoyed at them.

I didn't think about propagation, that is a big issue.

GoogleFrog avatar Oct 24 '21 00:10 GoogleFrog