Extra commands overlapping normal commands

Chris H.'s Ultima / ACS-style game development system!

Moderators: Ice Cream Jonsey, joltcountry

rld
Posts: 223
Joined: Sun Jan 25, 2009 2:17 am
Location: Dallas, TX

Extra commands overlapping normal commands

Post by rld »

Here is a small discovery that I made while poking around in the portion of the ACK source code that handles player commands. Depending on what you are trying to do, this may be helpful for some of you.

As described in the ACK manual, ACK allows four 'extra commands' to be defined for each game (page 4 of the configuration editor). Each of these commands consists of a key and a macro that is run when the key is pressed. These keys must be standard keys (no arrow keys, Fn keys, ALT+ or CTRL+ keys).

Standard keys with predefined meanings for the ACK engine are:

Space - Pass turn
TAB - Reload data (for development)
A - Attack
L - Look
D - Drop
G - Get
T - Talk
X - Exit (Vehicle)
B - Board (Vehicle)

If you set an 'extra command' to use any of these keys, it won't do anything because the standard command will already have been accepted by ACK and there is no processing of extra commands after this point.

There is an additional set of commands, however, which use different rules. These are:

I - Show player status and inventory
U - Either 'use' for misc items only, or 'use' for misc items, readying weapons, and using spells/skills (depending on config setting)
C - Cast (if Use is not set to handle spells/skills)
R - Ready (if Use is not set to handle weapon/armor selection)

These four commands are handled slightly differently by ACK, and so it is possible to set an 'extra command' to use the same character as one of these commands. This can be done whether or not the command would normally be handled by ACK. If ACK assigns a meaning to the command, the normal ACK command will be run first, and then your 'extra command' will be run.

Example 1:

Extra command #1 is set to 'I'. When 'I' is pressed, the normal ACK info/inventory screen will appear. When this screen is exited (by pressing ESC), the macro defined for extra command #1 will execute.

Example 2:

With the config setting set to "SEPARATE USE/READY/CAST KEYS", extra command #2 is set to 'R'. When 'R' is pressed, the Ready Weapons/Armor selection screen will appear. After this screen is exited, the macro for extra command #2 will execute.

Example 3:

With the config setting set to "USE KEY ALSO READY/CAST", extra command #3 is set to 'C'. When 'C' is pressed, only the macro for extra command #3 will execute.

Heather Harrison
Posts: 44
Joined: Fri May 21, 2010 8:40 pm

Post by Heather Harrison »

This is good to know. I have now used this to combine the I and Z commands.

Thanks.

Heather

Post Reply