A mod's default build keys
Each build button's quickkey on the builder's GUI page is that unit's default key on that builder.
A build key picks a unit from the shown build menu, as a click on its button
would. A mod gives its units default keys with the quickkey field of each
build button on its builders' GUI pages. Players can change them later.
The worked example
Download the build-keys example. Its guis/ARMLAB1.GUI replaces the Arm Kbot Lab's first page and keys its five units. One button:
[GADGET4]
{
[COMMON]
{
id=1;
assoc=77;
name=ARMCK;
xpos=0;
ypos=27;
width=64;
height=64;
attribs=32;
colorf=15;
colorb=0;
texturenumber=0;
fontnumber=0;
active=1;
commonattribs=4;
}
status=0;
text=;
quickkey=K;
}
| Unit | Key |
|---|---|
| ARMCK | K |
| ARMPW | Q |
| ARMROCK | Z |
| ARMHAM | Z (shared with ARMROCK) |
| ARMJETH | Y |
Install it with ADD MOD... and SET ACTIVE, select an Arm Kbot Lab and press K: the lab queues a Construction Kbot. Each picture shows its key in a small badge in its top-right corner.
The quickkey field
- A value starting with a letter is that letter:
quickkey=K;. - Anything else is a character code:
quickkey=121;isy. quickkey=0;, or no field, gives no key.- Case does not matter:
Kandkare the same key.
Per builder
Keys belong to a builder's own pages: the key on a button is that unit's key on that builder only. One unit can have Y on one builder and nothing on another. A unit placed by a download record takes the key of the button it fills; a unit no GUI button placed takes the key the unit has on the first builder (by name) that keys it.
TA and AEX
Stock TA's build pages carry no keys, and TA itself never acts on a build
button's quickkey. So in stock TA no unit has a build key until a player
gives it one (the Build Menu Keys window).
Mods that patch TA to use them, such as Escalation, carry one per button,
and AEX uses those as the mod's defaults in every rule set and every look.
Keys are kept per mod: the active mod's id, or ta for stock TA. Changing
a key in one mod never changes another.
What goes wrong
aex.log counts the keys read when a game starts:
BuildMenuRegistry: 5 build-menu key(s) from the GUI files (0 repeat(s) keyed differently on another menu: the first kept)
- No such line: no build button has a
quickkey. Check that the page file is inguis/(or the mod's renamed GUI folder) and named after the builder. - A key does nothing: the builder has an order on that key, and the order wins (keys and orders).
- Digits 1 to 9 always pick buttons by position in build placement; avoid them as build keys.