Alright, so there is more to this. I'm using the
\\n myself and you are right, it is a custom token.
Place this on your OnModuleLoad event. I'm sure it could go elsewhere but that's where I set my custom tokens.
SetCustomToken(1111, "[color="#ffffff"]\\n[/color]");
From there, you can use
\\n in SetDescription, and even string sString = "blahblah" within scripts themselves.
blah
\\n blah in conversations themselves.
As mentioned, it's one slash followed by n and you may set the value of the SetCustomToken to whatever number you require.
Be warned that using the custom token to create a RETURN will require some patience on your end to properly enter the correct number of RETURNs.
As an example, in Fate of the Auren, I read the entire database to find out what the player did in Almraiven and Shadewood, who they killed, what spirits they helped, to create a history of their life in the Land of the Living. So although there are TWO of these \\n in the SetDescription of a print out of the player's living history, it not always displays as TWO RETURNS but more. I've never been able to figure it out.
If you're looking to use this in a description to set on an item, here's an example.
if (GetCampaignInt("Almraiven", "almraiven") == 1) // COMPLETED ALMRAIVEN
{
string sDescription = GetDescription(oHistory);
sDescription += "\\n \\nYou journeyed to Almraiven and ... \\n \\n";
SetDescription(oHistory, sDescription);
}
if (GetCampaignInt("Almraiven", "faliscomp") == 1)
{
string sDescription = GetDescription(oItem);
sDescription += "Left Almraiven with Falis Goodmane, a Fighter travel companion. \\n \\n";
SetDescription(oItem, sDescription);
}
When appending to an already existing entry, such as a journal or a description of an item, you'll want to use the GetDescription function to snag what already exists, followed by appending the new description to the existing description.
FP!
Modifié par Fester Pot, 22 décembre 2010 - 04:08 .