• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Mod Release Swedish ship and citizen names

DeathDaisy

Freebooter
Storm Modder
inspired by @ANSEL's privateering thread I added names for swedish citizens and ships! now that sweden's a nation anyway might as well make it feel like a fullfledged one xD

some notes;
I took the ship names from historical ships from the period. my favorites are probably Bönan(the bean) and Näsvis(impertinent).

the citizen names are a bit of a compromise. the -sson names, so very typically swedish, are absent! that's because they werent used as family names until quite long after the relevant periods. you were called Andersson if you were Ander's son, and Andersdotter if you were Ander's daughter, and they were not inherited since your children preferably werent also the children of your father or mother, and neither did it pass to your spouse since they didnt switch parents.

family names as such werent really a huge thing among most people in the period; nobility and priests kinda used them and burghers followed suit as their influence grew. so I added noble, burgher and scholar names like Natt och Dag, Wallander, Linnæus, Lindberg, Angermannius etc.

nicknames and soldiers names tho were very common, so I added quite a lot of those. theyre adjectives, animals or weapons they thought were cool, professions, where they were from etc, and any combination of those. like Frisk(Healthy), Lantz(Lance), Fjällsvärd(mountain sword), Bagare(Baker), från Skara(from Skara), Mårdaklev(just a place), den Yngre(the Younger) etc. they werent really inherited on a large scale during most of the period either, but mostly you wont meet more than one generation, and it would often be used to tell people apart so they're more historical than -sson. sweden was quite behind when it came to family politics :p and most things other than war, tbh. hope that sounds like an alright solution :)

EDIT: added globals.c to the rar
EDIT2: updated again, now things should Just Work™ hopefully
EDIT3: merged @Homo eructus improved ship names with the new swedish ones!
 

Attachments

  • Swedish names and font tweak 2017-11-14.rar
    446.3 KB · Views: 372
Last edited:
Are you sure that's going to work? There appears to be no revised version of "globals.c" with the Swedish character name arrays declared.

Also, in "CharacterUtilite.c", function "SetRandomNameToCharacter", why is the new section for Swedish names out in a 'switch' block of its own instead of replacing the commented out Swedish section of the main switch block? Likewise in "Ships.c", function "GetRandomShipNameForNation".

If it does work, I wonder if @Jack Rackham will have use for the new names for inhabitants of the Swedish colony in "Woodes Rogers"?
 
Are you sure that's going to work? There appears to be no revised version of "globals.c" with the Swedish character name arrays declared.

Also, in "CharacterUtilite.c", function "SetRandomNameToCharacter", why is the new section for Swedish names out in a 'switch' block of its own instead of replacing the commented out Swedish section of the main switch block? Likewise in "Ships.c", function "GetRandomShipNameForNation".

If it does work, I wonder if @Jack Rackham will have use for the new names for inhabitants of the Swedish colony in "Woodes Rogers"?
You are very right, again I forgot to add a file like a damn tool :facepalm I'm srsly lucky you are so perceptive, thanks again :flower :cheers

I had them in the switches for the longest time but it just didnt work, it gave me endless errors and the names got overwritten by america :shrug after finally putting them after and outside in another switch in a separate "if" I havent encountered any problems, ships and captains get the proper names, so I hope it continues working xD
 

Attachments

  • globals.c
    13.5 KB · Views: 444
The names are probably being overwritten because America, like Sweden, is guest nation 1, i.e. nation number 6. So if nation is Sweden then "NATION" is 6, which triggers the "AMERICA" case.

Try this in "CharacterUtilite.c":
Code:
       if(GetCurrentPeriod() >= PERIOD_REVOLUTIONS)
       {
           case AMERICA:
               rNames = &sAmWomenNames;
               if(rCharacter.sex != "woman") rNames = &sAmManNames;
               rLastNames = &sAmFamilies;
           break;
       }
       if(GetCurrentPeriod() > PERIOD_EARLY_EXPLORERS && GetCurrentPeriod() < PERIOD_REVOLUTIONS && SWEDEN_ALLOWED)
       {
           case SWEDEN:
               rNames = &sSwWomenNames;
               if(rCharacter.sex != "woman") rNames = &sSwManNames;
               rLastNames = &sSwFamilies;
           break;
       }
That should allow Sweden to take its place in the main switch block, and America shouldn't conflict because its case is only triggered in later periods.
 
If it does work, I wonder if @Jack Rackham will have use for the new names for inhabitants of the Swedish colony in "Woodes Rogers"?
Thanks for that but I have named them after real persons - my students. :)

