Difference between revisions of "WkTextMacros"
From Worms Knowledge Base
(added ascii limitation section and workaround script) |
(changed wont work to may not work) |
||
Line 33: | Line 33: | ||
== ASCII Limitation == | == ASCII Limitation == | ||
− | Currently the module does not call WA's character conversion function to map non ASCII characters into the [[WA_character_table]]. Therefore only ASCII characters work as expected. Anything else | + | Currently the module does not call WA's character conversion function to map non ASCII characters into the [[WA_character_table]]. Therefore only ASCII characters are guaranteed to work as expected. Anything else may display improperly. |
A python script has been created to work around this issue: https://gist.github.com/cgarz/78f10dbad37e8fac9bd30070976db938 | A python script has been created to work around this issue: https://gist.github.com/cgarz/78f10dbad37e8fac9bd30070976db938 |
Latest revision as of 04:26, 22 October 2021
wkTextMacros | |
---|---|
Developer: | terion |
Supported games: | W:A |
Supported W:A version: | 3.8.x |
Supported W:A editions: | |
Language: | C++ |
License: | Open-source |
Website: | TUS Page |
Download: | wkTextMacros (224 kB) |
This WormKit module implements automatic text macros in both lobby and in-game chat.
How to use it
- Upon first launch, the module will create a macros/ directory inside your WA installation dir.
- Inside macros/ directory create a .txt file with the name of your desired command (for example, macros/rules.txt will be available as /rules command)
- Edit this file with notepad and fill it with your desired text macro (save it as plaintext, ascii file)
- When in lobby or in-game, type /macros to see a list of all available commands
- Type the name of your command to send the text to all players
Notes
- The text files are scanned and read on game launch and whenever you use /macros command. Thus macro file creation/modification/deletion will be reflected only when you type /macros command or restart the game.
- Text macros in lobby are sent as a single message and are limited to 1024 characters
- Text macros in-game are split by newline character into separate messages and are limited to 256 characters per line. Up to 3 text lines can be used in a single macro.
- Spamming text macros will trigger automatic /ignore by all players, so keep your macros short and use this module with moderation.
- Do not use space or other special characters in command names
- Do not use command names that overlap with bult-in game commands (/test, /version, etc)
- This module has been tested with WA version 3.8.0. It will not work with WA 3.7.2.2 and earlier versions. It might work with newer WA releases if no significant changes are made to lobby or game chat functions.
ASCII Limitation
Currently the module does not call WA's character conversion function to map non ASCII characters into the WA_character_table. Therefore only ASCII characters are guaranteed to work as expected. Anything else may display improperly.
A python script has been created to work around this issue: https://gist.github.com/cgarz/78f10dbad37e8fac9bd30070976db938
Simply drag a macro text file onto the py or exe file and press W to convert it for WA. The file will now display properly in WA. But not outside it. Drag it again and press U to reverse the operation.
NOTE: Only characters that are in the WA_character_table can be brought back as they were. Anything else will have been translated into a space or a similar looking character that is in the table.