Author Topic: Question to script compilation that contain text strings  (Read 3968 times)

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Question to script compilation that contain text strings
« on: October 04, 2007, 02:21:17 PM »
(WeiDU v 199).

If I have

EXTEND_BOTTOM ~Baldur.bcs~ ~DKDrizzt/scripts/DKKomZuf.baf~

and my .baf contains text strings, the text is taken out of the setup.tra, regardless that there is a "DKKomZuf.tra" in the relevant language folder.

I have to use

EXTEND_BOTTOM ~Baldur.bcs~ ~DKDrizzt/scripts/DKKomZuf.baf~
USING ~DKDrizzt/%s/DKKomZuf.tra~

to get the right strings compiled.

Either I missed something, or it would be great if script files, that get compiled and directly appended to an ingame script, would use the relevant tra directly, without need of the path specification.

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Question to script compilation that contain text strings
« Reply #1 on: October 04, 2007, 03:33:41 PM »
Will be fixed for 202.00.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Question to script compilation that contain text strings
« Reply #2 on: October 05, 2007, 02:50:18 AM »
I start really looking foreward to WeiDU 202. Thank you!

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Question to script compilation that contain text strings
« Reply #3 on: October 05, 2007, 04:52:43 AM »
Done. This will have to be tested, though, so I can't guarantee that it will actually be in (there might be a mod somewhere who actually expected AUTO_TRA not to be honored and was intentionally using setup.tra all along).
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Question to script compilation that contain text strings
« Reply #4 on: October 05, 2007, 02:22:39 PM »
If you point me to that one mod I'll happily rework the tp2 if the author doesn't want to.
I hope that this will be seen as a helpful feature though, as I neither want to put a USING to all my script files nor miss script's texts if I don't.

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Question to script compilation that contain text strings
« Reply #5 on: October 05, 2007, 02:32:39 PM »
If you point me to that one mod I'll happily rework the tp2 if the author doesn't want to.
I hope that this will be seen as a helpful feature though, as I neither want to put a USING to all my script files nor miss script's texts if I don't.
Rewriting a tp2 is not allowed under my compatibility rules (the one time when a feature required that resulted in this).

Mind you, this would only cause troubles if a mod is (intentionally!) using setup.tra references for EXTEND_TOP and has a .tra file with the same name as the script to be extended. I don't think this actually happens, but you can never be too sure.

Also, I should have received yesterday my new computer, which will have enough disk space for multiple installs of BG2 and thus allow testing. Unfortunately, they ran out of 8800 GTS/640 and thus I'll have to wait until Monday for it (thus delaying W202).
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Question to script compilation that contain text strings
« Reply #6 on: October 10, 2007, 04:52:50 AM »
Makes sense, but still I hope it will make it into 202.

another thing related to this:
(WeiDU 199)

Code: [Select]
EXTEND_BOTTOM ~Baldur25.bcs~ ~DKDrizzt/scripts/DKKoZu25.baf~
USING ~DKDrizzt/%s/DKKoZu25.tra~

installs fine - absolutely no error message or warning on the installer window. Problem is, there exists no "DKKoZu25.tra" (my fault), and the strings of the setup.tra are used.
(I feel haunted by these setup strings! And the one in question is two paragraphs long, the bio of the NPC.)

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Question to script compilation that contain text strings
« Reply #7 on: October 10, 2007, 05:18:49 AM »
I cannot in good conscience allow error messages to be printed if a .tra is not found. Perhaps I can enable them with MODDER.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Question to script compilation that contain text strings
« Reply #8 on: October 10, 2007, 05:30:50 AM »
Why not? It's a missing file. You get install errors if single strings don't get found. In the above case all strings are missing, and I don't get informed.
« Last Edit: October 10, 2007, 05:33:07 AM by jastey »

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Question to script compilation that contain text strings
« Reply #9 on: October 10, 2007, 05:34:59 AM »
Suppose you say (like I do in my mods)

AUTO_TRA ~mod/%s~
AUTO_TRA ~mod/english~

so that strings are picked from the english folder if there is no local translation available. If I turn on error messages, all such mods would get a warning on a partially translated mod.

Errors would duplicate even if you're COMPILEing a .baf without any string reference, and thus no associated TRA file.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Question to script compilation that contain text strings
« Reply #10 on: October 10, 2007, 05:40:12 AM »
OK, I guess I don't really understand how that tra-picking works. At least some kind of warning, be it in MODDER mode: "No xx.tra strings, using yy.tra" would help tremendously.

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Question to script compilation that contain text strings
« Reply #11 on: October 10, 2007, 05:54:40 AM »
Which I'm adding  :)
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Question to script compilation that contain text strings
« Reply #12 on: October 10, 2007, 09:41:25 AM »
The following changes apply to MODDER mode only. setup.tra is ignored for COMPILE and EXTEND_*. If no translation file is provided, a warning is printed (which could likely result in a false positive, hence no "Installed with warnings"). If you actually miss an @reference, the installation is halted.

Example:

Code: [Select]
Compiling 1 dialogue file and 1 script ...
Warning: COMPILE a.baf with strings from setup.tra
ERROR: No translation provided for @1

[a.baf]  ERROR at line 5 column 41-42
Near Text: @1
        Not_found
ERROR: parsing [a.baf]: Not_found
ERROR: error compiling [a.baf]: Not_found
ERROR: compiling [a.baf]!
Stopping installation because of error.

ERROR Installing [foo], rolling back to previous state

Whereas in non-modder mode the dialogue would be installed using @1 from setup.tra.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Question to script compilation that contain text strings
« Reply #13 on: June 22, 2009, 01:27:27 PM »
Suppose you say (like I do in my mods)

AUTO_TRA ~mod/%s~
AUTO_TRA ~mod/english~

so that strings are picked from the english folder if there is no local translation available.
If I use this, all lines are English, always. Did this change for 210, or did I misunderstood?

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Question to script compilation that contain text strings
« Reply #14 on: June 22, 2009, 02:02:52 PM »
in that case it's the other way around, I guess.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Question to script compilation that contain text strings
« Reply #15 on: June 22, 2009, 02:25:33 PM »
Ah, that makes sense. I will try it next time.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: