Jump to content


Bad implementation of BG1 items which are present but unused in BG2


  • Please log in to reply
16 replies to this topic

#1 -Hurricane-

-Hurricane-
  • Guest

Posted 23 September 2011 - 06:06 PM

I have another contribution to make. The implementation of a certain group of items by Setup-BGT.tp2 is flawed. This applies solely and specifically to the section entitled

////////////////////////////////////////////////
// BG1 items existing in BG2 but not used by BG2
////////////////////////////////////////////////
Here's what's bad about the code in that particular section:
The setup tries to patch a couple of things in these items, mostly setting the correct references to their BG1 descriptions and removing wrong abilities. In order to do so, the setup copies these items from BGT/Modify/ITM to override, patching them in the process. There is nothing wrong with the patching - the problem is with the sourcing from the BGT/Modify/ITM folder. The item files in that folder are plain duplicates taken from BG2 vanilla. Now BGT copies them into override during patching. As a result, these item files supersede any modifications made to these items prior to installing BGT. Since the BG2 Fixpack, for example, goes before BGT, all previous corrections made to these items by the fixpack (or other mods) are lost.

For instance, in order to assign Kiel's helmet its description from the BG1.tra, BGT does:

COPY ~BGT/Modify/ITM/HELM14.ITM~ ~override/HELM14.ITM~
  SAY IDENTIFIED_DESC @21408
