Preliminary report on modding BG:EE for iPad
leeho730
Member Posts: 285
Hi,
I have tried modding BG:EE for iPad and I want to report that it seems successful so far. Tried with infinite (well, 9999) stacking mod for arrows and so far on BG:EE I could stack arrows more than 40. Have installed range weapon ApR fix, boots of speed mod, safe xp cap raiser. Will test and report later.
I examined the file structure etc and it seems that BG:EE for iPad share almost identical file structure compared to BG:EE for PC. It even contains Dialog.tlk file so weidu mod should work but that may require quite a bit of "work-around", i.e. copy dialog.tlk of BG:EE for iPad to PC version, mod it, then copy both contents of override (except ELMIN.BCS) and dialog.tlk back to iPad directory.
Please note that only users of jailbroken iPad 2 with iOS 5.1.1 can mod the game. And considering override folder under Document directory doesn't do a thing, this means that unless you have quite specific iPad modding is almost impossible in iPad.
I have tried modding BG:EE for iPad and I want to report that it seems successful so far. Tried with infinite (well, 9999) stacking mod for arrows and so far on BG:EE I could stack arrows more than 40. Have installed range weapon ApR fix, boots of speed mod, safe xp cap raiser. Will test and report later.
I examined the file structure etc and it seems that BG:EE for iPad share almost identical file structure compared to BG:EE for PC. It even contains Dialog.tlk file so weidu mod should work but that may require quite a bit of "work-around", i.e. copy dialog.tlk of BG:EE for iPad to PC version, mod it, then copy both contents of override (except ELMIN.BCS) and dialog.tlk back to iPad directory.
Please note that only users of jailbroken iPad 2 with iOS 5.1.1 can mod the game. And considering override folder under Document directory doesn't do a thing, this means that unless you have quite specific iPad modding is almost impossible in iPad.
7
Comments
While I am definitely PRO jailbreaking here are Apple's views on it: http://support.apple.com/kb/HT3743
I don't have a iPad 1, but I'd like to remind people are useful tweaks on Cydia for increasing your RAM. Check here: http://www.iphone-tips-and-advice.com/iphone-memory.html
Everything from this point on requires the use of a jailbreak. If you don't have one then you need not read on.
Soundsets: If you want to use anything beyond the out of box soundsets you do need to purchase the $1.99 additional soundset upgrade. Once you do this you are free to use products like iFunBox to transfer additional soundsets to your device. In iFunBox click on your iPad > User Applications > Baldur's Gate > Baldur's Gate.APP (the one with the BG icon) > lang > en_us (or whatever language you use) > sounds. Just paste the .WAV files here.
The SorcerersPlace has quite a few to pick from: http://www.sorcerers.net/Games/BG2/index_soundsets2.php
I am investigating actually applying mods to the override folder and will post results back when/if that happens.
If it is a mod that only required the override directory you can create override beside the data directory, then place the files within (eg. XP Cap Remover).
If it is a weidu mod unfortunately we need to encourage the modders to make them iPad accessible. I don't know how many of them will be willing to chance their code just so that jailbreakers can use their mods, but it would never hurt to ask.
1. Jailbreak your iPad - check out http://www.evasi0n.com if you need help
2. Download iexplorer for either mac/windows. It's a paid program, but you get 30 days free. You can also get openSSH on cydia and sftp into your iPad as well, it's up to you (iexplorer is definitely easier if you don't have prior experience with openSSH)
3. Download the xp cap remover files - you can find links to them in mlnevese's post here: http://forum.baldursgate.com/discussion/10212/a-simple-xp-cap-remover
4. Open the .2DA files in the xp cap zip file with notepad or other text editor (make sure when you save, the file extension stays as .2DA). In the "xpcap" file, change all of the "-1" values to any xp cap you want. I used 5,000,000 but you can use whatever. In the "startare" and "startbp" files, change the START_XP_CAP value from -1 to the xp cap you used in the other file. You can also change the START_XP value to something other than 0 if you want to start a new game with a higher xp value.
5. Open iexplorer and plug your iPad into your computer. On the left hand side should be a file tree. Open Apps/Baldur's Gate/Baldur's Gate.app/. You should see a folder with a bunch of png files and several folders like 'data,' 'lang,' 'movies,' etc. Right click the "Baldurs Gate.app" folder in the file tree and click "new folder". This should create a new folder in the same directory as the png files. Rename the new folder to "override".
6. Copy the three .2DA files from step 4 into the override directory you just created. iExplorer allows you to just drag and drop them in.
That's it. Just close everything out, disconnect your iPad and open the Baldur's Gate app. Any new game you start will now have the xp cap applied and the new starting xp value you set. Also, any previously saved games should now allow you to gain xp up to the new cap. I can't guarantee this will work for everyone, but it worked for me and I have tested several saved games successfully. Good luck!
1) Copy files to override (if they aren't already there) and modify them
2) Modify dialog.tlk
...and they do this in a way that you can have multiple mods installed at the same time. So, if you set up the mods you want on the PC, then copy the override directory + dialog.tlk to the iPad, you should be good to go for most mods that work on BGEE.
I believe there are some WeiDu mods that actually hack the game executable - I wouldn't hold my breath waiting for these to come available on the iPad.
I had a realization this morning - if they make mods possible on the iPad without jailbreak, it will be trivially easy to bypass the DRM for DLC. So...I wouldn't expect official support for mods on the iPad any time soon. (they neatly side-stepped this problem on the desktop by including the DLC in the purchase price)
I suspects its because dialog.tlk is being modified with Windows paths. Even if they use relative paths (say, .\override) they will unfortunately will not work on iOS because UNIX based file systems use the other slash (./override).
Also while installing the Kit mod pack, I observed the debug files: More than just dialog.tlk were being modified.
So in my previous comment where I said modders would need to make their mods iPad accessible, I read somewhere that Weidu has that ability (to be used cross-platform). IF we could get the mod makers to design their mods cross-platform THEN we should be able to their mods.
Until then, mods that require only .2DA files in the override work.
P.S. If any of this information is wrong, please feel free to correct me. I just pieced this together through the 'interwebs' and have no real experience with this kind of thing.
@mars0124 All the platforms have the same game files in the same relative locations (save game and settings directories vary by platform). To the best of my knowledge, the only file in the entire installation that is platform specific is the executable itself.
So anything WeiDU does to files on the PC version are compatible with the other platforms. You *can* just copy any file modified (except the executable) from one installation (e.g. PC) to the other (iPad) and have it work.
The override folder can contain a number of the different internal file types used by BGEE. Most of these files are compressed into other files (BIFs?) in the main installation directory, so you won't find them there. You can put scripts (.BCS), dialogs (.DLG), areas (.ARE), creatures (.CRE), items (.ITM), etc. in the override and they will be used by the game.
And my tests say that you can't just copy and paste the files that have changed. Try installing a simple kit mod and copying the files over. Also, check the SETUP-XXX-DEBUG file and you'll see all files that get changed (Note: I ran the weidu setup file with the '--debug-boiic' switch which may or may not have done anything. I've attached my log where I installed only a Mystra Cleric kit (which works fine on PC) from the Kit Pack. I might be reading this wrong (which is fine as mutual learning in the point of a forum), but Default.BIF, and 25Defl.BIF are both appended to to point to the new override files (in addition to chittin.key and dialogs.tlk). If I am reading this right that means 4 changed files in addition to the override files.
Regardless of whether I copy only the override files, the override files + dialogs.tlk, or the override files + dialogs.tlk + chittin.key, or lastly, the override files + dialogs.tlk + chittin.key + the appended BIF files the end result is always the same. The app launches, goes to a black screen, and crashes.
Edit: I think I misunderstood how the BIFs were being used by weidu. Nevermind that part, but I still can't get weidu mods to work regardless.
I haven't jailbroken my iPad yet, but what worries me the most is Trent's tweet that the LUA VM was removed for space reasons - I wonder what impact that might have on mods running.
Looking at that debug log, it looks like all the actual mods are in the override directory. Maybe a smaller test with one file of each type with a simple mod - one BCS, one DLG, etc. would help figure out what will and what won't work.
Unfortunately, I've got a couple other projects on my plate keeping me from trying to break my brand new iPad.
Chitin.key might differ depending on OS (it did between Windows and Mac OS in the old editions), but that file should only be necessary if a mod biffs files (most don't). Common files (including dialog.tlk) should not have differences more significant than type of linebreak. But maybe BGEE is different in this regard. It shouldn't affect mods much. LUA is the console and aside from occasionally being configurable from the console, mods don't make use of it. A majority of extant WeiDU mods are already cross-platform, to the extent it falls upon the mods themselves to be cross-platform (WeiDU aims to abstract away the platform-specific stuff, so each individual modder does not need to account for it). If the iPad community wants to be able to use WeiDU mods, the first thing that must happen is that one of theirs port WeiDU to the iPad. I can't do it (I may be able to help, however), and waiting for modders to deliver mods unto you will not work either. Fortunately it seems it might be possible to crosscompile WeiDU from OS X to iOS using e.g., OCamlXARM, so the infrastructure might already be in place.
Could you maybe help out by giving me an initial direction to start in? I imagine we'll see in a relatively short amount of time if I can grow/adapt to fit the bill or if I should just bow out.
To follow up on your suggestions @Cerevant, I used NI (which I had previously never seen nor knew existed) to modify two files. 1) I modified COW.CRE, changing the beef to be worth 100xp. 2) I modified AR2626.BCS so that it only read the following, which I BELIEVE should have removed Watchers being summoned on witnessed theft.
"IF
Global("Teth","GLOBAL",2)
THEN
RESPONSE #100
IncrementChapter("Chptxt7")
AddJournalEntry(15841,INFO)
SetGlobal("Teth","GLOBAL",3)
END"
I then created the override file in my BG directory on the iPad right next to the data folder where it normally should be and populated the two modified files within. Upon restarting BG and testing, neither had taken effect.
Is that traditionally how you would create/place the mods?
Also, where can I find the extra features of this forum, like creating spoiler tags etc? I don't want to do everything in plain text if this is going to be an ongoing conversation.
Many thanks!
And another realization - AR2600 is Candlekeep in chapter 6. You want to modify AR2626.
Yes I am starting a new game
Yes its all uppercase. NI defaults to the same case as whatever is expected from the infinity engine, which is great, as if something is lower case it would be needed (I think).
So, limited success this time. I made three changes.
1) Changed the 'Welcome' text when you start the game: this failed and I am looking into it further.
2) Tried changing COW.CRE again. I think previously I changed it's XP vs its XP value: this worked. I received 100xp for slaying the MIGHTY cow.
3) Replaced Phlydia with a Phoenix Guard: this worked, and 'she' won.
This is very exciting. In my mind I am seeing a Cydia repo for BG mods to download files to the override folder 'easily'. It would be a lot easier that installing the mods manually for those who are less technically savvy. Imagine: picture packs, XP caps changes, sound packs, even doing thing like modifying AR2600 to remove the TUTORIALITEMCHECK for people who like it old school (not me).
But that still leaves the question of WeiDU mods...
Thanks again guys. Knowledge is power and I'm loving it.
As for a Cydia repository: the problem (and part of the reason for the existence of WeiDU) is that mods can conflict: If the first mod you install makes your cow worth 100XP, and your second mod made the cow cast cloudkill, when you played the game you would only see the effects of the second mod (no XP bonus). WeiDU makes localized changes to the game resources, rather than just overwriting them.
Ultimately we need to get WeiDU compiled for iOS. Override hacks work for individuals, but they are not a general solution.
But I agree, ultimately WeiDU would have to move over. Hopefully @Wisp will pipe in today or tomorrow so I can start thinking about it. I have no idea how I would even gets its dependencies ported over :S
http://psellos.com/2012/10/2012.10.ocamlxarm-mountain-lion.html