SCRMaps
/
Sign in

Editing without breaking the map

Things that actually broke a map, and what stops them.

2 min read

The most dangerous operation is a bulk text edit, because unit names and on-screen text so often contain the same words.

Never change a unit name. Triggers reference units by name, so a single changed character stops the map compiling. Translation and typo fixes must apply only to the strings inside DisplayText.

So instead of a global find-and-replace, you constrain the edit syntactically: match only the string inside a DisplayText call and rewrite only that.

re.sub(r'DisplayText\("((?:[^"\\]|\\.)*)"', rewrite_body, text)
A substitution that can only reach inside DisplayText.

Then verify. Count the occurrences of each unit name and confirm they are unchanged, and diff the set of quoted strings outside DisplayText against a backup. “Looks right” becomes “does not compile” later.

When you ask for a translation or wording pass, ask for a programmatic comparison of every DisplayText rather than a read-through. A selective read always misses things.

Sign in to track your progress