However, by the time BGT gets installed, the BG2 Fixpack has already altered HELM14.ITM in the original BG2 installation (the fixpack corrects the helmet's protection from fear). With BGT copying its "own", unaltered version of the helmet into override, the correction made by the fixpack is thereby undone. There are a number of items from BGT/Modify/ITM to which this problem applies. Algernon's cloak, which loses its once corrected icon again due to the way BGT handles CLCK08.ITM, is another example. BGT mustn't just overwrite the item files already changed by other mods such as the fixpack! And duplicating the fixpack changes to apply them to the BGT/Modify/ITM resources also wouldn't help since it's tedious and ineffective, because this issue isn't even limited to the prior installation of the fixpack alone, but potentially affects any given mod that happens to go before BGT in the installation order.

Long story short: Instead of pulling the item files from BGT/Modify/ITM, the setup has to alter the existing item files by drawing them directly from the game, thereby not reverting any previous changes made to them but appending the own changes to the respective items. The code in this particular section of the BGT setup has to be adjusted by replacing this kind of command

COPY ~BGT/Modify/ITM/*.ITM~ ~override/*.ITM~
with a usual patching method:

COPY_EXISTING ~*.ITM~ ~override~
Additionally, the corresponding item files at BGT/Modify/ITM should then be deleted, which also reduces the size of the BGT package.

#2 -Hurricane-

-Hurricane-
  • Guest

Posted 09 October 2011 - 11:17 AM

It's done. I just tried to do what I described and I succeeded - it works. I made the necessary changes to the setup code as described above and tested the thus modified setup. All the items are now handled properly! I've checked the resulting BGT build and everything is fine. My corrections are ready to be implemented. I'm providing them in this post.

Let me first say that in order to carefully adjust the COPY commands, I had to examine all the items and their implementation in detail and naturally came across some small remaining errors. Therefore I did not only adjust the COPY commands but also took the opportunity to make a couple of relevant changes and additions to the item patching code. This also involves 3 corrections in the code section called "BG1 items existing and used in BG2; rename" - so in contrast to what I said in the first post, there are not one but two code sections I touched. Here is the full documentation and submission.


1. Changing the setup code:

a) Section "BG1 items existing in BG2 but not used by BG2"

All commands in this section that perform "COPY ~BGT/Modify/ITM/<item>~ ~override/<item>~" have been replaced by using "COPY_EXISTING ~<item>~ ~override~", except for SCRL5R because this item is not present in a BG2 installation.

By applying this method, BGT no longer overrides any changes made to these items by other modifications if BGT is installed after those modifications. With respect to the BG2 Fixpack, BGT used to override a number of significant fixes. This problem is now solved. Fixes from the BG2 Fixpack which used to be but are no longer reversed include:
- BOW07: correction of proficiency to longbow (although BGT itself also does this bugfix)
- BOW08: correction of bad timings for its Set Color effects
- CLCK08: correction of the item icon
- DAGG10: correction of the item type to dagger (although BGT itself also does this bugfix)
- HELM14: correction of its Immunity to Fear and bad timings for the Reset Morale and Remove Fear effects
- MISC2P: correction of its Domination ability to account for elven racial resistance to charm
- TASLOIIL: correction of the weapon range
- all items in the section: any corrections introduced by future versions of the Fixpack

Apart from adjusting the COPY commands, I made the following additional changes to the setup code in this section in order to correct remaining errors:
- CLCK08: setting the Ability Icon = ICLCK08 instead of ICLCK07
- SCRL3F: correction of the item type - Books instead of Scrolls (the DevDoc even announces this correction but it was missing from the code the entire time)
- SCRL3Z: There was code for removing an unused ability from this item (as with similar scrolls) even though this scroll does not have any ability. Therefore this code is removed.
- SCRL5R: switched setting the description text to appear as the unidentified description and set identified description to None, like all the other scrolls
- SCRL5S: added code that removes the existing unused ability from this scroll (same problem as with similar scrolls)

Provision: In order for these changes to be implemented, I am providing the modified code that constitutes the code section "BG1 items existing in BG2 but not used by BG2". The existing code simply is to be swapped entirely with the following new one, no other adjustments are required. Here is the replacement:
Spoiler

b) Section "BG1 items existing and used in BG2; rename"

As I announced in the beginning of this post, I also altered this section to correct some additional errors I found. The COPY commands in this section are not altered, as there is no need to because these items are "new", unique resources that are only introduced by BGT. The three corrections I made to items in this section are:
- BGMISC56: switched setting the description text to unidentified description like the corresponding BG1 item, instead of identified description (just a cosmetic change)
- BGMISC79: corrected the weight to 130 as per the corresponding BG1 item
- BGRING08: added the Unusable by Monk flag

Provision: Same procedure - replace the existing code of the entire section with the following one:
Spoiler

That's it for updating the code in Setup-BGT.tp2.


2. Newly arranged BGT/Modify/ITM folder:

Since a lot of the item patching is now done by COPY_EXISTING, I revised the content of this directory. All item files that used to be copied from this location but are now drawn directly from the game have been removed, as they are no longer needed.

Additionally, I deleted a file called SCRL03.itm, which was located in this directory but was not used by any command. Going through all tp2's and BAT files and doing a change-log on the item revealed that BGT doesn't touch it or use it, so I guess there was no reason for this file to be there. Please correct me if I'm wrong.

Provision: The ITM folder at BGT/Modify is to be deleted entirely and replaced with this one: New-ITM-Folder.rar


3. Updating DevDoc at BGT\Help\DevDoc\index.html:

Finally, the documentation should be updated to reflect the different implementation of the item patching, as well as to include some workings of the BGT setup that hadn't been documented properly, as I discovered when I went through the item patching code.

a) At "Section 1h. Items", the old, flawed method for patching the items is described. This no longer applies to the BG1 items existing in BG2 but not used by BG2. It only still applies to the items which get renamed.
b) "Section 2d. New resources" contains a table of the items that get modified. While its content is still valid, most of the items there are no longer "new resources", and they are not drawn from "Modify/ITM". This only still applies to the items which get renamed.
c) The documentation of the following specific items is to be newly included or changed:
- GIBBERIL - is missing entirely: BGT prevents the melee ability from dealing damage to unarmed players
- MISC2P - is incomplete: BGT also adds the Unusable by Monk flag
- PLAT08 - is incomplete: BGT also sets the minimum strength to 11
- SCRL2R - is incomplete: BGT also corrects the identified description (by setting it to None)
- SCRL3Z - new change: no more "Remove ability"
- SCRL5S - new change: add "Remove ability"
- SCRLDRA - is incomplete: BGT also removes an unused ability
- SCRLKAR - is incomplete: BGT also removes an unused ability
- SCRLNEI - is incomplete: BGT also removes an unused ability
- SCRLTAR - is incomplete: BGT also removes an unused ability
- SCRLVAIL - is incomplete: BGT also removes an unused ability
- SCRLZHA - is incomplete: BGT also removes an unused ability
- SW1H13 - is missing entirely: BGT adds the Droppable flag, adds usability restrictions to make it only usable by Xan, and changes the proficiency to dagger
- SW1H18 - is incomplete: BGT also changes the proficiency to bastard swords
- TASLOIIL - is missing entirely: BGT prevents the melee ability from dealing damage to unarmed players
- XVARTIL - is missing entirely: BGT prevents the melee ability from dealing damage to unarmed players


----- End of submission -----

That is all. As you can see, this is quite an overhaul with some important corrections to the BGT setup, but I hope that, by using my provision, the changes can be made quickly. Whoever is capable of updating BGT, please implement this.

#3 Salk

Salk
  • Modder
  • 1411 posts

Donator

Posted 09 October 2011 - 08:08 PM

Great job, -Hurricane-!

I am sure A64 will be interested in it and will make it part of his next BGT release!

Thanks!

#4 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 16 October 2011 - 09:53 AM

BGT expects SW1H19.ITM to have 2 abilities before adding in the new Berserk ability - which doesn't matter for normal BGII-SoA installs but borks the entire BGT setup if some mod changes the number of abilities in that item before BGT gets its hands on it :D

Updated the SW1H19.ITM handling code to directly add the ability rather than check for the no. of abilities before addition courtesy Turambar's code magic here :P Modified .tp2 containing Hurricane's awesome stuff with Turambar's thing here :cheers:

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#5 -Hurricane-

-Hurricane-
  • Guest

Posted 16 October 2011 - 03:02 PM

Thank you for pointing this out in here as well, Lollorian. :)
I can confirm the findings over at the BWP 10.2 Release thread that Lollorian just described and linked to. In order for my changes to be implemented into BGT, you can follow Lollorian's link to the tp2 file. Alternatively, to continue my original decription for updating the tp2 file, it is now necessary to still follow my description, but then use Turambar's "magic snippet" (thank you pal!) as the code for patching SW1H19. If I could edit my post above, I would update the code in the spoiler tag myself. Hell, I'll just repost it including Turambar's correction:

For the entire Section "BG1 items existing in BG2 but not used by BG2", please use the following code instead:
Spoiler


@ Salk
You're welcome! :) It was my pleasure.

#6 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 23 October 2011 - 06:24 PM

Thanks for the hard effort. Will pop it in next release.
Much of the BGT-WeiDU code is still based on the good ol' days, so I wouldn't be surprised that there are a few rigid code blocks around.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#7 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 28 October 2011 - 05:28 AM

This is now in, thanks again. However, I have an issue with

CLCK08: setting the Ability Icon = ICLCK08 instead of ICLCK07

as I do not believe this is a fix. BG1 did not have ICLCK07.BAM and its CLCK08.ITM uses the ground icon GCLCK07.BAM as well, despite GCLCK08.BAM existing. Open for comments.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#8 Turambar

Turambar
  • Modder
  • 935 posts

Posted 28 October 2011 - 06:07 AM

This is now in, thanks again. However, I have an issue with

CLCK08: setting the Ability Icon = ICLCK08 instead of ICLCK07

as I do not believe this is a fix. BG1 did not have ICLCK07.BAM and its CLCK08.ITM uses the ground icon GCLCK07.BAM as well, despite GCLCK08.BAM existing. Open for comments.

Those two cloaks have the same effects, so it could be intentional to have the same icon. Moreover, I'm not sure whether there is, generally, a single icon for every single cloak.
I think it's more an UB or tweakpack kind of thing...

Thanks for the hard effort. Will pop it in next release.
Much of the BGT-WeiDU code is still based on the good ol' days, so I wouldn't be surprised that there are a few rigid code blocks around.

Speaking about old code, is it possible to move to override, instead of biffing, the .bam, itm, spl, are, sto, 2da, bcs, dlg, eff files (as the trimpack (?) for BWP does), in order to make the installation of other mods smoother? And could you also include the searchmaps for ar4600, 8900, 9300, 7500 in the "not biff" list since they are used by DS and NT?
I know that changing that enormous batch file to a list of AT_NOWs + some final MAKE_BIFFs in the .tp2 file (which would be wonderful for non-Windows users) would be extremely long, but removing that 'total biffing' would already make multi-mod installations much easier.

Turambar

Currently supporting: DSotSC for BGT, NTotSC - forum

Turambar's fixes and tweaks for BG2, BGT, DSotSC, NTotSC, SoBH and more!

 

Before posting questions (even regarding posts written by myself), please look at Jarno Mikkola's FAQs for the Megamods!
(how to correctly report CTDs)

 


vipersig.jpg


#9 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 28 October 2011 - 07:00 AM

as I do not believe this is a fix. BG1 did not have ICLCK07.BAM and its CLCK08.ITM uses the ground icon GCLCK07.BAM as well, despite GCLCK08.BAM existing. Open for comments.

Okey this might sound strange but my BGI-TotSC and BGII-ToB installs have the following setup for the items :unsure:

  • BGI
    • CLCK07
      • ICLCK07.bam
      • GCLCK01.bam
    • CLCK08
      • ICLCK07.bam
      • GCLCK01.bam
  • BGII
    • CLCK07
      • ICLCK07.bam
      • GCLCK01.bam
    • CLCK08
      • ICLCK07.bam
      • GCLCK01.bam
... the difference in the BGI and BGII installs being that there exists a ICLCK08.bam in BGII that isn't being used by any item :D (and the freaky thing is that the BG2Fixpack seems to apply that BAM to CLCK08.itm :unsure:)

So yeah, it depends on BGT being pure BGI or applying BG2Fixpack's changes to BGI items (which I think was Hurricane's intention :D)

Edited by Lollorian, 28 October 2011 - 07:04 AM.

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#10 -Hurricane-

-Hurricane-
  • Guest

Posted 28 October 2011 - 02:08 PM

Thank you Ascension, for including my work! I really appreciate you updating BGT. :)
Now to business. :D

So yeah, it depends on BGT being pure BGI or applying BG2Fixpack's changes to BGI items (which I think was Hurricane's intention :D)

Indeed, the reason I changed the code for the ability icon was to make it consistent with the item icon, which is changed by BG2Fixpack. I also made a comment within the patch code to document this.


So, is this a fix or is this a sinful deviation from BG1? :D Let's see:

BG1 did not have ICLCK07.BAM and its CLCK08.ITM uses the ground icon GCLCK07.BAM as well, despite GCLCK08.BAM existing. Open for comments.

Hm, I believe something got mixed up here ... What Lollorian said is correct, and maybe I can clear this up a little further. Firstly, the Nymph Cloak CLCK07 is always the same throughout BG1 and BG2, using
- ICLCK07.bam as its item icon
- GCLCK01.bam as the common, generic ground icon and
- CCLCK07.bam as its description icon.

Now we look at Algernon's cloak CLCK08:

1. Item icon:
- In BG1, a file called ICLCK08.bam does not exist, and the cloak uses ICLCK07.bam.
- In BG2, the cloak still uses that icon. However, the file ICLCK08.bam now exists in the game - it is unused in vanilla BG2.
- Accordingly, the BG2Fixpack assigns ICLCK08.bam to Algernon's cloak. This is "not being pure BG1" now.

2. Ground icon:
- No controversy here. There are no specific ground icons for different cloaks. Algernon's cloak always uses the generic GCLCK01.bam.

3. Description icon:
- In BG1, Algernon's cloak uses CCLCK07.bam even though CCLCK08.bam does exist (it's unused) - this is probably what you meant, Ascension. :)
- In BG2, Algernon's cloak was changed to use this very CCLCK08.bam by default.

To summarize: In BG1, Algernon's cloak uses the same resources as the Nymph Cloak because there is no item icon ICLCK08.bam, although a unique description icon is available but unused. In BG2, Algernon's cloak only changes to use that unique description icon, even though ICLCK08.bam now also exists. BG2Fixpack helps out by assigning this new item icon. Thereby, the cloak's own set of unique graphics is now complete.

Finally, BGT reintroduces the cloak's BG1 ability and, therefore, has to pick an item icon to assign to that ability. Given what I just outlined, I vote for sticking with ICLCK08.bam because it seems to me that, apart from the missing item icon file in BG1, the *CLCK08.bam resources were always meant to be used in the first place. The BG2Fixpack seems to make the same assumption, and BGT should therefore accord with it, else BGT would actually have to undo BG2Fixpack's change in order to make the cloak's item icon and ability icon consistent.

Come to think about consistency ... If we stick with ICLCK08.bam, BGT should probably duplicate the Fixpack's assignment of ICLCK08.bam as the item icon, in case someone installs BGT without BG2Fixpack.

#11 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 28 October 2011 - 02:22 PM

Speaking about old code, is it possible to move to override, instead of biffing, the .bam, itm, spl, are, sto, 2da, bcs, dlg, eff files (as the trimpack (?) for BWP does), in order to make the installation of other mods smoother? And could you also include the searchmaps for ar4600, 8900, 9300, 7500 in the "not biff" list since they are used by DS and NT?
I know that changing that enormous batch file to a list of AT_NOWs + some final MAKE_BIFFs in the .tp2 file (which would be wonderful for non-Windows users) would be extremely long, but removing that 'total biffing' would already make multi-mod installations much easier.

The issue I have with this is that BGT still needs to stand on its own, and I don't want to BIFF other people's files to batch BIFFing extensions in the override directory.

How are installation of other mods 'non-smooth'?

If DS and NT use those areas, shouldn't they be providing the means to make sure those areas work for them?

Finally, BGT reintroduces the cloak's BG1 ability and, therefore, has to pick an item icon to assign to that ability. Given what I just outlined, I vote for sticking with ICLCK08.bam because it seems to me that, apart from the missing item icon file in BG1, the *CLCK08.bam resources were always meant to be used in the first place. The BG2Fixpack seems to make the same assumption, and BGT should therefore accord with it, else BGT would actually have to undo BG2Fixpack's change in order to make the cloak's item icon and ability icon consistent.

Come to think about consistency ... If we stick with ICLCK08.bam, BGT should probably duplicate the Fixpack's assignment of ICLCK08.bam as the item icon, in case someone installs BGT without BG2Fixpack.

Yeh, I meant C not G. The line in bold is the thing I dispute. We cannot know what BioWare intended in BG1 unless there is clearly a mistake. The fact that the 08 files were missing could have simply meant, for example, that BioWare were not happy with it and decided to can the icon for it, or it could mean they deliberately wanted it to use the 07 files.

Edited by Ascension64, 28 October 2011 - 02:47 PM.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#12 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 28 October 2011 - 08:19 PM

One could add in a new BGTTweaks component called "Use unused BGII icon for Algernon's Cloak" yes? :D

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#13 Salk

Salk
  • Modder
  • 1411 posts

Donator

Posted 28 October 2011 - 10:09 PM

Well, my two cents is that I agree with Hurricane here. His assumption cannot be confirmed of course but BGT would be consistent with the BG2 Fixpack which is nowadays canon for a BG2 installation.

#14 Turambar

Turambar
  • Modder
  • 935 posts

Posted 29 October 2011 - 02:16 AM

The issue I have with this is that BGT still needs to stand on its own, and I don't want to BIFF other people's files to batch BIFFing extensions in the override directory.

I was thinking of this suggestion by the bigg, who sugested, for SoS, to only biff WEDs, TISs, MOSs, BMPs and WAVs, and add an extra forced_subcomponent which either biffs everything/what you want/... (using the code from his generalized biffing or modifying it in order to only biff files from a certain list) or moves to the override folder whatever's still in other folders.

How are installation of other mods 'non-smooth'?

If DS and NT use those areas, shouldn't they be providing the means to make sure those areas work for them?

I used the wrong word, I meant that it's quite unefficient, since biffing things many times takes up a lot of space on the disk, which can't be simply freed by moving/deleting the backup folder.

Concerning DS and NT, they provide different serachmaps which overwrite the BGT ones; it would be an optimization here as well to only biff them if the user does not want to install further mods.

Turambar

Currently supporting: DSotSC for BGT, NTotSC - forum

Turambar's fixes and tweaks for BG2, BGT, DSotSC, NTotSC, SoBH and more!

 

Before posting questions (even regarding posts written by myself), please look at Jarno Mikkola's FAQs for the Megamods!
(how to correctly report CTDs)

 


vipersig.jpg


#15 -Hurricane-

-Hurricane-
  • Guest

Posted 29 October 2011 - 02:18 PM

Finally, BGT reintroduces the cloak's BG1 ability and, therefore, has to pick an item icon to assign to that ability. Given what I just outlined, I vote for sticking with ICLCK08.bam because it seems to me that, apart from the missing item icon file in BG1, the *CLCK08.bam resources were always meant to be used in the first place. The BG2Fixpack seems to make the same assumption, and BGT should therefore accord with it, else BGT would actually have to undo BG2Fixpack's change in order to make the cloak's item icon and ability icon consistent.

Come to think about consistency ... If we stick with ICLCK08.bam, BGT should probably duplicate the Fixpack's assignment of ICLCK08.bam as the item icon, in case someone installs BGT without BG2Fixpack.

The line in bold is the thing I dispute. We cannot know what BioWare intended in BG1 unless there is clearly a mistake. The fact that the 08 files were missing could have simply meant, for example, that BioWare were not happy with it and decided to can the icon for it, or it could mean they deliberately wanted it to use the 07 files.

You're right of course. Despite the existence of the 08 files in BG2, it is possible that the usage of the 07 item icon for Algernon's cloak was intentional.
I guess we can't tell which way is the correct one. I have made my case in my previous post, and I can see yours being equally valid. It's just that for me, I don't even care so much about the icon itself as I find BG2Fixpack to have already made that decision for us. Salk said it best.

Btw, I'd also be fine with Lollorian's solution, seeing that BGT Tweaks currently has the chance to get an update soon (due to this recent thread). Although in that case, we could then argue which icon is set by default and which one is selectable via BGT Tweaks. For instance, restoring the 07 version would perhaps fit in with the BG1-ification components of BGT Tweaks ...

In any case, I just want to repeat that the implementation in BGT, and/or BGT Tweaks respectively, always has to ensure consistency between the ability icon and the item icon. Whenever the 07 ability icon is applied, the respective setup must also set the 07 item icon (undoing BG2Fixpack's change). Whenever the 08 ability icon is applied, the respective setup must also set the 08 item icon (duplicating BG2Fixpack's change).

#16 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 29 October 2011 - 03:30 PM

The whole decision boiled down to how slack I was, and seeing that I am super-slack (!), I'll just fix it like Fixpack in BGT. :)

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#17 -Hurricane-

-Hurricane-
  • Member
  • 81 posts

Posted 11 March 2012 - 06:40 AM

Just a quick addendum to this topic, now that the changes have been included since the release of BGT 1.13. I only want to bring up something I have mentioned before:

Come to think about consistency ... If we stick with ICLCK08.bam, BGT should probably duplicate the Fixpack's assignment of ICLCK08.bam as the item icon, in case someone installs BGT without BG2Fixpack.

That is exactly the problem now. Since v1.13, BGT sets the ability icon for Algernon's cloak to iclck08.bam. In the odd case that BGT is installed without the BG2Fixpack, you end up with the "reverse" icon inconsistency that we were debating about before: The ability icon now is iclck08, but without the Fixpack, the cloak's item icon still is iclck07. To resolve this, the BGT setup must duplicate the Fixpack's change to the item icon, as I have suggested earlier in this thread.

I changed the patch code for clck08.itm accordingly by adding the first four lines (the rest is untouched):

//also implements BG2 Fixpack fix
COPY_EXISTING ~clck08.itm~ ~override/clck08.itm~
  READ_ASCII 0x3a inv_icon
  PATCH_IF NOT ("%inv_icon%" STRING_EQUAL_CASE "iclck08") BEGIN
    WRITE_ASCII 0x3a ~ICLCK08~ #8 //Inventory icon
  END

  READ_LONG 0x64 abil_off
  READ_SHORT 0x68 abil_num
  READ_LONG 0x6a fx_off

  INSERT_BYTES "%abil_off%" 0x38
  SET abil_num += 1
  WRITE_SHORT 0x68 "%abil_num%"
  SET fx_off += 0x38
  WRITE_LONG 0x6a "%fx_off%"

  WRITE_BYTE "%abil_off%" 3 //Ability type
  WRITE_BYTE ("%abil_off%" + 0x2) 3 //Ability location = ITEM_SLOT
  WRITE_ASCII ("%abil_off%" + 0x4) ICLCK08 //Ability icon
  WRITE_BYTE ("%abil_off%" + 0xC) 1 //Ability target = LIVING_ACTOR
  WRITE_SHORT ("%abil_off%" + 0xE) 100 //Ability range
  WRITE_SHORT ("%abil_off%" + 0x1C) 1 //Ability damage type = PIERCING
  WRITE_BYTE ("%abil_off%" + 0x24) 3 //Ability when drained = RECHARGE_DAILY
  WRITE_SHORT ("%abil_off%" + 0x2A) 1 //Ability projectile type
  WRITE_SHORT ("%abil_off%" + 0x2C) 34 //Ability animation overhand %
  WRITE_SHORT ("%abil_off%" + 0x2E) 33 //Ability animation backhand %
  WRITE_SHORT ("%abil_off%" + 0x30) 33 //Ability animation thrust %

  READ_SHORT 0x70 fx_global_num

  SET fx_total_num = %fx_global_num%

  FOR (i = 0; i < "%abil_num%"; i += 1) BEGIN
    READ_SHORT (%abil_off% + %i% * 0x38 + 0x1E) fx_abil_num
    SET fx_total_num += %fx_abil_num%
  END

  INSERT_BYTES ("%fx_off%" + "%fx_global_num%" * 0x30) 0x30

  WRITE_SHORT ("%fx_off%" + "%fx_global_num%" * 0x30) 5 //Effect type = CHARM_CREATURE
  WRITE_BYTE ("%fx_off%" + "%fx_global_num%" * 0x30 + 0x2) 2 //Effect target = PRESET_TARGET
  WRITE_BYTE ("%fx_off%" + "%fx_global_num%" * 0x30 + 0x3) 3 //Power
  WRITE_BYTE ("%fx_off%" + "%fx_global_num%" * 0x30 + 0xD) 1 //Dispel/Resistance = YES/YES
  WRITE_LONG ("%fx_off%" + "%fx_global_num%" * 0x30 + 0xE) 3600 //Duration
  WRITE_LONG ("%fx_off%" + "%fx_global_num%" * 0x30 + 0x12) 100 //Probability 1
  WRITE_BYTE ("%fx_off%" + "%fx_global_num%" * 0x30 + 0x24) 0b00000010 //Savetype = VS_BREATH
  WRITE_LONG ("%fx_off%" + "%fx_global_num%" * 0x30 + 0x28) 0xFFFFFFFF //Save bonus = -1

  WRITE_SHORT ("%abil_off%" + 0x1E) 1 //New ability #FX
  WRITE_SHORT ("%abil_off%" + 0x20) "%fx_global_num%" //New ability FX index

  FOR (i = 1; i < "%abil_num%"; i += 1) BEGIN
    READ_SHORT (%abil_off% + %i% * 0x38 + 0x20) fx_abil_idx
    WRITE_SHORT (%abil_off% + %i% * 0x38 + 0x20) ("%fx_abil_idx%" + 1)
  END

Just did a quick installation using this code, without the Fixpack present - it worked.

Finally, this should then also be reflected in the dev.doc:

• CLCK08 (Algernon's Cloak): Add Charm Creature ability, implements BG2 Fixpack fix for item icon and ability icon ICLCK08 (assuring consistency between the two)