Jump to content

Question to WITH_TRA (I think)


Recommended Posts

I have this in sodrtd.tp2:

ACTION_IF (MOD_IS_INSTALLED ~themed_tweaks.tp2~ ~80~) THEN BEGIN
PRINT @100015 /* ~Themed Tweaks component was installed via Themed Tweaks: patching dialogues.~ */
WITH_TRA ~themed_tweaks/languages/%s/sod_stat_weak_poison.tra~ BEGIN
  OUTER_SET strref1 = RESOLVE_STR_REF(@107)
  OUTER_SET strref2 = RESOLVE_STR_REF(@106)
  OUTER_SET state_105 = STATE_WHICH_SAYS 105 IN ~themed_tweaks/languages/%s/sod_stat_weak_poison.tra~ FROM ~bdbelt~
END

And this bails out during install. Themed Taeaks component 80 is installed, translation path is correct as far as I can see:

Quote

Themed Tweaks component detected.

Themed Tweaks component was installed via Themed Tweaks: patching dialogues.
ERROR: No translation provided for @107
Stopping installation because of error.
Stopping installation because of error.
Stopping installation because of error.
Stopping installation because of error.

Does anyone see anything obvious or know why this doesn't work?

 

Link to comment

This works (checking in the same mod folder):

ACTION_IF (MOD_IS_INSTALLED ~themed_tweaks.tp2~ ~80~) THEN BEGIN
PRINT @100015 /* ~Themed Tweaks component was installed via Themed Tweaks: patching dialogues.~ */
//WITH_TRA ~themed_tweaks/languages/%s/sod_stat_weak_poison.tra~ BEGIN
WITH_TRA ~sodrtd/translations/%s/sod_stat_weak_poison.tra~ BEGIN
  OUTER_SET strref1 = RESOLVE_STR_REF(@107)
  OUTER_SET strref2 = RESOLVE_STR_REF(@106)
  OUTER_SET state_105 = STATE_WHICH_SAYS 105 IN ~themed_tweaks/languages/%s/sod_stat_weak_poison.tra~ FROM ~bdbelt~
END

 

Link to comment

Have you made sure that both mods use the same folder name for the same language? From what I've seen themed_tweaks uses "american" for English language.

Edit: Btw, you can specify multiple tra paths for WITH_TRA, so you could also add a fallback path in case a specific language doesn't exist.

Edited by argent77
Link to comment
5 minutes ago, argent77 said:

Have you made sure that both mods use the same folder name for the same language? From what I've seen themed_tweaks uses "american" for English language.

I wouldn't know how to do that? I thought it uses the language the other mod is installed in. Wouldn't make much sense if it didn't?

Link to comment

It does under the condition that both mods uses the same "language folder name". During your mod installation, the themed_tweaks/languages/%s is evaluated to 'themed_tweaks/languages/English' because your mod uses 'English' folder name but themed_tweaks uses 'american' and so the path doesn't exist.

Link to comment
1 hour ago, AL|EN said:

It does under the condition that both mods uses the same "language folder name". During your mod installation, the themed_tweaks/languages/%s is evaluated to 'themed_tweaks/languages/English' because your mod uses 'English' folder name but themed_tweaks uses 'american' and so the path doesn't exist.

Wow, ok, this really only works if both mods are installed in the same language, i.e. having the same name.

 

This is not the case for STATE_WHICH_SAYS and USING. It uses the language the other mod is installed in. Example: EndlessBG1 in Polish, Brandock the Mage in English. It patches the crossmod that is applied to a mod state using STATE_WHICH_SAYS:

Spoiler

