Skip to content

Preliminary report on modding BG:EE for iPad

leeho730leeho730 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.
«1

Comments

  • LiggLigg Member Posts: 187
    How did you do this? Did you have your iPad connected to a pc?
  • leeho730leeho730 Member Posts: 285
    For copying mod files, yes, i connected ipad to pc using normal usb cable. I used iexplorer pc programme to copy files from pc to iPad.
  • NifftNifft Member Posts: 1,065
    Nice! Too bad it doesn't help us non-jailbreak iPadders.
  • EudaemoniumEudaemonium Member Posts: 3,199
    Yeah, Overhaul needs to implement some kind of override folder at least. It already works with portraits, so it's not as if it *can't* be done.
  • leeho730leeho730 Member Posts: 285
    I agree. Override and Lang folder at the document should be able to override default game data. I don't wanna jailbreak my iPad any more I want to update my iPad to 6.1 but can't do...
  • smeagolheartsmeagolheart Member Posts: 7,963
    must be locked down by apple as part of their approval process?
  • ljboljbo Member Posts: 177
    @smeagolheart I wondered about it too but an app such as Pythonista seems a good counter example: it is a Python editor that is scriptable with user-written Python code. I don't see how an override folder in the user space of iOS users would be more dangerous than an arbitrary Python script. Actually this could enable Overhaul to issue bug fixes without incurring the delays of the AppStore review. Not only on the iPad but on MacOS X and Android in the future.
  • mars0124mars0124 Member Posts: 180
    I'm starting to play around with modding on BG:EE for the iPad. Not the creation of, but applying of mods. For starters a jailbreak is required. This is no longer a iOS 5.1.1 thing anymore: All versions of iPad support the jailbreak. Check http://www.evasi0n.com.

    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.
  • mars0124mars0124 Member Posts: 180
    The short version seems to be this:

    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.
  • DonYancyDonYancy Member Posts: 2
    I can also confirm that the xp cap removal mod works on iPad. Here are the exact steps I took:

    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!
  • CerevantCerevant Member Posts: 2,314
    My understanding is that most WeiDu mods do the following:
    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)
  • mlnevesemlnevese Member, Moderator Posts: 10,214
    @Cerevant Some mods change chitin.key as well... Mainly the big ones that bif its own contents after installation.
  • mars0124mars0124 Member Posts: 180
    Unfortunately the copying and pasting doesn't work that easily mlnevese.

    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.
  • mlnevesemlnevese Member, Moderator Posts: 10,214
    edited February 2013
    @mars0124 What @Cerevant was suggesting was to install the mod in Windows and then copy the relevant files and folders to the IPad. I only added that the Big Mods change the chitin.key as well.
  • CerevantCerevant Member Posts: 2,314
    @mlnevese Exactly. (thanks for the catch on chitin.key)

    @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.
  • mars0124mars0124 Member Posts: 180
    edited February 2013
    @Cerevat You are right that the folders are in the same relative location, but how that location is looked at by the operating system changes. If you have dialogs.tlk edited to see a .bif file in .\data\gui.bif on Windows, that is completely different programmatically than ./data/gui.bif on UNIX. Try typing 'CD .\data\gui.bif' into SSH on your iPad from your BG.App directory and you'll see what I mean.

    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.
    Post edited by mars0124 on
  • CerevantCerevant Member Posts: 2,314
    WeiDU handles path translations on the local OS. The game files don't have any path information. The only challenge is for you to put the right files in the right places.

    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.
  • mlnevesemlnevese Member, Moderator Posts: 10,214
    @Cerevant The first version of the BPSeries AI scripts was a pure override mod. It could be a good test.
  • CerevantCerevant Member Posts: 2,314
    I was thinking a bit smaller scale - create a AR2626.BCS with NI that spawns a new creature inside Candlekeep. Change a line of you dialog with Imoen to "Die Scum!" Something quick and easily verifiable.

    Unfortunately, I've got a couple other projects on my plate keeping me from trying to break my brand new iPad.
  • mlnevesemlnevese Member, Moderator Posts: 10,214
    Not jailbroken here either...
  • WispWisp Member Posts: 1,102
    @topic
    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.
    Cerevant said:


    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.

    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.
    mars0124 said:

    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.

    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.
  • mars0124mars0124 Member Posts: 180
    I'd be more than happy to learn, if helpful people like you @Wisp and @Cerevant were willing to lend a hand? As you can see from my above posts I am not familiar with the modding side of BG. Hopefully you can also see that I can question things/delve into them in an attempt to further understand them.

    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.
  • mars0124mars0124 Member Posts: 180
    edited February 2013
    Disclaimer to offering to help: I am a COMPLETE newbie right now. This would be starting from the ground up.

    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!
  • CerevantCerevant Member Posts: 2,314
    Can you double-check the files in your override folder and see if they are named in all caps? I noticed someone mention in another thread that the iPad is expecting the file names to be in all caps. You will need to restore you chitin.key if you haven't already.
  • CerevantCerevant Member Posts: 2,314
    edited February 2013
    Also be aware that changes to .CRE & .ARE typically only take effect when the creature/area are spawned. Did you start a new game?

    And another realization - AR2600 is Candlekeep in chapter 6. You want to modify AR2626.
  • mars0124mars0124 Member Posts: 180
    @Cerevant, you meant the opposite, but I got it. 2600 is Chapter 1.

    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.
  • CerevantCerevant Member Posts: 2,314
    Sorry...Up at 3am this morning. Brain no worky.

    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.
  • mars0124mars0124 Member Posts: 180
    In the case of Cydia override hacks, whoever maintains the Repo (in this case I am thinking me), you would just set packages that conflict. ie, if you want to install XP cow you HAVE to get rid of cloudkill cow (AWESOME btw).

    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
  • mlnevesemlnevese Member, Moderator Posts: 10,214
    Nothing against cloudkill cows, just don't try to explain where the cloud comes from... :)
  • CerevantCerevant Member Posts: 2,314
    Looks like this would build it on a Mac, presumably with XCode installed to provide the OS libraries:

    http://psellos.com/2012/10/2012.10.ocamlxarm-mountain-lion.html
Sign In or Register to comment.