Carrion Fields

CF scripts for CMUD 3.12

Current version is attached below. Tested for CMUD 3.12.

Download the xml-file "CFhighlights" and import it to your CMUD session.

A module named "CFbase" will be added to your package. It has all necessary stuff.

Recommended settings (for HD widescreen monitor):

"Options->Colors"
Preferences->Styles->Session->Default Session: text color "silver", font "lucida console" size 11.
Preferences->Styles->Session->Command Echo: text color "khaki", font "lucida console" size 11.
Preferences->Styles->Session->Information: text color "DarkTurquoise", font "lucida console" size 11.


General structure

CFbase module has several subclasses:

1) Highligths - contains all highlight triggers.

2) General - contains general purpose scripts.

3) Logger - contains a set of scripts to support CMUD HTML logging capabilities, adding colors to plain text logs and converting colored logs into format compatible with the Dioxide and Official CF boards.

4) Prompt - contains two prompt triggers.

- an actual prompt trigger (firing without EOF) that detects a prompt and raises "Prompt" event. You can use it to activate your own triggers.

- prompt splitter. This is a "normal" trigger which goal is to split an incoming prompt and text when CF joins them together. This is important because many highlight triggers have patterns that start from the beggining of a line (for speed). And, after all, it looks cool.

Notice: the triggers' patterns are supposed to catch a generic CF prompt which starts with an angle bracket and have at least three numbers inside (like <10hp 12m 23mv indoor> or civilized <100%hp 100%m 100%mv 1000tnl (50.00%)>). If you have wierd prompt you will need to update regex patterns accordingly, otherwise highlight stuff will fail to work on things that follow a prompt on the same line.

5) ConfigureClass - this alias enables/disables class/cabal specific highlights. Typical usage:

ConfigureClass "warrior|battle" 
ConfigureClass "warrior|empire|bladesect" 

(parameter - CMUD's string list with classes to enable)


Highlights

Colors

Colors are defined in Highlights/Colors class. You can replace them with your colors, but mine are still better.

Combat highlights

Class Highlights/CombatHi contains the core highlights for combat rounds. If you don't want any other highlights but these, you can just pick all regex patterns from this class and port it to your favorite client.

What exactly it colors:

  • Your damage to enemies. Yellow on lightcyan.
  • Enemies' damage to you. Light red.
  • Your parry/shield/dodge moves. Partial lightcyan.

Notice: third party damage is untouched. Use default CF colors so you will see how people hit each other in dark red.


Round example:

Class/cabal specific highlights

These classes define highlights specific for a class/subclass/cabal. You can enable/disable them as needed (for speed).

Spell/Skill/Event highlights

These are generric spell/skill/event highlights.

Warning: highlight tirggers are terminal

As soon as one of them fires the current line will be not parsed against other triggers anymore. This is done for speed.

If you wish other triggers with the same patterns to fire you can do any of following:

1) Make it higher priority (assign lower priority value) so it will fire before the corresponding highlight. If you still want the highlight to work, do not make your trigger terminal.

2) Change the highlight trigger making it not termnial (uncheck the corresponding checkbox in a script editor). In this case your trigger with the same pattern can be both: lower of higher priority.


Zombies gag engine

Class General/GagZombies implements the zombies gag engine. Its purpose is reduction of spam from a necromancer's servitors. Normally, golems and zombies movements take several lines of text (one line for each servitor) and since a necromancer can raise up to 7 mobs they may produce a lot of spam. This engine attempts to compact that spam into a single line.

Alias gagzom activates or deactivates the engine. You can also turn off the gager by pressing the "ungag zombies" button which appears when the engine is activated.

Example:

Normal CF output:

With activated zombies gag engine:


Logger

This class contains several useful scripts that support CMUD HTML logging capabilities. These scripts are integrated into the highlight system, they use CFbase/Highlights variables and classes, so it makes sense to keep the whole system consistent and make changes carefully.

How to setup HTML logging in CMUD:

Go to Preferences->Session->Logging and check "Log commands", "Log after triggers are executed", "Log MXP/HTML"

