Jump to content

EET v13.4 released


Recommended Posts

I don't even know how a shortcut could stop the worldmap from working...

Well if you can't read and make an accurate notice that when you start a wrong .exe and start a different game, the worldmap won't be the one you choose into the different game. But that would require reading a post in the past. Or understanding of it's content.
Link to comment

Never used VBScript before but this one seems to work fine on Windows 7 when running through weidu:

ACTION_IF ~%WEIDU_OS%~ STRING_EQUAL_CASE ~win32~ BEGIN
<<<<<<<< .../shortcut.bat
@echo off

set SCRIPT="%TEMP%\%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%.vbs"

echo Set oWS = WScript.CreateObject("WScript.Shell") >> %SCRIPT%
echo sLinkFile = "%USERPROFILE%\Desktop\EET.lnk" >> %SCRIPT%
echo Set oLink = oWS.CreateShortcut(sLinkFile) >> %SCRIPT%
echo oLink.TargetPath = "%CD%\Baldur.exe" >> %SCRIPT%
echo oLink.IconLocation = "%CD%\Baldur.exe, 0" >> %SCRIPT%
echo oLink.WorkingDirectory = "%CD%" >> %SCRIPT%
echo oLink.Save >> %SCRIPT%

cscript /nologo %SCRIPT%
del %SCRIPT%
>>>>>>>>
    COPY + ~.../shortcut.bat~ ~shortcut.bat~
    AT_NOW ~shortcut.bat~ EXACT
    DELETE + ~shortcut.bat~
END

It creates new shortcut on desktop. No idea how to do it on OSX, though.

Edited by K4thos
Link to comment

Linux uses .desktop files. Install something like this into ~/Desktop:

[Desktop Entry]
Encoding=UTF-8
Value=1.0
Type=Application
Name=Enhanced Edition Trilogy
GenericName=Enhanced Edition Trilogy
Comment=Enhanced Edition Trilogy (EET)
Icon=/path/to/icon.png
Exec="/path/to/game/start.sh" ""
Categories=Game;
Path=/path/to/working/dir

