• 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!

WIP Spanish translation

This is a test version of "nations.c". Rename the proper "nations.c" to something else, rename the attached file as "nations.c", then either start a new game as a Spanish privateer or load a savegame. Go to the tavern, stand in front of the tavern keeper, then save game again. (I still have your savegames from the experiments with marriage, so I started with one of those. :D)

This version of "nations.c" has all the randomness removed. As in a previous experiment, it's set to force a relation change every day. There's a line to set variables i and j to specific nations, and another to set their starting relation. All the random choices of relation change are now fixed. You can therefore edit the file to choose nations and check whichever relation change you want. It's currently set to use Spain and Holland, relation initially neutral, then Spain will declare war on Holland.

It also has some 'traceandlog' statements to show what is going on.
 

Attachments

  • nations_random_relations_test.c
    69.7 KB · Views: 63
Your test file worked, but when I tested again with the regular nations.c (which exactly matches the one you posted earlier, except for the "if(rand(1000) <1001" to force random relations), the same problem occurred. So maybe it has something to do with forcing those random changes and in regular play, it will be fine, but I'll have to actually wait around for a naturally occurring change to be sure. Luckily, being married to the governor's niece lets you skip 24 hours at a time, instead of 8 like your crew.

Edit: nop, still not working. I have no idea what''s happening. Both nations.c and shipslogs.txt match yours and still that second string doesn't trigger. Maybe I should try with a new game. Those saves may be a liitle confused after the last weeks of testing different stuff
Edit2: New game and still nothing.

Did you have a moment to check what's wrong with that line in shipyard.c?
Here.

The only string that give sme problems is "Visited the local shipyard"
 
Last edited:
As far as I can tell from Wikipedia, Dutch has no female versions of titles, so "Ridder_f", "Erfridder_f" should just stay the same as the male titles.
That sounds about right to me.

I recently read the official PotC prequel novel.
Lots of Wicked Wench action in there.
So I love the new name for Scourge!

Incidentally, this also suggests that the Dutch level 7 title should be "Jonkheer", "Ridder" should be level 8, and level 9 remain as "Baron" - similar to Spanish "Hidalgo", "Caballero", "Barón".
Ridderin sounds weird.
Technically It makes sense, but I can't imagine anyone using that word.

Jonkheer would become Jonkvrouw for female.
Baron turns into Barones.
And Graaf into Gravin.
 
Last edited:
Your test file worked, but when I tested again with the regular nations.c (which exactly matches the one you posted earlier, except for the "if(rand(1000) <1001" to force random relations), the same problem occurred. So maybe it has something to do with forcing those random changes and in regular play, it will be fine, but I'll have to actually wait around for a naturally occurring change to be sure. Luckily, being married to the governor's niece lets you skip 24 hours at a time, instead of 8 like your crew.
Can you upload the exact version of "nations.c" which you are using for your tests?

Did you have a moment to check what's wrong with that line in shipyard.c?
This is weird. This certainly works:
Code:
GetTranslatedLog("Visited the local shipwright.")+" "
I wrote a line in "console.c" to display it and it showed the translation correctly. However, while this in "shipyard.c" works:
Code:
string sLogEntry = "Visited the local shipwright. ";
...
Any attempt to translate it, using 'GetTranslatedLog' or even the most basic translation 'XI_ConvertString' results in the variable being wiped. I even put 'tracelog' lines at all points where the log is about to be written, with inverted commas round the variable, e.g.:
Code:
traceandlog("shipyard.c: ProcessCancelExit(): sLogEntry = '" + sLogEntry + "'");
Since the initial assignment adds a space on the end, that should have shown a space between the inverted commas if the translation had failed. It showed nothing - 'sLogEntry' had been completely wiped. But if I put the initial assignment back to using untranslated "Visited the local shipwright. ", sLogEntry remained intact.

A stupid problem calls for a stupid solution. I removed the initial assignment and just left a simple declaration 'string sLogEntry;' at the top. Assigning a value to 'sLogEntry' is now moved to the end of function 'InitInterface_R'. And now it works.

To misquote part of the line about French squirrels in "nations.c":
This doesn't make any sense at all and does not really explain why 'GetTranslatedLog' breaks the variable, but that's what it does.
 

Attachments

  • shipyard.c
    184.8 KB · Views: 75
Ridderin sounds weird.
Technically It makes sense, but I can't imagine anyone using that word.

Jonkheer would become Jonkvrouw for female.
Baron turns into Barones.
And Graaf into Gravin.
Done. Attached are "PROGRAM\NATIONS\nations_init.c" and "RESOURCE\INI\TEXTS\SPANISH\common.ini" with title 7 changed to "Jonkheer", "Ridder" moved to title 8, and the corresponding changes made to "common.ini" along with those female variants. (Presumably a female Burggraaf is a Burggravin.) I've also modified English "common.ini" the same way.
 

Attachments

  • common.ini
    85.7 KB · Views: 70
  • nations_init.c
    46 KB · Views: 67
