Jump to content

A mechanism for planting items


Recommended Posts

I made this setup for rogues' (thieves' and bards') item-planting. The Fallouts have a handy interface for putting items on creatures, but here one has to improvise. This arrangement works, and it could be contained in a special ability, patched into thieves' CLAB files for the 1st level. It's not far from here to a ready mod, all it would take is an ability icon and some TRA strings, but, as the British say, when leaving, leave. Anybody who wants to make the mod is welcome, though.

The hypothetical special ability is non-combat and invokes two Summon creature EFF files on NOTEVIL targets: one invisible minion (A) is summoned on Self, the other (B) on the creature to be given the item - the stooge. For this script the rogue has put the item in the first quick item slot, SLOT_MISC0. But since many items can't be put in quick item slots, one may instead focus on the first inventory slot - SLOT_MISC3, I think. Then it becomes a problem how to take that particular item with the script action that is used here, but with some ingenuity it can be done. Here I have a sort of tested prototype.

The script for A:

IF
    Heard([ANYONE],15665) /// the "Item Bein Taken" shout from B
THEN
    RESPONSE #1
        SetInterrupt(FALSE)        
        SmallWait(5) /// During the transfer
        DropInventory() /// A safeguard for worst-case scenarios
        DestroySelf()
END

IF
    ActuallyInCombat() /// In case fighting broke out while it was materializing
    Global("HAS","LOCALS",0) /// Has taken nothing yet
THEN
    RESPONSE #1
        DestroySelf()
END

IF
    Global("HAS","LOCALS",0)
    !HasItemSlot(LastSummonerOf,SLOT_MISC0)
THEN
    RESPONSE #1
        DisplayString(LastSummonerOf,@X)  /// Where did I put that thing? - It's always better to write engine strings in-character, if possible
        DestroySelf()
END

IF
    OnCreation()
THEN
    RESPONSE #1
        SetGlobal("HAS","LOCALS",1)
        TakeCreatureItems(LastSummonerOf,QUICKITEMS) /// Another check would be needed above to make sure only the leftmost slot is occupied
        Shout(56651) /// Signaling to B
END

IF
    Global("HAS","LOCALS",1)
THEN
    RESPONSE #1
        Shout(56651) /// Continue to yell to be heard for certain
END

The script for B:

IF
    Heard([ANYONE],56651) /// A is loaded
THEN
    RESPONSE #1
        ActionOverride(LastSummonerOf,TakeCreatureItems(LastHeardBy,ALL)) /// The stooge takes the stuff
        Shout(15665) /// A is free to disappear
        DestroySelf()
END

These minions need to be furnished with a bunch of immunities it always makes sense to give in such cases - to Damage and Slay so they don't accidentally die in a Cloudkill, to visual effects and so on, but especially to deafness. Deaf creatures don't hear shouts. As far as representation goes, the only weakness here is that the stooge will visibly strain after being made to take the item, when he should be pleasantly ignorant of the deed being done to him, but I don't think that can be avoided. Maybe it can be covered by making the creature turn around or something like that.

These scripts are for instant success, but because planting should work as a reverse of picking pockets, A's script should really be more complicated than I wrote and include Pick Pocket checks for the rogue. It's not necessary to count every point, increments of 5 points should be enough. No points would mean automatic failure, anything higher would involve checks like this:

IF

CheckStatGT(LastSummonerOf,PICKPOCKET,0)
CheckStatLT(LastSummonerOf,PICKPOCKET,6) /// Under 5%

THEN

RESPONSE #1
SetGlobal("HAS","LOCALS",1) /// And so on
...
RESPONSE #20
Shout(88445)
DestroySelf()

END

B would, of course, have

IF

Heard([ANYONE],88445)

THEN

RESPONSE #1
DisplayString(LastSummonerOf,@Y) /// Plant Item failed
ChangeEnemyAlly(LastSummonerOf,ENEMY)
DestroySelf()

END

Another reason why I'm not making such a mod myself is that, alas, there is no point to planting items on NPC. In the Fallouts you could equip people who had to go away with ticking dynamite stacks, there might have been one or two times when planting something on someone was involved in a plot, but it wasn't commonly called for even there. In the fantasy games there is nothing of that sort. Still, inventive modders could come up with items for assassination, planted evidence and so on.

Edited by temnix
Link to comment
On 6/6/2022 at 3:49 AM, temnix said:

As far as representation goes, the only weakness here is that the stooge will visibly strain after being made to take the item, when he should be pleasantly ignorant of the deed being done to him, but I don't think that can be avoided. Maybe it can be covered by making the creature turn around or something like that.

As far as scripting commands go, you can use:

ActionOverride(LastSummonerOf,SetSequence(SEQ_HEAD_TURN))

aVENGER did this many years ago.

Or as an effect externalized to .spl; opcode 138 parameter 2 set to 6

Link to comment

I have tried using the head turn. The NPC still jerks for a brief moment, it looks unnatural. Applying that through a spell would probably look no better, because that must still be done by the minion.

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...