Jump to content

EET on a tablet!


Recommended Posts

It has likely to do with the very end, start at line 2689:

Quote
set SCRIPT="%TEMP%\%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%.vbs"
 
echo Set oWS = WScript.CreateObject("WScript.Shell") >> %SCRIPT%
echo sLinkFile = "EET\temp\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.IconLocation = "%CD%\EET\docs\images\eet.ico" >> %SCRIPT%
echo oLink.WorkingDirectory = "%CD%" >> %SCRIPT%
echo oLink.Description = "Enhanced Edition Trilogy (EET)" >> %SCRIPT%
echo oLink.Save >> %SCRIPT%
 
cscript /nologo %SCRIPT%
del %SCRIPT%
>>>>>>>>
COPY + ~.../shortcut.bat~ ~shortcut.bat~
AT_NOW ~shortcut.bat~
DELETE + ~shortcut.bat~
COPY ~%MOD_FOLDER%/temp/EET.lnk~ ~%dir%~

END

 

Where it touches the ... Baldur.exe

Link to comment
8 hours ago, subtledoctor said:

I get this error when trying to install eet_core in the iOS game folder:

 


FAILURE:
Baldur's Gate II executable not found
Stopping installation because of error.

 

Any idea what the problem it?  Or, what part of the EET code this is at, so I can poke around and see what it was trying to do?

not sure what you mean by installing in "iOS game folder" - you've mentioned that you successfully installed on Mac OS, so why not just copying the files to iOS device? As for the error it's this part of code:

OUTER_SET found_exe = 0
ACTION_IF ~%WEIDU_OS%~ STR_EQ ~win32~ BEGIN
    ACTION_IF FILE_EXISTS ~Baldur.exe~ BEGIN
        COPY ~Baldur.exe~ ~Baldur.exe~
        AT_NOW ~%lua% %MOD_FOLDER%/lib/binary.lua Baldur.exe~
        OUTER_SET found_exe = 1
    END
END ELSE ACTION_IF ~%WEIDU_OS%~ STR_EQ ~osx~ BEGIN
    ACTION_IF FILE_EXISTS ~BaldursGateIIEnhancedEdition.app/Contents/MacOS/BaldursGateIIEnhancedEdition~ BEGIN
        OUTER_SPRINT exec ~./BaldursGateIIEnhancedEdition.app/Contents/MacOS/BaldursGateIIEnhancedEdition~
    END ELSE ACTION_IF FILE_EXISTS ~../MacOS/BaldursGateIIEnhancedEdition~ BEGIN
        OUTER_SPRINT exec ~../MacOS/BaldursGateIIEnhancedEdition~
    END
    ACTION_IF VARIABLE_IS_SET exec BEGIN
        COPY ~%exec%~ ~%exec%~
        AT_NOW ~%lua% %MOD_FOLDER%/lib/binary.lua %exec%~
        OUTER_SET found_exe = 1
    END
END ELSE BEGIN //unix
    ACTION_FOR_EACH file IN BaldursGateII BaldursGateII64 BaldursGateIIEnhancedEdition BaldursGateIIEnhancedEdition64 BEGIN
        ACTION_IF FILE_EXISTS ~%file%~ BEGIN
            COPY ~%file%~ ~%file%~
            AT_NOW ~%lua% %MOD_FOLDER%/lib/binary.lua ./%file%~
            OUTER_SET found_exe = 1
        END
    END
END
ACTION_IF found_exe = 0 BEGIN
    FAIL ~Baldur's Gate II executable not found~
END

it's used for the previously mentioned executable patching. If this code can't find the correct file in Mac OS then it's a bug - in such case please share where exactly is the executable (the file with compiled game) on Mac OS in relation to main game directory (where you extract mods)

Edited by K4thos
Link to comment
21 minutes ago, K4thos said:

... in such case please share where exactly is the executable (the file with compiled game) on Mac OS in relation to main game directory (where you extract mods)

The iOS executable (i.e., where @subtledoctor extracted the mod in order to mod the actual iOS game) should be here => /Users/%Username%/Music/iTunes/Previous iTunes Libraries/iTunes Media/Mobile Applications/Baldur's Gate 2 2.5.16/Payload/Baldur's Gate 2.app

Edited by Luke
Link to comment
5 hours ago, Luke said:

