• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

CrouchingLemur

Sergeant
97 Badges
Jan 3, 2016
85
465
  • Crusader Kings II: Charlemagne
  • Cities: Skylines - After Dark
  • Crusader Kings II: Jade Dragon
  • Pillars of Eternity
  • Cities: Skylines Deluxe Edition
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • The Showdown Effect
  • Semper Fi
  • Europa Universalis IV: Res Publica
  • Magicka
  • Leviathan: Warships
  • Knights of Pen and Paper +1 Edition
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • For the Motherland
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Third Rome
  • Dungeonland
  • Europa Universalis III
  • Hearts of Iron III
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Stellaris
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Conclave
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Way of Life
  • Mount & Blade: Warband
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • War of the Roses
  • Warlock: Master of the Arcane
  • Teleglitch: Die More Edition
Hello everyone!
Right now I'm working on improving localisation in 2 of my mods - making them more compatible to be precise.
In one of those mods, I want to change existing line to something else, in other I'm adding completely new lines.
Now, in both cases, in my mod folders I made folder localisation, and in them respectively .yml files: modname1_l_english.yml and modname2_l_english.yml.

Here is how first .yml file looks:

l_english:
#improved trading
TRADE_ITEM_HOLD_KEYS:0 "§GHold £ctrl to change 25 per click.\nHold £shift to change 500 per click.§!"

And here is how second .yml file looks:

l_english:
#my edict
edict_my_edict:0 "My Edict"
edict_my_edict_desc:0 "My Edict Description."

Now, the file with my edict is working properly, when I use that mod alone or with the other. But improved trading doesn't work either way. Right now my working mod improved trading has whole l_english.yml just copied with only one line changed and it works, but I wanted to make a file that wouldn't replace whole l_english.yml but only change TRADE_ITEM_HOLD_KEYS.

Can anyone help me do it?
 
Localization files are REALLY picky with encoding and indentation. Make sure after the l_english: every line of code has a space before the code.

You can also try another thing. In the mod that replaces something (that's the one not working, right?) rename the file to keep the vanilla name to see if it works.
 
I opened my name list in notepad++, moved some indentation around and after saving and reopening the file in windows notepad it had changed the apostrophe character to different symbols. You may want to open your file in windows notepad to ensure it's correct.
 
I'm having a similar issue on OS X, and I strongly suspect it's because TextEdit is doing something bad to the .yml file type upon re-saving. I already went through the whole "smart quotes" B.S. with another modding project so that's not the issue.

Anybody have a recommendation for a free OS X program that actually saves .yml files in a way that Stellaris accepts?
 
I can highly recommend Atom. It's a great open source text editor for all platforms.
And with a plugin it contains syntax highlighting for YAML files, which can be really helpful because one missing space could break your whole file. ;)
 
  • 2
Reactions:
Awesome, thanks for the tip. I'll play around with it tonight and see if that resolves the issue.

EDIT: Adding an entirely new .yml localisation file for organizational purposes didn't work, but modifying a copy of the original ship section localisation file (essentially just adding a single new line for the new battleship mid) worked out okay with Atom. So, I'll call it a victory. Thanks again.
 
Last edited: