WeiDU glitch?
#1
Posted 09 August 2009 - 12:48 AM
Attached are the files I'm trying to retraify, if anyone can help reproduce and troubleshoot. The syntax I'm using is: weidu --traify agtomtha.d --traify-old-tra agtomtha.tra --out agtomtha-new --traify-comment.
agtomth.rar 10.42K 76 downloads
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle
#2
Posted 10 August 2009 - 12:30 PM
[action list near line 73, column 159 of agtomtha.d] LEXER WARNING at line 73 co lumn 1-100 Near Text: unterminated comment WARNING: cannot verify action ~SetGlobal("ag_tom_nice","GLOBAL",1) IncrementGlob al("ag_tomruby","GLOBAL",1) AddJournalEntry(@28 /* ~: Parsing.Parse_error [agtomtha.d] PARSE ERROR at line 73 column 1-159 Near Text: A syntax error ERROR: problem tra-ifying file [agtomtha.d]: Parsing.Parse_error FATAL ERROR: Parsing.Parse_error
In my understanding, the message displayed by WeiDU (error in line 73 while parsing the action, around column 159) seems to indicate that WeiDU adds somehow a comment, possibly to add the text for @28 in it, but then encloses the text in ~~. Unfortunately, the first ~ will then mark the end of the action list and WeiDU seems to complain about it, possibly because it does not handle the comment as such an action list (anyway the game engine won't like the comment).
To try my hypothesis, I replaced the the separators ~ for line @28 in the tra file by ". This didn't change the error message.
Then I tryed % or ~~~~~ as separator for the action string, but that didn't work and changed the column where the error was located (column 108, at IncrementGlobal).
I assume that it's WeiDU default behaviour to assume a string shall be within ~~ when nothing in it prevents it.
As a workaround, I suggest you use the old suggestion for traify when adding new texts : --traify#
This command line worked fine (120 is the last number used in the existing tra file, so I used 121):
weidu --traify agtomtha.d --traify# 121 --out agtomtha-new --traify-comment
But I had to fix an error in the d file, at line 527:
The three @ are wrong, I had to remove them to get a proper result.++ ~I thought the talk was about a dozen thousand gold at most?~ + ag_tom_up_cost @@@
Then you just need to add the new tra lines to your existing file. The main drawback is that WeiDU won't reuse any existing @ref if a new text is identical to an existing one, which would be obtained when using --traify-old-tra. Anyway, any duplicate text will be removed during installation, so it's not such a big deal.
Final note:
To get a better understanding of WeiDU traify, I replaced the @28 in AddJournalEntry(@28,QUEST) on line 73 by a random text in "" with a line break, then I traified using the alternate command line with --traify#. The text for the journal didn't get traified at all and remained as it was in the generated d file.
Then I used ~~ as separators for my test string and I got an error message very similar to the one you get. The opening ~ of my string seems considered as the ending separator of the action list.
So it seems that WeiDU doesn't really look for texts to traify within the action list string, since my string in "" was forgotten. This behaviour doesn't look consistent with the way it seemed to want to add the actual text of @28 within /* */, as the initial error message made me think.
Possibly WeiDU would need an exception handling for the @ref substitution when it's found in a string such as an action string. But I do hope the bigg or Taimon won't hold anything against me for my wild guesses.
#3
Posted 11 August 2009 - 09:53 PM
Yeah, typo.But I had to fix an error in the d file, at line 527
Cheers, I guess this works for now. Also, bigg fixed it for the next WeiDU, so no worries .Then you just need to add the new tra lines to your existing file.
I did get a blank line and missing entry around @161, which usually indicates a problem with the code or traification but I couldn't figure it out. There is a blank string ~~ on the next line, but traify should skip those anyway, right?
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle