Warcraft II Forum

Warcraft II => Mods & Development => Topic started by: Nox on December 15, 2019, 09:10:18 AM

Title: F2 COLOR ALLY plug in.
Post by: Nox on December 15, 2019, 09:10:18 AM
There a probleme with the F2 color ally plug in..

Everytime you press F2 it bring you back to your starting location... is that possible to keep the focus where you are?
Title: Re: F2 COLOR ALLY plug in.
Post by: Lambchops on December 16, 2019, 12:54:33 AM
I think the return to start is the original game function of the F2 key.

On my system the call to GetAsyncKeyState() intercepts the F2 key before it gets to the game. If it is activating both the allied colors and the return to start then the only fix would be changing the allied colors to a different key.

You can change the activation key with a hex editor if you want.

If you edit allied_color.w2p you should find a 0x71 byte at offset 0x00000572

This is the virtual key code (https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes) for the F2 key. You can replace this byte with a different code to change the key.

i.e. if you make that byte 0xC0 you will change it to the [`/~] tilde key (next to the [1] key).
Title: Re: F2 COLOR ALLY plug in.
Post by: Available on December 16, 2019, 11:07:16 AM
That not so easy
"tilda", "delete", "backslash" keys won't work, probably because "w2local", idk.

Here is version with "insert" key.
Title: Re: F2 COLOR ALLY plug in.
Post by: Lambchops on December 17, 2019, 04:11:59 AM
That not so easy
"tilda", "delete", "backslash" keys won't work, probably because "w2local", idk.

Here is version with "insert" key.

Cool. Thanks for that :)
Title: Re: F2 COLOR ALLY plug in.
Post by: Available on November 14, 2021, 02:38:28 AM
One more modification of allied color plugin (toggles with INS key)

Archive contain two version:
Enemy_red (standard)
Enemy_orange (clearly visible on all tilesets)

(https://forum.war2.ru/index.php?action=dlattach;topic=5471.0;attach=4215)