The iOS executable (i.e., where @subtledoctor extracted the mod in order to mod the actual iOS game) should be here => /Users/%Username%/Music/iTunes/Previous iTunes Libraries/iTunes Media/Mobile Applications/Baldur's Gate 2 2.5.16/Payload/Baldur's Gate 2.app

From what I understand above is the exact game directory - it's not needed by weidu mods (and wouldn't be reliable either way since you can change install directories). What is needed is the relative executable location (in relation to default directory that weidu is using). Let's say I want to copy the executable in weidu. In windows that would be:

COPY ~./Baldur.exe~ ~./Baldur.exe~

for linux it is:

COPY ~./BaldursGateII~ ~./BaldursGateII~ //or BaldursGateIIEnhancedEdition, not sure which one is used in the most recent patch

    ~./BaldursGateII64~ ~./BaldursGateII64~ //or BaldursGateIIEnhancedEdition64

and for mac os I assumed the location is:

COPY ~./BaldursGateIIEnhancedEdition.app/Contents/MacOS/BaldursGateIIEnhancedEdition~ ~./BaldursGateIIEnhancedEdition.app/Contents/MacOS/BaldursGateIIEnhancedEdition~

or this (not sure which one is correct, both have been sent to me by users)

COPY ~../MacOS/BaldursGateIIEnhancedEdition~ ~../MacOS/BaldursGateIIEnhancedEdition~

if it's not the case I need correct location of the mac os executable together with the executable file name. Please paste the code that you would use in weidu mod to copy that file.

Edited by K4thos
Link to comment
6 hours ago, Luke said:

The iOS executable (i.e., where @subtledoctor extracted the mod in order to mod the actual iOS game) should be here => /Users/%Username%/Music/iTunes/Previous iTunes Libraries/iTunes Media/Mobile Applications/Baldur's Gate 2 2.5.16/Payload/Baldur's Gate 2.app

The .app  bundle is not actually an executable.  It is actually, more or less, just a folder with special handling in the OS.  The executable, as k4thos noted, is inside that bundle, in baldurs_gate_ii.app/contents/macos/

The iOS app bundles are structured differently.  Inside the .app bundle there are no "/contents/macos/" or "/contents/resources/" subfolders.  The top level of the app bundle is the resources folder - chitin.key, the /data folder, the /lang folder, all that stuff is right there, plus all the stuff used by the app bundle itself, like the app icons and the "/en.lproj" subfolder.

From what I can tell, the actual BG2 executable is sitting right there at the top level, in what is effectively the game folder.  I guess eet_core is looking for it somewhere else?  So, like I say, if I find the part of the EET code is doing this (thanks k4thos), I can go in and adjust it for my testing.

6 hours ago, K4thos said:

not sure what you mean by installing in "iOS game folder" - you've mentioned that you successfully installed on Mac OS, so why not just copying the files to iOS device?

Basically, because I'm not sure that the dialog.tlk files are identical for the two versions of the game.  The really ideal thing to do is mod a copy of the actual iOS game folder, and move the files from there to the device.  Modding the macOS or Windows version of the game and using those files might be fine... but why not eliminate a source of potential risk if we can?

* This may all be moot when the 2.6 patch drops, as iOS users no longer have access to the .ipa files and thus won't actually be able to mod the iOS game folder.  (I actually have an old Macbook with Sierra and iTunes 12, so I actually will have access to the iOS game folder... but most people won't.)  At that point, the method you mentioned will become the norm.  Hopefully Beamdog is going to make sure to sync up the .tlk files in the 2.6 patch. 

** Actually, do you know if there's a reasonably easy way to test whether the .tlk files match?  Is there some way in NI to go to the last entries, to compare them?  That could put my mind at ease, and/or allow us to sync them up ourselves.

Edited by subtledoctor
Link to comment
Quote

From what I can tell, the actual BG2 executable is sitting right there at the top level, in what is effectively the game folder.  I guess eet_core is looking for it somewhere else?  So, like I say, if I find the part of the EET code is doing this (thanks k4thos), I can go in and adjust it for my testing.

