[Mod Tool] Batch Star Namer

 

So, unlike in GalCiv 2, adding new star names in GalCiv III is a bit... involved. Lots of XML stuff to deal with, and if you've got a lot of stars to add, that process can get super tedious. This simple program solves that problem.

 

 

Operating it is pretty easy: choose your starting index (because each star name has a label like "RANDOM_STAR_NAME_3785" to uniquely identify it).

 

Then, choose your text file that contains all your star names. Each line should have one star name, like so:

 

Assuming loading the file doesn't throw any errors (It shouldn't), you can then save the .xml data, which will look like this:

 

You can directly throw this file into your mod's "Text" folder, and assuming there aren't any conflicting indexes, you should start seeing your new star names in the game. This file works just like other xml files: if it's named "StarNamesText.xml", it will replace all default stars. If it's named anything else, it will append them.

 

Side note: I wanted to give more options for labeling star names to prevent conflicts, but they NEED to be named in the format they are in. If anything comes before the "RANDOM_STAR_NAME_(index)" or after it, the names will not be read by the game.

 

Download link: https://dl.dropboxusercontent.com/u/71512473/GC3%20Star%20Namer.zip

 

And a few links you might be interested in:

http://library.galciv2.com/index.aspx?m=636

http://library.galciv2.com/index.aspx?m=607

Although I'm sure the original authors would be cool with it, I don't want to update their name lists on the off chance they're not. So I'll let you do that and use them personally.

 

Let me know if you have any issues!

 

Included readme file:

 

To use:

-Select the starting index. Check StarNamesText.xml in the English/Text folder to find the index you want to start at. If the last index in that file is 99, you will want to enter 100 into this box.

-Load your .txt file with all your star names. Star names should be one per line, exmaple:

Star1
Star2
Star3
Star4

Blank lines are replaced by "Psiyon" so if you ever see a star with my username, you dun goofed.


-Save the .xml file.


-Put the exported .xml file in the Text folder in your mod's folder. Assuming the starting index was correct, your new star names should add on to the existing ones.

77,729 views 15 replies
Reply #1 Top

posted on my mod compilation thread. (hopefully that is okay with you.) nice job btw

link: https://forums.galciv3.com/465803/page/1/#3552058

 

Reply #2 Top

Good work. Tbh, they should remove the label column from the xml. It serves no obvious purpose.

Reply #3 Top

Quoting DarkNeuron, reply 2

Good work. Tbh, they should remove the label column from the xml. It serves no obvious purpose.

It does have a purpose if you think about translations.

English is not going to be the only language supported. So all strings need a unique label in the way the current XML files are structured. And yes, also starnames should be translatable (not sure if they will be translated by Stardock, but at least it should be a possibility for fan-made translations)

Reply #4 Top

Quoting Ronnar, reply 3


Quoting DarkNeuron,

Good work. Tbh, they should remove the label column from the xml. It serves no obvious purpose.



It does have a purpose if you think about translations.

English is not going to be the only language supported. So all strings need a unique label in the way the current XML files are structured. And yes, also starnames should be translatable (not sure if they will be translated by Stardock, but at least it should be a possibility for fan-made translations)

They are not translatable. Most are junk founder names. Also, many star names are in latin, like Proxima Century, and should remain in latin. How would you translate "Hoth", or "Aldaron".

While you are correct that strings normally should have a unique identifier (for UI stuff etc), in this case, it is entirely redundant.

Reply #5 Top


You can directly throw this file into your mod's "Text" folder, and assuming there aren't any conflicting indexes, you should start seeing your new star names in the game. This file works just like other xml files: if it's named "StarNamesText.xml", it will replace all default stars. If it's named anything else, it will append them.


I'm having trouble with this.  I've named my XML file StarNamesText.xml and started the RANDOM_STAR_NAME index at 0 because my intention is to replace all the default stars.  I created my own mod directory by copying \Mods\ExampleMod to \Mods\StarNameMod and then copying the XML to \Mods\StarNameMod\Text\StarNamesText.xml.  However, when I start a new game, the star names are still coming from the default game data (\data\English\StarNamesText.xml).  If I overwrite the \data\English\StarNamesText.xml file with my own, then of course I see my star names used in a new game, but I'd prefer to do this the proper way using a mod rather than replacing anything in the game's data directory.  I've also tried \Mods\StarNameMod\English\Text\StarNamesText.xml with no success.  Any ideas?

