Yes, projectile entries from PROJECTL.IDS are off by 1 (most likely to be in sync with the MISSILE.IDS entries). I could integrate entries from MISSILE.IDS into the projectile datatype as well for more descriptive projectile names.
How to add spell on weapon so that every time character attacks, weapon releases some spell with 100% chance? Also, add the same effect with 40% chance.
Yes, projectile entries from PROJECTL.IDS are off by 1 (most likely to be in sync with the MISSILE.IDS entries). I could integrate entries from MISSILE.IDS into the projectile datatype as well for more descriptive projectile names.
Okay, I guess the problem is that the Secondary projectile field is the only one that does not use that +1 offset in-game, unlike every other projectile field, so the projectile it lists is always off.
@kjeron Looks like you're right. Even IESDP mentioned it briefly. I'll fix it in the next release.
@brus There are several ways. It depends on the effect you want to apply. Basically, you add the desired effect to the ability structure of the item that is used for attacking (i.e. Type = Melee) and lower the value in "Probability 1" field if you want to have a less than 100% chance of the effect to be triggered. There are many items in the game, that are using this method. For example, Celestial Fury (SW1H51.ITM) has a 5% chance for extra electrical damage. Another method is adding opcode 248 (Melee hit effect) or 249 (Ranged hit effect) to the weapon as global effect, which applies a specific effect to your attack, which is not necessarily attached to the weapon. OHRBRAC1.ITM in BG2:EE uses this method.
@brus There are several ways. It depends on the effect you want to apply. Basically, you add the desired effect to the ability structure of the item that is used for attacking (i.e. Type = Melee) and lower the value in "Probability 1" field if you want to have a less than 100% chance of the effect to be triggered. There are many items in the game, that are using this method. For example, Celestial Fury (SW1H51.ITM) has a 5% chance for extra electrical damage. Another method is adding opcode 248 (Melee hit effect) or 249 (Ranged hit effect) to the weapon as global effect, which applies a specific effect to your attack, which is not necessarily attached to the weapon. OHRBRAC1.ITM in BG2:EE uses this method.
Thx, for example "chain lightning" releases on hit with 40% chance. Also, if do this on ranged weapon for example sling, does spell triggers from the center of the caster or on target?
It depends on where you want to add this effect. If you want to add it to the launcher (sling, bow, crossbow, ...), then opcode 249 (Ranged hit effect) could be used. If it's a property of the missile, then it can be applied directly to the ability structure of the bullet, arrow, etc. itself.
I'd suggest to open a separate topic if you have more questions not directly related to NearInfinity.
Changes: - Major overhaul of the datatypes used in structured resources: - Improved datatype for song reference fields in ARE resources. - Dynamically changed fields don't cause the selected field to lose focus anymore. - Changed the combined IDS target/value field into two separate fields which are updated dynamically. - Improved projectile list fields by combining entries from MISSILE.IDS and PROJECTL.IDS. - Improved automatic update mechanism of IDS target fields in PRO resources (Enhanced Editions only). - Many internal changes. - Added new Tools->Check->For Illegal Strrefs... feature which checks for out-of-range strrefs in game resources. - Added "Expiry time" field to Item structures in ARE resources. - BS scripts (user-defined scripts) can be selected in relevant resource reference fields. - Extended parameter 2 of opcode 58 (Dispel Effects) in Enhanced Editions. - Updated parameters of opcode 294 (Set Existence Delay). - Improved descriptions of (unused) value fields in GAM's Variable structures. - Fixed infinite blocking bug when opening games via bookmarks. - Fixed a bug which occasionally caused errors in various search routines. - Fixed a bug in "Secondary projectile" field of PRO resources, which uses a different numbering scheme. - Fixed Master/Current area field labels in GAM resources. - Fixed Kit field type in IWD2. - More bugfixes and improvements.
@vanatos The visual appearance of the pocket plane challenge rooms has been implemented as door states. In the Area Viewer you can toggle between the good/evil room designs by checking or unchecking the "Draw closed" checkbox.
Changes: - Fixed an annoying issue which caused very long loading or search times (mainly) for SPL or ITM resources. - Fixed an issue which incorrectly enabled the "Play sound" button for all strings in DLG resources. - Added drag and drop support for files to the whole Near Infinity window. Dropping the CHITIN.KEY asks the user whether to open the associated game. (Note: Text edit windows, such as used for script, 2DA or IDS resources may block this operation because it interferes with their own drag and drop mechanism. Dropping files onto the resource tree, menu bar or status bar should work reliably however.) - Added new "Search reference" feature to MUS resources. - Added more IDS resource entries to the BCS syntax highlighter. - Changed ARE "Wind speed" field into "Overlay transparency" for all Enhanced Edition games. - Fixed display of closed door states in Area Viewer for maps with unusual tile index declarations (e.g. in BG2:EE AR0903.WED).
Found another bug: Strref Lookup should not display cached strings after switching games. Repro:
1. Start NI and open a game of your choice, e.g. BG:EE 2. Press Ctrl+L to open the StringRef lookup 3. Type 27412, press enter 4. Note that you see a journal entry for Reevor's Storehouse quest 5. Open BGII:EE 6. Press Ctrl+L to open the StringRef lookup 7. Type 27412, press enter
Observed: You see the BG1 journal entry for Reevor's Storehouse quest. Expected: You should see a line of BG2 dialog from Jaheira about Galvarey.
Note: Because of a bug in Near Infinity this release won't be detected by NI's own manual or automatic update check. All releases prior to this version (v1.36-20160112) are affected.
Changes: - Added spawned actors by INI file to the Area Viewer (currently used by IWD(EE), IWD2 and PST), including separate icons to distinguish them from ARE-based actors. - SAV resources: Added option to add new internal or external files or replace file entries. Added confirmation when deleting files. - Added "Edit as text" option and hex edit tab to "unknown file" viewer. - Improved consistency check for structured resources to reduce the number of incorrectly detected unused data or holes. This improvement should also reduce the number of hits in "Tools->Check->For corrupted files...". - Fixed an issue with language selections in EET games. - Various text search functions: Fixed an issue with the wrong line auto-highlighted in text files if the first line in the text file was empty. - Lots of internal optimizations in structured resources. - Improved component structure names in VEF resources. - Fixed a bug in NI's update check routine. - Several minor fixes.
Not a bug but when adding an effect to a creature such as modify proficiencies. The option listings are not alphabetically sorted. They are sorted by number. Older versions allow you to type in the edit box to retrieve the effect you're looking for.
Looks like you have found a bug. It's present in any kind of list that is sorted by numbers. I'll fix it in the next release.
As a work-around you can click into the list itself and start typing. The list should automatically select the first matching item relative to the current selection.
@argent77 Another field label: File - *.EFF (as v2 creature effect) Location - DWORD at 0x64 Function - Game time(in ticks) when effect was applied. Carries over when effects convert from one timing mode to another.
Exception - effects applied internally that do not set a parent resource also do not set this value.
Thanks for the information. It looks like this field has been added by one of the latest patches for the EE games. Even BG1:EE doesn't appear to make use of it yet.
Changes: - Added "Import/Export BAM session" feature to BAM Converter. You can export or import the current BAM configuration, which includes BAM frames, center coordinates of frames, cycle definitions and/or filter configurations to/from INI files. - Added option to import or add internal game resources to the BAM Converter in addition to external files. - Added an "Edit BAM" button to the BAM resource viewer which opens the current BAM in the BAM Converter. - Added new "Raw" tab to BAM resource viewer which lets you edit BAM data directly. - Added Save Type bit 25 description (Limit effect stacking) to Effect structures for TobEx installations. - Added new EE-specific field to effect v2 structures: "Time applied (Ticks)". - Added option "Show icons in DLG tree viewer" to Options menu. It can be used to disable the icons in front of dialog state and transition nodes in the DLG tree view tab. - Fixed a side effect of disabling the "Enable transparency" checkbox in the BAM resource viewer which affected the icons displayed in the ITM and SPL viewer. - Fixed a bug in the BAM Converter which didn't always properly update cycle definitions when you added new frames to the frames list. - Fixed autoselection in resource list panels of structured resources when typing into the text field. - Fixed a bug in DLG resources when selecting empty script structures. - Spelling fix "Detect Illusions" -> "Detect Illusion". - Several more minor fixes and improvements.
Thank you, this tool is one of the best out there. Seeing how the last update involved a lot of work with BAM, perhaps you could help me (or pinpoint in the right direction) - I am trying to export some creature graphics from Planescape: Torment, however most of them are colored in all those weird and bright color. Is there a way to reliably find what kind of color palet does the creature or item have in game and apply it in NearInfinity?
These "weird" colors are placeholders for user-defined colors in the games, such as the skin or hair colors you can choose during character generation, or color changes when equipping robes or armor. When you open these BAM files in NI's BAM Converter and click on the Palette button you can see that these colors are actually color ranges (usually 16 colors in a row). You can find a list of color gradients here. The gradient indices can be assigned to the color-related fields in the CRE file structure (such as metal color, skin color, ...).
I don't know where you can find more about creature animations, but you could take a look at the Infinity Animation project. It was designed to expand the original BG2 by new creature animations. Maybe you can find some useful information there.
@argent77 Opcode: 78 - Disease: Note - These values only worked as Spell Effects, not in External .Eff's.
Param2 = 11 - Added presumably for the Mold Touch Spell If Param1 != 0: Deals 1d6 Magic Damage, and applies the Resource Spell to the target, suppressing the usual message:"[Caster]: Casts [Spell]: [Target]". Default/Unlisted Resource: "[Parent]b".spl Delayed durations do not always begin at the right time. Timing Mode = 0 and Duration > 0 = Crash Suggested:
Param2 = 12 - Added presumably for the Mold Touch Spell At intervals, Deals [Param1]d6 Magic Damage, and applies the Resource Spell to the target, suppressing the usual message:"[Caster]: Casts [Spell]: [Target]", and next interval deals 1d6 less. Default/Unlisted Resource: "[Parent]b".spl Delayed durations do not always begin at the right time. Param1 = 0 never fires Param1 = 1 fires once Param1 = 2+ fires once and every other 6 seconds until damage = 0d6. Param1 > 255 = Crash. Timing Mode = 0 = Crash. Timing Mode = 3, ??? hits are sometimes random delay, sometimes hits extra times, possibly broken. Suggested:
Thanks for the info. It sounds pretty complicated though. Btw, it looks like Mold Touch doesn't work if you specify any non-zero values to the dice or special fields of the effect structure.
Special field does have an effect after all. It has some effect on frequency, and can change the damage from {[Param1]d6} to {Param1}.
Special field: 1st and 2nd byte= 0, 3rd and/4th byte!= 0 - Param1 damage every second for 1 Round, along with Resource applied every second, damage reduced by 1 every round. With Param1 != 0, Param2 = 11: 1 1 1 1 1 1 END, with the resource being applied every time. With Param1= 4, Param2 = 12: 4 4 4 4 4 4 3 3 3 3 3 3 3 2 2 2 2 2 2 1 1 1 1 1 1 END, with the resource being applied every time.
Special field: 1st byte = 1, 2nd byte = 0, 3rd and/or 4th byte != 0 - Param1 damage and Resource applied every round, damage reduced by 1 every round. With Param1 != 0, Param2 = 11: 1 - - - - - END, with the resource applied once With Param1= 4, Param2 = 12: 4 - - - - - 3 - - - - - 2 - - - - - 1 - - - - - END, with the resource applied once per round.
Summary: 1st byte: 0 = Frequency per second if byte 3 or byte 4 is nonzero, Defaults to per round without byte 3 or 4 set. 1 = Frequency per round 2+ = ??? Disables effect
2nd byte: !0 = ??? Disables effect
3rd byte: !0 = Damage is Param1 instead of [Param1]d6
4th byte: !0 = Damage is Param1 instead of [Param1]d6
@kjeron The Special field appears to be even more powerful than described in your previous post.
Summary: Frequency (low-order word): 0: Use default behavior if "damage type" is zero, apply effect per second if "damage type" is non-zero >0: Apply effect per amount rounds (Note: Damage reduction is always applied per round for "Mold touch/Decrement (12)", regardless of frequency.)
Damage type (high-order word): 0: Damage is [Param1]d6 !0: Damage is [Param1]
@brus You can do it by assigning the appropriate projectile to the spell (such as INAREAPA.PRO). The projectile field can be found in the Spell Ability structures. You might have to adapt the target and range fields as well if you're altering an existing spell.
Yes, projectile entries from PROJECTL.IDS are off by 1 (most likely to be in sync with the MISSILE.IDS entries). I could integrate entries from MISSILE.IDS into the projectile datatype as well for more descriptive projectile names.
@argent77 Was it logged as an official issue? Weidu coding requires a little arithmetic to fix this off by one issue too. I mean we have to alter the IDS_OF_SYMBOL output from projectl.ids to get the right numerical value.
Projectiles are handled correctly in current NI releases.
You can find the correct projectile ID in MISSILE.IDS. However, this file contains only descriptive text for the majority of projectiles (e.g. "Sparkle Area Chromatic (Party Only)" instead of "SPARCHPA"). To get the actual PRO resource name you have to refer to PROJECTL.IDS again which skips the "None" entry found in MISSILE.IDS and is therefore off by 1.
Understood and thanks for the answer. I am not saying NI does it wrong, sorry if my post is a bit offtopic. As you implemented a little modification in your tool, I just wanted to know if you raised an issue to Beamdog or you already know there is no issue from their perspective.
It has been like this since original BG2 (the first game using projectiles). The different numbering is most likely intended. For example, secondary projectiles specified in PRO files are using the indices from PROJECTL.IDS directly.
Comments
Also, add the same effect with 40% chance.
@brus There are several ways. It depends on the effect you want to apply. Basically, you add the desired effect to the ability structure of the item that is used for attacking (i.e. Type = Melee) and lower the value in "Probability 1" field if you want to have a less than 100% chance of the effect to be triggered. There are many items in the game, that are using this method. For example, Celestial Fury (SW1H51.ITM) has a 5% chance for extra electrical damage.
Another method is adding opcode 248 (Melee hit effect) or 249 (Ranged hit effect) to the weapon as global effect, which applies a specific effect to your attack, which is not necessarily attached to the weapon. OHRBRAC1.ITM in BG2:EE uses this method.
Also, if do this on ranged weapon for example sling, does spell triggers from the center of the caster or on target?
I'd suggest to open a separate topic if you have more questions not directly related to NearInfinity.
Update: NearInfinity v1.36-20151216
Changes:- Major overhaul of the datatypes used in structured resources:
- Improved datatype for song reference fields in ARE resources.
- Dynamically changed fields don't cause the selected field to lose focus anymore.
- Changed the combined IDS target/value field into two separate fields which are updated dynamically.
- Improved projectile list fields by combining entries from MISSILE.IDS and PROJECTL.IDS.
- Improved automatic update mechanism of IDS target fields in PRO resources (Enhanced Editions only).
- Many internal changes.
- Added new Tools->Check->For Illegal Strrefs... feature which checks for out-of-range strrefs in game resources.
- Added "Expiry time" field to Item structures in ARE resources.
- BS scripts (user-defined scripts) can be selected in relevant resource reference fields.
- Extended parameter 2 of opcode 58 (Dispel Effects) in Enhanced Editions.
- Updated parameters of opcode 294 (Set Existence Delay).
- Improved descriptions of (unused) value fields in GAM's Variable structures.
- Fixed infinite blocking bug when opening games via bookmarks.
- Fixed a bug which occasionally caused errors in various search routines.
- Fixed a bug in "Secondary projectile" field of PRO resources, which uses a different numbering scheme.
- Fixed Master/Current area field labels in GAM resources.
- Fixed Kit field type in IWD2.
- More bugfixes and improvements.
On the pocketplane map ar4500, can near infinity see the map visual transitions (challenge area's change visual appearance after it is completed)?.
I am not sure how to do so with this tool.
Update: NearInfinity v1.36-20151227
Changes:- Fixed an annoying issue which caused very long loading or search times (mainly) for SPL or ITM resources.
- Fixed an issue which incorrectly enabled the "Play sound" button for all strings in DLG resources.
- Added drag and drop support for files to the whole Near Infinity window. Dropping the CHITIN.KEY asks the user whether to open the associated game. (Note: Text edit windows, such as used for script, 2DA or IDS resources may block this operation because it interferes with their own drag and drop mechanism. Dropping files onto the resource tree, menu bar or status bar should work reliably however.)
- Added new "Search reference" feature to MUS resources.
- Added more IDS resource entries to the BCS syntax highlighter.
- Changed ARE "Wind speed" field into "Overlay transparency" for all Enhanced Edition games.
- Fixed display of closed door states in Area Viewer for maps with unusual tile index declarations (e.g. in BG2:EE AR0903.WED).
Found another bug: Strref Lookup should not display cached strings after switching games. Repro:
1. Start NI and open a game of your choice, e.g. BG:EE
2. Press Ctrl+L to open the StringRef lookup
3. Type 27412, press enter
4. Note that you see a journal entry for Reevor's Storehouse quest
5. Open BGII:EE
6. Press Ctrl+L to open the StringRef lookup
7. Type 27412, press enter
Observed: You see the BG1 journal entry for Reevor's Storehouse quest.
Expected: You should see a line of BG2 dialog from Jaheira about Galvarey.
Update: NearInfinity v1.36-20160112
Note: Because of a bug in Near Infinity this release won't be detected by NI's own manual or automatic update check. All releases prior to this version (v1.36-20160112) are affected.Changes:
- Added spawned actors by INI file to the Area Viewer (currently used by IWD(EE), IWD2 and PST), including separate icons to distinguish them from ARE-based actors.
- SAV resources: Added option to add new internal or external files or replace file entries. Added confirmation when deleting files.
- Added "Edit as text" option and hex edit tab to "unknown file" viewer.
- Improved consistency check for structured resources to reduce the number of incorrectly detected unused data or holes. This improvement should also reduce the number of hits in "Tools->Check->For corrupted files...".
- Fixed an issue with language selections in EET games.
- Various text search functions: Fixed an issue with the wrong line auto-highlighted in text files if the first line in the text file was empty.
- Lots of internal optimizations in structured resources.
- Improved component structure names in VEF resources.
- Fixed a bug in NI's update check routine.
- Several minor fixes.
As a work-around you can click into the list itself and start typing. The list should automatically select the first matching item relative to the current selection.
Another field label:
File - *.EFF (as v2 creature effect)
Location - DWORD at 0x64
Function - Game time(in ticks) when effect was applied. Carries over when effects convert from one timing mode to another.
Exception - effects applied internally that do not set a parent resource also do not set this value.
Update: NearInfinity v1.36-20160214
Changes:- Added "Import/Export BAM session" feature to BAM Converter. You can export or import the current BAM configuration, which includes BAM frames, center coordinates of frames, cycle definitions and/or filter configurations to/from INI files.
- Added option to import or add internal game resources to the BAM Converter in addition to external files.
- Added an "Edit BAM" button to the BAM resource viewer which opens the current BAM in the BAM Converter.
- Added new "Raw" tab to BAM resource viewer which lets you edit BAM data directly.
- Added Save Type bit 25 description (Limit effect stacking) to Effect structures for TobEx installations.
- Added new EE-specific field to effect v2 structures: "Time applied (Ticks)".
- Added option "Show icons in DLG tree viewer" to Options menu. It can be used to disable the icons in front of dialog state and transition nodes in the DLG tree view tab.
- Fixed a side effect of disabling the "Enable transparency" checkbox in the BAM resource viewer which affected the icons displayed in the ITM and SPL viewer.
- Fixed a bug in the BAM Converter which didn't always properly update cycle definitions when you added new frames to the frames list.
- Fixed autoselection in resource list panels of structured resources when typing into the text field.
- Fixed a bug in DLG resources when selecting empty script structures.
- Spelling fix "Detect Illusions" -> "Detect Illusion".
- Several more minor fixes and improvements.
I don't know where you can find more about creature animations, but you could take a look at the Infinity Animation project. It was designed to expand the original BG2 by new creature animations. Maybe you can find some useful information there.
Opcode: 78 - Disease:
Note - These values only worked as Spell Effects, not in External .Eff's.
Param2 = 11 - Added presumably for the Mold Touch Spell
If Param1 != 0: Deals 1d6 Magic Damage, and applies the Resource Spell to the target, suppressing the usual message:"[Caster]: Casts [Spell]: [Target]".
Default/Unlisted Resource: "[Parent]b".spl
Delayed durations do not always begin at the right time.
Timing Mode = 0 and Duration > 0 = Crash
Suggested: Param2 = 12 - Added presumably for the Mold Touch Spell
At intervals, Deals [Param1]d6 Magic Damage, and applies the Resource Spell to the target, suppressing the usual message:"[Caster]: Casts [Spell]: [Target]", and next interval deals 1d6 less.
Default/Unlisted Resource: "[Parent]b".spl
Delayed durations do not always begin at the right time.
Param1 = 0 never fires
Param1 = 1 fires once
Param1 = 2+ fires once and every other 6 seconds until damage = 0d6.
Param1 > 255 = Crash.
Timing Mode = 0 = Crash.
Timing Mode = 3, ??? hits are sometimes random delay, sometimes hits extra times, possibly broken.
Suggested: It looks like this was done instead of using the more stable Static Charge opcode so they would be removed with the "Cure Disease" effect.
and then it gets weird:
Param2 = 13
Cumulative effects of Param2 = 4, 5, 9, and 10.
-Strength, -Dexterity, -Charisma, and Slow effects.
Param2 = 14+
No Effect.
Btw, it looks like Mold Touch doesn't work if you specify any non-zero values to the dice or special fields of the effect structure.
It has some effect on frequency, and can change the damage from {[Param1]d6} to {Param1}.
Special field:
1st and 2nd byte= 0, 3rd and/4th byte!= 0
- Param1 damage every second for 1 Round, along with Resource applied every second, damage reduced by 1 every round.
With Param1 != 0, Param2 = 11:
1 1 1 1 1 1 END, with the resource being applied every time.
With Param1= 4, Param2 = 12:
4 4 4 4 4 4 3 3 3 3 3 3 3 2 2 2 2 2 2 1 1 1 1 1 1 END, with the resource being applied every time.
Special field:
1st byte = 1, 2nd byte = 0, 3rd and/or 4th byte != 0
- Param1 damage and Resource applied every round, damage reduced by 1 every round.
With Param1 != 0, Param2 = 11:
1 - - - - - END, with the resource applied once
With Param1= 4, Param2 = 12:
4 - - - - - 3 - - - - - 2 - - - - - 1 - - - - - END, with the resource applied once per round.
Summary:
1st byte:
0 = Frequency per second if byte 3 or byte 4 is nonzero, Defaults to per round without byte 3 or 4 set.
1 = Frequency per round
2+ = ??? Disables effect
2nd byte:
!0 = ??? Disables effect
3rd byte:
!0 = Damage is Param1 instead of [Param1]d6
4th byte:
!0 = Damage is Param1 instead of [Param1]d6 Good luck
The Special field appears to be even more powerful than described in your previous post.
Summary:
Frequency (low-order word):
0: Use default behavior if "damage type" is zero, apply effect per second if "damage type" is non-zero
>0: Apply effect per amount rounds
(Note: Damage reduction is always applied per round for "Mold touch/Decrement (12)", regardless of frequency.)
Damage type (high-order word):
0: Damage is [Param1]d6
!0: Damage is [Param1]
You can do it by assigning the appropriate projectile to the spell (such as INAREAPA.PRO). The projectile field can be found in the Spell Ability structures. You might have to adapt the target and range fields as well if you're altering an existing spell.
Was it logged as an official issue?
Weidu coding requires a little arithmetic to fix this off by one issue too. I mean we have to alter the IDS_OF_SYMBOL output from projectl.ids to get the right numerical value.
You can find the correct projectile ID in MISSILE.IDS. However, this file contains only descriptive text for the majority of projectiles (e.g. "Sparkle Area Chromatic (Party Only)" instead of "SPARCHPA"). To get the actual PRO resource name you have to refer to PROJECTL.IDS again which skips the "None" entry found in MISSILE.IDS and is therefore off by 1.
I am not saying NI does it wrong, sorry if my post is a bit offtopic. As you implemented a little modification in your tool, I just wanted to know if you raised an issue to Beamdog or you already know there is no issue from their perspective.