[MOD] Better IWD Pregen (v7.5) - a minimalist script and tweak pack
Dan_P
Member Posts: 129
GitHub: https://github.com/D2-mods/Better-IWD-Pregen
Download: https://github.com/D2-mods/Better-IWD-Pregen/releases
Compatible with classic and EE versions of BG1, BG2, IWD, and IWD2 (including EET/BGT/IWD2EE).
--
A minimalist script and tweak pack for Infinity Engine games. This mod was started as an attempt to make an improved version of the "IWD Pregen" party AI script from Icewind Dale: Enhanced Edition.
--
Script components:
Tweak components:
Additional info:
See GitHub page for more detailed info on individual components.
Script - Quick Info:
Auto-attack features:
Other features:
Cooldown hotkeys:
Script Compatibility:
--
Auto-attack breakdown:
BG(EE), BG2(EE), IWD(EE)
--
Nymph AI script (Call Woodland Beings):
--
Download: https://github.com/D2-mods/Better-IWD-Pregen/releases
Compatible with classic and EE versions of BG1, BG2, IWD, and IWD2 (including EET/BGT/IWD2EE).
--
A minimalist script and tweak pack for Infinity Engine games. This mod was started as an attempt to make an improved version of the "IWD Pregen" party AI script from Icewind Dale: Enhanced Edition.
--
Script components:
- Better IWD Pregen
- Better AI for Call Woodland Beings (EEs, BG2)
- Auto-assign script to new characters
Tweak components:
- Adjust enemy damage at higher difficulties (classic IWD, IWD2)
- Add or remove Avarine Decanter (IWD2)
- Unnerf Animate Dead (IWD2)
- Shapeshift movement bonuses bypass Free Action (EEs)
- Increase movement speed of IWD shapeshifts (IWD1, IWDEE)
- Give party starting equipment (IWD games)
- Give party a Bag of Holding at game start (classic and EEs)
- All classes get full HP bonuses from Constitution (classic and EEs)
- Reduce delay for Sneak Attacks + uncap Crippling Strike (EEs)
- Salamander auras hit only enemies of the caster (IWDEE)
- Allow Minsc to use his Berserk ability at will (BG games)
- Patch visuals for shortbows (IWDEE) or scimitars (IWD-in-BG2)
- Remove alignment restrictions for classes (classic and EEs)
- Prevent paladins and rangers falling at low rep (EEs)
Additional info:
- All components can be installed independently and in any order, except for auto-assigning the script.
- Script components should be installed after AI mods (ex. SCS or atweaks).
- Note that all tweaks are fine to install even after mods like SCS (this is the order I use for testing).
- If using tweaks from other mods that do similar things, whichever is installed last will usually be used.
- All tweaks have at least 2 subcomponents. i.e. if you say to "install all components", it won't automatically install any tweaks.
See GitHub page for more detailed info on individual components.
Script - Quick Info:
- Better IWD Pregen (d2scrp): Base script. Includes all features listed below.
- d2scrp+: Same as base script, except calls for help are enabled.
- d2scrp-: Same as base script, except default mode is Cooldown.
- IWD Pregen (iwdpgen): Same as vanilla IWD Pregen, but with shaman abilities added. (EE-only)
Auto-attack features:
- Melee aggro range is dependent on class (see below for full breakdown); range from 5 ft. (mages) to 27 ft..
- Will not attack if under the effects of Invisibility or Sanctuary.
- Will not attack if using Stealth, Bard Song, Turn Undead or Shamanic Dance.
- EEs: Active retargeting if a character's current weapon cannot hit or damage an enemy.
- Priority targeting against enemy casters (limited to within 5 ft. or in range of current weapon).
- Cooldown hotkeys to reduce melee aggro range to 5 ft. for 30 seconds, or set back to normal instantly.
Other features:
- Classes with Search will use it when not attacking (note: for IWD2, auto-Search only works if a character has Rogue or Monk levels).
- Will not auto-Search if using Stealth, Bard Song, Turn Undead or Shamanic Dance.
- Will attempt to stop attacking, or stop a Bard Song, if suddenly invisible (ex. from a contingency or area invisibility spell).
- Shamanic Dance is NOT stopped if suddenly invisible. This is to preserve summons.
- Will not auto-attack at under 15% HP, unless an enemy is in range of current weapon.
Cooldown hotkeys:
- If the B key is pressed, the character will enter a Cooldown mode for 30 seconds.
- Cooldown reduces melee aggro range to 5 ft. and disables some of the retargeting actions.
- If the E key is pressed, the Cooldown mode will be deactivated.
- If the game is saved while a character is in Cooldown mode, it will be deactivated on reload.
Script Compatibility:
Script Compatibility:
Also compatible with any BG2 conversion mods (ex. BGT or Classic Adventures).
Classic BG2 engine:
NOTE: I'm not 100% sure the scripts work with expansionless versions of the classic games.
- EEs: BG:EE, BG2:EE, IWD:EE, EET (tested on v2.5/v2.6)
- Classic: BG1, BG2, IWD, IWD2 (tested with GOG versions)
Also compatible with any BG2 conversion mods (ex. BGT or Classic Adventures).
Classic BG2 engine:
- TobEx (v26/v28): Compatibility issues should be fixed (v3.7 and later).
- TobEx Afterlife: Use v29.10 or later. (http://www.shsforums.net/files/file/1274-tobex-afterlife)
- Improved GUI mod: Use v5.1 or later. (http://www.shsforums.net/files/file/1265-bg2-improved-gui)
NOTE: I'm not 100% sure the scripts work with expansionless versions of the classic games.
--
Auto-attack breakdown:
BG(EE), BG2(EE), IWD(EE)
Class: Fighter, Ranger, Paladin, including any multiclass combinations
Conditions (one must be met to auto-attack)
Class: Kensai, Monk, Shapeshift/Polymorph (without Fighter levels)
Conditions (one must be met to auto-attack)
Class: Cleric, Druid, Shaman, Thief, Bard, Cleric/Thief
Conditions (one must be met to auto-attack)
Class: Mage, Sorcerer, Mage/Thief, Cleric/Mage
Conditions (one must be met to auto-attack)
IWD2
Conditions (one must be met to auto-attack)
- Enemy is within range of the currently equipped weapon
- Enemy is within 27 ft.
- Attacked by enemy
Class: Kensai, Monk, Shapeshift/Polymorph (without Fighter levels)
Conditions (one must be met to auto-attack)
- Enemy is within range of the currently equipped weapon
- Enemy is within 19 ft.
- Attacked by enemy
Class: Cleric, Druid, Shaman, Thief, Bard, Cleric/Thief
Conditions (one must be met to auto-attack)
- Enemy is within range of the currently equipped weapon
- Enemy is within 13 ft.
Class: Mage, Sorcerer, Mage/Thief, Cleric/Mage
Conditions (one must be met to auto-attack)
- Enemy is within range of the currently equipped weapon
- Enemy is within 5 ft.
- If THAC0 is less than 5, will attack if enemy is within 13 ft.
Class: Fighter, Ranger, Paladin or Barbarian (single-class or multiclass with 3+ levels)
Conditions (one must be met to auto-attack)
Class: Monk (Level 9+), Wild Shape/Tenser's/Iron Body (without 3+ warrior levels)
Conditions (one must be met to auto-attack)
Class: Cleric, Druid, Monk, Thief or Bard, including multiclass with Wizard or Sorcerer
Conditions (one must be met to auto-attack)
Class: Wizard or Sorcerer
Conditions (one must be met to auto-attack)
Conditions (one must be met to auto-attack)
- Enemy is within range of the currently equipped weapon
- Enemy is within 27 ft.
- Attacked by enemy
Class: Monk (Level 9+), Wild Shape/Tenser's/Iron Body (without 3+ warrior levels)
Conditions (one must be met to auto-attack)
- Enemy is within range of the currently equipped weapon
- Enemy is within 19 ft.
- Attacked by enemy
Class: Cleric, Druid, Monk, Thief or Bard, including multiclass with Wizard or Sorcerer
Conditions (one must be met to auto-attack)
- Enemy is within range of the currently equipped weapon
- Enemy is within 13 ft.
Class: Wizard or Sorcerer
Conditions (one must be met to auto-attack)
- Enemy is within range of the currently equipped weapon
- Enemy is within 5 ft.
--
Nymph AI script (Call Woodland Beings):
Option 1 - Revised script:
Compatible with EEs and classic BG2 engine, including SCS.
Not compatible with atweaks PnP Fey (use option 2).
--
Dimension Door: The nymph can teleport if conditions are met. It will alway teleport to either the nearest enemy or to a PC (usually, its summoner). It will not use Dimension Door if invisible, unless instructed to by the player (with the D key).
Marking: The nymph "marks" a PC as an object for various actions (by default, this is the summoner). If the marked PC is not on the map for any reason, the nymph will choose another PC on the same map. The nymph will always switch back to its summoner if in visual range. Note that the summoner, as an identifier, is not saved if a summon is still on the map (so if reloading, script will default to Player1 as the "marked" PC).
--
Hotkeys:
--
Option 2 - Patch existing script:
NOTE: Dimension Door is more limited with this patch. Will only teleport to the summoner or Player1.
- Smarter spellcasting (better targeting, checks magic resist, etc.).
- May cast Barkskin, Mass Cure, Entangle, or Summon Insects once each per combat encounter. When the AI uses these spells, it doesn't require or consume any memorized spells.
- Slightly increased movement and casting speed.
- Teleports to catch up with the party (ex. while traveling with Boots of Speed).
- Preserves invisibility (won't attack or cast spells).
- Cooldown hotkeys to delay spellcasting (B to enable, E to disable).
Compatible with EEs and classic BG2 engine, including SCS.
Not compatible with atweaks PnP Fey (use option 2).
--
Dimension Door: The nymph can teleport if conditions are met. It will alway teleport to either the nearest enemy or to a PC (usually, its summoner). It will not use Dimension Door if invisible, unless instructed to by the player (with the D key).
Marking: The nymph "marks" a PC as an object for various actions (by default, this is the summoner). If the marked PC is not on the map for any reason, the nymph will choose another PC on the same map. The nymph will always switch back to its summoner if in visual range. Note that the summoner, as an identifier, is not saved if a summon is still on the map (so if reloading, script will default to Player1 as the "marked" PC).
--
Hotkeys:
- If the D key is pressed the nymph will teleport to its summoner (or other PC). Only works when not in combat.
- If the B key is pressed, the nymph will enter Cooldown for 3 rounds. Cooldown mode disables most combat actions.
- If the E key is pressed, the Cooldown timer is set to 0 (deactivated).
--
Option 2 - Patch existing script:
- Adds Cooldown hotkeys (B to enable, E to disable)
- Adds D hotkey to teleport to party (out of combat only)
- Teleports to party if not in visual range (and not invisible)
- Preserves invisibility (won't attack or cast spells)
- Usable with atweaks PnP Fey, as well as AI mods that still use NYMPH.BCS (ex. SCS)
NOTE: Dimension Door is more limited with this patch. Will only teleport to the summoner or Player1.
--
Post edited by Dan_P on
2
Comments
- Fixed an issue where some Bioware NPCs could target each other for 1-2 seconds after killing enemies. I didn't notice this until recently because I did most of my early testing with custom characters only.
- Removed Calls for Help responses. I think what I had was pretty good, but it took away control from the player, which goes against the intent of a minimalist script. Shout actions are still in the script, in case I want to use them later (they should have a negligible effect on efficiency).
- Added support for classic Baldur's Gate (that's BG1 on the BG1 engine). Key info:
- Added the following tweaks:
- Tested and confirmed that the BG2 script is working with various conversion mods, including IWD-in-BG2, Classic Adventures, and Epic Endeavors. The Bag of Holding tweak is also working with these.
- This mod is pretty much finished now besides bug fixes, or making minor adjustments. The only TODO I have planned in my notes is PsT:EE support, which I'll probably only add if/when I get around to replaying it.
- Added component: Auto-assign script to new characters. This is a one-time action for each character in the party. Joinable NPCs in the EEs will also have their starting script changed.
- Added the following tweaks:
Also, it seems to me that the starting item pack ignores proficiency tweak revamps. I'd suggest to go with a bags of holding-based method based on the starting class IMO (maybe with one which doesn't allow storing items, like what Abel did in his Nonrandom Treasures).
Currently uses base-game spells only. I'll take a look at the atweaks changes when I get a chance. I remember having it in my notes somewhere to look at it, but I guess I forgot about it because I haven't been using atweaks in my EE installs.
This is true. For EEs it gives weapons based on proficiencies (with priority of weapons arbitrarily set by myself). So it's assuming profs are mostly the same as vanilla. Small changes, like to scimitar or flail groups are okay as long as flail and scimitar are still in the group. I really like the way it currently works, so I'm going to keep it as the main option. I was planning to eventually add some adjustability to one or two major tweaks, but to be honest, I'm just not too motivated to do it right now.
But the bag method might be a good idea as an alternate option. Like you said, it's more flexible with major proficiency tweaks. Since I already have a bag of holding component, it shouldn't take too long to add the option. It's basically the exact same thing, except put items in the bag as well. I'll need to test it in all iwd games, including even iwd-in-bg2, so might take a few days.
- the B and E hotkeys (Cooldown Mode) now give feedback in the dialogue box
Call Woodland Beings script
- will now be skipped if the atweaks PNP Fey component is installed. It's not impossible to make it compatible, but I don't have time for that right now.
Changes/fixes for the "Give party starting equipment" tweak:
- IWD-in-BG2: greataxe was set to wrong item resource
- classic IWD1 (with component 1): improved scripting and more ranged weapons can spawn
- Added a new subcomponent:
NOTE: If the separate "Give party a Bag of Holding" component is not installed, then items can only be taken out of the weapon bag. If it is installed, then the bag is changed to a normal Bag of Holding. You only have one bag with both installed, and install order doesn't matter.
- added subcomponent: Use existing script, but patch in a few actions
- adds Cooldown hotkeys (B to enable, E to disable)
- adds D hotkey to teleport to party
- will teleport to party if not in visual range (and not invisible)
- will preserve invisibility
- usable with atweaks PNP Fey, as well as AI mods that still use NYMPH.BCS (ex. SCS)
Give party starting equipment (IWD games)- Option 1 (auto-equip) is now skipped if certain tweaks are installed
- Option 2 (start with items in a bag) can be used with any tweaks
- detects BG/IWD-style profs (from cdtweaks) and Proficiency Overhaul (from Skill and Abilities mod)
classic BG2- the party script will fail to install if the Extended Event Text component from Improved GUI mod is detected (also called Extended messages/sounds or Extended Items/Quest/Spell messages)
- installing these together will crash the game when attempting to load a save
Readme fixEDIT:
Just realized today that Dimension Door no longer removes invisibility in EE v2.6. I'll probably just leave the nymph scripts as they currently are for backwards compatibility with v2.5. The D hotkey can still cast it whenever not in sight of enemies. They just won't use it automatically if invisible. Clicking the "Select All" button will also select summons, so you can have them teleport to the party, even if offscreen.
- added fixed DLL file if TobEx is detected (made by Insomniator from Spellhold Studios forum)
- fixed compatibility issue with Extended Event Text component from Improved GUI mod
Better AI for Call Woodland Beings- now compatible with original BG2 engine
- as with the EEs, the patch option is compatible with atweaks PnP Fey
"Give party starting equipment" tweak:Added a couple tweaks:
- Remove alignment restrictions for classes (classic and EEs)
- Paladins and Rangers do not fall at low rep (EEs)
These affect all classes and kits, including mod-added ones.Also, since the last time I posted in this thread, this component:
- Adjust enemy damage at higher difficulties (classic IWD, IWD2)
was also made compatible with IWD2, thanks to an exe patch by Bubb.v7.0 update
Changes for "Better IWD Pregen":
Changes for "Give party a Bag of Holding":
Changes for "Increase movement speed of IWD shapeshifts":
v6.0 update
"Give party starting equipment" (auto-equip):
"Give party starting equipment" (item bag):
Other updates:
Also:
Download on GitHub: https://github.com/D2-mods/Better-IWD-Pregen/releases
v7.3 update
v7.2 update
Fix/update for 'All classes get full HP bonuses from Constitution':
More options added for these components:
Other Updates:
What I do have right now is something I just found between the Salamander component and SubtleD's Spell Tweaks "Innate Cantrips". I picked the "Option 2 and Cloudburst being party friendly", and it seems to choke on D5CTPTS.SPL:
//ERROR: illegal 2-byte read from offset 152 of 114-byte file D5CTPTS.SPL
//ERROR: [D5CTPTS.SPL] -> [override/D5CTPTS.SPL] Patching Failed (COPY) (Failure("D5CTPTS.SPL: read out of bounds"))
//Stopping installation because of error.
--
Edit:
Mod updated to v7.4
Download on GitHub: https://github.com/D2-mods/Better-IWD-Pregen/releases
I updated the v7.4 downloads (in the OP and on GitHub) that should prevent the issue you were having (with the ".ITM.ITM"). I was able to recreate your error message, by doing these:
- installed the "start with bag containing items" component for IWDEE
- installed a small test mod with not-great parameters for patching (a simple "file exists" check, prevents the error)
Regardless, this particular error will definately not appear again (as in, it's 100% not possible). Note that version number isn't changed yet, but some files are updated.