Difference between revisions of "WkTextMacros"

From Worms Knowledge Base

Jump to: navigation, search
(Created page with "{{lowercase title}} {{ParentArticle|WormKit}} {{Software_infobox | name = wkTextMacros | developer = terion | games = W:A | waver = 3.8.x | waedit...")
 
(added ascii limitation section and workaround script)
Line 31: Line 31:
 
* Do not use command names that overlap with bult-in game commands (/test, /version, etc)
 
* 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.
 
* 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 work as expected. Anything else displays 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.

Revision as of 02:22, 14 October 2021

(Up to WormKit)
wkTextMacros
Developer: terion
Supported games: W:A
Supported W:A version: 3.8.x
Supported W:A editions: This item is compatible with the CD edition of W:A.  This item is compatible with the Steam edition of W:A.This item is compatible with the GOG edition of W:A.
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

  1. Upon first launch, the module will create a macros/ directory inside your WA installation dir.
  2. 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)
  3. Edit this file with notepad and fill it with your desired text macro (save it as plaintext, ascii file)
  4. When in lobby or in-game, type /macros to see a list of all available commands
  5. 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 work as expected. Anything else displays 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.

Personal tools