Author Topic: BG1Tutu: Mac problem (Lvl 7 characters)  (Read 10307 times)

Offline Loriel

  • Planewalker
  • *****
  • Posts: 390
  • Gender: Male
    • Loriel's Downloads
BG1Tutu: Mac problem (Lvl 7 characters)
« on: July 24, 2004, 04:51:28 AM »
Creating a new character for BG1Tutu results in a Level 7 character in Candlekeep for us Mac-users.I know that BG1Tutu patches the .exe to allow for level 1 characters and I know what to edit to get the same effect, but it seems difficult to many people (scared of a little hex-editing). I was wondering if anyone would be willing to share the implementation with me so I can provide a user-friendly way of getting this done?

EDIT:
Specifically, I am looking for a command-line option to get it done. I could just write a tutorial on how to use HexEdit, but I'd rather include a shell script at the end of the installation of BG1Tutu to avoid confusion or a complaint that I screwed up someone's BG2 installation.
« Last Edit: July 24, 2004, 04:55:57 AM by Loriel »

Offline Idobek

  • Dust Bunny
  • Planewalker
  • *****
  • Posts: 431
  • Gender: Male
Re: BG1Tutu: Mac problem (Lvl 7 characters)
« Reply #1 on: July 24, 2004, 05:44:27 AM »
It sounds like you know where in the exe you need to patch so why no write it as a WeiDU mod? WeiDU can patch the exe using WRITE_BYTE/SHORT/LONG just like any other file.

IIRC Tutu sets the starting xp to 1 in the exe and then uses a script to remove that 1 xp at the start of the game. This is because of reported issues with setting the xp to 0. I don't know whether this would be an issue on a Mac but it's worth bearing in mind.
The Gibberlings Three Forums

<SimDing0> Did you know G3 has secret forum rules?
<CamDawg> Yep. They're generally of the nature 'don't annoy Idobek.'

Offline Loriel

  • Planewalker
  • *****
  • Posts: 390
  • Gender: Male
    • Loriel's Downloads
Re: BG1Tutu: Mac problem (Lvl 7 characters)
« Reply #2 on: July 24, 2004, 05:28:29 PM »
Well, I created a mod that uses effects #96 Level change (set to 0) and #104 Experience points (set to -1), then added a point of XP with AddXPObject().  It works for single-classes, although I have to correct the HP, saves, kit bonuses, and and basically everything else.  The problem is with multi-classes, because there's no effect for changing second or third class levels.  I am off to try the Weidu patch method, but I'm pretty sure it won't work as things are now.  Weidu strips the resource fork from the files (which can be good for smaller file sizes - no icons), but that resource fork is where the application is defined as an application.  Once you copy something with Weidu, it becomes a regular document, which works for most mods, but in this case, it's editing the game itself.  I'm off to test it now, so we'll see.

Offline Loriel

  • Planewalker
  • *****
  • Posts: 390
  • Gender: Male
    • Loriel's Downloads
Re: BG1Tutu: Mac problem (Lvl 7 characters)
« Reply #3 on: July 24, 2004, 06:28:35 PM »
I tried the patch with Weidu, and here's the results:
1) The patch was made successfully and I verified it by doing a hexdump.
2) Weidu did strip the resources and made the executable into a document. I used ResEdit to change it back into an application, but attempting to launch it causes an error: "Operation could not be completed. An unexpected error occurred (error code -39)". I think that's an EOF error, but I could be wrong. The end result is, I won't be able to patch the application with the current Weidu.

Here's the code I used, if anyone's wondering:

Code: [Select]
COPY ~Baldur's Gate II Mac OS X~ ~Baldur's Gate II Mac OS X (tutu)~
WRITE_BYTE 0x00464f65 00
WRITE_BYTE 0x00464f66 00
WRITE_BYTE 0x00464f67 01

Offline Loriel

  • Planewalker
  • *****
  • Posts: 390
  • Gender: Male
    • Loriel's Downloads
Re: BG1Tutu: Mac problem (Lvl 7 characters)
« Reply #4 on: July 26, 2004, 05:55:13 AM »
I figured out a solution and the patch for Mac SOA is now available at my website. You can get it in the downloads section. You will need to have Weidu installed already to use this, so pick it up in the Weidu section of the Adventurer's Spa & Grill. The TOB patch is disabled until I can find out the offset it uses for starting experience. Once I get that info, I will post a message here to let everyone know that it's available for download.

Offline Loriel

  • Planewalker
  • *****
  • Posts: 390
  • Gender: Male
    • Loriel's Downloads
Re: BG1Tutu: Mac problem (Lvl 7 characters)
« Reply #5 on: October 13, 2004, 10:21:01 PM »
Alright, I've released another version that includes the Level 1 fix, the fixed BALDUR.BCS XP fix, and the fixed 'Add Kits'. You can download it at my website. If you don't yet have weidu installed, you'll need to download it from here before trying to install this patch.

Quote
Requires:
BG1Tutu installation
Current version of Weidu

I have tested it with all known versions of BG2:SoA and ToB:ToB, but if you have any troubles with this patch, please post a message for me at one of the following Forums:

Adventurer's Spa & Grill  http://ire.mainecoon.net/yabbse/
The Gibberlings Three     http://forums.gibberlings3.net/
Pocket Plane Group        http://forums.pocketplane.net/index.php


Version History:

v2.2: Added TOB Support
  - Fixed a problem with ToB installations where there was an offset not
    patched.
  - Cleaned up the code to make it run faster on all versions of BG2.
  - Added a easier system of passing variables and arrays to the patching
    scripts.  This will make it easier to update this patch in the future.

