1. Elemental: Reforged
  2. News
  3. Dev Journal #3: The Great String System Overhaul

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][p]Want to translate this to German? You'd need to maintain completely separate XML files for every language. Change Donya's abilities? Update it in 7 different places. Don’t forget, this means breaking every mod.[/p][p][/p][h3]Problem 2: Printf-Style Formatting That Crashes and Burns[/h3][p]At the same time, our UI strings used printf-style formatting:[/p][p][/p][p]The problems with this approach:[/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] [/p][h2]Why We Stopped After Sorcerer King[/h2][p]We released:[/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]Then we stopped. We had no choice. First, because these were 32-bit games and we could never fit the full game design into a single game because each one was a different aspect. Secondly, it became an ever increasing problem to have an “English only” game.[/p][p] [/p][h2]The 2025 Reforging: Fixing Everything[/h2][p]When we decided to create Elemental: Reforged, we knew this had to be fixed, but the scope was staggering:[/p][h3]The Archaeological Dig: What We Found[/h3]
  • [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]Some files were museums of bad practices:[/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]
[p][/p][h3]Step 1: Extract Everything from XML[/h3][p]Before (2010):[/p][p][/p][p]After (2025):[/p][p][/p][p]With the actual text in Strings.xml:[/p][p][/p][p][/p][h3]Step 2: Replace Printf with Named Parameters[/h3][p]Before (2010):[/p][p][/p][p]After (2025):[/p][p][/p][p] [/p][h2]The Business Impact: Finally Reaching the Other 60%[/h2][p]With these fixes complete:[/p][p]✅ Chinese localization: Now possible (1.4 billion potential players)
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]