Pocket Plane Group

BG2 Completed Mods => House Of Sim => Topic started by: SimDing0™ on April 01, 2004, 10:25:20 AM

Title: Ding0's Tweak Pack
Post by: SimDing0™ on April 01, 2004, 10:25:20 AM
Please see the readme (http://mods.pocketplane.net/D0Tweak_readme.htm) for details on the components.

The latest version is available over at http://www.pocketplane.net/sim/.
Title: Re: Ding0's Tweak Pack
Post by: Zaephir-Moth on April 06, 2004, 11:28:59 AM

  Hum... just a question Sim, why is there mentionned a v9.0 component ( "Smarter Irenicus") in the v8.0 Readme file ?
Would you already have secret projects... like making such a thing ? :D


Cheers
Title: Re: Ding0's Tweak Pack
Post by: SimDing0™ on April 06, 2004, 11:30:59 AM
I seem to have made a slight, um, error. Heheh.
Title: Re: Ding0's Tweak Pack
Post by: SixOfSpades on April 09, 2004, 06:09:34 PM
Regarding Ghreyfain's Holy Symbol Fix....

Anomen: Is there any way to make this contiguous with the tweak that grants the LG Anomen the Priest of Helm kit and the CN Anomen the Berserker kit? (LennonCook & I had the same idea, but we also planned to have Cor appropriate the Delryn Family Shield and Helmet when disowning Anomen, with the items recoverable after his death.) Even if not, should the CN Anomen recieve *any* Holy Symbol at all?

Viconia: I suggest a slight addition to DIALOG.TLK, turning her into a Priestess of Shar, and giving her (or her Holy Symbol) some Abilities related to Shar's portfolio, such as Blindness and PW: Blind.

Aerie: I don't think Multiclassed Priests (apart from Fighter/Clerics & Ranger/Clerics) should be allowed kits at all, but some minor Nature-based special abilities, such as Goodberries, Entangle, Charm/Summon Animal, or Tracking might not be amiss.
Title: Re: Ding0's Tweak Pack
Post by: NiGHTMARE on April 09, 2004, 08:22:32 PM
If you want Viconia to be a Priest of Shar, grab the Cleric remix mod (http://forums.camagna.net/index.php?s=3e460845d27042e1b75e733658a88610&showforum=29) :).
Title: Re: Ding0's Tweak Pack
Post by: Idobek on April 09, 2004, 08:42:06 PM
If Anomen the a Priest of Helm kit he'll get the Holy Symbol of Helm. Ghrey's Fix will be redundent in this case, but it can be safely installed along with Kit Anomen in order to get the other fixes.

I like the idea of Anomen not getting a Holy Symbol if he is CN. I might implement that myself.
Title: Re: Ding0's Tweak Pack
Post by: fallen demon on May 15, 2004, 05:06:12 PM
I was wondering if this was known to be incompatible w/ any other mods.  I have tob, big picture (along with tdd, sos and ts), npc banterpack, freedoms reign-reign of virtue, item upgrade and npc flirt installed and the unlimited summoning and kill cespanar components wont work, i have yet to encounter any demons to test the other components.
Title: Re: Ding0's Tweak Pack
Post by: SimDing0™ on May 15, 2004, 05:40:51 PM
Unlimited summonning requires ToB, but I'm assuming you have that considering the mods you list. Aside from that, I see no way in which they could fail to install; can you send me an installation log showing the failure?
Title: Re: Ding0's Tweak Pack
Post by: fallen demon on May 21, 2004, 06:28:52 PM
can you send me an installation log showing the failure?
sure.  How would i get this.
Title: Re: Ding0's Tweak Pack
Post by: SimDing0™ on May 21, 2004, 06:43:03 PM
After the installation fails, a setup-d0tweak.debug file should appear in your BG2 directory. This is what I need. Send it to SimDing0@pocketplane.net
Title: Re: Ding0's Tweak Pack
Post by: SimDing0™ on May 24, 2004, 02:11:13 PM
Okay, have I misunderstood the problem you're having? There's no installation error showing up in the log, so did you mean it wasn't working ingame rather than it was failing to install?
Title: Re: Ding0's Tweak Pack
Post by: fallen demon on May 24, 2004, 06:36:46 PM
Yah, it said it installed but the fetures didn't come up ingame srry for not being clear.
Title: Re: Ding0's Tweak Pack
Post by: SimDing0™ on May 27, 2004, 05:48:46 PM
The unlimited summonning component won't affect summonning spells installed by other mods. There may also be some mods which overwrite its effects, meaning it's wise to install it after them.

As for Kill Cespenar, the only explanation I can think of is something else overwriting the Cespenar creature.
Title: Re: Ding0's Tweak Pack
Post by: readme on June 14, 2004, 11:22:56 PM
This tweak pack seems nice.. I'm thinking about installing it atop Big Picture too but I've some questions:

1 - Does your mod replaces the creatures, itens, scripts, whatsoever.. or it just changes (or append, if thats the right term) the ones being used ? Cause if, for example, it changes the Celestial Fury .itm (or whatever the extension) , dont think I could upgrape it since the item identity was changed and cromwell would not recognize it as being the exact same celestial fury wich he has an upgrape for. I may be wrong but this seems how things work.

2 - Lets say BP uses a different Sarevok, wich is named (hopefully) slightly different than the one the normal game uses, weidu would aplly changes to this one, or would try to find the original sarevok.. or would aplly changes regardless of name and maybe the game would crash when he appears, or its a wait for sarevok to appear and see what happens kind of thing ?

3 - Lets say I've another mod installed wich also may change demons behaviors (BP probably has one but who knows, I'm just guessing so theres less to worry about later :)  ), I take its a script who makes that behavior thingy.. in any case, wich one would take precedence, your script or the ones that were trying to command demons before it ?

4 - Would you recomend NOT to install some components ?

5 - Last and more important, how many times can I kill cespy ? I can ressurect and rekill him as many times as I his reeducation process takes right ?

sorry if my questions are well.. dumb or pointless, I just dont have enough knowledge in this department :)

Nice mod anyway.
Title: Re: Ding0's Tweak Pack
Post by: SimDing0™ on June 15, 2004, 04:25:51 AM
Quote
1 - Does your mod replaces the creatures, itens, scripts, whatsoever.. or it just changes (or append, if thats the right term) the ones being used ? Cause if, for example, it changes the Celestial Fury .itm (or whatever the extension) , dont think I could upgrape it since the item identity was changed and cromwell would not recognize it as being the exact same celestial fury wich he has an upgrape for. I may be wrong but this seems how things work.
The Celestial Fury ITM isn't touched. All I do is extend a few scripts. The majority of components avoid overwriting, with exceptions such as the Goodberries component, which overwrites the spell, and the Cespenar component, which overwrites the creature (although this can easily be changed to patch it instead if compatibility issues arise).

Quote
2 - Lets say BP uses a different Sarevok, wich is named (hopefully) slightly different than the one the normal game uses, weidu would aplly changes to this one, or would try to find the original sarevok.. or would aplly changes regardless of name and maybe the game would crash when he appears, or its a wait for sarevok to appear and see what happens kind of thing ?
I don't touch Sarevok's CRE, but the weapon he uses, and this is patched rather than overwritten.

Quote
3 - Lets say I've another mod installed wich also may change demons behaviors (BP probably has one but who knows, I'm just guessing so theres less to worry about later   ), I take its a script who makes that behavior thingy.. in any case, wich one would take precedence, your script or the ones that were trying to command demons before it ?
Mine should do.

Quote
4 - Would you recomend NOT to install some components ?
My general design philosophy is to create mods that I would play with myself. The components I'd recommend giving most consideration are Restore Dimension Door, Summonning Cap Removal, and Kill Cespenar.

Quote
5 - Last and more important, how many times can I kill cespy ? I can ressurect and rekill him as many times as I his reeducation process takes right ?
How are you planning to resurrect him? :)

Quote
Nice mod anyway.
Thanks. Hope you enjoy it.
Title: Re: Ding0's Tweak Pack
Post by: readme on June 23, 2004, 11:33:50 AM
doh...  was hoping the mod itself allowed me to ressuct cespy :/

tnks for the reply :)
Title: Re: Ding0's Tweak Pack
Post by: underdog on June 17, 2005, 11:58:53 AM
Will the goodberries part work in Tutu?
I'm drooling at the thought of 3 point healing in Tutu.  ;D

Title: Re: Ding0's Tweak Pack
Post by: SimDing0™ on June 17, 2005, 11:59:22 AM
Yeh, it should do.
Title: Re: Ding0's Tweak Pack
Post by: underdog on June 17, 2005, 12:10:01 PM
So obviously skip the things that appear ot apply only to SoA/Tob, and install after Tutu in the Tutu install directory (I hope. It's already installed with the old interface, and it seems to work, must have done something right)
Title: Re: Ding0's Tweak Pack
Post by: Gorilym on June 21, 2005, 01:39:39 PM
Is there any chance that you could post an alternative, less proprietary packaging of the TweakPack? That is, .rar or .zip (like the QuestPack for instance)? As as Mac user, it's a bit of a hassle having to first copy the archive to a pc to be able to expand it, and then copying it back.
Title: Re: Ding0's Tweak Pack
Post by: SimDing0™ on June 21, 2005, 01:42:45 PM
All my mods currently are SFX-RAR-- and I'm sure Macs must have some archiving tool which can open SFX files as normal RARs. (And if you can extract Quest Pack, you should be able to extract anything I've made.)
Title: Re: Ding0's Tweak Pack
Post by: Gorilym on June 21, 2005, 01:46:26 PM
Indeed you are correct. Please excuse my previous moronic post, as I should have tried downloading the most recent version before posting it. Apparently the uncooperative archive was less recent than I remembered. :-[
Title: Re: Ding0's Tweak Pack
Post by: SimDing0™ on June 21, 2005, 01:47:20 PM
Well, I'm just pleased to hear that it actually IS possible to extract SFX files on a Mac, since I've just been assuming all this time. So thanks. :)
Title: Re: Ding0's Tweak Pack
Post by: SimDing0™ on August 02, 2005, 10:34:47 AM
v14 is out. Everybody should go enjoy Sensible Lore, Improved Backstabbing, NPCs/Summons Set Off Traps, and Slower Walking Speeds!
Title: Re: Ding0's Tweak Pack
Post by: Borsook on August 02, 2005, 12:55:39 PM
Great job Sim! (As always ;) )
Title: Re: Ding0's Tweak Pack
Post by: Azazello on August 02, 2005, 03:34:57 PM
Sim, you're just too friggin' good. Summons/NPCs Set Off Traps - so, so needed.
Title: Re: Ding0's Tweak Pack
Post by: Resonance on August 16, 2005, 09:24:28 PM
Sim, you're just too friggin' good. Summons/NPCs Set Off Traps - so, so needed.
Hehe. Yes, Zhivago of Tactics Improved Illyich infamy has already managed to get himself killed, after 5 minuts of gametesting in chateu Irenicus. I never needed to worry about getting around him.
Serves those jailkeepers right for not keeping a tidy prison... People can go and get themselves killed, what with all those boogeytraps lying about the workplace.
Anyhow, I suppose Irenicus can expect a lawsuit from the workers union one of these days...  ;D

Now, on the more critical side, I'm having trouble with component 21, the reduced walking speed.
It only seems to apply to my protagonist, whom is walking as if on slippery ice.
Supposing it had been so for all creatures in the game, I think I might still have liked this component.
But it figures that I'll hardly be able to survive many challenges with a protagonist under a permanent slow spell. Is this fixable, Sim?

While I'm being critical, I might add that the animation looks a bit weird (the walking on slippery ice appearance) but that's more of a detail, obviously, at least for my part.
_______________________________
edit: I've now experimented further with this, and the problem appears to be that this protagonist is a char I made some days ago, before installing this mod, since the same thing applies for all the chars made earlier by me.. Chars made after the mod move as they should(I now think) and chars that came as a part of the original bioware package are also fine. Any ideas on how to restore the char I'd like to have as a protagonist, other than by simply rerolling him?
Title: Re: Ding0's Tweak Pack
Post by: Borsook on August 17, 2005, 12:15:59 AM
You can change walking speed of a character in ShadowKeeper
Title: Re: Ding0's Tweak Pack
Post by: Resonance on August 17, 2005, 08:43:34 AM
You can change walking speed of a character in ShadowKeeper

Ok, thanks.
I went ahead and gave him a reroll, in stead of waiting. It wasn't as bad(in terms of time) as I had feared, even though I want my sorcerer protagonist to be fairly cheesy in terms of abilities.
Title: Re: Ding0's Tweak Pack
Post by: Resonance on August 17, 2005, 10:39:21 AM
Inspired by B's talk of Shadow keeper; I decided to investigate the matter with program he was talking about. Should have done so sooner, and saved myself an hour of rerolling!

