Jump to content


[OS X] Progress with manual install


  • Please log in to reply
87 replies to this topic

#21 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 10 March 2010 - 11:46 PM

I've been toying with the idea of burning a "clean install plus BG2 Fixpack" to a DVD, but haven't gotten around to that yet.

In Windows, the WinRAR is really the fastest way to reinstall the whole game from scratch, by first making the archive from the game folder that includes a clean install + patch + whatever mods you wish to already be there(as long as you know it's stable). This way you'll have a backup too... as you only have to delete the game folder, and then just unpack the archive to where the game folder was.

Deactivated account. The user today is known as The Imp.


#22 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 11 March 2010 - 07:43 AM

I've been toying with the idea of burning a "clean install plus BG2 Fixpack" to a DVD, but haven't gotten around to that yet.

In Windows, the WinRAR is really the fastest way to reinstall the whole game from scratch, by first making the archive from the game folder that includes a clean install + patch + whatever mods you wish to already be there(as long as you know it's stable). This way you'll have a backup too... as you only have to delete the game folder, and then just unpack the archive to where the game folder was.


Fantastic! I do have a Unix executable file on my computer called "rar" that I've never used before. If I can learn how to use it (I suspect it's as simple as running weidu-mac in a Terminal session), I'll make a .rar archive of the game with as many mods as I've determined will play nicely together.

All the more reason I'm glad that my latest approach is to install one mod at a time, test, then add more if things go well. I've restored critical files and re-installed 1PP (all but potions), and now I'm manually editing the OSX-item_rev-v2 files, so I can then install that mod and continue with the process.

Thanks!
Eric

Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#23 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 11 March 2010 - 11:46 AM

WeiDU is choking on INNER_PATCH_SAVE. It doesn't recognize this; says it expected one of a list of tokens, but that one isn't in the list. I added this section of code into description_updates.tpa, per BiG World Fixpack patch files:

// extract THAC0 line if possible
INNER_PATCH_SAVE thac0_line ~%description%~ BEGIN
REPLACE_TEXTUALLY ~\(.*[%lnl%%mnl%%wnl%]\)*\(THAC[0O]:.*[%lnl%%mnl%%wnl%]\)\(.*[%lnl%%mnl%%wnl%]\)*.*~
~\2~
END

I can't install the Masterwork Weapons component till I can get WeiDU to accept this. Please help!

Thanks,
Eric

Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#24 dabus

dabus
  • Member
  • 1982 posts

Posted 11 March 2010 - 12:52 PM

Sorry, can't assist with WeiDu but, uh, do you have a copy of windows somewhere?

If yes, I'd rather try to get windows running on a VM like Virtual PC, qemu or it's port fromhere. From what I see, it can be run on a Mac. Would be easier/less time-consuming for you then fiddling with your bare hands and having problems every now and then, though I think the WeiDU-guys don't get a report about OS X-stuff too often. ;)

At least I had my 2k-session up and running without any problems in about an hour or so when testing it. It might not run so smooth, though.

Edit: By the way, where did you get the weidu by the way and does that version support the action you want to run? Would be bad if the version does not know what to do with the code and choke on that line.

Edited by dabus, 11 March 2010 - 12:59 PM.

THINK! - It's not illegal.

#25 -Guest-

-Guest-
  • Guest

Posted 11 March 2010 - 03:12 PM

though I think the WeiDU-guys don't get a report about OS X-stuff too often.

These problems don't come from our end. The Mac build of WeiDU is fully supported.

There's no intrinsic value to RAR, so just use the Finder's archive process (Control-click on the folder and select "Create Archive of 'Selection'") to make a ZIP archive. Neither would be very fast on your G4 with the whole installation folder, but decompression would be faster than full-installing every time you want to restore the install.

You need to say where you're adding to the TP2 (or TPA or TPP or whatever) file and what editor you're using to edit the file, and you need to make sure it's using the latest version of WeiDU. You're describing a parsing error, so the issue is with the change you've made to the file (assuming the original works, which I wouldn't necessarily assume after seeing the names of some of those mods and those screenshots :P).

#26 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 11 March 2010 - 06:22 PM

