Jump to content

UseItemAbility(S:Object*,O:Target*,I:Slot*SLOTS,I:Ability*)


Guest morpheus562

Recommended Posts

Guest morpheus562

The IESDP used to have information regarding the below Action specific to IWDEE; however, it is no longer listed. Prior, the IESDP noted it was part of IWDEE but could be imported and used into Baldur's Gate.

UseItemAbility(S:Object*,O:Target*,I:Slot*SLOTS,I:Ability*)

The description for UseItem() states:

Quote

This action instructs the active creature to use the specified item (object) on the specified target (target). The ability number (i.e. extended header index) to use may be specified. This action is most often used to allow use of potions and wands. The item to be used must exist in the active creature’s inventory (not in a container within the inventory) - though it need not be equipped.

Is UseItemAbility still applicable, or how do I state the ability number within UseItem()?

Link to comment

Not all script action variants are listed in ACTION.IDS. You have to add the function signature first to make it accessible from scripts, like this:

APPEND ~ACTION.IDS~ ~34 UseItemAbility(S:Object*,O:Target*,I:Slot*SLOTS,I:Ability*)~ UNLESS ~UseItemAbility~
CLEAR_IDS_MAP

The latter command is important for WeiDU to register the ACTION.IDS changes.

Link to comment
Guest morpheus562
12 hours ago, argent77 said:

Not all script action variants are listed in ACTION.IDS. You have to add the function signature first to make it accessible from scripts, like this:

APPEND ~ACTION.IDS~ ~34 UseItemAbility(S:Object*,O:Target*,I:Slot*SLOTS,I:Ability*)~ UNLESS ~UseItemAbility~
CLEAR_IDS_MAP

The latter command is important for WeiDU to register the ACTION.IDS changes.

This is exactly what I do to use this action within my scripts. What I'm asking is why is it no longer showing within the IESDP? Why does the IESDP state UseItem can specify the ability when that is actually not part of UseItems functionality?

What other script action variants are missing from the IESDP? That could be very helpful information to know as I rely on the IESDP to tell me how and what I can make the scripts do.

Edited by morpheus562
Link to comment

There are actually three different variants listed for action 34 in IESDP:

One of them can be used to select the ability. However, the item seems to be chosen by item slot instead of a resref.

But you're right about the missing fourth variant. It should be listed even though it isn't defined in ACTION.IDS. There's already a precedent for this. Action 293 StartDialogOverride() lists the undefined variant for talking with conversable items.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...