It appears that Sims walking mod(the #21) simply applies a -3 modifier to walking speed for every(?) creature of the game, as can be wittnessed under Affects, when you look on a char in shadowkeeper. (I should perhaps mention that the Shadow keeper readme advices AGAINST mucking about in the Affects area, since it is all in hexcode, and you likely won't know what you're doing. In my case, however, that is just business as usual.  ;D)

If you have a similar problem, the char in question will have this modifier applied TWICE, observable by there being two lines with the same -3 modifier. It should be there only once.
Remove one, and the problem is solved.
Title: Re: Ding0's Tweak Pack
Post by: cheeseberries on August 23, 2005, 12:29:55 AM
Sim, you're just too friggin' good. Summons/NPCs Set Off Traps - so, so needed.

I can't get this to work with nej2 or bp.   

[gnt2003.bcs] not found in KEY file rolling back to previous state

any way to make it compatible with big mods?


P.S. can I attach files in this forum?  I'd show you the debug if I could.
Title: Re: Ding0's Tweak Pack
Post by: Borsook on August 23, 2005, 03:15:06 AM
You can paste in the content of the dubug (don't worry, even though it's long, a lot of people do that) or upload somewhere else and post a link.
Title: Re: Ding0's Tweak Pack
Post by: Resonance on August 28, 2005, 02:23:49 PM
After having played through chateu Irenicus, I'd have to say the Summons/NPCs Set Off Traps component is not compatible with this part of the game.

Especially not if you'd like to enjoy the improved Ilyich.
With the Summons/NPCs Set Off Traps Illyich and his entire hyped-up hitman crew will be gone the way of the Dodo long before you can get there to kill them all. No fun. Also, it means you can't retrieve the Acorns for the Dryads, OR get the Sword of Chaos from the djinn, because the Dryads won't want to interact with you when the acorns are all gone.

We had to restart the game; uninstalling the component wasn't enough.
But now Illyich and crew are dead once more.
The good kind of dead, that is, and our blade is wearing Illyichs mail to commemorate a difficult fight.

In conclusion; I'd advice Sim to add some kind of gameplay warning to the readme at Summons/NPCs Set Off Traps component in regards to chateu Irenicus, if nothing else.
Title: Re: Ding0's Tweak Pack
Post by: Borsook on August 28, 2005, 02:35:01 PM
After having played through chateu Irenicus, I'd have to say the Summons/NPCs Set Off Traps component is not compatible with this part of the game.

Especially not if you'd like to enjoy the improved Ilyich.
With the Summons/NPCs Set Off Traps Illyich and his entire hyped-up hitman crew will be gone the way of the Dodo long before you can get there to kill them all. No fun. Also, it means you can't retrieve the Acorns for the Dryads, OR get the Sword of Chaos from the djinn, because the Dryads won't want to interact with you when the acorns are all gone.

We had to restart the game; uninstalling the component wasn't enough.
But now Illyich and crew are dead once more.
The good kind of dead, that is, and our blade is wearing Illyichs mail to commemorate a difficult fight.

In conclusion; I'd advice Sim to add some kind of gameplay warning to the readme at Summons/NPCs Set Off Traps component in regards to chateu Irenicus, if nothing else.
Does it happen without improved Ilyich?
Title: Re: Ding0's Tweak Pack
Post by: Resonance on August 28, 2005, 02:44:16 PM
Haven't tried.
Title: Re: Ding0's Tweak Pack
Post by: Bursk on August 29, 2005, 05:30:50 AM
Sim, could you please take a look at this G3 thread:

http://forums.gibberlings3.net/index.php?showtopic=4397
Title: Re: Ding0's Tweak Pack
Post by: Resonance on August 29, 2005, 07:05:23 AM
Btw, Sim:

Supposing that you are about to have a new look at the Improved backstabbingcomponent (being one of the culprits mentioned in the linked thread, above), would you consider making backstabbing with axes possible, but with a multiplier penalty that you deem appropriate?
If you finally think it shouldn't be, plain and simple, ok.
I'm just a bit puzzled by the fact that quarterstaffs, flails and katanas can, when axes can't.
Title: Re: Ding0's Tweak Pack
Post by: SimDing0™ on August 29, 2005, 07:22:56 AM
Reduced Walking Speed has consistently proved a huge pain to get right. I'll try again for the next version. :)

I can't get this to work with nej2 or bp.   

[gnt2003.bcs] not found in KEY file rolling back to previous state

any way to make it compatible with big mods?
One of those is shipping with invalid or corrupt files. You'll have to pester the authors to fix that, because there's no easy solution at my end.

After having played through chateu Irenicus, I'd have to say the Summons/NPCs Set Off Traps component is not compatible with this part of the game.
This should only happen with Improved Ilyich. I assume the quests are impossible to complete because the items get disintegrated or something. I'll add an incompatibility note in the readme. (It might be possible to modify the Improved Ilyich AI to avoid the traps, but I'd really rather not spend that much time working with joke mods.) And yes, it should also note that uninstallation won't repair areas that have already been affected, sorry.

Sim, could you please take a look at this G3 thread:

http://forums.gibberlings3.net/index.php?showtopic=4397
Okay, Improved Backstabbing seems to cause the problem, although I can't actually see HOW. Fix should come soon, though.

Supposing that you are about to have a new look at the Improved backstabbingcomponent (being one of the culprits mentioned in the linked thread, above), would you consider making backstabbing with axes possible, but with a multiplier penalty that you deem appropriate?
If you finally think it shouldn't be, plain and simple, ok.
I'm just a bit puzzled by the fact that quarterstaffs, flails and katanas can, when axes can't.
The weapons that can backstab are the ones that are usable by single-class thieves. That's why the readme mentions Ashes of Embers: because it opens up the available backstabbing weapons.
Title: Re: Ding0's Tweak Pack
Post by: Resonance on August 29, 2005, 07:45:44 AM
The weapons that can backstab are the ones that are usable by single-class thieves. That's why the readme mentions Ashes of Embers: because it opens up the available backstabbing weapons.

Ok.
So, if I simply unistall the Improved backstabbing component, axes should be up and running for backstab again?
(Since I also have the AoE universal weapons installed)