v2.1: Patch & Display Fix
  - Only one of the offsets was being patched/restored for SoA versions.
    It was simply a misplaced '$' which has now been fixed.
  - Only two of the offsets were being patched/restored for ToB versions.
    It was simply a misplaced '$' which has now been fixed.
  - There was a display problem with the affected offsets in the logfile.
    I located the problem and fixed it, as well as adding the changed value
    of the offset for help with troubleshooting in the future.

v2: Big Fix, XP, and Kits
  - The Level 1 fix now works with the following versions of SoA and ToB:
      SoA 1.0
      SoA 1.1.1
      SoA 1.1.2
      ToB 1.0
      ToB 1.1.2
  - Added a fix for the applying kits to NPC's.  This might be redundant,
    but I wasn't sure if the kits were still causing segmentation faults.
  - Added documentation and logfiles.
  - Fixed the starting script for Tutu that assumed you were starting with
    1XP.  This caused a problem for any character that was imported.  Now,
    imported characters should function normally and will not lose XP.

v1: Quick Fix
  - Quick fix for the Level 1 problem until I can make a permanent fix.

Offline Loriel

  • Planewalker
  • *****
  • Posts: 390
  • Gender: Male
    • Loriel's Downloads
Re: BG1Tutu: Mac problem (Lvl 7 characters)
« Reply #6 on: January 21, 2005, 05:22:48 AM »
One more update and I think this will be the last one (famous last words).  Please note that this fix is now included in the Mac version of the Tutu Fixpack v6, which can be downloaded from the Tutu hompage.

Quote
BG1Tutu - Level One Fix
Requires: BG1Tutu installation
          Current Weidu version
          (both at http://ire.mainecoon.net/customs/weidu.html)

All you have to do is double-click the install_tutufix.command installer script and install it.  If you had trouble with installing the kits section of BG1Tutu, there is now a patch for that.  Now go play BG1Tutu with your new Level 1 characters!

I have tested it with all known versions of BG2:SoA and ToB:ToB, but if you have any troubles with this patch, please post a message for me at one of the following Forums:

Adventurer's Spa & Grill  http://ire.mainecoon.net/yabbse/
The Gibberlings Three     http://forums.gibberlings3.net/
Pocket Plane Group        http://forums.pocketplane.net/index.php


Version History:

v2.3: Added to the Tutu Fixpack
  - Thanks to the support of the authors of the Tutu Fixpack, I'm adding
    the Level 1 fix to the Tutu Fixpack!
  - Condensed the patching code into a couple of scripts.  It has the same
    functionality, but less confusing to troubleshoot.
  - Added a debug option for getting feedback from the user.

v2.2: Added TOB Support
  - Fixed a problem with ToB installations where there was an offset not
    patched.
  - Cleaned up the code to make it run faster on all versions of BG2.
  - Added a easier system of passing variables and arrays to the patching
    scripts.  This will make it easier to update this patch in the future.

v2.1: Patch & Display Fix
  - Only one of the offsets was being patched/restored for SoA versions.
    It was simply a misplaced '$' which has now been fixed.
  - Only two of the offsets were being patched/restored for ToB versions.
    It was simply a misplaced '$' which has now been fixed.
  - There was a display problem with the affected offsets in the logfile.
    I located the problem and fixed it, as well as adding the changed value
    of the offset for help with troubleshooting in the future.

v2: Big Fix, XP, and Kits
  - The Level 1 fix now works with the following versions of SoA and ToB:
      SoA 1.0
      SoA 1.1.1
      SoA 1.1.2
      ToB 1.0
      ToB 1.1.2
  - Added a fix for the applying kits to NPC's.  This might be redundant,
    but I wasn't sure if the kits were still causing segmentation faults.
  - Added documentation and logfiles.
  - Fixed the starting script for Tutu that assumed you were starting with
    1XP.  This caused a problem for any character that was imported.  Now,
    imported characters should function normally and will not lose XP.

v1: Quick Fix
  - Quick fix for the Level 1 problem until I can make a permanent fix.

Offline SimDing0

  • Back In Black
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3496
  • Gender: Male
  • Word Enhancer
Re: BG1Tutu: Mac problem (Lvl 7 characters)
« Reply #7 on: January 21, 2005, 06:28:57 AM »
What's the problem with the Tutu starting script assuming that you have 1 XP?

Offline Loriel

  • Planewalker
  • *****
  • Posts: 390
  • Gender: Male
    • Loriel's Downloads
Re: BG1Tutu: Mac problem (Lvl 7 characters)
« Reply #8 on: January 21, 2005, 01:12:08 PM »
In an earlier version of Tutufix, the script didn't take into account if you were playing multiplayer or imported your character with more or less experience.  So, let's say that you had an exported character that had already lost the 1XP to put it at 0 (for backup or whatever).  When you would import the character to a new game, it would lose 1XP again, putting you at -1 XP which means you're an instant level 40.  Also, if you had 5000 XP, when you imported the character, you would now have 4999 XP.  Basically, it just needed an XP(PlayerX,1) trigger to fix it.  Since I fixed that (don't know what version), Tutufix has been updated to fix that problem, so it's no longer an issue

Offline SimDing0

  • Back In Black
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3496
  • Gender: Male
  • Word Enhancer
Re: BG1Tutu: Mac problem (Lvl 7 characters)
« Reply #9 on: January 21, 2005, 05:42:46 PM »
Odd, I'm sure I had a check for 1 XP in there, but eh... so long as it works now. :)

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: