That's indeed tricky, but what you want should indeed be possible.Another thing, this one seems tricky. I've come to the part in the Governor dialog when he asks you to eliminate the hostiles in his waters, and the ship description he gives you of the target doesn't make sense once translated due to the order of the strings in it ([nation] [number of guns] [ship type] "Name"). For it to make sense in Spanish it should be [ship type][nation][number of guns] "Name". I've found what looks like the root code for that dialog in dialog_func.c but my question is: is it possible to change the order in which the strings are phrased in a way that only affects the Spanish vesion while the English one remains the same?
This is the relevant text in Dialog_func.c, I believe
Code:// MAXIMUS: can be used in any situation [used in Silehard-dialog] --> // KK --> string GetShipDescribe(string charId, bool nation, bool nguns, bool shipname, bool accusative) { ref chr, shipRef; int canQuantity; aref arShip; string shipType; string shipDescribe = ""; chr = characterFromID(charId); shipRef = GetShipByType(GetCharacterShipType(chr)); shipType = XI_ConvertString(shipRef.Sname); if (nation) shipDescribe += XI_ConvertString("sw_" + GetNationDescByType(sti(chr.nation))) + " "; if (nguns) shipDescribe += GetMaxCannonQuantity(chr) + XI_ConvertString("cannonsQuantity") + " "; shipDescribe += strlower(shipType); if (accusative) { switch (LanguageGetLanguage()) { case "Polish": int dl = strlen(shipDescribe); if (GetSymbol(shipDescribe, dl - 1) == "a") { string tmpstr = ""; for (int i = 0; i < dl - 1; i++) { if (GetSymbol(shipDescribe, i + 1) == " ") tmpstr += "№"; else tmpstr += strcut(shipDescribe, i, i); } tmpstr += "Ч"; shipDescribe = tmpstr; } break; // default: } } if (shipname) shipDescribe += " " + GetMyShipNameShow(chr); if(HasSubStr(shipType,"0") || HasSubStr(shipType,"1") || HasSubStr(shipType,"2") || HasSubStr(shipType,"3") || HasSubStr(shipType,"4") || HasSubStr(shipType,"5") || HasSubStr(shipType,"6") || HasSubStr(shipType,"7") || HasSubStr(shipType,"8") || HasSubStr(shipType,"9")) { if(!HasSubStr(shipType," 0") && !HasSubStr(shipType," 1") && !HasSubStr(shipType," 2") && !HasSubStr(shipType," 3") && !HasSubStr(shipType," 4") && !HasSubStr(shipType," 5") && !HasSubStr(shipType," 6") && !HasSubStr(shipType," 7") && !HasSubStr(shipType," 8") && !HasSubStr(shipType," 9")) { shipDescribe = shipType; } } return shipDescribe;
It seems to have a language specific variant for Polish, I assume it is to allow for special characters. Could the same procedure be used to change the order of the strings in just one language?
I have NOT tested this, but I think in theory it might do the trick:
Code:
string GetShipDescribe(string charId, bool nation, bool nguns, bool shipname, bool accusative)
{
ref chr, shipRef;
int canQuantity;
aref arShip;
string shipType;
string shipDescribe = "";
chr = characterFromID(charId);
shipRef = GetShipByType(GetCharacterShipType(chr));
shipType = XI_ConvertString(shipRef.Sname);
if (nation) shipDescribe += XI_ConvertString("sw_" + GetNationDescByType(sti(chr.nation))) + " ";
if (nguns) shipDescribe += GetMaxCannonQuantity(chr) + XI_ConvertString("cannonsQuantity") + " ";
shipDescribe += strlower(shipType);
switch (LanguageGetLanguage()) {
case "Polish":
if (accusative) {
int dl = strlen(shipDescribe);
if (GetSymbol(shipDescribe, dl - 1) == "a") {
string tmpstr = "";
for (int i = 0; i < dl - 1; i++) {
if (GetSymbol(shipDescribe, i + 1) == " ")
tmpstr += "¹";
else
tmpstr += strcut(shipDescribe, i, i);
}
tmpstr += "×";
shipDescribe = tmpstr;
}
}
break;
case "Spanish":
shipDescribe = strlower(shipType);
if (nation) shipDescribe += XI_ConvertString("sw_" + GetNationDescByType(sti(chr.nation))) + " ";
if (nguns) shipDescribe += GetMaxCannonQuantity(chr) + XI_ConvertString("cannonsQuantity") + " ";
break;
// default:
}
if (shipname) shipDescribe += " " + GetMyShipNameShow(chr);
if(HasSubStr(shipType,"0") || HasSubStr(shipType,"1") || HasSubStr(shipType,"2") || HasSubStr(shipType,"3") || HasSubStr(shipType,"4") || HasSubStr(shipType,"5") || HasSubStr(shipType,"6") || HasSubStr(shipType,"7") || HasSubStr(shipType,"8") || HasSubStr(shipType,"9"))
{
if(!HasSubStr(shipType," 0") && !HasSubStr(shipType," 1") && !HasSubStr(shipType," 2") && !HasSubStr(shipType," 3") && !HasSubStr(shipType," 4") && !HasSubStr(shipType," 5") && !HasSubStr(shipType," 6") && !HasSubStr(shipType," 7") && !HasSubStr(shipType," 8") && !HasSubStr(shipType," 9"))
{
shipDescribe = shipType;
}
}
return shipDescribe;
}
Be sure to include that in your next upload!Thanks for finding that @Homo eructus,
Drawing Kit is right as that's what the picture shows.
I have changed in the Cartagena hotel_dialog.h now to Drawing Kit.
Obs bugfix.
Alternatively @Grey Roger, please add it to your ZIP!