Title: Re: Ding0's Tweak Pack
Post by: SimDing0™ on August 29, 2005, 07:49:26 AM
Uh. No, the Improved Backstabbing component shouldn't affect which weapons are actually able to backstab. It could be that your thief doesn't have a high enough modifier for backstabbing to actually make any difference with an axe.
(Incidentally, I don't think axes can backstab in vanilla BG2, but you say you have AoE installed, so.)
Title: Re: Ding0's Tweak Pack
Post by: the bigg on August 29, 2005, 08:06:35 AM
The error for improved backstab component is that D0's tweak pack doesn't update the extended header effect index table.

As an added bonus (consider it peace offer after edit wars at SHS's wiki  ;) ), here is a corrected code for the component (corrects this bug, and makes the component's code more expandable by using an external list):

Code: [Select]
COPY_EXISTING_REGEXP GLOB ~.*\.itm~ ~override~
PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN // protects against invalid files
  READ_SHORT 0x1c "itemtype"
  SPRINT itemtypestring ~%itemtype%~

  PATCH_IF FILE_CONTAINS_EVALUATED (~d0tweak/backstab.txt~ ~^%itemtypestring% ~) THEN BEGIN
READ_LONG 0x64 ext_off
READ_SHORT 0x68 ext_count
READ_SHORT 0x6e eq_eff_indx
    READ_SHORT 0x70 "#effects"
    READ_LONG 0x6a "effectsoffset"
    WRITE_SHORT 0x70 ("%#effects%" + 1)
    effectsoffset += eq_eff_indx * 0x30 // maybe an extended header's effects are before the equipped ones...
    INSERT_BYTES "%effectsoffset%" 48
    WRITE_SHORT "%effectsoffset%" 263
    WRITE_BYTE ("%effectsoffset%" + 2) 1
    WRITE_BYTE ("%effectsoffset%" + 12) 2
    WRITE_BYTE ("%effectsoffset%" + 18) 100

// update extended headers' effects index table
    FOR (ext_cyc = 0; ext_cyc < ext_count; ext_cyc += 1) BEGIN
      READ_SHORT (ext_off + (ext_cyc * 0x38) + 0x20) ext_eff_idx
  PATCH_IF (ext_eff_idx > eq_eff_indx) BEGIN
     WRITE_SHORT (ext_off + (ext_cyc * 0x38) + 0x20) ext_eff_idx + 1
  END
    END

    // read the penalty from the file
    INNER_PATCH_FILE ~d0tweak/backstab.txt~ BEGIN
      SET thisline = 999
      FOR (i = 0; thisline != itemtype; i+=1) BEGIN
        READ_2DA_ENTRY i 0 1 thisline
      END
      i -= 1
      READ_2DA_ENTRY i 1 1 penalty
    END // INNER_PATCH_FILE

PATCH_IF itemtype = 20 BEGIN
      READ_SHORT 0x31 "proficiency"
  PATCH_IF proficiency = 93 BEGIN
    SET penalty = 3
  END
END

    WRITE_LONG ("%effectsoffset%" + 4) 0 - penalty
  END // PATCH_IF the itemtype is in the list
END // PATCH_IF SOURCE_SIZE is good
BUT_ONLY_IF_IT_CHANGES

the file d0tweak/backstab.txt lists itemtype and penalty to be applied:
Code: [Select]
25 2
23 1
30 5
20 1
26 4
29 3
2-handed swords case is treated inside the tp2.
Title: Re: Ding0's Tweak Pack
Post by: Resonance on August 29, 2005, 08:10:35 AM
Uh. No, the Improved Backstabbing component shouldn't affect which weapons are actually able to backstab. It could be that your thief doesn't have a high enough modifier for backstabbing to actually make any difference with an axe.
(Incidentally, I don't think axes can backstab in vanilla BG2, but you say you have AoE installed, so.)

Hm. In that case, this is probably not the right thread for this subject; but just to round it off:
What happens when he tries to backstab with axes is that he doesn't get to backstab.
He simply gets his attack; wheras his shortsword easily backstabs in the range of 20-30 hits. Strange.

I see that bigg has already found a solution to the actual component problem! :applauds:  :D
(Not that I can make heads or tails of it, but hey!)
Title: Re: Ding0's Tweak Pack
Post by: the bigg on August 29, 2005, 08:15:05 AM
Quote
(Not that I  can make heads or tails of it, but hey!)
That's standard fare with all my posts involving tp2 |337.
Title: Re: Ding0's Tweak Pack
Post by: SimDing0™ on August 29, 2005, 08:28:46 AM
One of these days I'm gonna have to give up actually trying to code anything myself. :) Thanks! I'll include it in the new version which should be out soon. Full credit blah blah blah.
Title: Re: Ding0's Tweak Pack
Post by: Borsook on August 29, 2005, 08:55:53 AM
Uh. No, the Improved Backstabbing component shouldn't affect which weapons are actually able to backstab. It could be that your thief doesn't have a high enough modifier for backstabbing to actually make any difference with an axe.
(Incidentally, I don't think axes can backstab in vanilla BG2, but you say you have AoE installed, so.)

Hm. In that case, this is probably not the right thread for this subject; but just to round it off:
What happens when he tries to backstab with axes is that he doesn't get to backstab.
He simply gets his attack; wheras his shortsword easily backstabs in the range of 20-30 hits. Strange.

I see that bigg has already found a solution to the actual component problem! :applauds:  :D
(Not that I can make heads or tails of it, but hey!)
Well, 3e sneak attack (available in IWD1&2) assumes that when hitting from the side/behind you can better aim and hit more nevralgic part, 2e backstabbing assumes classic "knife between shoulder blades" (which BTW should kill all humans instead of extra damage) so slashing weapons cannot backstab. 2e approach may seem illogical, hell WOTC backed out of it in 3e, but that's how it was...
Title: Re: Ding0's Tweak Pack
Post by: Resonance on August 30, 2005, 04:47:47 AM
Sim,

another issue in regards to the reduced walking speed I've noticed is that after a haste spell has dissipated all the chars[edit: of the party] suddenly move as if under a slow spell.

This effect eventually passes, and could as such be supposed to be some intentional aftereffect of the strain of being hasted, but since it passes instantly if and when you save the game, I take it that this is, in fact, a bug. (?)

For now, we are using the reduced walking speed anyways, because it just seems to produce a more realistic looking speed, in general. But this buggy aftereffect might eventually force us to uninstall this component. Going down to ordinary speed when you'd rather not, is one thing, but the after-haste-slow might eventually prove lethal on the party, and as such hinder our gaming progress in a notfunny way. Any clues as to what this may be due?
Title: Re: Ding0's Tweak Pack
Post by: SimDing0™ on August 31, 2005, 06:33:03 AM
Okay, I can reproduce the slowing problem, but I really don't have any idea what causes it. Will investigate further.
Title: Re: Ding0's Tweak Pack
Post by: Resonance on August 31, 2005, 07:42:42 AM
much obliged.
No rush. ;)
Title: Re: Ding0's Tweak Pack
Post by: underdog on September 03, 2005, 06:11:37 PM
Just DL version 15, it says the latest one on your page is version 14, and when I try to install it I get this error.

[setup-d0tweak] WeiDU version 185

Choose your language:
 0 [English]
 1 [French (by Raphaël Mizrahi)]
 2 [Spanish (by Bhasbuto/Clan DLAN)]
 3 [Polish (by Damian Staniszewski)]
 4 [German (by Tanis Eichenblatt)]
ERROR: problem parsing TP file [SETUP-D0TWEAK.TP2]: Sys_error("d0tweak/english: Permission denied")

FATAL ERROR: Sys_error("d0tweak/english: Permission denied")

Press ENTER to exit.



Title: Re: Ding0's Tweak Pack
Post by: the bigg on September 03, 2005, 08:35:09 PM
http://forums.pocketplane.net/index.php/topic,20122.0.html
Title: Re: Ding0's Tweak Pack
Post by: n00ber on October 19, 2005, 04:59:13 PM
For some reason, I think that the "Corrected Summonned Demon Behaviour" isn't working as it should. Glabrezu attack Pit Fiends alright, but they also attack Nabassu, and even other Glabrezu. I don't think that's supposed to happen.

I have Oversight installed, but since it's actually recommended that this component is installed on top of the alignment correction of Oversight, I don't think that's the problem.

Nice mod, BTW.
Title: Re: Ding0's Tweak Pack
Post by: SimDing0™ on October 20, 2005, 11:11:57 AM
It should be coded so that Glabrezu will attack Nabassu and so on if nothing else is around (demons being fairly unpleasent creatures), but always favour attacking Pit Fiends. Perhaps some D&D person could provide some information on whether they would actually attack each other?
Title: Re: Ding0's Tweak Pack
Post by: Andyr on October 23, 2005, 10:18:04 AM
They'd attack Pit Fiends because Bit Fiends are Baatezu, while Glabrezu are Tanar'ri.

I don't think there are many other Devils in the game - Erinyes and Abishai spring to mind as possibilities.

Other than that I would tend to think that Tanar'ri summoned to the Prime would turn their destructive energies on mortals to promote Chaos instead of attacking each other.
Title: Re: Ding0's Tweak Pack
Post by: SimDing0™ on October 23, 2005, 10:21:37 AM
And if there's nothing else around?
Title: Re: Ding0's Tweak Pack
Post by: Caedwyr on October 23, 2005, 02:03:59 PM
Probably the strongest one would take control of the others.  I can see two equally powerful Tanar'ri going at it, but since these creatures can gate in more creatures, there wouldn't be nothing else around for long.  They are intelligent, and not just mindless killing machines.
Title: Re: Ding0's Tweak Pack
Post by: Andyr on October 23, 2005, 08:20:36 PM
And if there's nothing else around?

They'd walk around and find someone to start some shit with.
Title: Re: Ding0's Tweak Pack
Post by: Shard on November 09, 2005, 08:29:53 AM
Ding0 Tweaks rocks. I can't play without it anymore. It just makes so much sense.
My gratitude, Sim.
Title: Re: Ding0's Tweak Pack
Post by: pro5 on January 27, 2007, 10:03:52 PM
I wonder why Summoning Cap Removal only patches a predefined list of creatures instead of doing something like this:
Code: [Select]
COPY_EXISTING_REGEXP GLOB ~^.*\.CRE$~ ~override~
PATCH_IF SOURCE_SIZE > 0 BEGIN
 READ_BYTE 0x275 "cur"
 PATCH_IF ("%cur%" = 6) BEGIN
  WRITE_BYTE 0x275 20 // Change gender from SUMMONED
 END
END
BUT_ONLY_IF_IT_CHANGES

Does it cause any problems I'm not aware of?

It would make this tweak more compatible with mods which add new summoned/summonible creatures.
Title: Re: Ding0's Tweak Pack
Post by: SimDing0™ on January 28, 2007, 10:40:40 AM
The reason is one of two: either because I was concerned that some creatures might be erroneously flagged as summoned and wanted to exclude them (this is daft), or because the code predates READ_BYTE (this is more likely). Next release will fix.
Title: Re: Ding0's Tweak Pack
Post by: devSin on January 28, 2007, 02:33:44 PM
The reason is one of two: either because I was concerned that some creatures might be erroneously flagged as summoned and wanted to exclude them (this is daft), or because the code predates READ_BYTE (this is more likely). Next release will fix.
There actually are some enemy-only creatures that are flagged as summoned.
Title: Re: Ding0's Tweak Pack
Post by: pro5 on January 28, 2007, 04:14:53 PM
Going through all EFF and SPL files also may be a good idea. By the way - there are four SPL files affected by this in unmodded game, not just two (I didn't bother to check if they're actually used anywhere).

Code: [Select]
COPY_EXISTING_REGEXP GLOB ~^.*\.EFF$~ ~OVERRIDE~
READ_LONG 0x10 "opcode"
PATCH_IF (("%opcode%" = 219) // Attack roll penalty
OR ("%opcode%" = 72) // Change AI type
OR ("%opcode%" = 179) // Damage vs type bonus
OR ("%opcode%" = 238) // Disintegrate
OR ("%opcode%" = 175) // Hold creature
OR ("%opcode%" = 185) // Hold creature 2
OR ("%opcode%" = 248) // Melee hit effect
OR ("%opcode%" = 109) // Paralyze
OR ("%opcode%" = 100) // Protection from creature type
OR ("%opcode%" = 249) // Ranged hit effect
OR ("%opcode%" = 55) // Slay
OR ("%opcode%" = 178) // THAC0 vs type bonus
OR ("%opcode%" = 177) // Use EFF file
OR ("%opcode%" = 283) // Use EFF file as curse
) THEN BEGIN
READ_LONG 0x20 "IDS_file"
READ_LONG 0x1c "IDS_entry"
PATCH_IF (("%IDS_file%" = 7) AND ("%IDS_entry%" = 6))  // if IDS target = "Gender.ids/SUMMONED"
THEN BEGIN
WRITE_LONG 0x1c 20
END
END ELSE
PATCH_IF ("%opcode%" = 71) // Sex change
THEN BEGIN
READ_LONG 0x1c "IDS_entry"
PATCH_IF ("%IDS_entry%" = 6)
THEN BEGIN
WRITE_LONG 0x1c 20
END
END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING_REGEXP GLOB ~^.*\.SPL$~ ~override~
  READ_LONG  0x64 "abil_off" ELSE 0
  READ_SHORT 0x68 "abil_num" ELSE 0
  READ_LONG  0x6a "fx_off"   ELSE 0
  FOR (index = 0 ; index < abil_num ; index = index + 1) BEGIN
    READ_SHORT ("%abil_off%" + 0x1e + (0x28 * "%index%")) "abil_fx_num"
    READ_SHORT ("%abil_off%" + 0x20 + (0x28 * "%index%")) "abil_fx_idx"
    FOR (index2 = 0 ; index2 < abil_fx_num ; index2 = index2 + 1) BEGIN
      READ_SHORT ("%fx_off%" +        (("%abil_fx_idx%" + "%index2%") * 0x30)) "opcode"
      PATCH_IF (("%opcode%" = 219) // Attack roll penalty
OR ("%opcode%" = 72) // Change AI type
OR ("%opcode%" = 179) // Damage vs type bonus
OR ("%opcode%" = 238) // Disintegrate
OR ("%opcode%" = 175) // Hold creature
OR ("%opcode%" = 185) // Hold creature 2
OR ("%opcode%" = 248) // Melee hit effect
OR ("%opcode%" = 109) // Paralyze
OR ("%opcode%" = 100) // Protection from creature type
OR ("%opcode%" = 249) // Ranged hit effect
OR ("%opcode%" = 55) // Slay
OR ("%opcode%" = 178) // THAC0 vs type bonus
OR ("%opcode%" = 177) // Use EFF file
OR ("%opcode%" = 283) // Use EFF file as curse     
      ) THEN BEGIN
READ_LONG ("%fx_off%" + 0x08 + (("%abil_fx_idx%" + "%index2%") * 0x30)) "IDS_file"
READ_LONG ("%fx_off%" + 0x04 + (("%abil_fx_idx%" + "%index2%") * 0x30)) "IDS_entry"
PATCH_IF (("%IDS_file%" = 7) AND ("%IDS_entry%" = 6))  // if IDS target = "Gender.ids/SUMMONED"
THEN BEGIN
WRITE_LONG ("%fx_off%" + 0x04 + (("%abil_fx_idx%" + "%index2%") * 0x30)) 20
END
      END ELSE
  PATCH_IF ("%opcode%" = 71) // Sex change
  THEN BEGIN
  READ_LONG ("%fx_off%" + 0x04 + (("%abil_fx_idx%" + "%index2%") * 0x30)) "IDS_entry"
  PATCH_IF ("%IDS_entry%" = 6)
  THEN BEGIN
  WRITE_LONG ("%fx_off%" + 0x04 + (("%abil_fx_idx%" + "%index2%") * 0x30)) 20
  END
  END
    END   
  END
BUT_ONLY_IF_IT_CHANGES

EDIT:
P.S. Of course, then we also have effects in ITM files... I'm sure you get the idea. :)
Title: Re: Ding0's Tweak Pack
Post by: SimDing0™ on January 28, 2007, 09:13:41 PM
Usual disclaimer applies: All this stuff didn't exist back in mid-2002 or whenever D0Tweak first originated, and I'm really, really lazy. Thanks for the code, though--consider it incorporated into the next version. I'm increasingly appreciating that I don't seem to have to even write my own mods any more. :)
Title: Re: Ding0's Tweak Pack
Post by: lac on February 16, 2007, 07:02:08 AM
I have been playing a Cleric-Thief recently, through BG1 and now in BG2.  Assuming that you find the concept of sneaking around and thumping people with a great big quarterstaff so unlikely as to be unwilling to exploit the fact that the game allows it,  there exists in BG1 only one useful weapon  for a cleric-thief, the staff-mace +2 (which
is available on Werewolf Island in TotSC).  For vanilla BG: nothing.    No magical clubs.  I wonder if staff-maces are treated differently by your changed
backstab modifiers,, or if they suffer the same penalty as regular quarterstaves?

curious,
lac
Title: Re: Ding0's Tweak Pack
Post by: DanielZK on May 21, 2007, 07:57:07 PM
Whenever i try extracting the remove summon cap, there is a parsing error. Help!
Title: Re: Ding0's Tweak Pack
Post by: Salk on May 22, 2007, 11:05:37 AM
DanielZK, do you have Big Picture installed ?
Title: Re: Ding0's Tweak Pack
Post by: John on August 04, 2007, 10:45:05 PM
How does one remove the Innate Drow Abilities component of the Tweak Pack?  I would like to be able to use the general creature and area improvements.  I've installed Ver 2.3

 It used to be a stand alone mod that I could add for a particular game.  I enjoy it occasionally but not all the time.

Also, I don't know if this mod is the cause, but there are now two elder orb beholders in the beholder cave in the Underdark that give the eyestalk, the sword artifact and the spell amulet.

Thanks,

John
Title: Re: Ding0's Tweak Pack v20
Post by: lac on September 18, 2008, 09:12:19 AM
I just installed the Tweak Pack on a BG Tutu installation.

The readme mentions 'Greyfain's BG1-style summoning' as being BG Tutu compatible, but it wasn't in the archive
I downloaded.  Also, it was possible to install the Visual Ioun Stones, but the readme doesn't indicate if this is a
sensible idea for BG1 Tutu or not, nor whether it has been tested and found to work.  I dont anticipate running into
any Ioun Stones playing BG1, but then I have just dl'ed a bunch of mods I have never played, nor even heard about.  :)
So for all I know I am about to run into Ioun stones all over the place.

Thank you very much for the mod by the way. 
Title: Re: Ding0's Tweak Pack
Post by: Keiran Halycon on November 28, 2008, 08:25:04 PM
I noticed the same issue.  I got the component to be installable by blanking lines 826 and 1229 of setup-d0tweak.tp2 (the first for the summoning cap alone, the second for the bg1-style summons), but I'm not sure yet if there are any real incompatibilities that I haven't noticed yet.  In my brief testing, it seems to work fine, with the following exception: the wand of monster summoning gives me the message "You cannot control more than 5 monsters at any given time" and creates 5 creatures (regardless of how many I already have).  Based on the description (12 HD of creatures), and based on the effect of Monster Summoning II (also 12 HD of creatures, summons 6 creatures when used), I think it's trying to spawn 6 creatures, but something is still left of the summoning cap and is stopping it.
Title: Re: Ding0's Tweak Pack
Post by: rhomboidspace on February 10, 2009, 08:41:40 AM
found a small bug with the remove summoning cap marco of V20, in the item effect check of sex change, uses %index2%, instead of %index%,  easy fix,  just a demon from copy/pasting code.
Title: Re: Ding0's Tweak Pack
Post by: Dirty Uncle Bertie on February 10, 2009, 11:35:59 AM
Are you able to upload a fixed file somewhere, rhomboidspace?  That would be a big help.
Title: Re: Ding0's Tweak Pack
Post by: rhomboidspace on February 12, 2009, 12:45:05 PM
Code: [Select]
BACKUP ~d0tweak/backup~
AUTHOR ~SimDing0@hotmail.com~

ALLOW_MISSING
  ~OGRESU.CRE~
  ~JAGUARSU.CRE~
  ~CATLIOWP.CRE~
  ~SWAAIR01.CRE~
  ~SWAAIR02.CRE~   
  ~DAUMBER.CRE~   
  ~BEARBRSU.CRE~
  ~BEARGRSU.CRE~
  ~BEARBLSU.CRE~
  ~GHOULSU.CRE~
  ~C6GUEN.CRE~   
  ~UDDOOR07.CRE~   
  ~SUMTAN01.CRE~   
  ~SUMTAN02.CRE~   
  ~TELICESA.CRE~   
  ~SAHANGU.CRE~   
  ~SKELWASU.CRE~   
  ~TOMEGOL1.CRE~   
  ~TOMEGOL2.CRE~   
  ~TOMEGOL3.CRE~   
  ~TOMEGOL4.CRE~   
  ~ELFIRSU1.CRE~   
  ~ELFIRSU2.CRE~   
  ~ELFIRSU3.CRE~   
  ~ELFIRSU4.CRE~   
  ~SERVSU.CRE~   
  ~ELFIRSUW.CRE~   
  ~TELICESA.CRE~   
  ~SPIDSWSU.CRE~   
  ~BERSERSU.CRE~   
  ~ELFIRPR.CRE~   
  ~WOLFDISU.CRE~   
  ~ELFIRSU.CRE~   
  ~ELAIRSU1.CRE~   
  ~ELAIRSU2.CRE~   
  ~ELAIRSU3.CRE~   
  ~OGREMASU.CRE~   
  ~ELAIRSUW.CRE~   
  ~SWAFIR01.CRE~   
  ~SWAFIR02.CRE~   
  ~SAHLACE.CRE~
  ~HAMASU.CRE~   
  ~DOGWISU.CRE~   
  ~SPIDPHSU.CRE~   
  ~SUMEFREE.CRE~
  ~SENSTALK.CRE~   
  ~RABBITSU.CRE~   
  ~SMOUNDSU.CRE~   
  ~SPIRLION.CRE~   
  ~GIBBERSU.CRE~   
  ~ELEARSU1.CRE~   
  ~ELEARSU2.CRE~   
  ~ELEARSU3.CRE~   
  ~ELEARSU4.CRE~   
  ~ELEARSUW.CRE~   
  ~GLOBSHAM.CRE~   
  ~STALKE.CRE~   
  ~CARRIOSU.CRE~   
  ~ELFIRPR2.CRE~   
  ~ELFIRPR3.CRE~   
  ~DRUFIR01.CRE~   
  ~TASLOISU.CRE~   
  ~GORMISTP.CRE~   
  ~DAGNOLL.CRE~   
  ~MOONDOG.CRE~   
  ~BEARCASU.CRE~   
  ~WOLFSU.CRE~   
  ~WRAITHSU.CRE~   
  ~DOGWASU.CRE~   
  ~BASILGSU.CRE~   
  ~MISTPO01.CRE~   
  ~DOGWAWP.CRE~   
  ~HOBGOBSU.CRE~
  ~SPIRBEAR.CRE~   
  ~SUMELEAR.CRE~   
  ~WYVERNSU.CRE~   
  ~SWORD01.CRE~   
  ~GNOLLSU.CRE~   
  ~BASILLSU.CRE~   
  ~WOLFWISU.CRE~   
  ~ELEARPR.CRE~   
  ~SPIRSNAK.CRE~   
  ~SPIRWOLF.CRE~   
  ~CATJAGSU.CRE~   
  ~NISHRUSU.CRE~   
  ~WOLFWWSU.CRE~   
  ~TELELFIR.CRE~   
  ~SAHSKEL.CRE~   
  ~CATJAGWP.CRE~   
  ~SWAEAR01.CRE~   
  ~SWAEAR02.CRE~   
  ~GHASTGSU.CRE~   
  ~ELEARPR2.CRE~   
  ~ELEARPR3.CRE~   
  ~GHASTSU.CRE~   
  ~WISH02.CRE~   
  ~SHADOWSU.CRE~   
  ~SUMELAIR.CRE~   
  ~HAKSU.CRE~   
  ~GPSKEL1.CRE~   
  ~DECKFELE.CRE~   
  ~DJINNISU.CRE~   
  ~OGREGRSU.CRE~   
  ~JELLMUSU.CRE~   
  ~SUMELFIR.CRE~   
  ~NYMPHSU.CRE~   
  ~OGRELESU.CRE~   
  ~EFREETSU.CRE~   
  ~SAHZOMB.CRE~   
  ~SPIDGISU.CRE~   
  ~BERSER02.CRE~   
  ~BERSER03.CRE~   
  ~BEARPOSU.CRE~   
  ~DRUEAR01.CRE~   
  ~KOBOLDSU.CRE~   
  ~CATLIOSU.CRE~   
  ~ETTERCSU.CRE~   
  ~SUMDJINN.CRE~   
  ~SWORD02.CRE~   
  ~WORGSU.CRE~
  ~XVARTSU.CRE~

ALWAYS

  COPY_EXISTING_REGEXP GLOB ~^anomen[0-9]*\.cre~ ~override~
                            ~^imoen[0-9]*\.cre~  ~override~
                            ~^mazzy[0-9]*\.cre~  ~override~
   READ_LONG 0x244 "current_kit_value"
   PATCH_IF ("%current_kit_value%" = 0x00000000) BEGIN
     WRITE_LONG 0x244 0x40000000
   END
  BUT_ONLY_IF_IT_CHANGES

  COPY_EXISTING_REGEXP GLOB ~^haer[0-9]*\.cre~ ~override~
   READ_LONG 0x244 "current_kit_value"
   PATCH_IF ("%current_kit_value%" = 0x00000020) BEGIN
     WRITE_LONG 0x244 0x400d0000
   END
  BUT_ONLY_IF_IT_CHANGES

  COPY_EXISTING_REGEXP GLOB ~^korgan[0-9]*\.cre~ ~override~
   READ_LONG 0x244 "current_kit_value"
   PATCH_IF ("%current_kit_value%" = 0x00010000) BEGIN
     WRITE_LONG 0x244 0x40010000
   END
  BUT_ONLY_IF_IT_CHANGES

  COPY_EXISTING ~spell.ids~ ~override~
REPLACE_TEXTUALLY ~PSIONIC _SUPERIOR_INVISIBILITY~ ~PSIONIC_SUPERIOR_INVISIBILITY~
  BUT_ONLY_IF_IT_CHANGES

  COPY_EXISTING ~kit.ids~ ~override~
    REPLACE_TEXTUALLY ~.*\bTRUECLASS\b~              ~0x4000 TRUECLASS~
    REPLACE_TEXTUALLY ~.*\bBERSERKER\b~              ~0x4001 BERSERKER~
    REPLACE_TEXTUALLY ~.*\bWIZARDSLAYER\b~           ~0x4002 WIZARDSLAYER~
    REPLACE_TEXTUALLY ~.*\bKENSAI\b~                 ~0x4003 KENSAI~
    REPLACE_TEXTUALLY ~.*\bCAVALIER\b~               ~0x4004 CAVALIER~
    REPLACE_TEXTUALLY ~.*\bINQUISITOR\b~             ~0x4005 INQUISITOR~
    REPLACE_TEXTUALLY ~.*\bUNDEADHUNTER\b~           ~0x4006 UNDEADHUNTER~
    REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_ABJURER\b~     ~0x0040 MAGESCHOOL_ABJURER~
    REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_CONJURER\b~    ~0x0080 MAGESCHOOL_CONJURER~
    REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_DIVINER\b~     ~0x0100 MAGESCHOOL_DIVINER~
    REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_ENCHANTER\b~   ~0x0200 MAGESCHOOL_ENCHANTER~
    REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_ILLUSIONIST\b~ ~0x0400 MAGESCHOOL_ILLUSIONIST~
    REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_INVOKER\b~     ~0x0800 MAGESCHOOL_INVOKER~
    REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_NECROMANCER\b~ ~0x1000 MAGESCHOOL_NECROMANCER~
    REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_TRANSMUTER\b~  ~0x2000 MAGESCHOOL_TRANSMUTER~
    REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_GENERALIST\b~  ~0x0000 WILDMAGE~
    REPLACE_TEXTUALLY ~.*\bFERALAN\b~                ~0x4007 FERALAN~
    REPLACE_TEXTUALLY ~.*\bSTALKER\b~                ~0x4008 STALKER~
    REPLACE_TEXTUALLY ~.*\bBEASTMASTER\b~            ~0x4009 BEASTMASTER~
    REPLACE_TEXTUALLY ~.*\bASSASIN\b~                ~0x400A ASSASIN~
    REPLACE_TEXTUALLY ~.*\bBOUNTYHUNTER\b~           ~0x400B BOUNTYHUNTER~
    REPLACE_TEXTUALLY ~.*\bSWASHBUCKLER\b~           ~0x400C SWASHBUCKLER~
    REPLACE_TEXTUALLY ~.*\bBLADE\b~                  ~0x400D BLADE~
    REPLACE_TEXTUALLY ~.*\bJESTER\b~                 ~0x400E JESTER~
    REPLACE_TEXTUALLY ~.*\bSKALD\b~                  ~0x400F SKALD~
    REPLACE_TEXTUALLY ~.*\bGODTALOS\b~               ~0x4013 GODTALOS~
    REPLACE_TEXTUALLY ~.*\bGODHELM\b~                ~0x4014 GODHELM~
    REPLACE_TEXTUALLY ~.*\bGODLATHANDER\b~           ~0x4015 GODLATHANDER~
    REPLACE_TEXTUALLY ~.*\bTOTEMIC\b~                ~0x4010 TOTEMIC~
    REPLACE_TEXTUALLY ~.*\bSHAPESHIFTER\b~           ~0x4011 SHAPESHIFTER~
    REPLACE_TEXTUALLY ~.*\bBEASTFRIEND\b~            ~0x4012 BEASTFRIEND~
    REPLACE_TEXTUALLY ~.*\bBARBARIAN\b~              ~0x0000 BARBARIAN~
    REPLACE_TEXTUALLY ~.*\bWILDMAGE\b~               ~0x0000 WILDMAGE~
  BUT_ONLY_IF_IT_CHANGES

  APPEND ~kit.ids~ ~0x4000 TRUECLASS~
    UNLESS ~\bTRUECLASS\b~
  APPEND ~kit.ids~ ~0x0000 BARBARIAN~
    UNLESS ~\bBARBARIAN\b~
  APPEND ~kit.ids~ ~0x0000 WILDMAGE~
    UNLESS ~\bWILDMAGE\b~

  APPEND ~state.ids~ ~0x00000FC0 STATE_REALLY_DEAD~ UNLESS ~STATE_REALLY_DEAD~

  APPEND ~ACTION.IDS~
    ~31 SpellRES(S:RES*,O:Target*)~
    UNLESS ~31 SpellRES(S:RES*,O:Target*)~
  APPEND ~ACTION.IDS~
    ~95 SpellPointRES(S:RES*,P:Target*)~
    UNLESS ~95 SpellPointRES(S:RES*,P:Target*)~
  APPEND ~ACTION.IDS~
    ~113 ForceSpellRES(S:RES*,O:Target)~
    UNLESS ~113 ForceSpellRES(S:RES*,O:Target)~
  APPEND ~ACTION.IDS~
    ~114 ForceSpellPointRES(S:RES*,P:Target)~
    UNLESS ~114 ForceSpellPointRES(S:RES*,P:Target)~
  APPEND ~ACTION.IDS~
    ~160 ApplySpellRES(S:RES*,O:Target)~
    UNLESS ~160 ApplySpellRES(S:RES*,O:Target)~
  APPEND ~ACTION.IDS~
    ~181 ReallyForceSpellRES(S:RES*,O:Target)~
    UNLESS ~181 ReallyForceSpellRES(S:RES*,O:Target)~
  APPEND ~ACTION.IDS~
    ~191 SpellNoDecRES(S:RES*,O:Target*)~
    UNLESS ~191 SpellNoDecRES(S:RES*,O:Target*)~
  APPEND ~ACTION.IDS~
    ~192 SpellPointNoDecRES(S:RES*,P:Target*)~
    UNLESS ~192 SpellPointNoDecRES(S:RES*,P:Target*)~
  APPEND ~ACTION.IDS~
    ~240 ReallyForceSpellDeadRES(S:RES*,O:Target)~
    UNLESS ~240 ReallyForceSpellDeadRES(S:RES*,O:Target)~
  APPEND ~ACTION.IDS~
    ~318 ForceSpellRangeRES(S:RES*,O:Target)~
    UNLESS ~318 ForceSpellRangeRES(S:RES*,O:Target)~
  APPEND ~ACTION.IDS~
    ~319 ForceSpellPointRangeRES(S:RES*,P:Target)~
    UNLESS ~319 ForceSpellPointRangeRES(S:RES*,P:Target)~
  APPEND ~ACTION.IDS~
    ~337 ReallyForceSpellPointRES(S:RES*,P:Target*)~
    UNLESS ~337 ReallyForceSpellPointRES(S:RES*,P:Target*)~
  APPEND ~TRIGGER.IDS~
    ~0x4031 HaveSpellRES(S:Spell*)~
    UNLESS ~0x4031 HaveSpellRES(S:Spell*)~

  APPEND ~ACTION.IDS~
    ~335 SetTokenGlobal(S:GLOBAL*,S:Area*,S:Token*)~
    UNLESS ~335 SetTokenGlobal(S:GLOBAL*,S:Area*,S:Token*)~

  APPEND ~CLASS.IDS~
    ~202 LONG_BOW~
    UNLESS ~202 LONG_BOW~
  APPEND ~CLASS.IDS~
    ~202 MAGE_ALL~
    UNLESS ~202 MAGE_ALL~

  COPY_EXISTING ~race.ids~ ~override~
    REPLACE_TEXTUALLY ~^149 +SHADOW\b~ ~149 STATUE~
  BUT_ONLY_IF_IT_CHANGES

  CLEAR_IDS_MAP

END

README ~d0tweak/readme.htm~

DEFINE_ACTION_MACRO ~REMOVE_SUMMONING_CAP~ BEGIN

ACTION_IF NOT FILE_EXISTS ~override/No_Summoning_Cap.d0~ THEN BEGIN

COPY ~d0tweak/dummy.d0~ ~override/No_Summoning_Cap.d0~

COPY_EXISTING_REGEXP GLOB ~^.*\.CRE$~ ~override~
PATCH_IF SOURCE_SIZE > 0 BEGIN
 READ_BYTE 0x275 "cur"
 PATCH_IF ("%cur%" = 6) BEGIN
  WRITE_BYTE 0x275 20 // Change gender from SUMMONED
 END
END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING_REGEXP GLOB ~^.*\.EFF$~ ~OVERRIDE~
READ_LONG 0x10 "opcode"
PATCH_IF (("%opcode%" = 219) // Attack roll penalty
OR ("%opcode%" = 72) // Change AI type
OR ("%opcode%" = 179) // Damage vs type bonus
OR ("%opcode%" = 238) // Disintegrate
OR ("%opcode%" = 175) // Hold creature
OR ("%opcode%" = 185) // Hold creature 2
OR ("%opcode%" = 248) // Melee hit effect
OR ("%opcode%" = 109) // Paralyze
OR ("%opcode%" = 100) // Protection from creature type
OR ("%opcode%" = 249) // Ranged hit effect
OR ("%opcode%" = 55) // Slay
OR ("%opcode%" = 178) // THAC0 vs type bonus
OR ("%opcode%" = 177) // Use EFF file
OR ("%opcode%" = 283) // Use EFF file as curse
) THEN BEGIN
READ_LONG 0x20 "IDS_file"
READ_LONG 0x1c "IDS_entry"
PATCH_IF (("%IDS_file%" = 7) AND ("%IDS_entry%" = 6))  // if IDS target = "Gender.ids/SUMMONED"
THEN BEGIN
WRITE_LONG 0x1c 20
END
END ELSE
PATCH_IF ("%opcode%" = 71) // Sex change
THEN BEGIN
READ_LONG 0x1c "IDS_entry"
PATCH_IF ("%IDS_entry%" = 6)
THEN BEGIN
WRITE_LONG 0x1c 20
END
END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING_REGEXP GLOB ~^.*\.SPL$~ ~override~
  READ_LONG  0x64 "abil_off" ELSE 0
  READ_SHORT 0x68 "abil_num" ELSE 0
  READ_LONG  0x6a "fx_off"   ELSE 0
  FOR (index = 0 ; index < abil_num ; index = index + 1) BEGIN
    READ_SHORT ("%abil_off%" + 0x1e + (0x28 * "%index%")) "abil_fx_num"
    READ_SHORT ("%abil_off%" + 0x20 + (0x28 * "%index%")) "abil_fx_idx"
    FOR (index2 = 0 ; index2 < abil_fx_num ; index2 = index2 + 1) BEGIN
      READ_SHORT ("%fx_off%" +        (("%abil_fx_idx%" + "%index2%") * 0x30)) "opcode"
      PATCH_IF (("%opcode%" = 219) // Attack roll penalty
OR ("%opcode%" = 72) // Change AI type
OR ("%opcode%" = 179) // Damage vs type bonus
OR ("%opcode%" = 238) // Disintegrate
OR ("%opcode%" = 175) // Hold creature
OR ("%opcode%" = 185) // Hold creature 2
OR ("%opcode%" = 248) // Melee hit effect
OR ("%opcode%" = 109) // Paralyze
OR ("%opcode%" = 100) // Protection from creature type
OR ("%opcode%" = 249) // Ranged hit effect
OR ("%opcode%" = 55) // Slay
OR ("%opcode%" = 178) // THAC0 vs type bonus
OR ("%opcode%" = 177) // Use EFF file
OR ("%opcode%" = 283) // Use EFF file as curse
      ) THEN BEGIN
READ_LONG ("%fx_off%" + 0x08 + (("%abil_fx_idx%" + "%index2%") * 0x30)) "IDS_file"
READ_LONG ("%fx_off%" + 0x04 + (("%abil_fx_idx%" + "%index2%") * 0x30)) "IDS_entry"
PATCH_IF (("%IDS_file%" = 7) AND ("%IDS_entry%" = 6))  // if IDS target = "Gender.ids/SUMMONED"
THEN BEGIN
WRITE_LONG ("%fx_off%" + 0x04 + (("%abil_fx_idx%" + "%index2%") * 0x30)) 20
END
      END ELSE
  PATCH_IF ("%opcode%" = 71) // Sex change
  THEN BEGIN
  READ_LONG ("%fx_off%" + 0x04 + (("%abil_fx_idx%" + "%index2%") * 0x30)) "IDS_entry"
  PATCH_IF ("%IDS_entry%" = 6)
  THEN BEGIN
  WRITE_LONG ("%fx_off%" + 0x04 + (("%abil_fx_idx%" + "%index2%") * 0x30)) 20
  END
  END
    END
  END
  READ_SHORT 0x70 "global_fx_num" ELSE 0
  FOR (index = 0 ; index < global_fx_num ; index = index + 1) BEGIN
    READ_SHORT ("%fx_off%" + ("%index%" * 0x30)) "opcode"
    PATCH_IF (("%opcode%" = 219) // Attack roll penalty
  OR ("%opcode%" = 72) // Change AI type
  OR ("%opcode%" = 179) // Damage vs type bonus
  OR ("%opcode%" = 238) // Disintegrate
  OR ("%opcode%" = 175) // Hold creature
  OR ("%opcode%" = 185) // Hold creature 2
  OR ("%opcode%" = 248) // Melee hit effect
  OR ("%opcode%" = 109) // Paralyze
  OR ("%opcode%" = 100) // Protection from creature type
  OR ("%opcode%" = 249) // Ranged hit effect
  OR ("%opcode%" = 55) // Slay
  OR ("%opcode%" = 178) // THAC0 vs type bonus
  OR ("%opcode%" = 177) // Use EFF file
  OR ("%opcode%" = 283) // Use EFF file as curse
    ) THEN BEGIN
READ_LONG ("%fx_off%" + 0x08 + ("%index%" * 0x30)) "IDS_file"
READ_LONG ("%fx_off%" + 0x04 + ("%index%" * 0x30)) "IDS_entry"
PATCH_IF (("%IDS_file%" = 7) AND ("%IDS_entry%" = 6))  // if IDS target = "Gender.ids/SUMMONED"
THEN BEGIN
  WRITE_LONG ("%fx_off%" + 0x04 + ("%index%" * 0x30)) 20
END
    END ELSE
PATCH_IF ("%opcode%" = 71) // Sex change
THEN BEGIN
  READ_LONG ("%fx_off%" + 0x04 + ("%index2%" * 0x30)) "IDS_entry"
  PATCH_IF ("%IDS_entry%" = 6)
  THEN BEGIN
    WRITE_LONG ("%fx_off%" + 0x04 + ("%index2%" * 0x30)) 20
  END
END
  END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING_REGEXP GLOB ~^.*\.ITM$~ ~override~
READ_LONG  0x64 "abil_off" ELSE 0
READ_SHORT 0x68 "abil_num" ELSE 0
READ_LONG  0x6a "fx_off"   ELSE 0
FOR (index = 0 ; index < abil_num ; index = index + 1) BEGIN
READ_SHORT ("%abil_off%" + 0x1e + (0x38 * "%index%")) "abil_fx_num"
READ_SHORT ("%abil_off%" + 0x20 + (0x38 * "%index%")) "abil_fx_idx"
FOR (index2 = 0 ; index2 < abil_fx_num ; index2 = index2 + 1) BEGIN
READ_SHORT ("%fx_off%" + (("%abil_fx_idx%" + "%index2%") * 0x30)) "opcode"
PATCH_IF (("%opcode%" = 219) // Attack roll penalty
  OR ("%opcode%" = 72) // Change AI type
  OR ("%opcode%" = 179) // Damage vs type bonus
  OR ("%opcode%" = 238) // Disintegrate
  OR ("%opcode%" = 175) // Hold creature
  OR ("%opcode%" = 185) // Hold creature 2
  OR ("%opcode%" = 248) // Melee hit effect
  OR ("%opcode%" = 109) // Paralyze
  OR ("%opcode%" = 100) // Protection from creature type
  OR ("%opcode%" = 249) // Ranged hit effect
  OR ("%opcode%" = 55) // Slay
  OR ("%opcode%" = 178) // THAC0 vs type bonus
  OR ("%opcode%" = 177) // Use EFF file
  OR ("%opcode%" = 283) // Use EFF file as curse
) THEN BEGIN
READ_LONG ("%fx_off%" + 0x08 + (("%abil_fx_idx%" + "%index2%") * 0x30)) "IDS_file"
READ_LONG ("%fx_off%" + 0x04 + (("%abil_fx_idx%" + "%index2%") * 0x30)) "IDS_entry"
PATCH_IF (("%IDS_file%" = 7) AND ("%IDS_entry%" = 6))  // if IDS target = "Gender.ids/SUMMONED"
THEN BEGIN
WRITE_LONG ("%fx_off%" + 0x04 + (("%abil_fx_idx%" + "%index2%") * 0x30)) 20
END
END ELSE
PATCH_IF ("%opcode%" = 71) // Sex change
THEN BEGIN
READ_LONG ("%fx_off%" + 0x04 + (("%abil_fx_idx%" + "%index2%") * 0x30)) "IDS_entry"
PATCH_IF ("%IDS_entry%" = 6)
THEN BEGIN
WRITE_LONG ("%fx_off%" + 0x04 + (("%abil_fx_idx%" + "%index2%") * 0x30)) 20
END
END
END
END
  READ_SHORT 0x70 "global_fx_num" ELSE 0
  FOR (index = 0 ; index < global_fx_num ; index = index + 1) BEGIN
    READ_SHORT ("%fx_off%" + ("%index%" * 0x30)) "opcode"
    PATCH_IF (("%opcode%" = 219) // Attack roll penalty
  OR ("%opcode%" = 72) // Change AI type
  OR ("%opcode%" = 179) // Damage vs type bonus
  OR ("%opcode%" = 238) // Disintegrate
  OR ("%opcode%" = 175) // Hold creature
  OR ("%opcode%" = 185) // Hold creature 2
  OR ("%opcode%" = 248) // Melee hit effect
  OR ("%opcode%" = 109) // Paralyze
  OR ("%opcode%" = 100) // Protection from creature type
  OR ("%opcode%" = 249) // Ranged hit effect
  OR ("%opcode%" = 55) // Slay
  OR ("%opcode%" = 178) // THAC0 vs type bonus
  OR ("%opcode%" = 177) // Use EFF file
  OR ("%opcode%" = 283) // Use EFF file as curse
    ) THEN BEGIN
READ_LONG ("%fx_off%" + 0x08 + ("%index%" * 0x30)) "IDS_file"
READ_LONG ("%fx_off%" + 0x04 + ("%index%" * 0x30)) "IDS_entry"
PATCH_IF (("%IDS_file%" = 7) AND ("%IDS_entry%" = 6))  // if IDS target = "Gender.ids/SUMMONED"
THEN BEGIN
  WRITE_LONG ("%fx_off%" + 0x04 + ("%index%" * 0x30)) 20
END
    END ELSE
PATCH_IF ("%opcode%" = 71) // Sex change
THEN BEGIN
  READ_LONG ("%fx_off%" + 0x04 + ("%index%" * 0x30)) "IDS_entry"
  PATCH_IF ("%IDS_entry%" = 6)
  THEN BEGIN
    WRITE_LONG ("%fx_off%" + 0x04 + ("%index%" * 0x30)) 20
  END
END
  END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~kit.ids~ ~override~
REPLACE_TEXTUALLY ~0X401F~ ~0x401F~
BUT_ONLY_IF_IT_CHANGES
ACTION_IF NOT FILE_EXISTS ~override/ar2812.bcs~
THEN BEGIN
COPY ~d0tweak/d0tweak.bcs~ ~override/ar2812.bcs~
END
ACTION_IF FILE_EXISTS ~override/cm7000.bcs~
THEN BEGIN
EXTEND_TOP ~cm7000.bcs~ ~d0tweak/d0tweak.bcs~
END
COPY ~d0tweak/d0tweak.bcs~ ~override/rdog.bcs~
COPY ~d0tweak/d0tweak.bcs~ ~override/rdwarf.bcs~
COPY ~d0tweak/d0tweak.bcs~ ~override/retter.bcs~
COPY ~d0tweak/d0tweak.bcs~ ~override/rgibbler.bcs~
COPY ~d0tweak/d0tweak.bcs~ ~override/rhalflin.bcs~
COPY ~d0tweak/d0tweak.bcs~ ~override/rhobgoba.bcs~
COPY ~d0tweak/d0tweak.bcs~ ~override/rhobgobf.bcs~
COPY ~d0tweak/d0tweak.bcs~ ~override/rkobold.bcs~
COPY ~d0tweak/d0tweak.bcs~ ~override/rogre.bcs~
COPY ~d0tweak/d0tweak.bcs~ ~override/rsiren.bcs~
COPY ~d0tweak/d0tweak.bcs~ ~override/rsirine.bcs~

COPY_EXISTING_REGEXP GLOB ~.*\.bcs~ ~override~
PATCH_SILENT
PATCH_IF (SOURCE_SIZE > 0) THEN BEGIN // protects against invalid files
DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY ~SUMMONED)~ ~20)~
REPLACE_TEXTUALLY ~\.SUMMONED\.~ ~.20.~
REPLACE_TEXTUALLY ~\.SUMMONED\]~ ~.20]~
COMPILE_BAF_TO_BCS
END
PATCH_VERBOSE
BUT_ONLY_IF_IT_CHANGES