Reply #6 Top

I would love to see a list put together of real stars. Making sure that the racial homeworld stars stay untouched, of course. The mostly uncurated crowdsourced names drive me batty.

Reply #7 Top

Quoting arcanemagick, reply 5

I'm having trouble with this.  I've named my XML file StarNamesText.xml and started the RANDOM_STAR_NAME index at 0 because my intention is to replace all the default stars.  I created my own mod directory by copying \Mods\ExampleMod to \Mods\StarNameMod and then copying the XML to \Mods\StarNameMod\Text\StarNamesText.xml.  However, when I start a new game, the star names are still coming from the default game data (\data\English\StarNamesText.xml).  If I overwrite the \data\English\StarNamesText.xml file with my own, then of course I see my star names used in a new game, but I'd prefer to do this the proper way using a mod rather than replacing anything in the game's data directory.  I've also tried \Mods\StarNameMod\English\Text\StarNamesText.xml with no success.  Any ideas?

Sounds like you don't actually have mods enabled in the game settings. If you do, then I'm stumped--sounds like you've done everything correctly, and I don't see a reason why it wouldn't work.

+1 Loading…
Reply #8 Top

Good tool, thanks.

 

 

Reply #9 Top

Quoting arcanemagick, reply 5


You can directly throw this file into your mod's "Text" folder, and assuming there aren't any conflicting indexes, you should start seeing your new star names in the game. This file works just like other xml files: if it's named "StarNamesText.xml", it will replace all default stars. If it's named anything else, it will append them.



I'm having trouble with this.  I've named my XML file StarNamesText.xml and started the RANDOM_STAR_NAME index at 0 because my intention is to replace all the default stars.  I created my own mod directory by copying \Mods\ExampleMod to \Mods\StarNameMod and then copying the XML to \Mods\StarNameMod\Text\StarNamesText.xml.  However, when I start a new game, the star names are still coming from the default game data (\data\English\StarNamesText.xml).  If I overwrite the \data\English\StarNamesText.xml file with my own, then of course I see my star names used in a new game, but I'd prefer to do this the proper way using a mod rather than replacing anything in the game's data directory.  I've also tried \Mods\StarNameMod\English\Text\StarNamesText.xml with no success.  Any ideas?