A stupid problem calls for a stupid solution. I removed the initial assignment and just left a simple declaration 'string sLogEntry;' at the top. Assigning a value to 'sLogEntry' is now moved to the end of function 'InitInterface_R'. And now it works.
Thanks. At least it wasn't me missing something obvious. It's possible the same will have to be done for all the other "Visited the local..." in other files (store.c, etc.) which I suppose follow the same pattern. I'll'see when I get to them.

Can you upload the exact version of "nations.c" which you are using for your tests?
Other than the probability line, it matches 100% the one I downloaded form this post WIP - Spanish translation

Here.
 

Attachments

  • nations.c
    68.4 KB · Views: 64
Baron should be Friherre but what between Greve and Friherre?
Borgmästare, Landshövding and Riksråd: why not.
 
Oops - forgot to put the revised Swedish titles into "nations_init.c"! I've re-uploaded it in post #1365. "common.ini" already has the revised titles:
Code:
string = Godsägare, "Godsägare"
string = Riddare,"Riddare"
string = Friherre,"Friherre"
string = Borgmästare,"Borgmästare"
string = Greve,"Greve"
string = Riksråd,"Riksråd"
string = Godsägare_f, "Godsägarinna"
string = Riddare_f,"Riddarinna"
string = Friherre_f,"Friherrinna"
string = Borgmästare_f,"Borgmästarinna"
string = Greve_f,"Grevinna"
string = Riksråd_f,"Riksråd"
So title 7 is now Godsägare and title 8 is now Riddare - as with Spain and Portugal, Sweden now only gets a full knighthood at level 8. Landshövding is eliminated as Greve is now level 11, being the Swedish equivalent to everyone else's Count or Conde. Borgmästare remains at level 9, between Friherre and Greve, unless Sweden has a title equivalent to Viscount or Vizconde. (The Dutch version of Count is Graaf, similar to Greve. Is there a Swedish equivalent to Burggraaf, perhaps Burggreve?)

Another look through Wikipedia indicates that the Swedish equivalent to Marquis is Markis, or Markisinna for women. If that is correct, I'll modify both files again - Markis would replace Riksråd as the level 12 Swedish title.
 