END
END



LANGUAGE ~English~
         ~english~
         ~d0tweak/english/d0tweak.tra~
LANGUAGE ~French (by Raphaël Mizrahi)~
         ~french~
         ~d0tweak/english/d0tweak.tra~
         ~d0tweak/french/d0tweak.tra~
LANGUAGE ~Spanish (by Bhasbuto/Clan DLAN)~
         ~spanish~
         ~d0tweak/english/d0tweak.tra~
         ~d0tweak/spanish/d0tweak.tra~
LANGUAGE ~Polish (by Damian Staniszewski)~
         ~polish~
         ~d0tweak/english/d0tweak.tra~
         ~d0tweak/polish/d0tweak.tra~
LANGUAGE ~German (by Tanis Eichenblatt)~
         ~german~
         ~d0tweak/english/d0tweak.tra~
         ~d0tweak/german/d0tweak.tra~
LANGUAGE ~Japanese (by Kuroukume Velve)~
         ~japanese~
         ~d0tweak/english/d0tweak.tra~
         ~d0tweak/japanese/d0tweak.tra~

BEGIN @1

COPY ~d0tweak/goodberry/gberry2.itm~ ~override~
  SAY UNIDENTIFIED_DESC @2
COPY ~d0tweak/goodberry/gberry3.itm~ ~override~
  SAY UNIDENTIFIED_DESC @3
