Skip to content

Commit d76848c

Browse files
authored
Merge pull request #72 from KenshiDRK/master
Adding article and plural names for items
2 parents 4ab20ae + f36ba6a commit d76848c

File tree

3 files changed

+50
-29
lines changed

3 files changed

+50
-29
lines changed

Program.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,6 @@ private static void PostProcess()
324324
}
325325

326326
// Move item descriptions into separate table
327-
//TODO: Remove when shared resources are implemented
328327
model.item_descriptions = new List<dynamic>();
329328
foreach (var item in model.items)
330329
{
@@ -338,6 +337,24 @@ private static void PostProcess()
338337

339338
model.item_descriptions.Add(item_description);
340339
}
340+
341+
// Move item grammar into separate table
342+
model.items_grammar = new List<dynamic>();
343+
foreach (var item in model.items)
344+
{
345+
if (item.en != "." && (item.id < 29681 || item.id > 29693))
346+
{
347+
dynamic item_grammar = new ModelObject();
348+
item_grammar.id = item.id;
349+
item_grammar.plural = item.enlp;
350+
item_grammar.article = item.art;
351+
352+
item.art = null;
353+
item.enlp = null;
354+
355+
model.items_grammar.Add(item_grammar);
356+
}
357+
}
341358

342359
// Fill in linked auto-translate names
343360
foreach (var at in model.auto_translates)