when I run into trouble like this I rescan the game files then I lock the xml files as read only. sometimes this helps. I have had the files get over written by the game or it`s cache. Also maybe have some one else look at your file.

Reply #10 Top

Quoting Psiyon, reply 7

Sounds like you don't actually have mods enabled in the game settings. If you do, then I'm stumped--sounds like you've done everything correctly, and I don't see a reason why it wouldn't work.

Thanks, Psiyon! That was it. Since this was my first attempt at using mods, I didn't even realize there was an option that needed to be switched on. :blush:

Reply #11 Top

That looks very handy. Great addition to the modding community.

Reply #12 Top

Quoting Christian_Akacro, reply 6

I would love to see a list put together of real stars. Making sure that the racial homeworld stars stay untouched, of course. The mostly uncurated crowdsourced names drive me batty.

Happily, faction homeworlds will not be affected by the random star list created with this tool (i.e. replacing or supplementing StarNamesText.xml).

Other "real stars" lists have been created previously for GalCiv2, etc.  However, I have created my own since I favor having stars use a Bayer designation by default.  I wrote some quick code to dump out a list of every possible combination of Greek alphabet letter name and constellation genitive name.  This produces a list of a couple thousand star names, some of which do not actually exist--but I wouldn't know without looking them up anyway.  ;P   For example, the Volans constellation uses only 10 letters for twelve stars (two are double stars): Alpha Volantis thru Kappa Volantis.  My list adds Lambda Volantis thru Omega Volantis.  I also chose to combine some constellation names that have a major and minor (e.g. Ursae Majoris and Ursae Minoris becomes just Ursae) or a northern and a southern (e.g. Coronae Borealis and Coronae Australis becomes just Coronae), etc.

Anyway, for those interested, here's that list:
Possible_Bayer_Stars.txt


I've also added to the above list another list of a couple hundred real named stars selected from Wikipedia.  Doing this means that roughly 10% of the stars on a map should have proper names (e.g. Antares, Betelgeuse, Rigel, etc.) instead of a Bayer designation.  Of course, again one must ignore the fact that Deneb and Alpha Cygni would be the same real star.  ;) Here's that list:
Some_Named_Stars.txt

Just plug those into Psiyon's tool, either individually or combined per your preference, and enjoy the nice formatted XML for your mod!

+1 Loading…
Reply #13 Top

Quoting arcanemagick, reply 10


Quoting Psiyon,

Sounds like you don't actually have mods enabled in the game settings. If you do, then I'm stumped--sounds like you've done everything correctly, and I don't see a reason why it wouldn't work.



Thanks, Psiyon! That was it. Since this was my first attempt at using mods, I didn't even realize there was an option that needed to be switched on. :blush:

 

yeah that helps too! glad it is fix!!

Reply #14 Top

Quoting arcanemagick, reply 12


Quoting Christian_Akacro,

I would love to see a list put together of real stars. Making sure that the racial homeworld stars stay untouched, of course. The mostly uncurated crowdsourced names drive me batty.



Happily, faction homeworlds will not be affected by the random star list created with this tool (i.e. replacing or supplementing StarNamesText.xml).

Other "real stars" lists have been created previously for GalCiv2, etc.  However, I have created my own since I favor having stars use a Bayer designation by default.  I wrote some quick code to dump out a list of every possible combination of Greek alphabet letter name and constellation genitive name.  This produces a list of a couple thousand star names, some of which do not actually exist--but I wouldn't know without looking them up anyway.  ;P   For example, the Volans constellation uses only 10 letters for twelve stars (two are double stars): Alpha Volantis thru Kappa Volantis.  My list adds Lambda Volantis thru Omega Volantis.  I also chose to combine some constellation names that have a major and minor (e.g. Ursae Majoris and Ursae Minoris becomes just Ursae) or a northern and a southern (e.g. Coronae Borealis and Coronae Australis becomes just Coronae), etc.

Anyway, for those interested, here's that list:
Possible_Bayer_Stars.txt


I've also added to the above list another list of a couple hundred real named stars selected from Wikipedia.  Doing this means that roughly 10% of the stars on a map should have proper names (e.g. Antares, Betelgeuse, Rigel, etc.) instead of a Bayer designation.  Of course, again one must ignore the fact that Deneb and Alpha Cygni would be the same real star.  ;) Here's that list:
Some_Named_Stars.txt

Just plug those into Psiyon's tool, either individually or combined per your preference, and enjoy the nice formatted XML for your mod!

 

Awesome! This is all I really wanted. Something to help reduce the breaking of game immersion. Karma for you!

 

How do I supplement/add this in without breaking things?

Reply #15 Top

Quoting Christian_Akacro, reply 14
How do I supplement/add this in without breaking things?

Well, I wanted to replace all the stars with my own list and not use any that came with the game, so I would do it like this:

1. Download the GC3 Star Namer tool from the OP.

2. Download the star list TXT file you want.  Or download multiple and copy/paste them into a single TXT file.

3. Open the GC3 Star Namer tool
    a. Set the starting index to 0.
    b. Load the TXT file.
    c. Save the XML file as StarNamesText.xml

4. Open the \Documents\My Games\GalCiv3\Mods folder.

5. Select the ExampleMod folder
    a. Press CTRL+C to copy it.
    b. Then press CTRL+V to paste it.
    c.  Rename the ExampleMod - Copy folder to StarNameMod.

6. Copy the StarNamesText.xml file created with the tool (Step 3) into the newly created \Documents\My Games\GalCiv3\Mods\StarNameMod\Text folder.

7. Make sure Mods are enabled.  One can either edit the \Documents\My Games\GalCiv3\Prefs.ini file and set EnableMods=1 or one can enabled them in-game under the Gamplay Options.  If you do it in-game, then you may have to restart--I'm not really sure because I just edited the INI file.

8. Start a new game.  (Existing saves will already have their star names set from when the galaxy was generated.)

If you ever want to go back to the game's default star list, then you can simply remove the \Documents\My Games\GalCiv3\Mods\StarNameMod folder.