Dev Journal #3: The Great String System Overhaul
How Fixing 15-Year-Old Code Finally Opens Elemental to the World
[p]By Brad Wardell[/p][p][/p][h2]Localization: How to double your market size[/h2][p]Here's a business truth that haunts game developers: English speakers represent only 40% of the strategy 4X gaming market. The other 60%? They're playing games in German, Chinese, French, Spanish, Polish, Russian, and so many others.[/p][p]For 15 years, Elemental was locked out of that 60%. That was because back in 2008, when we were developing the game, we were thinking mostly retail and that meant North America.[/p][p]Now, in 2025, when looking at remastering Elemental and combining FE, SK, and WOM into a single integrated game, we need to reach that other 60%. This means revisiting the way we do strings.[/p][p] [/p][h2]BEFORE: Hard-coded strings everywhere[/h2][h3]Problem 1: Hardcoded Strings in XML Data Files[/h3][p]Every piece of game text was baked directly into the data files:[/p][p]- [p]Type mismatches cause crashes: Pass a string where it expects a number? Crash.[/p]
- [p]Translation nightmare: German might need "für %d Schaden greift %s %s an" (completely different order)[/p]
- [p]Zero context for translators: What's the first %s? The second %s? Who knows![/p]
- [p]Elemental: War of Magic (2010) - English only[/p]
- [p]Fallen Enchantress (2012) - English only[/p]
- [p]Sorcerer King (2014) - English only[/p]
- [p]12,000+ hardcoded strings in XML files[/p]
- [p]514 FormatSTLString calls with printf formatting[/p]
- [p]467 broken parameter replacements (missing assignments)[/p]
- [p]71 C++ files with string handling code[/p]
- [p]3 competing string systems used simultaneously[/p]
- [p]Unit.cpp: 69 broken parameter replacements[/p]
- [p]BattleEngine.cpp: All three systems in the same function[/p]
- [p]ElementalUI.cpp: Calls to put %d and %s together for tooltips.[/p]
✅ Japanese localization: Now possible (125 million potential players)
✅ Korean localization: Now possible (75 million potential players)
✅ European languages: Germany and France and Poland are huge markets!
✅ Modding support: Community translations become feasible and modding is much more robust.[/p][p] [/p][h2]The Bottom Line[/h2][p]Fixing this for Elemental: Reforged wasn't just about clean code - it was about bringing Elemental to a worldwide audience.[/p][p]Sometimes the most important feature is invisible, but it was worth it.[/p][p]Now, finally, Elemental is for everyone.[/p]