Skip to content

Stat_txt.tbl Editing

Ar3sgice edited this page Sep 24, 2020 · 3 revisions

What is stat_txt.tbl

It is a file that contains the strings Starcraft use for button text and data text, like the names of weapons and armors.

How to edit stat_txt.tbl

The stat_txt.tbl editor is separated into two parts. The first part is "CPT", the other has string IDs and contents.

First, click CPT to generate a bunch of binary countoffs. There is a line in the end saying

//--- PUT YOUR STRING EDIT TRIGGERS HERE ---//

Use the second part to generate string editing triggers like this:

	MemoryAddr(0x006509b0, Add, 332);
	Set Deaths("Current Player", "Terran Marine", Set To, 1794992884);
	MemoryAddr(0x006509b0, Subtract, 332);
	MemoryAddr(0x006509b0, Add, 6845);
	Set Deaths("Current Player", "Terran Marine", Set To, 1292042349);
	MemoryAddr(0x006509b0, Add, 1);
	Set Deaths("Current Player", "Terran Marine", Set To, 1702260481);
	MemoryAddr(0x006509b0, Add, 1);
	Set Deaths("Current Player", "Terran Marine", Set To, 50361088);
	MemoryAddr(0x006509b0, Add, 1);
	Set Deaths("Current Player", "Terran Marine", Set To, 1869873491);
	MemoryAddr(0x006509b0, Add, 1);
	Set Deaths("Current Player", "Terran Marine", Set To, 112);
	MemoryAddr(0x006509b0, Subtract, 6849);

Put them inside the "PUT YOUR STRING EDIT TRIGGERS HERE" section to work.

Terran Marine is the correct behavior. It will work as long as you don't use "Use Custom Names in Trigedit" in SCMDraft.

The offset

It should start at the section where stat_txt.tbl has a lot of unused strings. After every trigger generation it will update the offset to after the newly edited ones.

It uses 27380 by default, which I think is actually the wrong value. Should be 26664 or something like that. Needs more testing.

If you edited so many text that it grows over 64 trigger actions

Use Trigger Slicer on the last trigger.