COPY ~d0tweak/goodberry/gberry4.itm~ ~override~
  SAY UNIDENTIFIED_DESC @4
COPY ~d0tweak/goodberry/gberry5.itm~ ~override~
  SAY UNIDENTIFIED_DESC @5
COPY ~d0tweak/goodberry/gberry6.itm~ ~override~
  SAY UNIDENTIFIED_DESC @6
COPY ~d0tweak/goodberry/gberry7.itm~ ~override~
  SAY UNIDENTIFIED_DESC @7
COPY ~d0tweak/goodberry/sppr207.spl~ ~override~
  SAY 0x50 @8

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN @9

REQUIRE_PREDICATE NOT FILE_EXISTS ~override/fw2600.are~ ~Skipping Tutu-incompatible component.~

// 0x13 = LE, 0x33 = CE
COPY_EXISTING ~dempitsu.cre~ ~override~
              ~imp01.cre~ ~override~
              ~icsalfir.cre~ ~override~
  WRITE_BYTE 0x27b 0x13
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~demnabsu.cre~ ~override~
              ~demglasu.cre~ ~override~
              ~impqua01.cre~ ~override~
              ~obsdem01.cre~ ~override~
              ~obsdem02.cre~ ~override~ // Unused "Mane"
              ~obsdem04.cre~ ~override~
              ~obsdem05.cre~ ~override~ // Unused Nabassu
              ~abydem01.cre~ ~override~
  WRITE_BYTE 0x27b 0x33