Sorry, can't assist with WeiDu but, uh, do you have a copy of windows somewhere?

If yes, I'd rather try to get windows running on a VM like Virtual PC, qemu or it's port fromhere. From what I see, it can be run on a Mac. Would be easier/less time-consuming for you then fiddling with your bare hands and having problems every now and then, though I think the WeiDU-guys don't get a report about OS X-stuff too often. ;)

At least I had my 2k-session up and running without any problems in about an hour or so when testing it. It might not run so smooth, though.

Edit: By the way, where did you get the weidu by the way and does that version support the action you want to run? Would be bad if the version does not know what to do with the code and choke on that line.


Negative on the Windows thing, and I may never be able to afford the software required to run Windows on my Mac. In any case, my primary objective is to discover and to report whatever turns out to be the most playable multimod install under OS X Tiger, for the benefit of the BiG World Project as well as for myself :) I'll do whatever it takes to make this work.

I keep WeiDU current as much as possible, and I d/l it from Wesley Weimer's site always. My version is 213. I'd expect it to be able to handle anything a modder could throw at it, but perhaps not...or perhaps something is missing in the .patch file. Still a mystery to me.

Funny thing about the Masterwork Weapons component of Item Revisions: it worked just fine before I started adding changes to the files from the .patch file text *LOL*

- E

Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#27 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 11 March 2010 - 06:24 PM


Well, Mac can do sh, so you could try to convert to that format.
Or even better, get wine and you should be able to run the whole thing without manual labor. I guess you could copy the result and run it with your native version if the developers did stick with their usual format.


Wine doesn't work on the good old PowerPC-based macs, like this one.


I'm not clued-in enough to know how to convert files to sh, but I'm not afraid to use the Terminal, so...I'll gladly give it a go, if someone can guide me.

If it makes a difference, I have Install-tools in my BGII - SoA folder at my disposal.

- E

Edited by Eric P., 11 March 2010 - 06:38 PM.

Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#28 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 11 March 2010 - 06:36 PM

though I think the WeiDU-guys don't get a report about OS X-stuff too often.

These problems don't come from our end. The Mac build of WeiDU is fully supported.

There's no intrinsic value to RAR, so just use the Finder's archive process (Control-click on the folder and select "Create Archive of 'Selection'") to make a ZIP archive. Neither would be very fast on your G4 with the whole installation folder, but decompression would be faster than full-installing every time you want to restore the install.

You need to say where you're adding to the TP2 (or TPA or TPP or whatever) file and what editor you're using to edit the file, and you need to make sure it's using the latest version of WeiDU. You're describing a parsing error, so the issue is with the change you've made to the file (assuming the original works, which I wouldn't necessarily assume after seeing the names of some of those mods and those screenshots :P).


OK, so when I'm ready, I'll simply create an archive of the BGII - SoA folder. That much is easy enough for me :)

Here are the details about the file that's giving me trouble: the file I'm modifying, as I mentioned earlier, is called description_updates.tpa. It's located inside /BGII - SoA/item_rev/lib. The text I'm using to add/replace in that file comes from another file called description_updates.tpa.patch, which is located inside /BiG World Fixpack/item_rev. I have BiG World Fixpack extracted on another HD for reference. The editor I use is TextWrangler 2.3. I'll check to see if there's a more recent version of WeiDU than 213, as that's the version I'm using.

Hope this helps!
- E

Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#29 -Guest-

-Guest-
  • Guest

Posted 11 March 2010 - 07:15 PM

