Guest Penang Posted August 1, 2019 Share Posted August 1, 2019 I want to restrict items to NPCs and I've been copying the existing 319 effect from existing NPC items and modifying them. I want to change Haer'Dalis' swords to restrict by actor's scripting name like the rest of the NPC items instead of by race (tiefling). Unfortunately, setting parameter #2 to 11 (actor's scripting name) has a maximum of 8 characters. "HAERDALIS" is 9 characters long. Is "HAERDALI" his actor's scripting name? Other NPCs have names <= 8 characters so Haer'Dalis had me stumped. Quote Link to comment
Guest Penang Posted August 2, 2019 Share Posted August 2, 2019 I tried using parameter #2 to 10 (actor's name) and used a STRREF that points to string "Haer'Dalis" and started a new game but Haer'Dalis can't use them. Maybe I'm setting it wrong. Anyway to restrict these items to Haer'Dalis without restricting it by Race, Class, Alignment, Kit, Stats (except the normal restrictions: Strength 5, must not be Cleric, Druid or Mage)? Quote Link to comment
argent77 Posted August 2, 2019 Share Posted August 2, 2019 Actor's script name is indeed limited to 8 letters, and defining it via EFF file (which allows up to 24 letters) doesn't work for this opcode. But using Actor's name strref should work fine. Make sure to set the Power field to 1 though, to actually restrict the item to the specified target. Quote Link to comment
Guest Penang Posted August 2, 2019 Share Posted August 2, 2019 This is what it looks like in NearInfinity. Can you guys check? Thanks! Type: Restrict item (319) Target: Self (1) Power: 1 Actor's name: Haer'Dalis IDS target: Actor's name (10) Timing mode: Instant/While equipped - 2 Dispel/Resistance: Natural/Nonmagical (0) Duration: 0 Probability 1: 100 Probability 2: 0 Unused: 48 41 45 52 44 41 4c 49 h # dice thrown/maximum level: 0 Dice size/minimum level: 0 Save type: ( No save ) Save bonus: 0 Description note: Haer'Dalis Quote Link to comment
argent77 Posted August 2, 2019 Share Posted August 2, 2019 The opcode definition look fine so far. Btw, which name strref did you place into the parameter1 field? Many CRE files are using different strrefs for their "Name" and "Tooltip" fields. It should definitely work with the strref from the "Name" field. Quote Link to comment
Guest Penang Posted August 2, 2019 Share Posted August 2, 2019 Hi Argent77 I used 9182 as STRREF in the Actor's Name and Description Note. Quote Link to comment
argent77 Posted August 2, 2019 Share Posted August 2, 2019 Yes, that should be the correct strref. If it still doesn't work, try unchecking all usability flags (if there are any set). The opcode restriction should be enough to make it usable exclusively by the target. Also make sure there are no duplicate opcode 319 entries. They might interfere with each other. Quote Link to comment
Guest Penang Posted August 3, 2019 Share Posted August 3, 2019 I just created a new game and it worked! I guess I didn't test it properly the last time. Thanks argent77 Quote Link to comment
Recommended Posts
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.