BUT_ONLY_IF_IT_CHANGES

COMPILE ~d0tweak/demons~

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN @10

REQUIRE_PREDICATE NOT FILE_EXISTS ~override/fw2600.are~ ~Skipping Tutu-incompatible component.~

// Correct Animations
// COPY_EXISTING ~sudemde1.cre~ ~override~
// WRITE_SHORT 0x28 4352
// COPY_EXISTING ~sudemde2.cre~ ~override~
// WRITE_SHORT 0x28 4352
COPY_EXISTING ~dempit01.cre~ ~override~
  WRITE_SHORT 0x28 32558
COPY_EXISTING ~jondem02.cre~ ~override~
  WRITE_SHORT 0x28 4352
COPY_EXISTING ~jondem04.cre~ ~override~
  WRITE_SHORT 0x28 4352
COPY_EXISTING ~obsdem04.cre~ ~override~
  WRITE_SHORT 0x28 57424 // Maurezhi = IC_LICHBLACK
ACTION_IF FILE_EXISTS ~data/25CreAni.bif~ // ToB Demons
THEN BEGIN
  COPY_EXISTING ~gordem.cre~ ~override~
    WRITE_SHORT 0x28 4352
  COPY_EXISTING ~demgla01.cre~ ~override~
    WRITE_SHORT 0x28 57585
  COPY_EXISTING ~demglab.cre~ ~override~
    WRITE_SHORT 0x28 57585
  COPY_EXISTING ~demglab2.cre~ ~override~
    WRITE_SHORT 0x28 57585
  COPY_EXISTING ~demglasu.cre~ ~override~
    WRITE_SHORT 0x28 57585
  COPY_EXISTING ~enddem01.cre~ ~override~
    WRITE_SHORT 0x28 57585
  COPY_EXISTING ~enddem02.cre~ ~override~
    WRITE_SHORT 0x28 57585
  COPY_EXISTING ~jondem01.cre~ ~override~
    WRITE_SHORT 0x28 57585
  COPY_EXISTING ~jondem03.cre~ ~override~
    WRITE_SHORT 0x28 57585
  COPY_EXISTING ~jondem05.cre~ ~override~
    WRITE_SHORT 0x28 57585
  COPY_EXISTING ~abisred1.cre~ ~override~
    WRITE_SHORT 0x28 57568
  COPY_EXISTING ~gordem.cre~ ~override~
    WRITE_SHORT 0x28 4352
  COPY_EXISTING ~telpit1.cre~ ~override~
    WRITE_SHORT 0x28 32558
  COPY_EXISTING ~telpit2.cre~ ~override~
    WRITE_SHORT 0x28 32558
  COPY_EXISTING ~gordem2.cre~ ~override~
    WRITE_SHORT 0x28 59648 // Velithuu = IC_SALAMANDER
  ACTION_IF FILE_EXISTS ~override/balth2.dlg~ // Ascension Demons
  THEN BEGIN
    COPY_EXISTING ~fincamb2.cre~ ~override~
      WRITE_SHORT 0x28 8960 // Cambion = IC_DEATH_KNIGHT
    COPY_EXISTING ~finnabas.cre~ ~override~
      WRITE_SHORT 0x28 4352
    // COPY_EXISTING ~finbabau.cre~ ~override~ // Babau = IC_LICHBLACK
  END
END

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN @14

REQUIRE_PREDICATE NOT FILE_EXISTS ~override/fw2600.are~ ~Skipping Tutu-incompatible component.~

COPY_EXISTING ~SPWI402.SPL~ ~override/SPWI450.SPL~
COPY ~d0tweak/ddoor/D0SCRLDD.ITM~ ~override~

COPY_EXISTING ~scrolls.sto~ ~override~
  READ_LONG 0x34 "sale_offset"
  READ_LONG 0x38 "sale_num"
  READ_LONG 0x2C "item_offset"
  READ_LONG 0x4C "drink_offset"
  READ_LONG 0x70 "cure_offset"
  SET "orig_sale_num" = "%sale_num%"
  SET "ddoor_added" = 0
  SET "ddoor_insert" = 0
  SET "item_offset_patch" = 0
  SET "drink_offset_patch" = 0
  SET "cure_offset_patch" = 0
  WHILE ("%sale_num%" > 0) BEGIN
    READ_LONG ("%sale_offset%" +        (("%sale_num%" - 1) * 0x1C)) "item1"
    READ_LONG ("%sale_offset%" + 0x04 + (("%sale_num%" - 1) * 0x1C)) "item2"
    WHILE (("%item1%" = 0x4c524353) AND ("%item2%" = 0x00004232) AND ("%ddoor_insert%" = 0)) BEGIN // scrl2b
      SET "ddoor_insert" = "%sale_num%"
    END
  SET "sale_num" = ("%sale_num%" - 1)
  END
  WHILE (("%ddoor_added%" = 0) AND ("%ddoor_insert%" > 0)) BEGIN
    INSERT_BYTES ("%sale_offset%" + ("%ddoor_insert%" * 0x1C)) 28
    WRITE_ASCII ("%sale_offset%" +        ("%ddoor_insert%" * 0x1C)) ~D0SCRLDD~
    WRITE_LONG  ("%sale_offset%" + 0xa + ("%ddoor_insert%" * 0x1C)) 1 // stacks of 1
    WRITE_LONG  ("%sale_offset%" + 0x10 + ("%ddoor_insert%" * 0x1C)) 1 // identified
    WRITE_LONG  ("%sale_offset%" + 0x14 + ("%ddoor_insert%" * 0x1C)) 3 // quantity
    SET "ddoor_added" = 1
  END
  WRITE_LONG 0x38 ("%orig_sale_num%" + "%ddoor_added%")
  WHILE (("%ddoor_added%" = 1) AND ("%item_offset_patch%" = 0) AND NOT ("%item_offset%" < "%sale_offset%")) BEGIN
    WRITE_LONG 0x2C ("%item_offset%" + 0x1C)
    SET "item_offset_patch" = 1
  END
  WHILE (("%ddoor_added%" = 1) AND ("%drink_offset_patch%" = 0) AND NOT ("%drink_offset%" < "%sale_offset%")) BEGIN
    WRITE_LONG 0x4C ("%drink_offset%" + 0x1C)
    SET "drink_offset_patch" = 1
  END
  WHILE (("%ddoor_added%" = 1) AND ("%cure_offset_patch%" = 0) AND NOT ("%cure_offset%" < "%sale_offset%")) BEGIN
    WRITE_LONG 0x70 ("%cure_offset%" + 0x1C)
    SET "cure_offset_patch" = 1
  END
BUT_ONLY_IF_IT_CHANGES

ACTION_IF FILE_EXISTS ~data/25Store.bif~
THEN BEGIN
COPY_EXISTING ~25spell.sto~ ~override~
              ~25spell2.sto~ ~override~
  READ_LONG 0x34 "sale_offset"
  READ_LONG 0x38 "sale_num"
  READ_LONG 0x2C "item_offset"
  READ_LONG 0x4C "drink_offset"
  READ_LONG 0x70 "cure_offset"
  SET "orig_sale_num" = "%sale_num%"
  SET "ddoor_added" = 0
  SET "ddoor_insert" = 0
  SET "item_offset_patch" = 0
  SET "drink_offset_patch" = 0
  SET "cure_offset_patch" = 0
  WHILE ("%sale_num%" > 0) BEGIN
    READ_LONG ("%sale_offset%" +        (("%sale_num%" - 1) * 0x1C)) "item1"
    READ_LONG ("%sale_offset%" + 0x04 + (("%sale_num%" - 1) * 0x1C)) "item2"
    WHILE (("%item1%" = 0x4c524353) AND ("%item2%" = 0x00004232) AND ("%ddoor_insert%" = 0)) BEGIN // scrl2b
      SET "ddoor_insert" = "%sale_num%"
    END
  SET "sale_num" = ("%sale_num%" - 1)
  END
  WHILE (("%ddoor_added%" = 0) AND ("%ddoor_insert%" > 0)) BEGIN
    INSERT_BYTES ("%sale_offset%" + ("%ddoor_insert%" * 0x1C)) 28
    WRITE_ASCII ("%sale_offset%" +        ("%ddoor_insert%" * 0x1C)) ~D0SCRLDD~
    WRITE_LONG  ("%sale_offset%" + 0xa + ("%ddoor_insert%" * 0x1C)) 1 // stacks of 1
    WRITE_LONG  ("%sale_offset%" + 0x10 + ("%ddoor_insert%" * 0x1C)) 1 // identified
    WRITE_LONG  ("%sale_offset%" + 0x14 + ("%ddoor_insert%" * 0x1C)) 4 // quantity
    SET "ddoor_added" = 1
  END
  WRITE_LONG 0x38 ("%orig_sale_num%" + "%ddoor_added%")
  WHILE (("%ddoor_added%" = 1) AND ("%item_offset_patch%" = 0) AND NOT ("%item_offset%" < "%sale_offset%")) BEGIN
    WRITE_LONG 0x2C ("%item_offset%" + 0x1C)
    SET "item_offset_patch" = 1
  END
  WHILE (("%ddoor_added%" = 1) AND ("%drink_offset_patch%" = 0) AND NOT ("%drink_offset%" < "%sale_offset%")) BEGIN
    WRITE_LONG 0x4C ("%drink_offset%" + 0x1C)
    SET "drink_offset_patch" = 1
  END
  WHILE (("%ddoor_added%" = 1) AND ("%cure_offset_patch%" = 0) AND NOT ("%cure_offset%" < "%sale_offset%")) BEGIN
    WRITE_LONG 0x70 ("%cure_offset%" + 0x1C)
    SET "cure_offset_patch" = 1
  END
BUT_ONLY_IF_IT_CHANGES
END

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN @16

REQUIRE_PREDICATE NOT FILE_EXISTS ~override/fw2600.are~ ~Skipping Tutu-incompatible component.~

ACTION_IF FILE_EXISTS ~data/25Items.bif~
THEN BEGIN
COPY_EXISTING ~DEVA.ITM~ ~override/DEVA.ITM~
WRITE_BYTE 0x60 4
READ_BYTE 0x18 "flags"
WRITE_BYTE 0x18 ("%flags%" BOR 0b01000000)
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~DEVAEVIL.ITM~ ~override/DEVAEVIL.ITM~
WRITE_BYTE 0x60 4
READ_BYTE 0x18 "flags"
WRITE_BYTE 0x18 ("%flags%" BOR 0b01000000)
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~DEVMON01.ITM~ ~override/DEVMON01.ITM~
WRITE_BYTE 0x60 4
READ_BYTE 0x18 "flags"
WRITE_BYTE 0x18 ("%flags%" BOR 0b01000000)
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~PLANETAR.ITM~ ~override/PLANETAR.ITM~
WRITE_BYTE 0x60 4
READ_BYTE 0x18 "flags"
WRITE_BYTE 0x18 ("%flags%" BOR 0b01000000)
BUT_ONLY_IF_IT_CHANGES
END

COPY_EXISTING ~SAREVO.ITM~ ~override/SAREVO.ITM~
WRITE_BYTE 0x60 3
READ_BYTE 0x18 "flags"
WRITE_BYTE 0x18 ("%flags%" BOR 0b01000000)
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~BEARSPIR.ITM~ ~override/BEARSPIR.ITM~
WRITE_BYTE 0x60 2
READ_BYTE 0x18 "flags"
WRITE_BYTE 0x18 ("%flags%" BOR 0b01000000)
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~LIONSPIR.ITM~ ~override/LIONSPIR.ITM~
WRITE_BYTE 0x60 2
READ_BYTE 0x18 "flags"
WRITE_BYTE 0x18 ("%flags%" BOR 0b01000000)
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~SNAKSPIR.ITM~ ~override/SNAKSPIR.ITM~
WRITE_BYTE 0x60 2
READ_BYTE 0x18 "flags"
WRITE_BYTE 0x18 ("%flags%" BOR 0b01000000)
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~WOLFSPIR.ITM~ ~override/WOLFSPIR.ITM~
WRITE_BYTE 0x60 2
READ_BYTE 0x18 "flags"
WRITE_BYTE 0x18 ("%flags%" BOR 0b01000000)
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~AROW10.ITM~ ~override~
WRITE_LONG 0x60 4
READ_BYTE 0x18 "flags"
WRITE_BYTE 0x18 ("%flags%" BOR 0b01000000)
BUT_ONLY_IF_IT_CHANGES

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN @17

