1 # ================================================================================
3 # checkCreatureStrings.pl
4 # Copyright 2006, Sony Online Entertainment LLC
6 # ================================================================================
10 # --------------------------------------------------------------------------------
12 die "usage: $0\n\t Checks that all creatures.tab creature names are localized. Outputs missing creature names." if (@ARGV);
13 die "Must be run within a swg directory!" if (getcwd
() !~ m
!(.*/swg/\w
+/)!);
16 my $creaturesStringFile = "data/sku.0/sys.shared/built/game/string/en/mob/creature_names.stf";
17 my $creaturesTabFile = "dsrc/sku.0/sys.server/compiled/game/datatables/mob/creatures.tab";
18 my $localizationToolCon = "../all/tools/all/win32/LocalizationToolCon_r.exe";
20 # --------------------------------------------------------------------------------
22 open(CS
, "$rootPath$localizationToolCon $rootPath$creaturesStringFile -list |") || die "$!";
26 $creaturesString{$_[0]} = 1;
30 open(CT
, "$rootPath$creaturesTabFile") || die "$!";
31 <CT
>; <CT
>; # skip column header name & type
35 if (!$creaturesString{$_[0]})
38 ++$missingStringCount;
43 if ($missingStringCount)
45 print STDERR
"\nFAILURE! Missing $missingStringCount creature name strings!\n";
49 print STERR
"\nSUCCESS! No missing creature strings!\n";
52 exit $missingStringCount;
54 # ================================================================================