relative path to the mac os executable that the tp2 file expects has been posted in my previous post (and from what I understand it's wrong). To avoid further confusion and misunderstandings please post the weidu code for coping the file on mac os.

Please make sure it's the correct file, used to execute the game on mac os, not linux (depending on the store, some builds contain multiple executables for different OSes).

 

Quote

** Actually, do you know if there's a reasonably easy way to test whether the .tlk files match?  Is there some way in NI to go to the last entries, to compare them?  That could put my mind at ease, and/or allow us to sync them up ourselves.

Weidu --noautoupdate --no-auto-tp2 --logapp --use-lang "en_us" --out "strings.tra" --traify-tlk

and compare files for example with Beyond Compare: https://www.scootersoftware.com

Edited by K4thos
Link to comment
2 hours ago, K4thos said:

relative path to the mac os executable that the tp2 file expects has been posted in my previous post (and from what I understand it's wrong). To avoid further confusion and misunderstandings please post the weidu code for coping the file on mac os.

Please make sure it's the correct file, used to execute the game on mac os, not linux (depending on the store, some builds contain multiple executables for different OSes).

 

I'm not talking about the macOS executable.  I have the macOS game, and inside it is the macOS executable.  EET install fine on it. 

Simultaneously, in a different folder, on my macOS system, I have the iOS game, and inside that is the iOS executable.  That executable is in a different location, relative to the iOS game folder where EET runs, from the location of the macOS executable relative to the macOS game folder where the first copy of EET was installed.

The same would happen if you open the iOS game folder in Windows (which is perfectly possible).  Detection of the OS is irrelevant to the location of the executable when you are modding a game version that is not for the OS you're using to mod it.  (Lots of Mac users mod on Windows and then transfer the files to macOS, for another example.)

On the other hand, as I said, I'm sure there's no way to get a patched iOS executable onto an iOS device, so it doesn't really matter.  I just need to comment out the executable-patching code locally.

Link to comment

Looking good, so anymore instructorial/tutorial things you would like to ? ... were it me, I would post that in the very first post, and clearly divide the top part to that edit, now that you have a game that is not any more on the "... is not (yet) a reality.".

________________________________________________

with a say, an edit divider. And then you can even edit the tutorial after, if it has updates.

Link to comment

@K4thos

I just saw this in a post about modding on Linux:

"There's one other issue unique to Linux (and macOS) that we haven't entirely dealt with. Mods that recompile the chitin.key file with additional paths will use backslashes as path separators (because windows). Argent77 has written some code for his DLCbuilder tool that replaces the wrongslashes with rightslashes. I have packaged it into a separate mod which can be downloaded below. You ONLY need this if you aren't using DLCbuilder or K4thos's Enhanced Edition Trilogy, which has this built into the installation process as well."

Does EET alter chitin.key? I didn't realize that. To be perfectly honest I don't really know what chitin.key is or does. But I suspect it cannot be replaced in mobile games. (I'll properly test that when I get a chance.)

What I've tested so far:

- Install EET (and the associated .command file) and EET_end on the desktop version of BG2EE v2.5.16, with biffing disabled*

- Move everything to a Windows partition to run the .PVRZ converter

- Transfer the /override, /lang, /worldmap, and /sounds folders to an iPad (not chitin.key, though)

- Start a game of BG2EE. The menus are a bit messed up, but navigable. All of the EET campaigns are present; I could start an SoD campaign and mess around a bit in Korlasz' dungeon. 

Obviously that's not the most extensive test. Do you foresee issues that I do not? Does EET require a modified chitin.key? Specifically, does it require a modified chitin.key if biffing is turned off?

* Second question: is there something I can change in the .tp2 file to turn off biffing? My relatively crude mod manager on MacOS has no facility for adding arguments when it runs Weidu. It would be a lot easier for me to simply keep a copy of EET that doesn't biff by default. (For that matter, could biffing maybe be sone kind of .ini/settings option, the way e.g. Item Revisions has .ini options you can set before installing?)

Edited by subtledoctor
Link to comment
On 8/4/2019 at 10:45 AM, subtledoctor said:

I just saw this in a post about modding on Linux:

"There's one other issue unique to Linux (and macOS) that we haven't entirely dealt with. Mods that recompile the chitin.key file with additional paths will use backslashes as path separators (because windows). Argent77 has written some code for his DLCbuilder tool that replaces the wrongslashes with rightslashes. I have packaged it into a separate mod which can be downloaded below. You ONLY need this if you aren't using DLCbuilder or K4thos's Enhanced Edition Trilogy, which has this built into the installation process as well."

Does EET alter chitin.key?

Gonna reiterate this question, since I never saw an answer and I'm about to do a modded install, and like any other player, I'd really prefer not to waste dozens of hours on something if it can't work.

Does EET alter chitin.key or the game executable?  Does it make changes of a sort that cannot be ported to other platforms? 

Link to comment
Quote

 

I just saw this in a post about modding on Linux:

"There's one other issue unique to Linux (and macOS) that we haven't entirely dealt with. Mods that recompile the chitin.key file with additional paths will use backslashes as path separators (because windows). Argent77 has written some code for his DLCbuilder tool that replaces the wrongslashes with rightslashes. I have packaged it into a separate mod which can be downloaded below. You ONLY need this if you aren't using DLCbuilder or K4thos's Enhanced Edition Trilogy, which has this built into the installation process as well."

Does EET alter chitin.key? I didn't realize that. To be perfectly honest I don't really know what chitin.key is or does. But I suspect it cannot be replaced in mobile games. (I'll properly test that when I get a chance.)

 

EET_end.tp2 has this code contribute by Argent77, so I assume nothing else is needed:

// Works around a bug in the game engine which fails to load KEY files containing backslashes as pathname separator
// Problem shows up after MAKE_BIFF is used on osx and linux games
COPY ~chitin.key~ ~chitin.key~
    READ_LONG 0x08 numBiffs
    READ_LONG 0x10 ofsBiffs
    FOR (idx = 0; idx < numBiffs; ++idx) BEGIN
        SET curOfs = ofsBiffs + idx*12
        READ_LONG (curOfs + 0x04) ofsBiffName
        READ_SHORT (curOfs + 0x08) lenBiffName
        READ_ASCII ofsBiffName biffName ELSE ~~ (lenBiffName) NULL
        PATCH_IF (NOT ~%biffName%~ STRING_EQUAL_CASE ~~) BEGIN
            INNER_PATCH_SAVE biffName ~%biffName%~ BEGIN
                REPLACE_TEXTUALLY ~\\~ ~/~
            END
            WRITE_ASCIIE ofsBiffName ~%biffName%~
        END
    END
BUT_ONLY
Quote

* Second question: is there something I can change in the .tp2 file to turn off biffing? My relatively crude mod manager on MacOS has no facility for adding arguments when it runs Weidu. It would be a lot easier for me to simply keep a copy of EET that doesn't biff by default. (For that matter, could biffing maybe be sone kind of .ini/settings option, the way e.g. Item Revisions has .ini options you can set before installing?)

just make this line return false to skip biffing:

ACTION_IF (~%argv[0]%~ STRING_CONTAINS_REGEXP ~[bB]~ = 1) BEGIN
Quote

Does EET alter chitin.key or the game executable?  Does it make changes of a sort that cannot be ported to other platforms? 

it does patch it for windows, linux and mac (although I don't know if this one works since I haven't received a confirmation, requested earlier in this topic, regarding relative path to mac os game executable). The changes are minor (removes some hardcoded spells references that caused problems in ToB, gets rid of hardcoded DAYNITE / NITEDAY movies and some other stuff that I don't remember what it’s for). Even if you skip executable patching I wouldn't expect huge issues on a tablet. Here are the changes (implemented in lua since using weidu REPLACE_TEXTUALLY on an executable may result in out of memory problem): https://github.com/K4thos/EET/blob/master/EET/lib/binary.lua

Edited by K4thos
Link to comment

Thanks!  So this should probably work even if the modified chitin.key and executable don't get copied over with the /lang and /override and other modded directories.  Worth a try anyway.  I'll probably still wait until I get a newer iPad though - mine is very old and feeble, and I get some minor freezes/slowdowns with ~30K files in /override... a proper EET install for me would likely increase that to about 80K-100K, they would probably go from minor to major.

Link to comment
On 1/9/2020 at 8:48 PM, subtledoctor said:

I'll probably still wait until I get a newer iPad though...

Unfortunately, the latest models (i.e., 12.9-inch iPad Pro and 11-inch iPad Pro) are not supported (as far as Screen Resolution / Aspect Ratio is concerned). This means the games do not scale correctly to fully fill the screen. You know, it might take away from the experience...

Edited by Luke
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...