Pages

Shared keys and cycling

Units of one builder with the same key form a group; pressing the key again within 1.5 seconds picks the next.

Several units of one builder can share a key. The first press picks one of them; pressing the key again soon after picks the next. Mods use this for related units, such as all the energy buildings on one key.

The worked example

In the build-keys example Rocko and Hammer share Z:

[GADGET6]
	{
	[COMMON]
		{
		id=1;
		name=ARMROCK;
		commonattribs=4;
		}
	quickkey=Z;
	}
[GADGET7]
	{
	[COMMON]
		{
		id=1;
		name=ARMHAM;
		commonattribs=4;
		}
	quickkey=Z;
	}

(Shortened: the full buttons are in the example's guis/ARMLAB1.GUI.)

With an Arm Kbot Lab selected:

Press Picks
Z Rocko
Z again within 1.5 s Hammer
Z again within 1.5 s Rocko
Z after a pause Rocko again

How a press picks

  • The first press picks the group's first unit on the shown page, or the group's first unit when the shown page has none, turning to its page.
  • Each press within 1.5 seconds of the last picks the next unit in cycle order, wrapping round and turning the page as it goes.
  • For a builder, "next" is the unit after the one placement is armed with; for a factory, the unit after the one the last press queued.
  • Shift with the key queues as usual in a factory.

The key works on every page: a unit need not be on the shown page. The key turns the menu to the page that shows it.

Cycle order

Cycle order is menu order (page, then button) until a player changes it. In the Build Menu Keys window, select a unit of the group and use UP and DOWN in the cycle list. The order is kept per mod, and a unit that joins the group later goes after the others.

Making and leaving groups

  • A mod makes a group by giving several build buttons one quickkey.
  • A player makes one by giving a unit a key other units already have: it joins them. In the window, a shaded letter is a key other units have.
  • A unit given a key of its own leaves its group.

Groups belong to one builder: the same units can be grouped on one builder and keyed apart on another.

What goes wrong

  • The second press picks the same unit: more than 1.5 seconds passed, so the press started on the shown page again.
  • A unit is skipped: a unit that no page shows now (a hidden unit) is passed over.
  • Everything on one key is slow to reach: a long group cycles one press at a time. Split it, or put the most used unit first with UP.

Next

Keys and order letters.