/* EndlessBG1 - handled individually */
ACTION_IF (GAME_INCLUDES ~sod~ AND MOD_IS_INSTALLED ~c#endlessbg1.tp2~ ~0~) BEGIN
PRINT @55580 /* ~EndlessBG1 detected.~ */

/* direct transition to BGII */
// Get state @8 for BELT %BELTBRD12_BELT8%
/* ~I see. Still, the city is in your debt. Fare well, Hero of Baldur's Gate.~ */
  OUTER_SET BELTBRD12_BELT8 = STATE_WHICH_SAYS 8 IN ~c#endlessbg1/translations/%s/DIALOGUES.TRA~ FROM ~BELT~
  OUTER_SPRINT ~BELTBRD_or_BELT~ ~BELT~
  COMPILE EVALUATE_BUFFER ~C#Brandock/dialogue/c#brando_bg1end_bg2.d~
     USING ~C#Brandock/tra/autotra/%LANGUAGE%/c#brand_dialogues.tra~

(...)

weidu.log of example

Spoiler

// Log of Currently Installed WeiDU Mods
// The top of the file is the 'oldest' mod
// ~TP2_File~ #language_number #component_number // [Subcomponent Name -> ] Component Name [ : Version]
~C#ENDLESSBG1/C#ENDLESSBG1.TP2~ #3 #0 // Endless BG1: komponent glowny (wymagany): 10
~C#ENDLESSBG1/C#ENDLESSBG1.TP2~ #3 #1 // Uklon dla bohatera Wrot Baldura (rezydencja w palacu): 10
~C#ENDLESSBG1/C#ENDLESSBG1.TP2~ #3 #2 // Krotki publiczny hold dla bohatera Wrot Baldura: 10
~C#ENDLESSBG1/C#ENDLESSBG1.TP2~ #3 #3 // Unikatowe wyposazenie Sarevoka: 10
~C#ENDLESSBG1/C#ENDLESSBG1.TP2~ #3 #4 // Miecz Sarevoka: 10
~C#ENDLESSBG1/C#ENDLESSBG1.TP2~ #3 #5 // Imoen i Ksiezna Liia Jannath (Imoen otrzymuje rezydencje w palacu): 10
~C#ENDLESSBG1/C#ENDLESSBG1.TP2~ #3 #6 // Ksiaze Eltan bedzie w palacu: 10
~C#ENDLESSBG1/C#ENDLESSBG1.TP2~ #3 #7 // Uzdrowiciel Plomiennej Piesci przyjdzie do swiatyni w Podziemnym Miescie: 10
~C#ENDLESSBG1/C#ENDLESSBG1.TP2~ #3 #8 // Spotkanie z Elminsterem -> Wersja autorska jastey: 10
~C#ENDLESSBG1/C#ENDLESSBG1.TP2~ #3 #10 // Uchodzcy z polnocy przybeda do Wrot Baldura: 10
~C#ENDLESSBG1/C#ENDLESSBG1.TP2~ #3 #11 // Skarbnik Ophyllis bedzie w podziemiach palacu: 10
~C#ENDLESSBG1/C#ENDLESSBG1.TP2~ #3 #12 // Komentarz Denkoda w Gildii Zlodziei Cienia o smierci Sarevoka: 10
~C#ENDLESSBG1/C#ENDLESSBG1.TP2~ #3 #13 // Pomin labirynt zlodziei w drodze powrotnej po zabiciu Sarevoka: 10
~C#ENDLESSBG1/C#ENDLESSBG1.TP2~ #3 #14 // Krypta Korlasz bedzie dostepna w BG1: 10
~C#ENDLESSBG1/C#ENDLESSBG1.TP2~ #3 #15 // Uzdrowiciel Fenster bedzie w palacu: 10
~C#ENDLESSBG1/C#ENDLESSBG1.TP2~ #3 #16 // Kapitan Corwin bedzie w palacu: 10
~C#BRANDOCK/C#BRANDOCK.TP2~ #0 #0 // Brandock the Mage: v1_220430
~C#BRANDOCK/C#BRANDOCK.TP2~ #0 #10 // Brandock the Mage: Crossmod Content: v1_220430
~C#BRANDOCK/C#BRANDOCK.TP2~ #0 #20 // Install Alternate Portrait -> Alternative #1: Friendly, by Acifer: v1_220430
~C#BRANDOCK/C#BRANDOCK.TP2~ #0 #30 // Use Dialogue Style for Brandock's Banter in SoD: v1_220430
~C#BRANDOCK/C#BRANDOCK.TP2~ #0 #50 // Use Short Cutscene in Thalantyr's Abode: v1_220430

Brandock.DEBUG

Spoiler

Install Component [Brandock the Mage: Crossmod Content]?
nstall, or [N]ot Install or [Q]uit?
Installing [Brandock the Mage: Crossmod Content] [v1_220430]

SoD detected...
loading 1 tra file
[c#brandock/tra/autotra/english/game.tra] has 220 translation strings
loading 1 tra file
[c#brandock/tra/autotra/english/game.tra] has 220 translation strings
loading 1 tra file
[c#brandock/tra/autotra/english/game_ee.tra] has 28 translation strings
loading 1 tra file
[c#brandock/tra/autotra/english/game_ee.tra] has 28 translation strings
loading 1 tra file
[c#brandock/tra/autotra/english/journal.tra] has 77 translation strings
loading 1 tra file
[c#brandock/tra/autotra/english/journal.tra] has 77 translation strings
[./override/CAMPAIGN.2DA] loaded, 1169 bytes

EndlessBG1 detected.
[c#endlessbg1/translations/english/DIALOGUES.TRA] has 142 translation strings
[c#endlessbg1/translations/french/DIALOGUES.TRA] has 142 translation strings
[c#endlessbg1/translations/german/DIALOGUES.TRA] has 142 translation strings
[c#endlessbg1/translations/polish/DIALOGUES.TRA] has 142 translation strings
[c#endlessbg1/translations/russian/DIALOGUES.TRA] has 142 translation strings
[./override/BELT.dlg] loaded, 24500 bytes
Compiling 1 dialogue file ...
[C#Brandock/tra/autotra/english/c#brand_dialogues.tra] has 1748 translation strings
[C#Brandock/dialogue/c#brando_bg1end_bg2.d] loaded, 2443 bytes
Processing 1 dialogues/scripts ...
[./override/BELT.DLG] loaded, 24500 bytes
[BELT.DLG] loaded
[./override/C#BRANDJ.DLG] loaded, 303934 bytes
[C#BRANDJ.DLG] loaded
[BELT.DLG] saved    56 states, 197 trans, 11 strig, 141 ttrig, 39 actions
override/BELT.dlg copied to C#Brandock/backup/10/BELT.dlg, 24500 bytes
[C#BRANDJ.DLG] saved    1463 states, 3400 trans, 195 strig, 1249 ttrig, 1042 actions
override/C#BRANDJ.dlg copied to C#Brandock/backup/10/C#BRANDJ.dlg, 303934 bytes
[c#endlessbg1/translations/english/DIALOGUES.TRA] has 142 translation strings
[c#endlessbg1/translations/french/DIALOGUES.TRA] has 142 translation strings
[c#endlessbg1/translations/german/DIALOGUES.TRA] has 142 translation strings
[c#endlessbg1/translations/polish/DIALOGUES.TRA] has 142 translation strings
[c#endlessbg1/translations/russian/DIALOGUES.TRA] has 142 translation strings
[./override/BELT.dlg] loaded, 25231 bytes
Compiling 1 dialogue file ...
[C#Brandock/tra/autotra/english/brandock_sod.tra] has 5 translation strings
[C#Brandock/dialogue/c#brando_bg1end_sod.d] loaded, 1740 bytes
Processing 1 dialogues/scripts ...
[./override/BDIMOEN.DLG] loaded, 58867 bytes
[BDIMOEN.DLG] loaded
[./override/C#BRANDJ.DLG] loaded, 439706 bytes
[C#BRANDJ.DLG] loaded
[BDIMOEN.DLG] saved    194 states, 525 trans, 21 strig, 276 ttrig, 159 actions
override/BDIMOEN.dlg copied to C#Brandock/backup/10/BDIMOEN.dlg, 58867 bytes
[C#BRANDJ.DLG] saved    1465 states, 3406 trans, 195 strig, 1253 ttrig, 1048 actions
Compiling 1 dialogue file ...
[C#Brandock/tra/autotra/english/brandock_sod.tra] has 5 translation strings
Processing 1 dialogues/scripts ...
[./override/BELT.DLG] loaded, 25231 bytes
[BELT.DLG] loaded
[./override/C#BRANDJ.DLG] loaded, 441342 bytes
[C#BRANDJ.DLG] loaded
[BELT.DLG] saved    56 states, 198 trans, 11 strig, 142 ttrig, 40 actions
[C#BRANDJ.DLG] saved    1466 states, 3455 trans, 195 strig, 1301 ttrig, 1049 actions

I'm not trying to sound smart, I just don't know the difference here why it works for STATE_WHICH_SAYS and USING but not with WITH_TRA.

Can I make this work somehow so it recognizes the correct language of the other mod? What is the difference why it doesn't work here?

Link to comment

This works, even if Themed_Tweaks is installed in "american" and RtD in "German" (giving a tra path included in the same mod):

ACTION_IF (MOD_IS_INSTALLED ~themed_tweaks.tp2~ ~80~) THEN BEGIN
PRINT @100015 /* ~Themed Tweaks component was installed via Themed Tweaks: patching dialogues.~ */
WITH_TRA ~themed_tweaks/languages/%s/sod_stat_weak_poison.tra~ ~sodrtd/translations/%s/sod_stat_weak_poison.tra~ BEGIN
  OUTER_SET strref1 = RESOLVE_STR_REF(@107)
  OUTER_SET strref2 = RESOLVE_STR_REF(@106)
  OUTER_SET state_105 = STATE_WHICH_SAYS 105 IN ~themed_tweaks/languages/%s/sod_stat_weak_poison.tra~ FROM ~bdbelt~
END

 

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...