Jump to content


Photo

Opcode 183 Apply Effect Itemtype


  • Please log in to reply
4 replies to this topic

#1 Demivrgvs

Demivrgvs
  • Member
  • 143 posts

Posted 22 June 2013 - 02:27 AM

Did ToBEx really fixed this opcode? :)

 

A player mentioned this here at G3, and with a quick search I found out AndreaColombo at BGEE says here that both 182 and 183 have been fixed...so, I looked at Modder Reference again and found out it seems true (not sure why I never noticed it before - is it recent?).

 

Now I'll have to try it asap because it opens way too much opportunities, and I'd be the happiest man on earth if it works as I hope, but I have a couple of questions:

 

1) how does it work the 'Type' field? Does it reference an IDS or 2DA? Or does it simply pick from item "category" entry (e.g. Armor 2, Plate Mail 64, Full Plate 65, etc.)?

 

2) I'm not sure I understand this: "Limitations: the effect is applied again if an already equipped matching itemtype is used to force-attack a target via the quickbar." So, if applied to a weapon the effect is re-applied if you select the weapon?

 

3) What if the itemtype is not equipped anymore? Does 183 work as a repeating EFF which checks every x time if the item is still equipped? Or is it a "one time only" check?

 

Thanks in advance.

 

 



#2 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 22 June 2013 - 03:52 PM

Did ToBEx really fixed this opcode? :)

A player mentioned this here at G3, and with a quick search I found out AndreaColombo at BGEE says here that both 182 and 183 have been fixed...so, I looked at Modder Reference again and found out it seems true (not sure why I never noticed it before - is it recent?).
Yeah, it has been there a while. :)
 
1) how does it work the 'Type' field? Does it reference an IDS or 2DA? Or does it simply pick from item "category" entry (e.g. Armor 2, Plate Mail 64, Full Plate 65, etc.)?
This is the item type as described in IESDP ITM V1.0 0x1c field. Yes, your examples are correct.
 
2) I'm not sure I understand this: "Limitations: the effect is applied again if an already equipped matching itemtype is used to force-attack a target via the quickbar." So, if applied to a weapon the effect is re-applied if you select the weapon?
Essentially, be very careful about using permanent timings with incremental change (e.g. heal when equip itemtype) stuff.
Example: Let's say A equips an amulet of heal (the amulet heals 3 HP every equipping event of itemtype mace). Now I equip A with a mace -> heal 3 HP. While the mace is still equipped, if I decide to use F2 to quick-select the mace from the quick-bar (even though the mace is already the weapon currently being equipped), A will heal 3 HP again.
 
3) What if the itemtype is not equipped anymore? Does 183 work as a repeating EFF which checks every x time if the item is still equipped? Or is it a "one time only" check?
Can't remember exactly, but whenever the inventory state of a creature changes, the list is re-checked and effects re-applied (since the itemtype effect list forms part of the same structure that stats are stored).
 
Hope that helps.

Edited by Ascension64, 22 June 2013 - 03:54 PM.

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

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

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


#3 Demivrgvs

Demivrgvs
  • Member
  • 143 posts

Posted 23 June 2013 - 08:25 AM

Cool, I'm still not sure about its limitations or possible issues, but I'll surely try this out. It has a huge potential imo. For example it should be able to give the Cavalier kit a +x bonus to AC when wielding a shield without causing the above mentioned issue, am I correct?

 

Anyway, thanks again for your work and for taking some time to help me. :)



#4 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 23 June 2013 - 03:40 PM

Yeah, it should work fine with that.
If you want to try and test the limitation, you can repetitively re-equip said shield (e.g. sword and shield combo) via quickbar and see if the creature's AC keeps getting better. If the AC sits correctly at +x better than the previous AC, then it should be fine.

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

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

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


#5 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 19 July 2013 - 05:39 AM

When I use timing mode 2 in the EFF, it is constantly reapplied whenever I re-equip the item (e.g. shield). Saving and loading the game dispels the entire stack.

 

1) Timing mode 2 shouldn't stack the effect, or there should be some other way to make it disappear when an item is un-equipped.

2) The effect should be automatically applied - if itemtype is equipped - upon loading the game.


Retired from modding.