You have the latest version of WeiDU. The problem should be in where you're placing the additions (you're likely adding the code somewhere where it's invalid). I have no familiarity with this stuff; maybe if you post 50 lines near where you're trying to make changes (or wait for somebody who knows what you're talking about with these mods) will isolate what the problem is.

#30 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 11 March 2010 - 07:47 PM

I don't want to take up too much space here, but I'll post the section of code in question from description_updates.tpa (won't be pretty). The second part of this, "extract THAC0 line if possible", contains the problem code:

// requires 'thac0', the new value
DEFINE_PATCH_MACRO ~crossbow_changes_english~ BEGIN
SET thac0_backup = %thac0%
PATCH_IF (%index% = 0x50) BEGIN // unidentified description
SET thac0 = 1
END

// extract THAC0 line if possible
INNER_PATCH_SAVE thac0_line ~%description%~ BEGIN
REPLACE_TEXTUALLY ~\(.*[%lnl%%mnl%%wnl%]\)*\(THAC[0O]:.*[%lnl%%mnl%%wnl%]\)\(.*[%lnl%%mnl%%wnl%]\)*.*~
~\2~
END

// make up to date THAC0 line
PATCH_IF (~%thac0_line%~ STRING_EQUAL ~%description%~) BEGIN // description doesn't contain a thac0 line
PATCH_IF (%thac0% > 0) BEGIN
SPRINT thac0_line ~THAC0: +%thac0% bonus
~
END ELSE
PATCH_IF (%thac0% < 0) BEGIN
SPRINT thac0_line ~THAC0: %thac0% penalty
~
END
END ELSE BEGIN // thac0 line exists
INNER_PATCH_SAVE thac0_line ~%thac0_line%~ BEGIN
SPRINT thac0_sign ~~
PATCH_IF (%thac0% > 0) BEGIN
SPRINT thac0_sign ~+~ // only need to add a sign on positive values as negative numbers will include it
END
// catches "THAC0: +3" and "THAC0: -2 penalty"
REPLACE_TEXTUALLY ~THAC[0O]:[ %tab%]*[+-][0-9]+~
~THAC0: %thac0_sign%%thac0%~
END
// remove existing THAC0 line
REPLACE_TEXTUALLY ~THAC[0O]:.*[%lnl%%mnl%%wnl%]~
~~
END

// add new THAC0 line above Damage, or Weight
PATCH_IF ((~%description%~ STRING_CONTAINS_REGEXP ~Damage:~) = 0) BEGIN // contains damage line
REPLACE_TEXTUALLY ~Damage:~
~%thac0_line%Damage:~
END ELSE BEGIN
REPLACE_TEXTUALLY ~[%lnl%%mnl%%wnl%]Weight:~
~
%thac0_line%Weight:~
END
SET thac0 = %thac0_backup%
END

If there's another way to achieve the desired result, I'd be willing to try implementing. If worse comes to worst, I'll forget about using the masterwork weapon component altogether, but I'd much prefer to solve this and continue.

Thanks,
Eric

Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#31 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 11 March 2010 - 07:48 PM

Sorry about the lack of formatting in the above. Everything appears to be properly indented in the .tpa file.
- E

Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#32 -Guest-

-Guest-
  • Guest

Posted 11 March 2010 - 08:54 PM

That code is correct. Post the exact error message.

#33 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 11 March 2010 - 10:58 PM

That code is correct. Post the exact error message.


Text from the weidu-mac installer:

Install Component [Masterwork Weapons]?
[I]nstall, or [N]ot Install or [Q]uit? i

Installing [Masterwork Weapons]
In state 383, I expected one of these tokens:
[0] EOF
[3] <<<<<<<<
[10] EXTEND_TOP_REGEXP
[13] GET_DIRECTORY_ARRAY
[15] REQUIRE_FILE
[16] DEFINE_ACTION_MACRO
[18] ADD_MUSIC
[26] EXTEND_TOP
[27] VERBOSE
[29] APPEND_COL
[30] ADD_PROJECTILE
[41] DEFINE_PATCH_MACRO
[44] LOAD_TRA
[50] ALTER_TLK_LIST
[53] LAUNCH_ACTION_FUNCTION
[74] CLEAR_MEMORY
[76] AT_INTERACTIVE_NOW
[77] DEFINE_ACTION_FUNCTION
[81] COPY
[83] OUTER_PATCH
[91] UNINSTALL
[93] GET_FILE_ARRAY
[97] PRINT
[102] ACTION_DEFINE_ASSOCIATIVE_ARRAY
[104] ADD_KIT
[106] FAIL
[107] MKDIR
[111] BEGIN
[112] COPY_EXISTING_REGEXP
[113] COPY_LARGE
[117] ACTION_READLN
[120] ACTION_DEFINE_ARRAY
[122] AT_UNINSTALL
[127] AT_INTERACTIVE_UNINSTALL
[133] STRING_SET_RANGE
[134] OUTER_SPRINT
[135] CLEAR_IDS_MAP
[137] STRING_SET
[138] COPY_KIT
[141] AT_EXIT
[142] COPY_ALL_GAM_FILES
[143] END
[148] ALTER_TLK
[152] LAUNCH_ACTION_MACRO
[160] DEFINE_PATCH_FUNCTION
[162] COMPILE
[166] MOVE
[168] OUTER_WHILE
[172] APPEND
[177] RANDOM_SEED
[208] REINCLUDE
[209] EXTEND_BOTTOM
[222] SILENT
[226] COPY_EXISTING
[230] ALTER_TLK_RANGE
[232] ACTION_PHP_EACH
[241] AT_NOW
[242] FORBID_FILE
[243] STRING_SET_EVALUATE
[249] EXTEND_BOTTOM_REGEXP
[255] AT_INTERACTIVE_EXIT
[258] OUTER_SET
[263] APPEND_OUTER
[265] OUTER_FOR
[270] INCLUDE
[273] OUTER_PATCH_SAVE
[275] OUTER_TEXT_SPRINT
[288] ACTION_FOR_EACH
[290] COPY_RANDOM
[292] ACTION_CLEAR_ARRAY
[304] BIFF
[307] ACTION_IF
[319] ACTION_BASH_FOR
[323] ADD_SPELL
Parse error (state 383) at INNER_PATCH_SAVE

[item_rev/lib/description_updates.tpa] PARSE ERROR at line 99 column 1-18
Near Text: INNER_PATCH_SAVE
GLR parse error

[item_rev/lib/description_updates.tpa] ERROR at line 99 column 1-18
Near Text: INNER_PATCH_SAVE
Parsing.Parse_error
ERROR: parsing [item_rev/lib/description_updates.tpa]: Parsing.Parse_error
Stopping installation because of error.
Stopping installation because of error.

ERROR Installing [Masterwork Weapons], rolling back to previous state
Will uninstall 0 files for [item_rev.tp2] component 1.
In state 383, I expected one of these tokens:
[0] EOF
[3] <<<<<<<<
[10] EXTEND_TOP_REGEXP
[13] GET_DIRECTORY_ARRAY
[15] REQUIRE_FILE
[16] DEFINE_ACTION_MACRO
[18] ADD_MUSIC
[26] EXTEND_TOP
[27] VERBOSE
[29] APPEND_COL
[30] ADD_PROJECTILE
[41] DEFINE_PATCH_MACRO
[44] LOAD_TRA
[50] ALTER_TLK_LIST
[53] LAUNCH_ACTION_FUNCTION
[74] CLEAR_MEMORY
[76] AT_INTERACTIVE_NOW
[77] DEFINE_ACTION_FUNCTION
[81] COPY
[83] OUTER_PATCH
[91] UNINSTALL
[93] GET_FILE_ARRAY
[97] PRINT
[102] ACTION_DEFINE_ASSOCIATIVE_ARRAY
[104] ADD_KIT
[106] FAIL
[107] MKDIR
[111] BEGIN
[112] COPY_EXISTING_REGEXP
[113] COPY_LARGE
[117] ACTION_READLN
[120] ACTION_DEFINE_ARRAY
[122] AT_UNINSTALL
[127] AT_INTERACTIVE_UNINSTALL
[133] STRING_SET_RANGE
[134] OUTER_SPRINT
[135] CLEAR_IDS_MAP
[137] STRING_SET
[138] COPY_KIT
[141] AT_EXIT
[142] COPY_ALL_GAM_FILES
[143] END
[148] ALTER_TLK
[152] LAUNCH_ACTION_MACRO
[160] DEFINE_PATCH_FUNCTION
[162] COMPILE
[166] MOVE
[168] OUTER_WHILE
[172] APPEND
[177] RANDOM_SEED
[208] REINCLUDE
[209] EXTEND_BOTTOM
[222] SILENT
[226] COPY_EXISTING
[230] ALTER_TLK_RANGE
[232] ACTION_PHP_EACH
[241] AT_NOW
[242] FORBID_FILE
[243] STRING_SET_EVALUATE
[249] EXTEND_BOTTOM_REGEXP
[255] AT_INTERACTIVE_EXIT
[258] OUTER_SET
[263] APPEND_OUTER
[265] OUTER_FOR
[270] INCLUDE
[273] OUTER_PATCH_SAVE
[275] OUTER_TEXT_SPRINT
[288] ACTION_FOR_EACH
[290] COPY_RANDOM
[292] ACTION_CLEAR_ARRAY
[304] BIFF
[307] ACTION_IF
[319] ACTION_BASH_FOR
[323] ADD_SPELL
Parse error (state 383) at INNER_PATCH_SAVE

[item_rev/lib/description_updates.tpa] PARSE ERROR at line 99 column 1-18
Near Text: INNER_PATCH_SAVE
GLR parse error

[item_rev/lib/description_updates.tpa] ERROR at line 99 column 1-18
Near Text: INNER_PATCH_SAVE
Parsing.Parse_error
ERROR: parsing [item_rev/lib/description_updates.tpa]: Parsing.Parse_error
Error Uninstalling [item_rev.tp2] component 1:
Parsing.Parse_error
ERROR: Parsing.Parse_error
Please submit a report regarding this problem, including the information contained in item_rev.DEBUG to Demivrgvs and Mike1072 at forums.gibberlings3.net

Same messages every time.
- E

Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#34 -Guest-

-Guest-
  • Guest

Posted 12 March 2010 - 10:55 AM

I think you're giving me the wrong information (that code is not updated, and I can't find any patch to add such a block anywhere; also Line 99 is somewhat before the crossbow_changes_english definition). Do you have the latest versions?

I need to know where you're making changes to file, not where you think it's failing (i.e., this is what comes before and this is what comes after and I'm adding the code in this spot).

(Note that you can apply the patch files with "patch" on Mac OS X, but it requires a little legwork to strip out all the path data, convert the files to Unix line endings, and manually apply them to the target files.)

#35 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 12 March 2010 - 11:39 AM

I think you're giving me the wrong information (that code is not updated, and I can't find any patch to add such a block anywhere; also Line 99 is somewhat before the crossbow_changes_english definition). Do you have the latest versions?

I need to know where you're making changes to file, not where you think it's failing (i.e., this is what comes before and this is what comes after and I'm adding the code in this spot).

(Note that you can apply the patch files with "patch" on Mac OS X, but it requires a little legwork to strip out all the path data, convert the files to Unix line endings, and manually apply them to the target files.)


I am manually inserting the little block of code where it appears in the above message. I'm inserting it between this part:

// requires 'thac0' and 'damage', the new values, and 'strength_mod', the bonus damage dealt due to being wielded with someone of high strength
@@ -141,6 +129,47 @@
SET thac0 = %thac0_backup%
END

And this part:

// requires 'thac0', the new value
DEFINE_PATCH_MACRO ~crossbow_changes_english~ BEGIN
@@ -220,6 +249,8 @@
END

So, I'm adding 41 lines in between these two parts in description_updates.tpa.

If there's a command I can use in the Terminal to apply the patches to the original files, I'd like to know what it is and how to use it, as that is closer to the way it's supposed to be done anyway ;) Otherwise, I'll continue to copy/past lines where appropriate in all the mods I have, before installing them.

If there's any more information anyone needs for this situation, I'll gladly supply it, if I can.

Thanks,
Eric

Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#36 -Guest-

-Guest-
  • Guest

Posted 12 March 2010 - 12:25 PM

You may need Xcode installed, but in general, patch takes a diff and a target and uses the path header to determine which files to change. Because these are set up as Windows paths, they're useless, and they're of different lengths, so it's not as easy to chomp them (patch allows you to ignore by directory "level," but you want paths with the same length), so they need to be rewritten or removed. For example, in description_updates.tpa.patch, you could get rid of the path for Line 1, leaving it as simply "--- description_updates.tpa date-time-stamp"; the same for Line 2 ("+++ description_updates.tpa date-time-stamp"). Then you need to convert both the target file and the patch file to Unix line breaks (the CLI really doesn't like DOS CRLF). Then you just put both files in the same folder (you can manually construct the paths, instead of reducing them to just the filename as above, but no bother if you're not going to do a bunch) and run "patch description_updates.tpa description_updates.tpa.patch" (for example). If you get a message "Chunk #%d FAILED," then oops, something is wrong with the patch or the target file (or the patch purposely doesn't apply) and some or all of the patches weren't performed (it will tell you at the end how many of total failed); for description_updates.tpa.patch, if you did everything correctly, it shouldn't fail with fresh downloads of the mods.

Assuming you're deleting the '+' marks and pasting the whole "DEFINE_PATCH_MACRO ~short_bow_changes_english~ BEGIN" block at the correct place (between END and the // comment), the code should work. The error may be occurring elsewhere if you've made other changes (likely a missing END somewhere).

#37 -Guest-

-Guest-
  • Guest

Posted 12 March 2010 - 12:28 PM

Then you just put both files in the same folder (you can manually construct the paths, instead of reducing them to just the filename as above, but no bother if you're not going to do a bunch) and run "patch description_updates.tpa description_updates.tpa.patch" (for example).

After moving to the directory, doh. So if you have the files in /BG2/item_rev/lib, you "cd /BG2/item_rev/lib" and then run the patch command.

#38 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 12 March 2010 - 12:40 PM

I do see a man entry for "patch" in the Terminal, so I'll do a test by moving a .patch file into a corresponding mod folder, then run the command in Terminal and see what happens.

- E

Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#39 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 12 March 2010 - 07:32 PM

Results of running "patch" in the Terminal, as a test:

silverbird:~ ericp$ cd /test
silverbird:/test ericp$ patch description_updates.tpa description_updates.tpa.patch
(Stripping trailing CRs from patch.)
patching file description_updates.tpa
Reversed (or previously applied) patch detected! Assume -R? [n] y
Hunk #2 FAILED at 21.
Hunk #5 FAILED at 141.
Hunk #6 succeeded at 185 (offset -35 lines).
Hunk #7 succeeded at 241 (offset -35 lines).
Hunk #8 succeeded at 277 (offset -35 lines).
Hunk #9 succeeded at 297 (offset -35 lines).
2 out of 9 hunks FAILED -- saving rejects to file description_updates.tpa.rej

This suggests to me that it recognized that I'd applied some of the changes already (just a guess), but not sure. The contents of the file description_updates.tpa.rej show two sections of lines that are marked for deletion...including the INNER_PATCH_SAVE thing. Interesting. Dropping other files and their patches into /test, and running the patch command to patch files is resulting in some successes and some failures. I notice that patch strips trailing CRs, but don't know if that's important.

Should I ignore all the patching, and attempt to install the unpatched mods? Run patch on all the appropriate files, install, and hope for the best? (Unlikely, but I had to throw that out there). What should the next step be in this process?

Thanks,
Eric

Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#40 -Guest-

-Guest-
  • Guest

Posted 12 March 2010 - 08:03 PM

You want to convert both the target file and the patch file to Unix line endings, as I said (you should be able to set this in TextWrangler; patch will try to convert the CRLF into LF, but it's best not to give it any grief). The notes mean that you already changed the file (three of the patches were still valid even after your edits, but two of the patches weren't able to recover at all, while 4 were). With a clean download of the mod, you should get no failures (assuming you update the paths and the line endings). If WeiDU wasn't built to run on Windows, CRLF wouldn't even really be supported at all (LF is preferred, always), so you can mostly totally ignore that (the game doesn't really like its TLK entries to be CRLF anyway, so I'm not sure how those description updates are turning out, but whatever).

I don't know about any of the other patches, and you're known for crazy big installs, so I'm not sure it even really matters; you'll have to ask the other people who try tons of mods at once. For the patches that succeed with no failures, it certainly shouldn't hurt, but if you don't experience any installation issues or know of any compatibility problems with the unpatched mods, it's at your discretion. Good luck!