ResourceParser.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ public static void Initialize(dynamic model)
4343
private enum StringIndex
4444
{
4545
Name = 0,
46-
//EnglishArticle = 1,
46+
EnglishArticle = 1,
4747
EnglishLogSingular = 2,
48-
//EnglishLogPlural = 3,
48+
EnglishLogPlural = 3,
4949
EnglishDescription = 4,
5050
JapaneseDescription = 1,
5151
}
@@ -614,7 +614,9 @@ private static void ParseFullStrings(BinaryReader reader, dynamic item, Language
614614
switch (language)
615615
{
616616
case Languages.English:
617+
item.art = DecodeEntry(reader, StringIndex.EnglishArticle);
617618
item.enl = DecodeEntry(reader, StringIndex.EnglishLogSingular);
619+
item.enlp = DecodeEntry(reader, StringIndex.EnglishLogPlural);
618620
item.endesc = DecodeEntry(reader, StringIndex.EnglishDescription);
619621
break;
620622

@@ -634,12 +636,12 @@ private static object DecodeEntry(BinaryReader reader, StringIndex index)
634636
var datatype = reader.ReadInt32();
635637
stream.Position = origin;
636638

637-
reader.ReadBytes(dataoffset);
639+
reader.ReadBytes(dataoffset - 4);
638640

639641
switch (datatype)
640642
{
641643
case 0:
642-
reader.ReadBytes(0x18);
644+
reader.ReadBytes(0x1C);
643645
var dataorigin = stream.Position;
644646

645647
while (stream.Position != stream.Length && reader.ReadByte() != 0)
@@ -654,7 +656,9 @@ private static object DecodeEntry(BinaryReader reader, StringIndex index)
654656
return res;
655657

656658
case 1:
657-
return reader.ReadInt32();
659+
var value = reader.ReadInt32();
660+
stream.Position = origin;
661+
return value;
658662
}
659663

660664
return null;

fixes.xml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,7 +1903,7 @@ IN THE SOFTWARE.
19031903
<o id="102" en="${actor} uses ${ability}.${lb}${target} recovers ${number} HP." color="H" suffix="HP" />
19041904
<o id="103" en="${actor} uses ${weapon_skill}.${lb}${target} recovers ${number} HP." color="H" suffix="HP" />
19051905
<o id="104" en="Unable to use item. You do not meet the level requirement." color="122" />
1906-
<o id="105" en="${actor} gains ${number} experience points." color="131" />
1906+
<o id="105" en="${actor} gains ${number2} experience points." color="131" />
19071907
<o id="106" en="${actor} is intimidated by ${target}'s presence." color="122" />
19081908
<o id="107" en="${target} is temporarily unable to access support job abilities." color="123" />
19091909
<o id="108" en="${actor} uses ${ability}.${lb}Pet's powers increase!" color="101" />
@@ -2051,7 +2051,7 @@ IN THE SOFTWARE.
20512051
<o id="250" en="Reraise takes effect!" color="122" />
20522052
<o id="251" en="The effect of ${status} is about to wear off." color="123" />
20532053
<o id="252" en="${actor} casts ${spell}.${lb}Magic Burst! ${target} takes ${number} points of damage." color="D" />
2054-
<o id="253" en="EXP chain #${number}!${lb}${actor} gains ${number} experience points." color="131" />
2054+
<o id="253" en="EXP chain #${number2}!${lb}${actor} gains ${number} experience points." color="131" />
20552055
<o id="254" en="Current enmity: ${number}" color="191" />
20562056
<o id="255" en="DEBUG: ${target}}${number}% chance of success." color="1" />
20572057
<o id="256" en="In this flower pot:${lb}Seeds sown: ${item}" color="121" />
@@ -2106,7 +2106,7 @@ IN THE SOFTWARE.
21062106
<o id="305" en="${actor} uses Trick Attack." color="101" />
21072107
<o id="306" en="${actor} uses ${ability}.${lb}${target} recovers ${number} HP." color="H" suffix="HP" />
21082108
<o id="307" en="That action requires a two-handed weapon." color="122" />
2109-
<o id="308" en="Unable to use the ${item}. ${target}'s inventory is full." color="121" />
2109+
<o id="308" en="Unable to use the ${item}. ${target}'s inventory is full." color="123" />
21102110
<o id="309" en="${actor} casts ${spell} on ${target}." color="56" />
21112111
<o id="310" en="${actor}'s ${skill} skill drops 0.${number} points!" color="1" suffix="skill points" />
21122112
<o id="311" en="${actor} covers ${target}." color="101" />
@@ -2167,10 +2167,10 @@ IN THE SOFTWARE.
21672167
<o id="366" en="${number} MP drained from ${target}." color="H" suffix="MP" />
21682168
<o id="367" en="${target} recovers ${number} HP." color="H" suffix="HP" />
21692169
<o id="368" en="${actor} earns a merit points! (Total: ${number})" color="1" suffix="merit points" />
2170-
<o id="369" en="${actor} uses ${weapon_skill}.${lb}${number} of ${target}'s attributes is drained." color="H" suffix="attributes" />
2171-
<o id="370" en="${actor} uses ${weapon_skill}.${lb}${number} status effect is drained from ${target}." color="56" suffix="status effect" />
2170+
<o id="369" en="${actor} uses ${weapon_skill}.${lb}${number} of ${target}'s attributes is drained." color="H" suffix="attributes drained" />
2171+
<o id="370" en="${actor} uses ${weapon_skill}.${lb}${number} status effect is drained from ${target}." color="56" suffix="status effect drained" />
21722172
<o id="371" en="${actor} gains ${number} limit points." color="131" suffix="limit points" />
2173-
<o id="372" en="Limit chain #${number}!${lb}${actor} gains ${number} limit points." color="131" suffix="limit points" />
2173+
<o id="372" en="Limit chain #${number2}!${lb}${actor} gains ${number} limit points." color="131" suffix="limit points" />
21742174
<o id="373" en="${actor} hits ${target}.${lb}${target} recovers ${number} hit points!" color="H" suffix="HP" />
21752175
<o id="374" en="Striking ${target}'s armor causes ${actor} to become ${status}." color="112" />
21762176
<o id="375" en="${actor} uses a ${item}.${lb}${target} receives the effect of ${status}." color="81" />
@@ -2198,24 +2198,24 @@ IN THE SOFTWARE.
21982198
<o id="397" en="Skillchain: Detonation.${lb}${target} recovers ${number} hit points!" color="H" suffix="HP" />
21992199
<o id="398" en="Skillchain: Impaction.${lb}${target} recovers ${number} hit points!" color="H" suffix="HP" />
22002200
<o id="399" en="${actor} uses a ${item}.${lb}All of ${target}'s Petras vanish!" color="81" />
2201-
<o id="400" en="${actor} uses a ${item}.${lb}${number} of ${target}'s status ailments disappears!" color="81" />
2201+
<o id="400" en="${actor} uses a ${item}.${lb}${number} of ${target}'s status ailments disappears!" color="81" suffix="status ailments disappears" />
22022202
<o id="401" en="${actor} uses a ${item}.${lb}${number} of ${target}'s effects disappears!" color="81" suffix="effects disappears" />
22032203
<o id="402" en="${actor} uses ${weapon_skill}.${lb}${target}'s magic defense is enhanced." color="56" />
2204-
<o id="403" en="${number} of ${target}'s attributes is drained." color="H" suffix="attributes" />
2205-
<o id="404" en="${number} status effect is drained from ${target}." color="H" suffix="buffs" />
2204+
<o id="403" en="${number} of ${target}'s attributes is drained." color="H" suffix="attributes drained" />
2205+
<o id="404" en="${number} status effect is drained from ${target}." color="H" suffix="status effect drained" />
22062206
<o id="405" en="${actor} uses ${weapon_skill}.${lb}${number} of ${target}'s effects disappears!" color="56" suffix="effects disappears" />
22072207
<o id="406" en="${actor} uses ${weapon_skill}.${lb}${target} falls to the ground." color="102" />
22082208
<o id="407" en="${actor} uses a ${item}.${lb}${target}'s TP is reduced." color="81" suffix="TP" />
22092209
<o id="408" en="${actor} uses a ${item}.${lb}No effect on ${target}." color="R" />
22102210
<o id="409" en="${actor} uses ${weapon_skill}.${lb}${target}'s TP is increased to ${number}." color="H" suffix="TP" />
22112211
<o id="410" en="No target available. Unable to use item." color="122" />
2212-
<o id="411" en="${actor} attempts to use the ${item}, but lacks the required number of Ballista Points.${lb}You currently have ${number} Ballista points." color="122" />
2212+
<o id="411" en="${actor} attempts to use the ${item}, but lacks the required number of Ballista Points.${lb}You currently have ${number} Ballista Points." color="122" />
22132213
<o id="412" en="${actor} uses a ${item}.${lb}${target} receives the effect of ${status}." color="81" />
22142214
<o id="413" en="${actor} uses a ${item}.${lb}${target} takes ${number} points of damage." color="D" />
22152215
<o id="414" en="${actor} uses ${ability}.${lb}${target} receives the effect of Magic Attack Boost and Magic Defense Boost." color="101" />
22162216
<o id="415" en="${target} receives the effect of Magic Attack Boost and Magic Defense Boost." color="101" />
22172217
<o id="416" en="${actor} uses ${weapon_skill}.${lb}${target} receives the effect of Magic Attack Boost and Magic Defense Boost." color="56" />
2218-
<o id="417" en="${actor} uses ${ability}.${lb}${number} of ${target}'s attributes is drained." color="H" suffix="attributes" />
2218+
<o id="417" en="${actor} uses ${ability}.${lb}${number} of ${target}'s attributes is drained." color="H" suffix="attributes drained" />
22192219
<o id="418" en="${actor} uses ${weapon_skill} on ${target}.${lb}${target}'s target switches to ${actor}!" color="56" />
22202220
<o id="419" en="${target} learns ${spell}!" color="81" />
22212221
<o id="420" en="${actor} uses ${ability}. The total comes to ${number}!${lb}${target} receives the effect of ${ability}." color="101" />
@@ -2362,15 +2362,15 @@ IN THE SOFTWARE.
23622362
<o id="561" en="Unable to perform that action.${lb}Your have already earned the maximum number of finishing moves." color="122" />
23632363
<o id="562" en="The status parameters of ${target} have increased." color="122" />
23642364
<o id="563" en="${actor} destroys ${target}." color="101" />
2365-
<o id="564" en="${target} were destroyed." color="101" />
2365+
<o id="564" en="${target} was destroyed." color="101" />
23662366
<o id="565" en="${target} obtains ${gil}." color="127" suffix="gil"/>
23672367
<o id="566" en="${target} obtains ${number} tab. (Total: ${number})" color="131" />
23682368
<o id="567" en="${actor} stowed away a ${item} in his tattered Maze Monger pouch." color="81" />
23692369
<o id="568" en="Your tattered Maze Monger pouch already contains a ${item} and cannot hold another." color="122" />
23702370
<o id="569" en="Your current status prevents you from using that ability." color="123" />
2371-
<o id="570" en="${actor} casts ${spell}.${lb}${number} of ${target}'s status ailments disappears!" color="81" />
2372-
<o id="571" en="${number} of ${target}'s status ailments disappears!" color="81" />
2373-
<o id="572" en="${actor} casts ${spell}.${lb}${actor} absorbs ${number} of ${target}'s status ailments." color="81" />
2371+
<o id="570" en="${actor} casts ${spell}.${lb}${number} of ${target}'s status ailments disappears!" color="81" suffix="status ailments disappears" />
2372+
<o id="571" en="${number} of ${target}'s status ailments disappears!" color="81" suffix="status ailments disappears" />
2373+
<o id="572" en="${actor} casts ${spell}.${lb}${actor} absorbs ${number} of ${target}'s status ailments." color="81" suffix="status ailments absorbed" />
23742374
<o id="573" en="${actor} or a alliance member is participating in a union.${lb}Ineligible to obtain treasure from this enemy." color="123" />
23752375
<o id="574" en="${actor}'s pet is currently unable to perform that action." color="122" />
23762376
<o id="575" en="${actor}'s pet does not have enough TP to perform that action." color="122" />
@@ -2387,7 +2387,7 @@ IN THE SOFTWARE.
23872387
<o id="586" en="Towards ${target} is ${number}%." color="101" suffix="%%" />
23882388
<o id="587" en="${target} regains ${number} HP." color="H" suffix="HP" />
23892389
<o id="588" en="${target} regains ${number} MP." color="H" suffix="MP" />
2390-
<o id="589" en="${target} have been healed of ${number} status ailments." color="101" />
2390+
<o id="589" en="${target} has been healed of ${number} status ailments." color="101" suffix="status ailments healed" />
23912391
<o id="590" en="You can now perform ${weapon_skill}." color="122" />
23922392
<o id="591" en="${actor} uses ${ability}.${lb}${target} is afflicted with Bewildered Daze (lv.${number})." color="101" prefix="lv." />
23932393
<o id="592" en="${target} attempts to counter ${actor}'s attack, but misses." color="M" suffix="(miss)" />
@@ -2405,7 +2405,7 @@ IN THE SOFTWARE.
24052405
<o id="604" en="${actor} eats a ${item}, but finds nothing inside..." color="81" />
24062406
<o id="605" en="Additional effect: ${target} falls to the ground." color="56" />
24072407
<o id="606" en="${actor}'s absorbs ${target}'s counter.${lb}${actor} recovers ${number} HP." color="H" suffix="HP" />
2408-
<o id="607" en="${actor} uses ${weapon_skill}.${lb}${number} of ${target}'s status ailments disappears!" color="H" />
2408+
<o id="607" en="${actor} uses ${weapon_skill}.${lb}${number} of ${target}'s status ailments disappears!" color="H" suffix="status ailments disappears" />
24092409
<o id="608" en="${actor} uses ${ability}.${lb}Treasure Hunter effectiveness against ${target} increases to ${number}." color="101" prefix="TH" />
24102410
<o id="609" en="Prowess attained: Increased treasure casket discovery." color="122" />
24112411
<o id="610" en="Prowess attained: Increased combat and magic skill gain." color="122" />
@@ -2431,10 +2431,10 @@ IN THE SOFTWARE.
24312431
<o id="634" en="Prowess boosted: Enhanced &quot;Cure&quot; potency." color="122" />
24322432
<o id="635" en="Prowess boosted: Increased weapon skill damage." color="122" />
24332433
<o id="636" en="Prowess boosted: &quot;Killer&quot; effects bonus." color="122" />
2434-
<o id="641" en="Additional effect: 1 of ${target}'s attributes is drained." color="H" />
2435-
<o id="642" en="${actor} casts ${spell}.${lb}${actor} absorbs ${number} of ${target}'s status benefits." color="H" />
2434+
<o id="641" en="Additional effect: 1 of ${target}'s attributes is drained." color="H" suffix="attributes drained" />
2435+
<o id="642" en="${actor} casts ${spell}.${lb}${actor} absorbs ${number} of ${target}'s status benefits." color="H" suffix="status benefits absorbed" />
24362436
<o id="643" en="Your current training regime will begin anew!" color="122" />
2437-
<o id="644" en="${actor} uses ${ability}.${lb}${number} of ${target}'s status effects are removed." color="H" suffix="buffs" />
2437+
<o id="644" en="${actor} uses ${ability}.${lb}${number} of ${target}'s status effects are removed." color="H" suffix="status effects removed" />
24382438
<o id="645" en="${actor} uses ${ability}.${lb}${target} is ${status}." color="65" />
24392439
<o id="646" en="${actor} uses ${ability}.${lb}${target} falls to the ground." color="56" />
24402440
<o id="647" en="${actor} casts ${ability}.${lb}${target}'s ${status} effect disappears!" color="81" />
@@ -2525,9 +2525,9 @@ IN THE SOFTWARE.
25252525
<o id="734" en="${actor} uses ${ability} on ${target}." color="56" />
25262526
<o id="735" en="Capacity chain #${number}!${lb}${actor} gains ${number2} capacity points." color="131" />
25272527
<o id="736" en="${actor} uses ${ability}.${lb}${number} HP drained from ${target}." color="H" suffix="HP" />
2528-
<o id="737" en="${actor} uses ${ability}. ${lb}${number} of ${target} magic effects is drained." color="101" />
2528+
<o id="737" en="${actor} uses ${ability}. ${lb}${number} of ${target} magic effects is drained." color="101" suffix="magic effects drained" />
25292529
<o id="738" en="${actor} uses ${ability}." color="101" />
2530-
<o id="739" en="${target} receives ${number} magical effects." color="56" />
2530+
<o id="739" en="${target} receives ${number} magical effects." color="56" suffix="magical effects received" />
25312531
<o id="740" en="${target}: $lt; ${number}/${number2}" color="1 $gt;" />
25322532
<o id="741" en="You receive ${number} Unity accolades for a total of ${number2}!" color="127" />
25332533
<o id="742" en="You are currently unable to undertake this objective." color="121" />
@@ -2566,7 +2566,7 @@ IN THE SOFTWARE.
25662566
<o id="775" en="A new objective has been added in the Contents &gt; Content (Ambuscade) Records of Eminence category!" color="121" />
25672567
<o id="776" en="Additional effect: ${target} is chainbound." color="56" />
25682568
<o id="777" en="You cannot mount at this time." color="122" />
2569-
<o id="778" en="${actor} uses ${weapon_skill}.${lb}${actor} copies ${number} magical effects from ${target}." color="111" />
2569+
<o id="778" en="${actor} uses ${weapon_skill}.${lb}${actor} copies ${number} magical effects from ${target}." color="111" suffix="magical effects copied" />
25702570
<o id="779" en="${actor} uses ${weapon_skill}.${lb}A barrier begins to pulsate around ${target}." color="111" />
25712571
<o id="780" en="${actor} uses ${weapon_skill}.${lb}${actor} takes aim at ${target}!" color="111" />
25722572
<o id="781" en="${target} retaliates, absorbing ${number} TP from ${actor}." color="101" />

0 commit comments

Comments
 (0)