I've made this recently, but I'm not using it anymore, in favour of a PHP script I'm making that exports to cliloc to JSON and make it easier to translate clilocs (which was the objective of this program).
I was also using this program over UO Fiddler because UO Fiddler exports to .cvs (using ';' as delimiter), but some cliloc texts have ';' on it, so the exportation/importation were not working as expected.
Using tab as delimiter solves that problem. (And if it happens to be a tab in the middle of a string, it gets replaced by a blank space).
It's not following the patterns for CSV files yet, as it doesn't use a text qualifier, but it's woking, as far as I've tested.
Anyway, I thought it would be interesting to release the code here, as a case study. (It's also available on github: https://github.com/felladrin/runuo-custom-scripts/tree/master/ClilocToTsvConverter)
The package contains the source code of the program, which can be copiled with a single click, as you can read on the following description (same description of the github page).
ClilocToTsvConverter
Program to convert a UO Cliloc file to Tab Separated Values (tsv) file, back and forth. By default it'll use Cliloc.enu, but you can easily change the extension on top of the scripts.
Note: This is not an addon for RunUO. It's a standalone program.
Usage
Get the file Cliloc.enu from yout UO install dir, and copy it to this folder.
Then, run ClilocToTsv.bat to generate the file Cliloc.tsv.
Note: If no Cliloc.tsv was generated, check if it's marked as Read Only. If so, uncheck it.
Editing Cliloc.tsv
To edit the tsv file, you can use LibreOffice to open it and set to import as follows:
Building Cliloc.enu
Once you've done the changes, you can run TsvToCliloc.bat to compile the .tsv into a cliloc file.
For this you need to have .Net Framework 4.0 or Mono installed on your computer.
I was also using this program over UO Fiddler because UO Fiddler exports to .cvs (using ';' as delimiter), but some cliloc texts have ';' on it, so the exportation/importation were not working as expected.
Using tab as delimiter solves that problem. (And if it happens to be a tab in the middle of a string, it gets replaced by a blank space).
It's not following the patterns for CSV files yet, as it doesn't use a text qualifier, but it's woking, as far as I've tested.
Anyway, I thought it would be interesting to release the code here, as a case study. (It's also available on github: https://github.com/felladrin/runuo-custom-scripts/tree/master/ClilocToTsvConverter)
The package contains the source code of the program, which can be copiled with a single click, as you can read on the following description (same description of the github page).
ClilocToTsvConverter
Program to convert a UO Cliloc file to Tab Separated Values (tsv) file, back and forth. By default it'll use Cliloc.enu, but you can easily change the extension on top of the scripts.
Note: This is not an addon for RunUO. It's a standalone program.
Usage
Get the file Cliloc.enu from yout UO install dir, and copy it to this folder.
Then, run ClilocToTsv.bat to generate the file Cliloc.tsv.
Note: If no Cliloc.tsv was generated, check if it's marked as Read Only. If so, uncheck it.
Editing Cliloc.tsv
To edit the tsv file, you can use LibreOffice to open it and set to import as follows:
- Separated by: Tab
- Text Qualifier: leave the field blank (do not let single/double quotes because it causes errors)
Building Cliloc.enu
Once you've done the changes, you can run TsvToCliloc.bat to compile the .tsv into a cliloc file.
For this you need to have .Net Framework 4.0 or Mono installed on your computer.