@Homo eructus: how would you translate "Citadel Rock"? This is the shore location on Eleuthera and is currently not included in "interface_strings.txt" along with other location names. (Apart from town names - they're in "common.ini".)
 
@Homo eructus: how would you translate "Citadel Rock"? This is the shore location on Eleuthera and is currently not included in "interface_strings.txt" along with other location names. (Apart from town names - they're in "common.ini".)

"Roca de la Ciudadela".

Any luck with that nations.c and the second string in the relations log not triggering?
 
I haven't had time to wait for a genuinely random relation change. But I can't see any reason why my file which forces a relation change every day the same way yours does - 'if(rand(1000) <1001)' instead of 'if(rand(1000) < RELATION_CHANGE_PROBABILITY*10)' - would succeed in adding the line but the normal "nations.c" would not. The code which adds the log lines is unchanged, it still uses variable 'i' and 'j' for the nations whose relations are changing, and variable 'random' to determine how the relations have changed. The only difference is that those variable are fixed rather than being randomly set.
 
I did wait for a regular random change and it didn't work either. At the end of the day , it's mostly a flavour line, so it's not the worst thing in the world
 
The question is not why it is not working now. The question is whether it ever worked, and if so, why?

The code to add the extra line is:
Code:
if(IsInServiceOf(i) && GetNationRelation2MainCharacter(j)==RELATION_ENEMY) logEntry += GetTranslatedLog("\n \nIt was about time to show those #snationdesc2# landlubbers who's in charge in the Caribbean!");
The original code differed only in adding untranslated text, the condition was the same. The line should be added if you are in the service of Spain and hostile to Holland.

But at this point, you're not hostile to Holland and neither is Spain. Variable 'newRelation' is set , but does not take effect until further down in step 3.

So why did the test version work? It's because the test version first runs 'SetNationRelationBoth(i, j, RELATION_NEUTRAL);' to put Spain and Holland at peace so that Spain can then declare war on Holland. But 'SetNationRelationBoth' has no effect on your personal relations - that's handled by 'SetNationRelation2MainCharacter' (or 'SetRMRelation'). You started the game hostile to Holland and are still hostile even though Spain is at peace, and so when the code gets to that check, you are in the service of Spain and hostile to Holland, so the extra line is added.

In normal gameplay, there are two reasons for keeping personal relations separate from international relations. Quest code can turn a nation against you without it having to declare war on another nation, e.g. when Silehard turns Britain against you in "Tales of a Sea Hawk". And your relations will only follow those of a nation if you are solely in that nation's service - if you get a French LoM as well as a Spanish one then your served nation is Personal and if Spain then makes peace with Holland, Holland will still hate you.

And so to the fix. This version uses this code for the extra line:
Code:
if(ServedNation == i) logEntry += GetTranslatedLog("\n \nIt was about time to show those #snationdesc2# landlubbers who's in charge in the Caribbean!");
The check on whether you're hostile to nation j is removed - you aren't at this point, but you will be after step 3, provided you're solely in the service of nation i. You'll also only get the extra text if you're solely in the service of nation i. If you have multiple LoM's then you don't care as much, you're only in it for the money and promotions. (I may add a bit more code so that if you're in service of nation i but not solely, you can have an extra line saying something like "This is good for me because I can now legally attack <nation j>'s ships and earn promotions from <nation i>".)
 

Attachments

  • nations.c
    68.5 KB · Views: 47
I had these in the back burner.

NK.c: some additional translations on top of the ones you added about rolling in storms (the onscreen logs about log frequency, wow, so meta)

KB_routines (onscreen log after ship repairs)

seadogs.c (string about not having a map and clubhauling directions)

Interface_strings (all of the above + the crew grumbling about the curse + a couple of extra touches here and there). English version included

Also the general storyline_strings, with Black Caesar's intro blurb translated and Devlin's Opera's storyline_strings updated

I'll throw in shipslog_strings too (SPA and ENG), just in case I added something I forgot since last upload.
 

Attachments

  • SPAfiles.zip
    177.5 KB · Views: 45
Last edited:
Last minute NK.c update with the strings for the steam frigate speed
 

Attachments

  • NK.c
    206.7 KB · Views: 45
  • interface_strings.txt
    135.6 KB · Views: 63
I may have been a little carried away and translated pretty much every LogIt string (onscreen logs) out there (except the ones that are ovbiosuly for dev or debug purposes), including some from the files above that had escaped me. When I sort the files out, I'll upload them. I also found a couple of lines that were in interface_strings but were missing the TranslateString code in the .c files
 
Last edited:
Here they go

Includes:
NK.c
-All 26 occurrences of "You seem to have a pretty impressive squadron of your own. Looks like you won't be needing the promotion ship." (no idea why there are so many or if all of them are needed but just in case)
-Strings informing the player that the Black Pearl sweeps or the Sword of Triton are off cooldown
-Several strings about kraken attack

AIShip.c
-"Greek fire hits the"

DailyCrew Update.c
-Report about wounded crewmembers healing or dying from gangrene

Battle Interface.c
-Strings indicating the use of sweeps and sword of Triton

LEnc_monsters.c
-"You are ALONE now. No other LIVING soul dares to enter here.." (was already in interface_strings but no code)

All blacksmith .c dialog files
-Log about getting your blades (or guns) back when you order a mass repair

LAi_groups.c
-"You take a uniform from one of the dead soldiers"

store.c
-"Time:"
-Ship's log entry "Visited..."

Javier_Balboa and Spanish_Captain2 dialog .c files from Ardent
-Hints (were already in interface_strings but no code)

Antigua_Dockyard_dialog.c form Hornblower
-Logs about ship repairs

quests_reaction from JackSparrow
-"Ten years later..."

Both ENG and SPA interface_string.txt and shipslog_strings.txt
 

Attachments

  • logit strings SPA.zip
    354.6 KB · Views: 55
Last edited:
store.c was missing a GetTranslatedLog, here.

Also, a typo in Spanish common.ini and a small addition to sulan_shipslogsc to translate the day of the week when several entries from different days are lumped together under the same log title (like in port visits).

I'll stop now
 

Attachments

  • store.c
    47 KB · Views: 44
  • sulan_shipslog.c
    5.5 KB · Views: 43
  • common.ini
    85.8 KB · Views: 38
Last edited:
Here they go

Includes:
NK.c
-All 26 occurrences of "You seem to have a pretty impressive squadron of your own. Looks like you won't be needing the promotion ship." (no idea why there are so many or if all of them are needed but just in case)
-Strings informing the player that the Black Pearl sweeps or the Sword of Triton are off cooldown
-Several strings about kraken attack

AIShip.c
-"Greek fire hits the"

DailyCrew Update.c
-Report about wounded crewmembers heaing or dying from gangrene

Battle Interface.c
-Strings indicating the use of sweeps and sword of Triton

LEnc_monsters.c
-"You are ALONE now. No other LIVING soul dares to enter here.." (was already in interface_strings but no code)

All blacksmith .c dialog files
-Log about getting your blades (or guns) back when you order a mass repair

LAi_groups.c
-"You take a uniform from one of the dead soldiers"

store.c
-"Time:"
-Ship's log entry "Visited..."

Javier_Balboa and Spanish_Captain2 dialog .c files from Ardent
-Hints (were already in interface_strings but no code)

Antigua_Dockyard_dialog.c form Hornblower
-Logs about ship repairs

quests_reaction from JackSparrow
-"Ten years later"

Both ENG and SPA interface_string.txt and shipslog_strings.txt
Here are some more problems: Need Help - Updating the Russian Translation
 
Back
Top