If you need any help with swedish names I can do that.
 
Try this in "CharacterUtilite.c":
I'm not sure the game syntax will like having an if-statement in the middle of a switch.
You may need a single "GUEST_NATION1" and have an if inside it to check if it is America or Sweden.
I believe there is some sort of function for that already, courtesy of @konradk.
 
The names are probably being overwritten because America, like Sweden, is guest nation 1, i.e. nation number 6. So if nation is Sweden then "NATION" is 6, which triggers the "AMERICA" case.

Try this in "CharacterUtilite.c":
Code:
       if(GetCurrentPeriod() >= PERIOD_REVOLUTIONS)
       {
           case AMERICA:
               rNames = &sAmWomenNames;
               if(rCharacter.sex != "woman") rNames = &sAmManNames;
               rLastNames = &sAmFamilies;
           break;
       }
       if(GetCurrentPeriod() > PERIOD_EARLY_EXPLORERS && GetCurrentPeriod() < PERIOD_REVOLUTIONS && SWEDEN_ALLOWED)
       {
           case SWEDEN:
               rNames = &sSwWomenNames;
               if(rCharacter.sex != "woman") rNames = &sSwManNames;
               rLastNames = &sSwFamilies;
           break;
       }
That should allow Sweden to take its place in the main switch block, and America shouldn't conflict because its case is only triggered in later periods.
I'm not sure the game syntax will like having an if-statement in the middle of a switch.
You may need a single "GUEST_NATION1" and have an if inside it to check if it is America or Sweden.
I believe there is some sort of function for that already, courtesy of @konradk.