The last path is redundant, as you could run set it from the script (if it's needed at all). start.sh is what bg2ee uses.

Link to comment

Linux uses .desktop files. Install something like this into ~/Desktop:

[Desktop Entry]
Encoding=UTF-8
Value=1.0
Type=Application
Name=Enhanced Edition Trilogy
GenericName=Enhanced Edition Trilogy
Comment=Enhanced Edition Trilogy (EET)
Icon=/path/to/icon.png
Exec="/path/to/game/start.sh" ""
Categories=Game;
Path=/path/to/working/dir

The last path is redundant, as you could run set it from the script (if it's needed at all). start.sh is what bg2ee uses.

 

thanks but:

1. How to move EET.desktop with above code to ~/Desktop? Weidu starts inside game folder.

2. /path/to/game/ - is there %CD% equivalent on linux? Otherwise I won't be able to set this path

 

edit: not sure if it will work, if someone is on OSX please test this code:

ACTION_IF ~%WEIDU_OS%~ STRING_EQUAL_CASE ~osx~ BEGIN
<<<<<<<< .../EET.desktop
[Desktop Entry]
Encoding=UTF-8
Value=1.0
Type=Application
Name=Enhanced Edition Trilogy
GenericName=Enhanced Edition Trilogy
Comment=Enhanced Edition Trilogy (EET)
Icon=%pwd%/EET/docs/images/EET.ico
Exec="%pwd%/start.sh" ""
Categories=Game;
Path=%pwd%
>>>>>>>>
    COPY ~.../EET.desktop~ "~/Desktop" EVALUATE_BUFFER
END

edit2: it won't work, first we need to get content of the %pwd% variable into weidu variable in order to evaluate it. Something like this on windows (below code converts 'userprofile' system variable to 'dir' weidu variable):

<<<<<<<< .../userprofile.bat
echo %userprofile%>EET/temp/userprofile.txt
>>>>>>>>
    COPY + ~.../userprofile.bat~ ~EET/temp~
    AT_NOW ~EET/temp/userprofile.bat~
    COPY + ~EET/temp/userprofile.txt~ ~EET/temp~
        READ_ASCII 0x0 dir (%SOURCE_SIZE%)
    OUTER_PATCH_SAVE dir ~%dir%~ BEGIN
        REPLACE_TEXTUALLY ~%WNL%~ ~~
    END

Could someone please rewrite it for OSX?

Edited by K4thos
Link to comment

2. it's $PWD or what the pwd command would return. I'm pretty sure .desktop files are purely declarative.

1. If weidu doesn't know about ~ or environmental variables, you can evaluate $HOME in a script. `echo -n $varname` to capture it.

Link to comment

ok, so here is a code ready for test on OSX (it can be run on vanilla game too):

ACTION_IF ~%WEIDU_OS%~ STRING_EQUAL_CASE ~osx~ BEGIN
    ACTION_FOR_EACH var IN PWD HOME BEGIN
<<<<<<<< .../path.command
echo -n $%var%>path.txt
>>>>>>>>
        COPY + ~.../path.command~ ~path.command~ EVALUATE_BUFFER //%var% is evaluated to PWD and in next loop to HOME
        AT_NOW ~./path.command~
        COPY + ~path.txt~ ~path.txt~
            READ_ASCII 0x0 dir (%SOURCE_SIZE%)
        OUTER_PATCH_SAVE ~dir~ ~%dir%~ BEGIN
            REPLACE_TEXTUALLY ~%LNL%~ ~~
        END
        OUTER_TEXT_SPRINT EVAL ~%var%~ ~%dir%~
    END
    DELETE + ~path.command~
        ~path.txt~
    PRINT ~PWD = %PWD%; HOME = %HOME%~
<<<<<<<< .../EET.desktop
[Desktop Entry]
Encoding=UTF-8
Value=1.0
Type=Application
Name=Enhanced Edition Trilogy
GenericName=Enhanced Edition Trilogy
Comment=Enhanced Edition Trilogy (EET)
Icon=%PWD%/EET/docs/images/EET.ico
Exec="%PWD%/start.sh" ""
Categories=Game;
Path=%PWD%
>>>>>>>>
    COPY ~.../EET.desktop~ ~%HOME%~ EVALUATE_BUFFER
END

If it won't create a shortcut please report what will be returned by weidu (text is printed via PWD = %PWD%; HOME = %HOME%). And if someone sees error in this code please correct it and repost fixed version so that we don't have to make another test.

Edited by K4thos
Link to comment

Are you sure macs use these files at all? It's only a FDO spec. $HOME can also be derived from the weidu constant USER_DIRECTORY/../.. .

 

Overall it looks overly complicated. Why not do it all in a shell script, where there's no need for half of the code?

Link to comment
ACTION_IF ~%WEIDU_OS%~ NOT STRING_EQUAL_CASE ~win32~ BEGIN
    AT_NOW ~./add.shortcut.sh~
END

add.shortcut.sh (marked as executable; chmod +x add.shortcut.sh # above, if it can't be done before):

#!/bin/sh
cat > $HOME/EET.desktop << TEETEE
[Desktop Entry]
Encoding=UTF-8
Value=1.0
Type=Application
Name=Enhanced Edition Trilogy
GenericName=Enhanced Edition Trilogy
Comment=Enhanced Edition Trilogy (EET)
Icon=$PWD/EET/docs/images/EET.ico
Exec="$PWD/start.sh" ""
Categories=Game;
Path=$PWD
TEETEE
Edited by lynx
Link to comment

Are you sure macs use these files at all? It's only a FDO spec. $HOME can also be derived from the weidu constant USER_DIRECTORY/../.. .

 

Overall it looks overly complicated. Why not do it all in a shell script, where there's no need for half of the code?

I have no idea what I'm doing when it comes to OSX and linux. And I'm working completely blind since I have no way to test it. If you can provide a shell script that will create this shortcut than please post full code here. In such case I will just call it via:

AT_NOW ~./yourScript.sh~

the downside of it will be permanent shortcut on desktop though (since the shortcut would not be registered for uninstallation), so if my weidu code works than probably it would be better to keep it.

 

edit: noticed your reply, thanks for code. I will add it to tp2.

Edited by K4thos
Link to comment

Never used VBScript before but this one seems to work fine on Windows 7 when running through weidu:

...
echo sLinkFile = "%USERPROFILE%\Desktop\EET.lnk" >> %SCRIPT%
...

It creates new shortcut on desktop. No idea how to do it on OSX, though.

Only if you have not move you desktop folder to another drive via "Location" tab at folder Properties panel. And you can't use hardcoded folder name. My userprofile is C:\Users\ALIEN but my desktop is D:\Pulpit.

Because you can't call SHGetKnownFolderPath win32 API function, this solution will work for DOS/CMD:

@echo off
for /f "usebackq tokens=3*" %%D IN (`reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Desktop`) do set DESKTOP=%%D
echo %DESKTOP%
Link to comment

Not sure if this is EET or vanilla bug

In BG4600 in the Laurel quest to kill gibberlings, the Global("Gibberdead","BG4600") is not set regardless how many gibber.cre you kill. So the mimiquest never gets finished. Also, far too few gibber spawn to reach a value of 11 in the first place.

 

Not sure how this was intended to work but I think that gibber.bcs need somethink like

IF

Die()

AreaCheck("BG4600")

THEN

RESPONSE #100

IncrementGlobal("Gibberdead","BG4600",1)

END

 

Edit - tested my proposed code and all works as intended.

may be related to DSotSC (well, it almost 100% is). I will check it out, thanks.

I just want to tell you that this bug still occurs (just in case you wonder :) )

Link to comment

Still won't install on OS X. Got further this time, though. Here is the end of setup-EET_CORE.debug:

 

 

 

[./override/CULTD4.CRE] loaded, 1460 bytes
Copied [CULTD4.CRE] to [override/CULTD4.CRE]
[./override/CULTD5.CRE] loaded, 1460 bytes
Copied [CULTD5.CRE] to [override/CULTD5.CRE]
[./override/CULTD6.CRE] loaded, 1460 bytes
Copied [CULTD6.CRE] to [override/CULTD6.CRE]
Copying and patching 1 file ...
[./override/IMPORT02.2DA] loaded, 181 bytes
Copied [IMPORT02.2DA] to [override/IMPORT02.2DA]
Copying and patching 1 file ...
[./override/BG2400.bcs] loaded, 1583 bytes
Copied [BG2400.bcs] to [override/BG2400.bcs]
Copying and patching 1 file ...
[./override/BG2900.bcs] loaded, 1944 bytes
Copied [BG2900.bcs] to [override/BG2900.bcs]
Copying 1 file ...
[./override/sw1h01.itm] loaded, 362 bytes
Copied [sw1h01.itm] to [override/AY#BGEEARBCSFIX.000]
Copying and patching 1 file ...
[./override/BG4300.bcs] loaded, 785 bytes
Copied [BG4300.bcs] to [override/BG4300.bcs]
Copying and patching 1 file ...
[./override/gorion.cre] loaded, 1348 bytes
[./override/oh1000.are] loaded, 956 bytes
[./override/oh1000.are] loaded, 956 bytes
Copied [gorion.cre] to [override/gorion.cre]
Copying and patching 1 file ...
ERROR: error loading [Baldur]
Stopping installation because of error.

ERROR Installing [Core EET (game importation)], rolling back to previous state
Will uninstall 14088 files for [EET_CORE.TP2] component 0.
  Restoring backed-up [EET/backup/core/0/engine.lua]
EET/backup/core/0/engine.lua copied to engine.lua, 104 bytes
  Restoring backed-up [EET/backup/core/0/pcu_dict.tph]
EET/backup/core/0/pcu_dict.tph copied to EET/lib/pcu_dict.tph, 64959 bytes
Uninstalled    14088 files for [EET_CORE.TP2] component 0.

 

 

 

EDIT - maybe it's this code:

///// Exe patching                                     \\\\\
/////                                                  \\\\\

COPY ~Baldur%exe%~ ~Baldur%exe%~
    REPLACE_TEXTUALLY ~NITEDAY~ ~~ (7)
    REPLACE_TEXTUALLY ~DAYNITE~ ~~ (7)
    REPLACE_TEXTUALLY ~SPIN649~ ~~ (7)
    REPLACE_TEXTUALLY ~SPIN822~ ~~ (7)
    //change default campaign
    REPLACE_TEXTUALLY ~SOD~ ~BG1~
    REPLACE_TEXTUALLY ~Never Show Nuisance BG1~ ~Never Show Nuisance SOD~
    REPLACE_TEXTUALLY ~Edition/BG1save~ ~Edition/sodsave~
    REPLACE_TEXTUALLY ~usingBG1StartMenu~ ~usingSODStartMenu~
BUT_ONLY

At least in my GOG version of BG2EE, there is no executable in the game directory, it is somewhere else. (And frankly, I'm skeptical about where executable patching will work on different platforms anyway.)

 

I've commented that bit out of EET_core and I'm now reinstalling, will report back.

 

EDIT 2 - now everything installed correctly, but when I run the game I get a few different versions of this error:

MENU ERROR
 
Invalid token in menu: [useOverlayTint] on line 4813, character 3

I can hit okay a few times and the game startup begins, then there is a quick CTD.

 

EDIT 3 - I deleted the references to useOverlayTint in UI.menu, and now the app opens without any errors, but still crashes after the Nietzsche quote. So something is causing it to crash when it tries to go to the main menu.

Edited by subtledoctor
Link to comment

 

Not sure if this is EET or vanilla bug

In BG4600 in the Laurel quest to kill gibberlings, the Global("Gibberdead","BG4600") is not set regardless how many gibber.cre you kill. So the mimiquest never gets finished. Also, far too few gibber spawn to reach a value of 11 in the first place.

 

Not sure how this was intended to work but I think that gibber.bcs need somethink like

IF

Die()

AreaCheck("BG4600")

THEN

RESPONSE #100

IncrementGlobal("Gibberdead","BG4600",1)

END

 

Edit - tested my proposed code and all works as intended.

may be related to DSotSC (well, it almost 100% is). I will check it out, thanks.

I just want to tell you that this bug still occurs (just in case you wonder :) )

 

 

This one worked without issues for me. Using both SCS that adds to the number of gibberlings spawned and BG romantic encounters that adds dialogue with Laurel, so maybe one of those mods address it.

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...