Jump to content
DavidW

EET_end confusion

Recommended Posts

Can someone explain whether it's still agreed practice to put "eet_end" at the end of any install order, and if so, why?

 

It is a serious nuisance from a debugging point of view to have a several-minute-long extra install layered over one's mod and I'm seriously struggling to see the benefit, given modern WEIDU code.

Share this post


Link to post

Here is all that EET_End does: (hopefully I didn't miss anything important, it's been a while since I've touched this code)

1. Save patcher - optional feature available only during first running EET_End on the current installation. It allows to make saves created on different EET installation (even with completely different mods selection) work on current installation without issues (by updating TLK references using TRA files generated during previous installation, removing non existing resources from saves and re-generating worldmap file from scratch, patching it with info from old map)

2. generate and patch 2da files related to CAMPAIGN.2DA engine feature (e.g. campaign variants of PDIALOG.2DA)

3. NPC's JOIN DLG files merging consisting of 3 steps:
- reading whole content of the DLG file and adding proper trigger filtering depending on which part of the story they come from, using "chapter" variable. Dialogue file only receives filtering if the state can be called by script (which means already has some triggers).
- combining JOIN DLG files
- updating all DLG, BCS and CRE files that exists in game to change references to files and updating old state numbers into new ones

4. generate lua code used for biography based on CLASTEXT.2da and RACETEXT.2da (used in GUI to display correct biography in different campaigns)

5. generate extra code for item importation (other mods can append to K#IMPORT.2DA in order to make item transferable from SoD to SoA)

6. export SAVES.TRA (traified TLK starting from string outside the vanilla game range) and SAVES.TXT - both used by Save patcher, updated each time the mod is installed/re-installed

-------------------

All of this stuff is something that has to be done after all other mods are installed (at least after those that modify affected 2DA files and/or stuff related to NPCs JOIN dialogs - including any state references to them). Preferably also after any mod that add strings to TLK file (otherwise Save patcher feature won't be reliable).

The main reason why this code is at the end is the JOIN DLG files merging. Without it the open aspect of EET world (returning back to any previously visited area from later portions of the game) would not exist. Well ok, it could, but adding EET compatibility for mods that have not been designed with EET in mind would be a nightmare. More information is available in "Modder's Notes".

-------------------

As for the length, running EET_End on vanilla EET installation (without other mods) is pretty fast (about 1 min if I remember correctly). If having large installation extends the installation time so much in future I will change the code for state reference patching from weidu to Lua (like I did in main component). This should speed up the installation time drastically (with Lua code amount of mods installed should not longer affect how long regexp takes).

Edited by K4thos

Share this post


Link to post

So (if I'm understanding this correctly) it's not that EET_end needs to be installed last, it's just that it needs to be installed after any mods that haven't explicitly allowed for EET compatibility.

Share this post


Link to post

Not sure if I understand "explicitly allowed for EET compatibility" sentence correctly. Even mods with full EET compatibility are installed before EET_End since they expect state of the game (campaign related 2da files, NPC JOIN dlg file names and state numbers) present before this component alters it. Of course someone could create a mod that expects post EET_End state of the game but I'm not aware about any such mod.

------------

Of course if mod does not affect the same stuff that EET_End modifies (or it's a test installation where it doesn't matter), installing them after EET_End won't be a problem.

Even if other readme files also says to install different mod at the end, EET_end can't really brake such mods, so to avoid confusion and problems that's what EET readme says.

edit:

It would be silly to re-install the component each time player tests some new EE GUI or UI component, so readme file of mods like EEUITweaks Mod Collection actually mentions that it's ok to install it after EET_end IIRC (it doesn't matter if it's before or after it). When I'm releasing a weidu installer hotfix for some bug I'm also not expecting players to uninstall EET_end in order to install it. In other words it's a general rule (and it's always safe to follow it, regardless of what other mods readme files says), not necessity.

Edited by K4thos

Share this post


Link to post
1 hour ago, K4thos said:

Not ... In other words it's a general rule (and it's always safe to follow it, regardless of what other mods readme files says), not necessity.

3

It would be nice to know which exact files the EET_end edits. As a list... and it might be useful to actually list mods that REQUIRE it to be installed before it. Added NPC mods, is a good assumption, but what else ? Yeah, the Widescreen mod is also best to install last... but it's hardly an exact requirement.

So, for example, the SCS could skip the install as last component and install it before the SCS, if there is no common files. So there's no 87 hours of installing SCS and then 5 minutes to hours of installing the EET_end. In every test.

And nope, the SCS is not an GUI mod, so your edit has no clearing effect of where this stands at.

Edited by Jarno Mikkola

Share this post


Link to post

Jarno Mikkola, fair points.

Quote

and it might be useful to actually list mods that REQUIRE it to be installed before it. Added NPC mods, is a good assumption, but what else ? Yeah, the Widescreen mod is also best to install last... but it's hardly an exact requirement.

- kits mods - installing kit after EET_End results in missing default biography text for this kit, also the kit data won't be copied among CAMPAIGN.2DA file variants, so it won't be selectable in some campaigns,
- NPC mods - installing them after EET_End results in missing JOIN dlg merging and problems with PDIALOG.2DA (different 2da file is used in different campaigns, EET_End makes all necessary changes to 2da files automatically)
- mods that reference particular JOIN DLG file names or JOIN dlg state numbers (other then BG2 SoA ones, since those files are used as a base for merging others)
- mods that takes advantage of "K#IMPORT.2DA" items import feature (explained here)
- tweaks that expects particular data in 2DA file that is altered by EET_End (can't think about any such mod, but there is a room for conflict here)
- (only if you're interested in the "Save patcher" feature) mods that add new TLK entries that are referenced in save files - EET_End updates file that stores mod added strings during installation/re-installation, hence it should be installed after such mods

Quote

It would be nice to know which exact files the EET_end edits.

I will make a list of 2da files and post them in this topic at a later date.

Quote

And nope, the SCS is not an GUI mod, so your edit has no clearing effect of where this stands at.

I don't think SCS is a mod that must be installed before, especially in a modder test setup (in which "Save patcher" feature has 0 value)
 

Edited by K4thos

Share this post


Link to post

Certainly my testing of SCS has been after a full EET instal, and in a couple of places it does something bespoke and EET-specific. (SCS code already has to allow for the possibility of BG1Tutu, BGT, vanilla BG2, BGEE, BG2EE, and SoD - what's one more :) )

Specifically, I use a variable %eet_var% to add the _ suffix after a few files that need it, and I need to allow for EET's bespoke random-treasure tables.

 

 

Share this post


Link to post
On 1/9/2019 at 1:50 PM, K4thos said:

Here is all that EET_End does: (hopefully I didn't miss anything important, it's been a while since I've touched this code)

1. Save patcher - optional feature available only during first running EET_End on the current installation. It allows to make saves created on different EET installation (even with completely different mods selection) work on current installation without issues (by updating TLK references using TRA files generated during previous installation, removing non existing resources from saves and re-generating worldmap file from scratch, patching it with info from old map)

2. generate and patch 2da files related to CAMPAIGN.2DA engine feature (e.g. campaign variants of PDIALOG.2DA)

3. NPC's JOIN DLG files merging consisting of 3 steps:
- reading whole content of the DLG file and adding proper trigger filtering depending on which part of the story they come from, using "chapter" variable. Dialogue file only receives filtering if the state can be called by script (which means already has some triggers).
- combining JOIN DLG files
- updating all DLG, BCS and CRE files that exists in game to change references to files and updating old state numbers into new ones

4. generate lua code used for biography based on CLASTEXT.2da and RACETEXT.2da (used in GUI to display correct biography in different campaigns)

5. generate extra code for item importation (other mods can append to K#IMPORT.2DA in order to make item transferable from SoD to SoA)

6. export SAVES.TRA (traified TLK starting from string outside the vanilla game range) and SAVES.TXT - both used by Save patcher, updated each time the mod is installed/re-installed

-------------------

All of this stuff is something that has to be done after all other mods are installed (at least after those that modify affected 2DA files and/or stuff related to NPCs JOIN dialogs - including any state references to them). Preferably also after any mod that add strings to TLK file (otherwise Save patcher feature won't be reliable).

The main reason why this code is at the end is the JOIN DLG files merging. Without it the open aspect of EET world (returning back to any previously visited area from later portions of the game) would not exist. Well ok, it could, but adding EET compatibility for mods that have not been designed with EET in mind would be a nightmare. More information is available in "Modder's Notes".

-------------------

As for the length, running EET_End on vanilla EET installation (without other mods) is pretty fast (about 1 min if I remember correctly). If having large installation extends the installation time so much in future I will change the code for state reference patching from weidu to Lua (like I did in main component). This should speed up the installation time drastically (with Lua code amount of mods installed should not longer affect how long regexp takes).

 

 

K4thos--- correct me if im wrong? I'm in need of help I cannot get the EET-END proccess to work it finalize for me. I posted my log in a previous thread on here. reading this, do i not need the EET end to play my game? Cos I'm attempting to start a new game now and it it totally works with all my new modded content.

 

appreciate ya! thanks!

 

-Kate

SETUP-EET_END.DEBUG.zip

Edited by aliKater

Share this post


Link to post

yes, you abolutly need it. The error is:

[./override/%LIGHTHOUSE_BLACKALARICSCAVE_BCS.BCS%] loaded, 744 bytes
ERROR: [%LIGHTHOUSE_BLACKALARICSCAVE_BCS.BCS%] -> [override/%LIGHTHOUSE_BLACKALARICSCAVE_BCS.BCS%] Patching Failed (COPY) (Failure("Unknown extension for DECOMPILE_AND_PATCH: bcs%"))
Stopping installation because of error.

which means some mod didn't install this script correctly (variable name not evaluated). I'm afraid the only way to fix it is finding which one is bugged and uninstalling it (or deleting the problematic file from override, but that would still result in bugged mod in your installation).

There is a weidu command that can list mods affecting particular file but I don't remember which one wast that. I’m sure @Jarno Mikkola can help here with his batch file that can do it.

 

Edited by K4thos

Share this post


Link to post
36 minutes ago, K4thos said:

yes, you abolutly need it. The error is:

which means some mod didn't install this script correctly (variable name not evaluated).

1

Actually, -nerd eyeglass push- if you look at the .debug file a little further up:
 

Quote

override/ZORDRAL.DLG copied to EET/backup/end/0/ZORDRAL.DLG, 817 bytes
Copied [ZORDRAL.DLG] to [override/ZORDRAL.DLG]
[./override/ZORL.DLG] loaded, 1105 bytes
[ZORL.DLG.DLG] loaded
[ZORL.DLG] created from [ZORL.DLG]
Adding ZORL to internal list of available DLGs
[ZORL.DLG] saved    15 states, 20 trans, 2 strig, 0 ttrig, 3 actions
Copying and patching 9488 files ...
[./override/!SARAD1.BCS] loaded, 12870 bytes
[./override/!SARAD2.BCS] loaded, 15422 bytes
[./override/!SARAD3.BCS] loaded, 1064 bytes
[./override/!SPCCON.BCS] loaded, 1800 bytes
[./override/%LIGHTHOUSE_BLACKALARICSCAVE_BCS.BCS%] loaded, 744 bytes
ERROR: [%LIGHTHOUSE_BLACKALARICSCAVE_BCS.BCS%] -> [override/%LIGHTHOUSE_BLACKALARICSCAVE_BCS.BCS%] Patching Failed (COPY) (Failure("Unknown extension for DECOMPILE_AND_PATCH: bcs%"))
Stopping installation because of error.

ERROR Installing [EET end - last mod in install order], rolling back to previous state

1

Yes, the mod uses a variable that is missing from the library it should be in... which you have updated to now contain it: 

Quote

OUTER_SPRINT "Lighthouse_BlackAlaricsCave_BCS" "BG3601"

But as the mods previous versions were installed before it contained this new and improved file, it get's percented.

Which in return disables the whole entire dialog file. Or it fails to actuate.

So the fix is to get the new version (v15) of the Lure of the siren's call mod. Source, my very own self.

Share this post


Link to post

Jarno, are you sure it's a problem with Sirine mod? I've just downloaded v14 and v15 and they don't use Lighthouse_BlackAlaricsCave variable in tp2 file at all. It's some other mod that is bugged here, I think.

Edited by K4thos

Share this post


Link to post
1 hour ago, K4thos said:

Jarno, are you sure it's a problem with Sirine mod?

I would remember it to be so... but I might be WRONG.

Anyways, the problem is the definition loibrary, not the actual file... which means one can't just --change-log a file to which mod altered it, cause we don't have a file to make the --change-log from. But I guess you already knew that. Unless I am off a mile.

Anyways, one could make a --change-log via a .bat file to the file called "ZORDRAL.DLG" via this:

mkdir change-log
WeiDU.exe --log nul --change-log aram00.bcs >change-log/change-log.txt --out change-log

The first line makes a new directory, into where it then prints out the results and backup files that it can find, and the second line makes the log etc. And yes, it needs a weidu.exe in the game directory.

Edited by Jarno Mikkola

Share this post


Link to post
Guest Gorf
4 hours ago, K4thos said:

yes, you abolutly need it. The error is:


[./override/%LIGHTHOUSE_BLACKALARICSCAVE_BCS.BCS%] loaded, 744 bytes
ERROR: [%LIGHTHOUSE_BLACKALARICSCAVE_BCS.BCS%] -> [override/%LIGHTHOUSE_BLACKALARICSCAVE_BCS.BCS%] Patching Failed (COPY) (Failure("Unknown extension for DECOMPILE_AND_PATCH: bcs%"))
Stopping installation because of error.

which means some mod didn't install this script correctly (variable name not evaluated). I'm afraid the only way to fix it is finding which one is bugged and uninstalling it (or deleting the problematic file from override, but that would still result in bugged mod in your installation).

There is a weidu command that can list mods affecting particular file but I don't remember which one wast that. I’m sure @Jarno Mikkola can help here with his batch file that can do it.

 

The Calling mod.

That was the one in my last install with that error.

Share this post


Link to post
2 hours ago, AL|EN said:

Isn't it just older EET version fault?

nope

1 hour ago, Jarno Mikkola said:

I would remember it to be so... but I might be WRONG.

Anyways, the problem is the definition loibrary, not the actual file... which means one can't just --change-log a file to which mod altered it, cause we don't have a file to make the --change-log from. But I guess you already knew that. Unless I am off a mile.

Anyways, one could make a --change-log via a .bat file to the file called "ZORDRAL.DLG" via this:


mkdir change-log
WeiDU.exe --log nul --change-log aram00.bcs >change-log/change-log.txt --out change-log

The first line makes a new directory, into where it then prints out the results and backup files that it can find, and the second line makes the log etc. And yes, it needs a weidu.exe in the game directory.

also no, the library is fine. The error says that there is literally %LIGHTHOUSE_BLACKALARICSCAVE_BCS.BCS% file in override (with ".BCS%" extension, which has been caught by this regexp in EET_end:

COPY_EXISTING_REGEXP GLOB ~.+\.BCS~ ~override~
13 minutes ago, Guest Gorf said:

The Calling mod.

That was the one in my last install with that error.

this is it, thanks.

@CamDawg, this line in The Calling tp2:

EXTEND_BOTTOM ~%Lighthouse_BlackAlaricsCave_BCS.bcs%~ ~thecalling/baf/pearl.baf~    EVALUATE_BUFFER

should be changed to:

EXTEND_BOTTOM ~%Lighthouse_BlackAlaricsCave_BCS%.bcs~ ~thecalling/baf/pearl.baf~    EVALUATE_BUFFER

@aliKater, you can make this change yourself and reinstall the mod (all mods installed later should automatically reinstall too. Worth making a backup beforhand just in case)

Edited by K4thos

Share this post


Link to post
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...