Once it's done your saved logs via "File->New/Append Log" or "File->Save Buffer..." will contain html tags with colors. However, the raw CMUD html log isn't great. It doesn't define font/charset/formatting and there are also bugs with unclosed color tags in CMUD 3.08 (Zugg promises to fix them soon). But don't panic yet. There is a script in the Logger class that fixes these problems.

I suggest you to save your logs with ".txt" extension so you wouldn't try to open a raw CMUD html log with your favorite browser.

LodDir variable - defines the default path where all scripts look for input files and put results. In this distribution it points to "C:\" and you obviously want to change it to something meaningful. Find a good place for all your temporary/draft logs and assign it to this variable.

LogCharset variable - defines the charset. Current value is "windows-1251" (russian), english men should not worry about it, but if you want to add comments in some wierd orcish language, change this value accordingly.

ReplayLog <plain-text-log> - this script replays a plain text log line by line with all highlight triggers temporarily enabled. You can save your scroll buffer (I suggest to keep it large enough: 10-20k lines) as a html log so you will have a colored version of your plain text log. Of course, you can't restore all colors because this script doesn't know where are your commands and where is the mud output, plus it can't restore original colors coming from CF itself and the prompt-split tirgger is also disabled, but overall, the majority of combat rounds and other stuff will be colored. Plus it tries to color "tells" with default CF colors.

ReformatHTML <raw-CMUD-html-log> <css-html-log> - this script creates a "true" html log from a raw CMUD html log. It adds black background, monospaced font and replaces color tags with style tags. The resulting file is a complete html log you would want to keep in archives, review in your browser, show your parents, children and girl/boyfrields. This script also adds an empty comment template header. You can fill it or just remove it.

Typical usage:

1) Open a raw CMUD html log with a text editor, trim it as necessary or copy/paste interesting parts in a new file. Don't break html tags in process.

2) Add comments (if you wish) to your draft file. Everything starting from "// " (2x slashes + space) until the end of the line is considered as a comment and will be colored accordingly

3) Run the script on your draft file. The second parameter is an output file name (in LogDir path).

ToDioxide <css-html-log> <dioxide-ready-log> - this script converts a css-html-log (created by ReformatHTML) into Dioxide compatible log. There is an autoformat option for Dioxide log board but it has limitations. You can't post formatted logs as replies (which is useful if you want to post a group of logs together), it can't preserve original CF/CMUD colors and it fails to color a lot of stuff.

Using the output of this script you can post your log on the Dioxide boards with original colors and formatting, just copy/paste it into your message. Remember to uncheck the "Format" checkbox before you submit your log.

ToBBCode <css-html-log> <official-board-ready-log> - this script converts a css-html-log (created by ReformatHTML) into BBcode suitable for posting on the Official CF boards. It also adds a little hack to preserve empty lines that are normally eaten by the official boards engine. Just copy/paste the output file of this script into your post on the official boards (you may preview but copy/paste it again before submitting). Warning: if you preview your log and it contains "[" or "]" symbols, copy/paste it again before posting or these symbols and text between them will be removed. Also check the checkbox "Check if you DO NOT wish to use emotion icons in your message" because some sequences in your log may be considered as such.

Flow examples:

1) How to make a colored version from a plain text log for your archives

- ReplayLog plain.txt

- in CMUD: save buffer -> raw.txt

- ReformatHTML raw.txt log.html -> Show log.html to your mother.

2) How to save a fight from a scrollback buffer and post it to the Dioxide board.

- in CMUD: save buffer -> raw.txt

- edit raw.txt in a text editor. Trim, add comments.

- ReformatHTML raw.txt log.html. Review it in your favorite browser.

- ToDioxide log.html log.diox

- copy/paste log.diox into your message and uncheck "Format" checkbox before posting.

Example: Dioxide log board: Parting blow is overpowered

3) How to format and post your plain log to the Official CF boards

- ReplayLog plain.txt

- in CMUD: save buffer -> raw.txt

- edit raw.txt in a text editor. Trim, add comments.

- ReformatHTML raw.txt log.html. Review it in your favorite browser.

- ToBBcode log.html log.bbcode

- copy/paste log.bbcode into your message on the official forums.

Example: Official CF log board: Parting blow is overpowered