thats kinda what I tried, and it returns errors :( if what I dun with another switch(nat) in an extra if(sweden etc) is bad, would this maybe work instead?
Code:
switch (nat) // 04-12-06 change to var
    {
        case ENGLAND:  makeref(rMassiveOfNames, sRndShpEnName); break;
        case FRANCE:   makeref(rMassiveOfNames, sRndShpFrName); break;
        case SPAIN:    makeref(rMassiveOfNames, sRndShpSpName); break;
        case PIRATE:   makeref(rMassiveOfNames, sRndShpPiName); break;
        case HOLLAND:  makeref(rMassiveOfNames, sRndShpHoName); break;
        case PORTUGAL: makeref(rMassiveOfNames, sRndShpPoName); break;
        case GUEST_NATION1:
            if(GetCurrentPeriod() > PERIOD_EARLY_EXPLORERS && GetCurrentPeriod() < PERIOD_REVOLUTIONS){
                makeref(rMassiveOfNames, sRndShpSwName);
            }
            if(GetCurrentPeriod() >= PERIOD_REVOLUTIONS){
                makeref(rMassiveOfNames, sRndShpAmName);
            }
        break;
        // default:
                   makeref(rMassiveOfNames, sRndShpEnName); //add default case 04-12-06
    }
it looks kinda tidy and since america and sweden dont overlap it shouldnt be a problem?

EDIT: discovered @Homo eructus revised spanish names and added my names to that file instead! :onya I'll upload a new main rar with it in the main post too when the switch situation is solved :p
 

Attachments

  • Characters_names.c
    106.1 KB · Views: 754
Last edited:
What error do you get?
Maybe add in an 'else' to avoid both being true at the same time?
 
What error do you get?
Maybe add in an 'else' to avoid both being true at the same time?
with an if before a case in a switch, it gives a lot of errors about not finding strings and undeclared vars.I can run it again with those to see exactly what it says. had the same problem with the ships when trying to give different cases for different periods. putting the if inside the case instead like below seems to work fine xDEDIT: the characters actually dont return errors with ifs rn! but they get the wrong names despite period. could try with an else, but the GUEST1_NATION deffo work, so gonna go with that :p
Code:
case GUEST1_NATION:
            if(GetCurrentPeriod() > PERIOD_EARLY_EXPLORERS && GetCurrentPeriod() < PERIOD_REVOLUTIONS && SWEDEN_ALLOWED){
                rNames = &sSwWomenNames;
                if(rCharacter.sex != "woman") rNames = &sSwManNames;
                rLastNames = &sSwFamilies;
            }
            else{
                rNames = &sAmWomenNames;
                if(rCharacter.sex != "woman") rNames = &sAmManNames;
                rLastNames = &sAmFamilies;
            }
        break;
probably has less chance for errors than what I had in the file in the rar with an extra switch in an if after the primary switch function:
Code:
if(GetCurrentPeriod() > PERIOD_EARLY_EXPLORERS && GetCurrentPeriod() < PERIOD_REVOLUTIONS && SWEDEN_ALLOWED){
        switch(iNation){
            case SWEDEN:
                rNames = &sSwWomenNames;
                if(rCharacter.sex != "woman") rNames = &sSwManNames;
                rLastNames = &sSwFamilies;
            break;
        }
    }
attaching the files with the GUEST1_NATION cases, and updating the rar :onya
 

Attachments

  • CharacterUtilite.c
    147.2 KB · Views: 228
  • Ships.c
    34 KB · Views: 417
Last edited:
with an if before a case in a switch, it gives a lot of errors about not finding strings and undeclared vars.I can run it again with those to see exactly what it says.
I was afraid something like that might happen.
No need to run it again; you already confirmed my suspicion that it would be invalid code syntax.
 
I turned a town swedish to check out the names ex vitro, and they are assigned correctly which is nice and I do like the feel of the names. however, the game seems to use "å" as an accented c of some kind, and the capital one also turns into something else. it looks fine in the log, so the game definitely takes the right input, which means its probably by design since they assumed no one would use å and added a french/polish specific thing instead. "å" does exist in the font files tho afaict, so dunno what thats about. any ideas about how to get the game to use that instead? or am I SooL and gotta remove the names with å?
 
however, the game seems to use "å" as an accented c of some kind, and the capital one also turns into something else. it looks fine in the log, so the game definitely takes the right input, which means its probably by design since they assumed no one would use å and added a french/polish specific thing instead. "å" does exist in the font files tho afaict, so dunno what thats about. any ideas about how to get the game to use that instead? or am I SooL and gotta remove the names with å?
I remember that several of those complex characters need to be written differently in the code than they appear on the screen.
This is massively annoying and I never could make full sense of it. You can probably get it to work, but some investigation/trial-and-error may be required.
 
I remember that several of those complex characters need to be written differently in the code than they appear on the screen.
This is massively annoying and I never could make full sense of it. You can probably get it to work, but some investigation/trial-and-error may be required.
turns out some fonts had å but not the ones used in fonts_euro.ini which is used in the game, so I added them. but its real stupid now; "å" and "Å" are still french and polish letters, if you want "å" and "Å" in game you must instead write "¨" and "~" respectively. I feared switching them out would ruin text that exists in the game (although I didnt find any "å"s in the in-game text files, so maybe its okey?). it does look good and natural in the game now at least
 

Attachments

  • Swedish names and font tweak.rar
    433 KB · Views: 449
The umlaut with no letter under it is probably safe, but translating "~" into "Å" could cause trouble. Even if there are none in any existing questbooks, dialogs etc., that doesn't mean it won't be used by someone in the future. Is it not possible to pick some other non-English ASCII character? Or, better, if one of the Swedish characters is being used as a stand-in for a French character, use something else for the French character and let the Swedish character be itself.
 
As long as it works, I'd call that a success! Nice one, @DeathDaisy. :cheers
Thanks xD
The umlaut with no letter under it is probably safe, but translating "~" into "Å" could cause trouble. Even if there are none in any existing questbooks, dialogs etc., that doesn't mean it won't be used by someone in the future. Is it not possible to pick some other non-English ASCII character? Or, better, if one of the Swedish characters is being used as a stand-in for a French character, use something else for the French character and let the Swedish character be itself.
I picked those because they returned "" in utils.c and had no entries in the font file, but Id much rather switch å to use å and move the french letters to another symbol if you think thats alright! :onya
 
picked those because they returned "" in utils.c and had no entries in the font file, but Id much rather switch å to use å and move the french letters to another symbol if you think thats alright! :onya
If you can make that work correctly, I'd say that's pretty darn awesome! :woot
 
If you can make that work correctly, I'd say that's pretty darn awesome! :woot
works like a charm xD
now å is å, Å is Å, the accented c is ¨ and ÿ is §. hope that sounds alright! :onya I updated the utils.c with those characters too. they seemed to work in names but I couldnt log them without adding them there. i spose I could just make the c and ÿ use their corresponding actual letters.. but I assume they used other letters before for some reason? anyway, it works!

EDIT: merged my new ones with @Homo eructus improved spanish shipnames!
 

Attachments

  • Swedish names and font tweak 2017-11-14.rar
    446.3 KB · Views: 384
Last edited:
Back
Top