REQUIRE_PREDICATE NOT FILE_EXISTS ~override/fw2600.are~ ~Skipping Tutu-incompatible component.~

COPY ~d0tweak/racial/haterace.2da~ ~override~
REPLACE 99999 @18
REPLACE 99998 @19
REPLACE 99997 @20
REPLACE 99996 @21
REPLACE 99995 @22
REPLACE 99994 @23
REPLACE 99993 @24

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN @25

REQUIRE_PREDICATE NOT FILE_EXISTS ~override/fw2600.are~ ~Skipping Tutu-incompatible component.~

LAUNCH_ACTION_MACRO ~REMOVE_SUMMONING_CAP~

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN @26

REQUIRE_PREDICATE NOT FILE_EXISTS ~override/fw2600.are~ ~Skipping Tutu-incompatible component.~

EXTEND_TOP ~baldur.bcs~ ~d0tweak/cfmod/cfmod.baf~
EXTEND_TOP ~baldur25.bcs~ ~d0tweak/cfmod/cfmod.baf~

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN @27

DEPRECATED ~An updated version of this component is now incorporated into the BG2 Fixpack at http://www.gibberlings3.net/.~

REQUIRE_PREDICATE NOT FILE_EXISTS ~override/fw2600.are~ ~Skipping Tutu-incompatible component.~

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN @32

REQUIRE_PREDICATE NOT FILE_EXISTS ~override/fw2600.are~ ~Skipping Tutu-incompatible component.~
REQUIRE_PREDICATE FILE_EXISTS ~data/25CreAni.bif~ ~Skipping ToB-specific component.~

COPY_EXISTING ~botsmith.cre~ ~override~
WRITE_LONG 0x14 150
WRITE_SHORT 0x24 50
WRITE_SHORT 0x26 50
WRITE_BYTE 0x59 100
WRITE_BYTE 0x5a 100
WRITE_BYTE 0x5b 75
WRITE_BYTE 0x5c 0
WRITE_BYTE 0x5d 35
WRITE_BYTE 0x5e 100
WRITE_BYTE 0x5f 100
WRITE_BYTE 0x60 0
WRITE_BYTE 0x61 0
WRITE_BYTE 0x62 0
WRITE_BYTE 0x63 0
REPLACE_TEXTUALLY ~CLCK24~ ~CLCK25~
REPLACE_TEXTUALLY ~INVULNER~ ~D0NOTHIN~

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN @33

DEPRECATED ~An updated version of this component is now incorporated into the AI Improvements component of Quest Pack at http://www.pocketplane.net/quest/.~

REQUIRE_PREDICATE NOT FILE_EXISTS ~override/fw2600.are~ ~Skipping Tutu-incompatible component.~

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN @34

REQUIRE_PREDICATE FILE_EXISTS ~data/25CreAni.bif~ ~Skipping component requiring ToB.~

COPY ~d0tweak/ioun/d0io1.bam~ ~override~
     ~d0tweak/ioun/d0io2.bam~ ~override~
     ~d0tweak/ioun/d0io3.bam~ ~override~
     ~d0tweak/ioun/d0io4.bam~ ~override~
     ~d0tweak/ioun/d0io5.bam~ ~override~
     ~d0tweak/ioun/d0io6.bam~ ~override~
     ~d0tweak/ioun/d0io7.bam~ ~override~
     ~d0tweak/ioun/d0io8.bam~ ~override~
     ~d0tweak/ioun/d0io9.bam~ ~override~

COPY ~d0tweak/ioun/sporbit.vvc~ ~override/d0io1.vvc~
WRITE_ASCII 0x8 "D0IO1"
WRITE_BYTE 0x1a 0x8
COPY ~d0tweak/ioun/sporbit.vvc~ ~override/d0io2.vvc~
WRITE_ASCII 0x8 "D0IO2"
COPY ~d0tweak/ioun/sporbit.vvc~ ~override/d0io3.vvc~
WRITE_ASCII 0x8 "D0IO3"
COPY ~d0tweak/ioun/sporbit.vvc~ ~override/d0io4.vvc~
WRITE_ASCII 0x8 "D0IO4"
COPY ~d0tweak/ioun/sporbit.vvc~ ~override/d0io5.vvc~
WRITE_ASCII 0x8 "D0IO5"
COPY ~d0tweak/ioun/sporbit.vvc~ ~override/d0io6.vvc~
WRITE_ASCII 0x8 "D0IO6"
COPY ~d0tweak/ioun/sporbit.vvc~ ~override/d0io7.vvc~
WRITE_ASCII 0x8 "D0IO7"
COPY ~d0tweak/ioun/sporbit.vvc~ ~override/d0io8.vvc~
WRITE_ASCII 0x8 "D0IO8"
COPY ~d0tweak/ioun/sporbit.vvc~ ~override/d0io9.vvc~
WRITE_ASCII 0x8 "D0IO9"

COPY_EXISTING ~helm18.itm~ ~override~
              ~helm25.itm~ ~override~
READ_LONG 0x6a "effectsoffset"
READ_SHORT 0x70 "#effects"
WRITE_SHORT 0x70 ("%#effects%" + 1)
INSERT_BYTES "%effectsoffset%" 48
WRITE_SHORT "%effectsoffset%" 215
WRITE_BYTE ("%effectsoffset%" + 2) 1
WRITE_BYTE ("%effectsoffset%" + 8) 1
WRITE_BYTE ("%effectsoffset%" + 12) 2
WRITE_BYTE ("%effectsoffset%" + 18) 100
WRITE_ASCII ("%effectsoffset%" + 20) "D0IO6"

COPY_EXISTING ~helm20.itm~ ~override~
              ~helm34.itm~ ~override~
READ_LONG 0x6a "effectsoffset"
READ_SHORT 0x70 "#effects"
WRITE_SHORT 0x70 ("%#effects%" + 1)
INSERT_BYTES "%effectsoffset%" 48
WRITE_SHORT "%effectsoffset%" 215
WRITE_BYTE ("%effectsoffset%" + 2) 1
WRITE_BYTE ("%effectsoffset%" + 8) 1
WRITE_BYTE ("%effectsoffset%" + 12) 2
WRITE_BYTE ("%effectsoffset%" + 18) 100
WRITE_ASCII ("%effectsoffset%" + 20) "D0IO4"

COPY_EXISTING ~helm23.itm~ ~override~
              ~helm27.itm~ ~override~
READ_LONG 0x6a "effectsoffset"
READ_SHORT 0x70 "#effects"
WRITE_SHORT 0x70 ("%#effects%" + 1)
INSERT_BYTES "%effectsoffset%" 48
WRITE_SHORT "%effectsoffset%" 215
WRITE_BYTE ("%effectsoffset%" + 2) 1
WRITE_BYTE ("%effectsoffset%" + 8) 1
WRITE_BYTE ("%effectsoffset%" + 12) 2
WRITE_BYTE ("%effectsoffset%" + 18) 100
WRITE_ASCII ("%effectsoffset%" + 20) "D0IO3"

COPY_EXISTING ~helm26.itm~ ~override~
READ_LONG 0x6a "effectsoffset"
READ_SHORT 0x70 "#effects"
WRITE_SHORT 0x70 ("%#effects%" + 1)
INSERT_BYTES "%effectsoffset%" 48
WRITE_SHORT "%effectsoffset%" 215
WRITE_BYTE ("%effectsoffset%" + 2) 1
WRITE_BYTE ("%effectsoffset%" + 8) 1
WRITE_BYTE ("%effectsoffset%" + 12) 2
WRITE_BYTE ("%effectsoffset%" + 18) 100
WRITE_ASCII ("%effectsoffset%" + 20) "D0IO5"

COPY_EXISTING ~helm24.itm~ ~override~
READ_LONG 0x6a "effectsoffset"
READ_SHORT 0x70 "#effects"
WRITE_SHORT 0x70 ("%#effects%" + 1)
INSERT_BYTES "%effectsoffset%" 48
WRITE_SHORT "%effectsoffset%" 215
WRITE_BYTE ("%effectsoffset%" + 2) 1
WRITE_BYTE ("%effectsoffset%" + 8) 1
WRITE_BYTE ("%effectsoffset%" + 12) 2
WRITE_BYTE ("%effectsoffset%" + 18) 100
WRITE_ASCII ("%effectsoffset%" + 20) "D0IO1"

COPY_EXISTING ~helm19.itm~ ~override~
READ_LONG 0x6a "effectsoffset"
READ_SHORT 0x70 "#effects"
WRITE_SHORT 0x70 ("%#effects%" + 1)
INSERT_BYTES "%effectsoffset%" 48
WRITE_SHORT "%effectsoffset%" 215
WRITE_BYTE ("%effectsoffset%" + 2) 1
WRITE_BYTE ("%effectsoffset%" + 8) 1
WRITE_BYTE ("%effectsoffset%" + 12) 2
WRITE_BYTE ("%effectsoffset%" + 18) 100
WRITE_ASCII ("%effectsoffset%" + 20) "D0IO7"

ACTION_IF FILE_EXISTS ~data/25Items.bif~
THEN BEGIN
COPY_EXISTING ~amsoul01.itm~ ~override~
READ_LONG 0x6a "effectsoffset"
READ_SHORT 0x70 "#effects"
WRITE_SHORT 0x70 ("%#effects%" + 1)
INSERT_BYTES "%effectsoffset%" 48
WRITE_SHORT "%effectsoffset%" 215
WRITE_BYTE ("%effectsoffset%" + 2) 1
WRITE_BYTE ("%effectsoffset%" + 8) 1
WRITE_BYTE ("%effectsoffset%" + 12) 2
WRITE_BYTE ("%effectsoffset%" + 18) 100
WRITE_ASCII ("%effectsoffset%" + 20) "D0IO2"
END

ACTION_IF FILE_EXISTS ~override/CDIOUN1.itm~
THEN BEGIN
COPY_EXISTING ~CDIOUN1.itm~ ~override~
READ_LONG 0x6a "effectsoffset"
READ_SHORT 0x70 "#effects"
WRITE_SHORT 0x70 ("%#effects%" + 1)
INSERT_BYTES "%effectsoffset%" 48
WRITE_SHORT "%effectsoffset%" 215
WRITE_BYTE ("%effectsoffset%" + 2) 1
WRITE_BYTE ("%effectsoffset%" + 8) 1
WRITE_BYTE ("%effectsoffset%" + 12) 2
WRITE_BYTE ("%effectsoffset%" + 18) 100
WRITE_ASCII ("%effectsoffset%" + 20) "D0IO8"
END

ACTION_IF FILE_EXISTS ~override/CDIOUN2.itm~
THEN BEGIN
COPY_EXISTING ~CDIOUN2.itm~ ~override~
READ_LONG 0x6a "effectsoffset"
READ_SHORT 0x70 "#effects"
WRITE_SHORT 0x70 ("%#effects%" + 1)
INSERT_BYTES "%effectsoffset%" 48
WRITE_SHORT "%effectsoffset%" 215
WRITE_BYTE ("%effectsoffset%" + 2) 1
WRITE_BYTE ("%effectsoffset%" + 8) 1
WRITE_BYTE ("%effectsoffset%" + 12) 2
WRITE_BYTE ("%effectsoffset%" + 18) 100
WRITE_ASCII ("%effectsoffset%" + 20) "D0IO9"
END

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN @35

DEPRECATED ~An updated version of this component is now incorporated into the G3 Tweak Pack at http://www.gibberlings3.net/.~

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN @36

REQUIRE_PREDICATE NOT FILE_EXISTS ~override/fw2600.are~ ~Skipping Tutu-incompatible component.~

COPY ~d0tweak/drow/KRDL1.BAM~ ~override~
     ~d0tweak/drow/KRDL1.vvc~ ~override~
     ~d0tweak/drow/KRGLOBD.BAM~ ~override~
     ~d0tweak/drow/KRGLOBD.vvc~ ~override~
     ~d0tweak/drow/KRGLOBD2.BAM~ ~override~
     ~d0tweak/drow/KRGLOBD2.vvc~ ~override~

COPY ~d0tweak/drow/KRIN400.SPL~ ~override~
  SAY 0x8 @37
  SAY 0x50 @38

COPY ~d0tweak/drow/KRIN401.SPL~ ~override~
  SAY 0x8 @39
  SAY 0x50 @40

COPY ~d0tweak/drow/KRIN402.SPL~ ~override~
  SAY 0x8 @41
  SAY 0x50 @42
  SAY 0xfe @43
  SAY 0x12e @44

COPY ~d0tweak/drow/KRIN403.SPL~ ~override~
  SAY 0x8 @45
  SAY 0x50 @46

EXTEND_TOP ~WTASIGHT.BCS~ ~d0tweak/drow/ET_WTA.BAF~
EXTEND_TOP ~WTARSGT.BCS~ ~d0tweak/drow/ET_WTA.BAF~
EXTEND_TOP ~WDASIGHT.BCS~ ~d0tweak/drow/ET_WTA.BAF~
EXTEND_TOP ~WDARSGT.BCS~ ~d0tweak/drow/ET_WTA.BAF~

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN @47

DEPRECATED ~An updated version of this component is now incorporated into the Miscellaneous Enhancements component of Quest Pack at http://www.pocketplane.net/quest/.~

REQUIRE_PREDICATE NOT FILE_EXISTS ~override/fw2600.are~ ~Skipping Tutu-incompatible component.~

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN @50

REQUIRE_PREDICATE NOT FILE_EXISTS ~override/fw2600.are~ ~Skipping Tutu-incompatible component.~

COPY_EXISTING ~QUAYLEM.CRE~ ~override/QUAYLEM.CRE~
WRITE_ASCII ~0x34~ ~D0Nothin~
WRITE_ASCII ~0x3c~ ~D0Nothin~

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN @51

