Home   Help Search Login Register  

Author Topic: Stringtables replaced?  (Read 1937 times)

0 Members and 1 Guest are viewing this topic.

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Stringtables replaced?
« 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.
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Stringtables replaced?
« Reply #1 on: 27 Jun 2009, 21:38:59 »
Afaik it's stringtable.xml now..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Stringtables replaced?
« Reply #2 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-
« Last Edit: 28 Jun 2009, 08:06:33 by h- »
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Stringtables replaced?
« Reply #3 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).
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline i0n0s

  • Moderator
  • *****
Re: Stringtables replaced?
« Reply #4 on: 28 Jun 2009, 02:53:48 »
And if you want to convert from stringtable.csv to xml:
CSVtoXML.7z

Just pass the path to the csv as first parameter.

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Stringtables replaced?
« Reply #5 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

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?
« Last Edit: 28 Jun 2009, 03:06:22 by nominesine »
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Stringtables replaced?
« Reply #6 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";
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)