Kulyok Posted February 7, 2006 Share Posted February 7, 2006 Just tried to do it without AUTO_TRA and USING both, got a mistake. (ERROR: No translation provided for @47. It seems like WeiDU tried to use my Setup.tra for all dialogue files.) Ugh. Looks like I have to use AUTO_TRA, after all. Domi: your LANGUAGE ~English~ ~english~ ~Kivan/tra/english/SETUP.tra~ is sufficient. EDIT: You'll also have to add before that AUTO_TRA ~Kivan/%s~ Link to comment
Idobek Posted February 7, 2006 Share Posted February 7, 2006 --dout doesn't exist anymore. Oh, okay. Domi, slight change: FOR %%1 IN (mymod\d\*.d) DO WeiDU --traify %%1 --out mymod\tra\%%1 Link to comment
Idobek Posted February 7, 2006 Share Posted February 7, 2006 By the way, I'm pretty sure I do something similar that will make the tra files have sequential strings. I'm not sure there's any benefit in it. Link to comment
Domi Posted February 7, 2006 Author Share Posted February 7, 2006 Okay, so I will end up with 3 folders: D (original hard-coded dialogues) D_TRA (D's that were traified) TRA (TRA files) So, I will then change all my references in TP2 to new D_TRA folder for COMPILE purposes. Now, what will happen if I need by whatever reason to change D structure in the file? Do I have to re-TRA'fy? What will happen with the foreign langiage TRAs in that case? Do I manually insert the new lines or something? Link to comment
CamDawg Posted February 7, 2006 Share Posted February 7, 2006 Okay, so I will end up with 3 folders: D (original hard-coded dialogues) D_TRA (D's that were traified) TRA (TRA files) So, I will then change all my references in TP2 to new D_TRA folder for COMPILE purposes. Pardon, but why? Once traified you shouldn't need your hard-coded d files. Move your new tra-ified d files into the location of the old ones and the tra files into a language folder. Once traified you shouldn't use the old .d files any more. Link to comment
Domi Posted February 7, 2006 Author Share Posted February 7, 2006 Uhm, because if someone asks anything about a dialogue, the only way I can find it is using the old D's, to be honest, because I doubt that I will quickly get used to working with two files, one for structure, and one for texts... Link to comment
CamDawg Posted February 7, 2006 Share Posted February 7, 2006 Well, you can either look at two files for reference (d and tra), or maintain two as you manually have to move your changes from hard-coded d to tra-ified d. I personally find the former is infinitely easier, especially with something that can handle multiple files (woo ConTEXT). When tra-ifying, WeiDU is also kind enough to leave the old text, but commented out: BEGIN foo IF ~~ THEN BEGIN state SAY @0 /* Hi there! */ IF ~~ THEN REPLY @1 /* Hello! */ THEN GOTO bar IF ~~ THEN REPLY @2 /* Buzz off. */ THEN EXIT END So you should be able to get the gist of the dialogue without having to look it up every time. Or at least, until you radically alter the dialogue and the comments no longer resemble the strings. Link to comment
Domi Posted February 8, 2006 Author Share Posted February 8, 2006 Okay, it does not work. FOR %%1 IN (mymod\d\*.d) DO WeiDU --traify %%1 --out mymod\tra\%%1 this line give invalid argument %%1. Weidu spouts tons of infor on arguments, and the line FOR %1 IN (mymod\d\*.d) DO WeiDU --traify %1 --out mymod\tra\%1 does produce some movement, but gives a FATAL ERROR, like this: D:\Program Files\Black Isle\BGII - SoA>WeiDU --traify Kivan\d\P#PID25.D --out Ki van\tra\Kivan\d\P#PID25.D [WeiDU] WeiDU version 189 FATAL ERROR: Sys_error("Kivan\\tra\\Kivan\\d\\P#PID25.D: No such file or directo ry") EDIT: Basically, in the end, after much handholding from Cam I added the Kivan/d into the tra folder, and it worked I guess just the output path was not specified correctly. Unless it was intended all along. Link to comment
Kulyok Posted February 8, 2006 Share Posted February 8, 2006 When tra-ifying, WeiDU is also kind enough to leave the old text, but commented out: BEGIN foo IF ~~ THEN BEGIN state SAY @0 /* Hi there! */  IF ~~ THEN REPLY @1 /* Hello! */ THEN GOTO bar  IF ~~ THEN REPLY @2 /* Buzz off. */ THEN EXIT END Thankfully, this was not true for me. Otherwise, I would have ended with a lot of unnecessary baggage in my Dialogue directory. (Not to mention that the version would be quite a bit heavier). No, for me it went like this: BEGIN foo IF ~~ state SAY @0 ++ @1 + bar ++ @2 + bye END @0 = ~Hi there!~ @1 = ~Hello!~ @2 = ~Buzz off.~ Link to comment
the bigg Posted February 8, 2006 Share Posted February 8, 2006 Okay, it does not work. FOR %%1 IN (mymod\d\*.d) DO WeiDU --traify %%1 --out mymod\tra\%%1 this line give invalid argument %%1. Weidu spouts tons of infor on arguments, and the line FOR %1 IN (mymod\d\*.d) DO WeiDU --traify %1 --out mymod\tra\%1 does produce some movement, but gives a FATAL ERROR, like this: D:\Program Files\Black Isle\BGII - SoA>WeiDU --traify Kivan\d\P#PID25.D --out Ki van\tra\Kivan\d\P#PID25.D [WeiDU] WeiDU version 189 FATAL ERROR: Sys_error("Kivan\\tra\\Kivan\\d\\P#PID25.D: No such file or directo ry") EDIT: Basically, in the end, after much handholding from Cam I added the Kivan/d into the tra folder, and it worked I guess just the output path was not specified correctly. Unless it was intended all along. <{POST_SNAPBACK}> This is a problem with the Windows CLI; the %1 variable will be substituted with mymod\d\name_of_file.d, rather than name_of_file.d. You have to use FOR %A IN (mymod\d\*.d) DO WeiDU --traify %A --out mymod\tra\%~nxA (or double the number of %s if doing from a bat file). Variables (IE %A) shouldn't use a number, but a capital letter (numbers are for the CLI parameters). Link to comment
Domi Posted February 8, 2006 Author Share Posted February 8, 2006 Neat, thank you! I will definetly use it the next time I need to convert a lot of D's to TRA's. Link to comment
Meira Posted August 29, 2006 Share Posted August 29, 2006 Well, you can either look at two files for reference (d and tra), or maintain two as you manually have to move your changes from hard-coded d to tra-ified d. I personally find the former is infinitely easier, especially with something that can handle multiple files (woo ConTEXT). When tra-ifying, WeiDU is also kind enough to leave the old text, but commented out: BEGIN foo IF ~~ THEN BEGIN state SAY @0 /* Hi there! */ IF ~~ THEN REPLY @1 /* Hello! */ THEN GOTO bar IF ~~ THEN REPLY @2 /* Buzz off. */ THEN EXIT END So you should be able to get the gist of the dialogue without having to look it up every time. Or at least, until you radically alter the dialogue and the comments no longer resemble the strings. How can I make WeiDU do this? Like Kulyok I ended up with a .d file without the out commented lines. However, I'd love to have the lines there for reference. I used this command: FOR %A IN (amber\dialogs\*.d) DO WeiDU --traify %A --traify# 200 --out amber\tra\%~nxA Link to comment
cmorgan Posted August 29, 2006 Share Posted August 29, 2006 Don't do this until The BiGG has a chance to fix it... http://forums.pocketplane.net/index.php/to....html#msg291259 the current way to do this leaves your file looking like BEGIN foo IF ~~ THEN BEGIN state SAY @0 /* Hi there! /* IF ~~ THEN REPLY @1 /* Hello! /* THEN GOTO bar IF ~~ THEN REPLY @2 /* Buzz off. /* THEN EXIT END with no termination of comment (*/). When he gets it repaired, the syntax is http://forums.pocketplane.net/index.php/to....html#msg291521 weidu --traify-comment --traify X#GORLET.D --out X#GORLET_NEW.D which I set up to run under WinXP as a batch file that avoided overwrites by the following: FOR %%A IN (BG1NPC\Phase1\DLG\*.d) DO WeiDU --traify-comment --traify %%A --out BG1NPC\TEMP\%%~nxA and then replaced the files after visually confirming that everything was ok. EDIT: Please note, I did this without the extra command --traify-comment; the reference posts above have TheBigg's direct comments, so that if I am confusing something it will be clearer in his replies! Link to comment
Meira Posted August 29, 2006 Share Posted August 29, 2006 Thanks. Shame about that bug, though. Link to comment
Domi Posted September 12, 2007 Author Share Posted September 12, 2007 Edit: Nevermind, sorted it out. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.