Pages

Download records

A download/*.tdf record puts one unit on one button of a builder's page, the way TA unit packs add units.

A download record is TA's way for an add-on unit to join a builder's menu without replacing the builder's GUI pages. Use one when the unit pack should also work in TA.

The worked example

download/MYUNIT.TDF from the add-a-unit example:

[MENUENTRY1]
	{
	UNITMENU=ARMLAB;
	MENU=3;
	BUTTON=5;
	UNITNAME=MYUNIT;
	}

The Arm Kbot Lab has one GUI page in stock TA, so MENU=3 gives it a second page, drawn from ARMDL.GUI, and MYUNIT takes that page's sixth button.

Fields

Field Meaning
UNITMENU The builder, by unit name
MENU The page, plus one: MENU=2 is page 1, MENU=3 is page 2
BUTTON The page's button, counted from 0 in the page file's gadget order: BUTTON=0 is the page's fifth gadget (GADGET4), the first after the page's header, font and arrows
UNITNAME The unit the button builds

The section name ([MENUENTRY1]) is free. One file may hold several records, for several builders.

How records are read

  • Every .tdf in download/ is read, files in name order, records in file order. Records for one button replace each other: the last one wins.
  • MENU raises the builder's page count, so a record can add pages. A page with no GUI file of its own uses the side's download page.
  • The unit joins the builder's build list for the AI as well.
  • A record whose MENU points at a page that is switched off (a zero-byte GUI file) fills nothing, but the unit stays on the AI's build list.
  • Under a mod that renames download (Escalation reads downloadsE), the stock download/ folder is not read. A mod's own downloadsE/ record wins over a stock record for the same button.

What goes wrong

BuildMenuRegistry: download entry MYUNIT for ARMLAB names button 5 that ARMDL.GUI does not have

The page file has no button at BUTTON+4. Use a lower BUTTON, or name a page the builder has.

  • The button is greyed: UNITNAME names a unit that did not load.
  • A stock unit disappeared: your record took its button. Cavedog's own bonus units use some download buttons too (the Flea is on the Arm Kbot Lab's page 2, button 1). Pick another button.
  • Nothing at all: UNITMENU names a builder that does not exist. Check the builder's FBI file name.

Next

aexmenus files, which need no page or button numbers.