OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: nominesine on 27 Jun 2009, 21:21:24

Title: Stringtables replaced?
Post by: nominesine on 27 Jun 2009, 21:21:24
What has happened to stringtable.csv in ArmA2? The old method of adding subtitles to speech/radio seems to be defunct.
Title: Re: Stringtables replaced?
Post by: h- on 27 Jun 2009, 21:38:59
Afaik it's stringtable.xml now..
Title: Re: Stringtables replaced?
Post by: nominesine on 27 Jun 2009, 21:49:10
Any information available on how to make one?

#EDIT: No need to quote the entire previous post you're replying to..   h-
Title: Re: Stringtables replaced?
Post by: Spooner on 27 Jun 2009, 22:48:26
stringtable.csv still works fine, but stringtable.xml is the new format for A2. This has particular advantage for stringtables in missions, since that has always been buggy in A1 (languages don't default properly if an entry is missing, unlike the way they worked in OFP).
Title: Re: Stringtables replaced?
Post by: i0n0s on 28 Jun 2009, 02:53:48
And if you want to convert from stringtable.csv to xml:
CSVtoXML.7z (http://dev-heaven.net/attachments/download/968/CSVtoXML.7z)

Just pass the path to the csv as first parameter.
Title: Re: Stringtables replaced?
Post by: nominesine on 28 Jun 2009, 02:58:52
stringtable.csv still works fine

I'm an old timer. This soothes my fragile nerves :)

And if you want to convert from stringtable.csv to xml:
CSVtoXML.7z (http://dev-heaven.net/attachments/download/968/CSVtoXML.7z)

Just pass the path to the csv as first parameter.

I wish I had the wisdom to implement that solution into my mission  :blink:

EDIT: The descritpion.ext entry for the string is different from OFP and Armed Assault though. Here's what it supposed to look like (working example):

Code: [Select]
class CfgSounds
{

class grunt_01
{
name = "grunt_01";
sound[] = {"sound\grunt_01.ogg", db+20, 1.0, 160};
titles[]={0, "$STR_grunt_01"};
};
class grunt_02
{
name = "grunt_02";
sound[] = {"sound\grunt_02.ogg", db+20, 1.0, 160};
titles[]={0, "$STR_grunt_02"};
};
class grunt_03
{
name = "grunt_03";
sound[] = {"sound\grunt_03.ogg", db+20, 1.0, 160};
titles[]={0, "$STR_grunt_03"};
};
class grunt_04
{
name = "grunt_04";
sound[] = {"sound\grunt_04.ogg", db+20, 1.0, 160};
titles[]={0, "$STR_grunt_04"};
};
class grunt_05
{
name = "grunt_05";
sound[] = {"sound\grunt_05.ogg", db+20, 1.0, 160};
titles[]={0, "$STR_grunt_05"};
};
class grunt_06
{
name = "grunt_06";
sound[] = {"sound\grunt_06.ogg", db+20, 1.0, 160};
titles[]={0, "$STR_grunt_06"};
};
class grunt_07
{
name = "grunt_07";
sound[] = {"sound\grunt_07.ogg", db+20, 1.0, 160};
titles[]={0, "$STR_grunt_07"};
};
};

Please note that the stringtable.csv must be in the root-folder of the mission (unlike the sounds it's refering to). And every string must be named with a line staring with a dollar sign. But don't use the dollarsign when you are referring to the string in a script. OK?
Title: Re: Stringtables replaced?
Post by: Spooner on 28 Jun 2009, 18:49:22
In a config of any kind, you get the localized string with a $ at the start of the string:
Code: [Select]
text = "$STR_frogs_are_great";
In a script you would get the string with:
Code: [Select]
_frog = localize "STR_frogs_are_great";