REQUIRE_PREDICATE NOT FILE_EXISTS ~override/fw2600.are~ ~Skipping Tutu-incompatible component.~

COPY_EXISTING ~AR0011.ARE~ ~override~
  ~AR0013.ARE~ ~override~
  ~AR0084.ARE~ ~override~
  ~AR0085.ARE~ ~override~
  ~AR0086.ARE~ ~override~
READ_BYTE 0x14 "flags"
WRITE_BYTE 0x14 ("%flags%" BOR 0b00001000)
BUT_ONLY_IF_IT_CHANGES

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN @52

COPY ~d0tweak/lore~ ~override~

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN @53

COPY_EXISTING_REGEXP GLOB ~.*\.itm~ ~override~
PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN // protects against invalid files
  READ_SHORT 0x1c "itemtype"
  SPRINT itemtypestring ~%itemtype%~

  PATCH_IF FILE_CONTAINS_EVALUATED (~d0tweak/backstab.txt~ ~^%itemtypestring% ~) THEN BEGIN
READ_LONG 0x64 ext_off
READ_SHORT 0x68 ext_count
READ_SHORT 0x6e eq_eff_indx
    READ_SHORT 0x70 "#effects"
    READ_LONG 0x6a "effectsoffset"
    WRITE_SHORT 0x70 ("%#effects%" + 1)
    effectsoffset += eq_eff_indx * 0x30 // maybe an extended header's effects are before the equipped ones...
    INSERT_BYTES "%effectsoffset%" 48
    WRITE_SHORT "%effectsoffset%" 263
    WRITE_BYTE ("%effectsoffset%" + 2) 1
    WRITE_BYTE ("%effectsoffset%" + 12) 2
    WRITE_BYTE ("%effectsoffset%" + 18) 100

// update extended headers' effects index table
    FOR (ext_cyc = 0; ext_cyc < ext_count; ext_cyc += 1) BEGIN
      READ_SHORT (ext_off + (ext_cyc * 0x38) + 0x20) ext_eff_idx
  PATCH_IF (ext_eff_idx > eq_eff_indx) BEGIN
     WRITE_SHORT (ext_off + (ext_cyc * 0x38) + 0x20) ext_eff_idx + 1
  END
    END

    // read the penalty from the file
    INNER_PATCH_FILE ~d0tweak/backstab.txt~ BEGIN
      SET thisline = 999
      FOR (i = 0; thisline != itemtype; i+=1) BEGIN
        READ_2DA_ENTRY i 0 1 thisline
      END
      i -= 1
      READ_2DA_ENTRY i 1 1 penalty
    END // INNER_PATCH_FILE

PATCH_IF itemtype = 20 BEGIN
      READ_SHORT 0x31 "proficiency"
  PATCH_IF proficiency = 93 BEGIN
    SET penalty = 3
  END
END

    WRITE_LONG ("%effectsoffset%" + 4) 0 - penalty
  END // PATCH_IF the itemtype is in the list
END // PATCH_IF SOURCE_SIZE is good
BUT_ONLY_IF_IT_CHANGES

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN @59
SUBCOMPONENT @55
OUTER_SET "install_mode" = 1
INCLUDE ~d0tweak/functions/npctraps.tph~

BEGIN @60
SUBCOMPONENT @55
OUTER_SET "install_mode" = 2
INCLUDE ~d0tweak/functions/npctraps.tph~

BEGIN @61
SUBCOMPONENT @55
OUTER_SET "install_mode" = 3
INCLUDE ~d0tweak/functions/npctraps.tph~

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN @56

REQUIRE_PREDICATE NOT FILE_EXISTS ~override/fw2600.are~ ~Skipping Tutu-incompatible component.~

DEPRECATED ~An updated version of this component is now incorporated into the G3 Tweak Pack at http://www.gibberlings3.net/.~

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

BEGIN @58

REQUIRE_PREDICATE NOT FILE_EXISTS ~override/fw2600.are~ ~Skipping Tutu-incompatible component.~

LAUNCH_ACTION_MACRO ~REMOVE_SUMMONING_CAP~

COPY ~d0tweak/summons/Copy~ ~override~

COPY ~d0tweak/summons/SPWI309.SPL~ ~override/SPWI309.SPL~
  SAY 0x50 @2201

COPY ~d0tweak/summons/SPWI504.SPL~ ~override/SPWI504.SPL~
  SAY 0x50 @2202

COPY ~d0tweak/summons/SPWI407.SPL~ ~override/SPWI407.SPL~
  SAY 0x50 @2203

COPY ~d0tweak/summons/SPPR402.SPL~ ~override/SPPR402.SPL~
     ~d0tweak/summons/SPRA304.SPL~ ~override/SPRA304.SPL~
  SAY 0x50 @2204

COPY ~d0tweak/summons/SPPR501.SPL~ ~override/SPPR501.SPL~
     ~d0tweak/summons/SPRA305.SPL~ ~override/SPRA305.SPL~
  SAY 0x50 @2205

COPY ~d0tweak/summons/SPPR602.SPL~ ~override/SPPR602.SPL~
     ~d0tweak/summons/SPRA306.SPL~ ~override/SPRA306.SPL~
  SAY 0x50 @2217

COPY ~d0tweak/summons/SPWI501.SPL~ ~override/SPWI501.SPL~
  SAY 0x50 @2206

COPY ~d0tweak/summons/SPPR301.SPL~ ~override/SPPR301.SPL~
  SAY 0x50 @2207

COPY_EXISTING ~scrl2d.itm~ ~override~
SAY 0x54 @2206
COPY_EXISTING ~scrl2g.itm~ ~override~
SAY 0x54 @2202
COPY_EXISTING ~scrl2a.itm~ ~override~
SAY 0x54 @2203
COPY_EXISTING ~scrl1l.itm~ ~override~
SAY 0x54 @2201

COPY_EXISTING ~SKELWASU.CRE~ ~override~
WRITE_LONG 0x14 1150
WRITE_BYTE 0x272 115
WRITE_ASCII 0x248 "GMINIONM"

COPY ~d0tweak/summons/newcres~ ~override~

COPY ~d0tweak/summons/skeletons~ ~override~
  SAY NAME1 @2208
  SAY NAME2 @2208
  SAY BATTLE_CRY1 @2209
  SAY BATTLE_CRY2 @2209
  SAY BATTLE_CRY3 @2209
  SAY BATTLE_CRY4 @2209
  SAY BATTLE_CRY5 @2209
  SAY ATTACK1 @2210
  SAY ATTACK2 @2211
  SAY ATTACK3 @2212
  SAY DAMAGE @2213
  SAY DYING @2214
  SAY SELECT_COMMON1 @2215
  SAY SELECT_COMMON2 @2216

////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////

/* BEGIN @57

COPY_EXISTING ~imoen2j.dlg~ ~override~
  READ_LONG 0x8 "#states"
  PATCH_IF ("%#states%" > 0) BEGIN
    INNER_ACTION BEGIN
  COPY_EXISTING ~d0tweak/imoen/contimoen.d~ ~d0tweak/imoen/contimoen.d~
    FOR (int i = 0; i < "%#states%"; i++) BEGIN
  REPLACE_TEXTUALLY ~ADD_STATE_TRIGGER IMOEN2J~ ~ADD_STATE_TRIGGER IMOEN2J %i%~
    END
  COMPILE ~d0tweak/imoen/contimoen.d~
    END
DECOMPILE_DLG_TO_D
  INNER_ACTION BEGIN
    COPY_EXISTING ~imoenj.dlg~ ~override~
  DECOMPILE_DLG_TO_D
    APPEND_FILE ~imoen2j.dlg.d~
REPLACE_TEXTUALLY ~BEGIN IMOEN2J.*~ ~~
  COMPILE_D_TO_DLG
    BUT_ONLY_IF_IT_CHANGES
  END
COMPILE_D_TO_DLG
BUT_ONLY_IF_IT_CHANGES */
Title: Re: Ding0's Tweak Pack
Post by: Kulyok on February 13, 2009, 12:56:32 AM
Looks like another competent modder joined the scene. Welcome!

(I'm saying competent, because I don't understand what the file means - which automatically makes anyone who does understand a more clever person than me).
Title: Re: Ding0's Tweak Pack
Post by: Drelnza on April 11, 2010, 07:21:41 AM
Thanks rhomboidspace, I am going to try and install the summoning cap removal despite the reports of it being buggy....
Title: Re: Ding0's Tweak Pack
Post by: Angel on February 22, 2015, 10:36:58 AM
D0Tweak v22 is now available from PPG at http://pocketplane.net/sim/ (http://pocketplane.net/sim/).
Title: Re: Ding0's Tweak Pack
Post by: Salk on July 23, 2015, 02:15:08 AM
Angel,

does my beloved component "Summon set off traps" exclude flying creatures?
Title: Re: Ding0's Tweak Pack
Post by: Angel on July 23, 2015, 04:01:33 AM
Angel,

does my beloved component "Summon set off traps" exclude flying creatures?

It seems to.  I see exceptions made for wraiths, air elementals, mists and the like.
Title: Re: Ding0's Tweak Pack
Post by: Salk on July 24, 2015, 12:31:01 AM
It seems to.  I see exceptions made for wraiths, air elementals, mists and the like.

Yes, thank you.

I just wonder if non summons of that category and more (like flying familiars) are excluded from setting off traps in the original game.
Title: Re: Ding0's Tweak Pack
Post by: Angel on September 11, 2016, 03:57:07 AM
A minor update, v23 is now available.  The main change is that the "Visible Ioun Stones" component will now support ioun stones from The Sorcerer's Place Collection (Ivory Ioun Stone), BG1 Quest Pack (Egg of the Frozen Spider) and BG1 Romantic Encounters (Thalantyr's Ioun Stone), as well as one ioun stone from Rogue Rebalancing that I overlooked in v22 (Verduris' Luckstone).
Title: Re: Ding0's Tweak Pack
Post by: AL|EN on September 11, 2016, 04:26:48 AM
Angel, i would be really happy if you could create pull request to BWS repo (https://bitbucket.org/BigWorldSetup/bigworldsetup) with link,archive name and size changes :)
Title: Re: Ding0's Tweak Pack
Post by: Angel on April 04, 2018, 04:52:59 PM
V24 is now available on GitHug.  Biggest change is that the mod should now work on BG1EE/Siege of Dragonspear.  Visual Ioun Stones now covers two ioun stones added by SoD (Trollblood Ioun Stone [bdioun01] and Blood Red Ioun Stone [bdioun02]), and Sensible Lore now takes shamans into account (they get the same lore as sorcerers).

I also further tweaked the code in places.  Most specifically, Enhanced Goodberries now patches the existing item and spell instead of copying in new ones, which should make it more compatible.

I also created myself a Linux version of the G3 ModPackaging tool, so archives for Windows, OSX and Linux can now also be downloaded from GitHub.  The download page is here:

https://github.com/AngelGryph/D0Tweak/releases/tag/v24


EDIT: The self-extracting archive for Windows did not work, replaced it with a .zip file.
Title: Re: Ding0's Tweak Pack
Post by: Greenhorn on March 07, 2020, 06:55:35 AM
Mmm... Angel, is there a particular reason why your update is without weidu exe and such a pain to install on BGT or Tutu? Don't get me wrong, I'm grateful for your work but it is little tedious to unpack whole thing ( download, then inside downloaded and extracted D0Tweak-24 you must find d0tweak and extract in game folder as setup can't find it's tp. file and THEN you must manually insert weidu.exe and rename it correctly).
Title: Re: Ding0's Tweak Pack
Post by: jastey on March 11, 2020, 06:11:46 AM
Please note that the official download is here now: https://github.com/Pocket-Plane-Group/D0Tweak/releases
With mod packages and everything. :)
Title: Re: Ding0's Tweak Pack
Post by: SamielArt on November 14, 2020, 12:42:51 AM
V24 is now available on GitHug.  Biggest change is that the mod should now work on BG1EE/Siege of Dragonspear.  Visual Ioun Stones now covers two ioun stones added by SoD (Trollblood Ioun Stone [bdioun01] and Blood Red Ioun Stone [bdioun02]), and Sensible Lore now takes shamans into account (they get the same lore as sorcerers).

I also further tweaked the code in places.  Most specifically, Enhanced Goodberries now patches the existing item and spell instead of copying in new ones, which should make it more compatible.

I also created myself a Linux version of the G3 ModPackaging tool, so archives for Windows, OSX and Linux can now also be downloaded from GitHub.  The download page is here:

https://github.com/AngelGryph/D0Tweak/releases/tag/v24


EDIT: The self-extracting archive for Windows did not work, replaced it with a .zip file.
V24 is now available on GitHug.  Biggest change is that the mod should now work on BG1EE/Siege of Dragonspear.  Visual Ioun Stones now covers two ioun stones added by SoD (Trollblood Ioun Stone [bdioun01] and Blood Red Ioun Stone [bdioun02]), and Sensible Lore now takes shamans into account (they get the same lore as sorcerers).

I also further tweaked the code in places.  Most specifically, Enhanced Goodberries now patches the existing item and spell instead of copying in new ones, which should make it more compatible.

I also created myself a Linux version of the G3 ModPackaging tool, so archives for Windows, OSX and Linux can now also be downloaded from GitHub.  The download page is here:

https://github.com/AngelGryph/D0Tweak/releases/tag/v24


EDIT: The self-extracting archive for Windows did not work, replaced it with a .zip file.

Hi, this component can't be installed in BG1EE  "14: Kensai Ryu's Restored Drow Innate Abilities" I recieved this message : " component is not compatible with your game" Is not possible to run this component in BGEE1?? thanks