[BUG] Opcode 181 (forbid itemtype) does not work
Requiem
Member Posts: 187
Expected behaviour: when used (with a relevant item code in parameter 2) and applied to a character thar character should not be able to equip that item. E.g. if used with item code 0x1a it should prevent the character from equipping staves.
Current behaviour: No effect
Current behaviour: No effect
0
Comments
Parameter 1 will now be the item type to be disallowed and parameter 2 will be if the equip(0) or use(1) will be restricted.
Not sure if it'll make it into the next patch or not, but let me know if it breaks any existing items.
While i'm on a roll, and although it's not really a bug, more of a query, is there any possibility of getting any more item types recognised by the engine. None of them are completely new, just to flesh out what is available, I'm more interested in using opcode 181 to block their use out in certain kits than to introduce novel items. I already use a script to automatically sort items into appropriate categories based on some of their attributes.
Categories I was specifically thinking of:
- Elven Chain (same as chain mail, just duplicated and renamed)
- All "large swords" and "small swords" broken down into what they actually are, e.g. 1 category for short sword, 1 category for long sword, 1 category for scimitar, 1 category for ninja-to, 1 category for katana, and so on. (same as parent categories, just duplicated and renamed for each type)
- Wizard and Cleric Scrolls (as 2 seperate categories, same as the existing "scrolls" itemtype just duplicated and renamed).
- Bracers and Gauntlets. (i'm not sure if this has already been split into two categories)
- Heavy Crossbow and Light Crossbow. (same as crossbow just duplicated and renamed)
- Short Bow, Long Bow, Composite Long Bow (same as bow just duplicated and renamed)
- Helmets and Ioun Stones. (ioun stones could possibly go under 0x0048 Hat currently, haven't tested it)
- Necklaces and Amulets. (same as necklaces just duplicated and renamed)
- Hammers and throwing hammers (seperate, same as hammers, just duplicated and renamed)
- Dual-use daggers and throwing daggers (seperate, same as daggers, just duplicated and renamed)
- Dual-use Axes and throwing axes (seperate, same as axes, just duplicated and renamed)
- Dual-use Pears and Javelins (same as spears, just duplicated and renamed)
Whew, big post. Just an idea anyway, i realise you guys are very busy, and thanks again for the updates
As for the expanded list of item types, that would probably be useful for a few different things, but I think you can get what you're after by using effect 180 and disallow these items by their resource name. We might eventually expand the item types but I don't know where it is hiding and it would take a lot of testing. I'll keep it in mind in case I come across it though.
With regards to using opcode 180 over new item types i pretty much came to that conclusion as well, busy writing some code now to read all the files in the game and create blocking spells by each type, seems like the way to do it, thanks again for your help.
Does it work now ? If so, could someone explain me how to use it ? Near Infinity can't do it right now.
Alrighty, I'll attach a testing amulet here for reverse engineering.
If you have a character who has a quarterstaff (Adelia in my case) you should notice that they cannot equip it when wearing the amulet.
Having parameter #1 (the topmost Unknown in effect 181) in NI set t0 1a 00 00 00 will disallow quarterstaves. you should be able to get other item types from an IDS file.
Having parameter #2 set to 0 will prevent the equiping of items, while setting it to 1 will (hopefully) prevent the use of abilities like potions or sandthief ring with the right parameter #1. It's been ages since i tested that so i dunno if it works like that.
As for the list, Near Infinity has it, but not in hexa. For record, here's the list :
00 Misc
01 Amulets
02 Armors
03 Belts
04 Boots
05 Arrows
06 Bracers
07 Headgear
08 Keys
09 Potions
0A Rings
0B Scrolls
0C Shield
0D Foods
0E Bullets
0F Bows
10 Daggers
11 Maces
12 Sling
13 Small Swords
14 Large Swords
15 Hammers
16 Morning stars
17 Flails
18 Darts
19 Axes
1A Quarterstaves
1B Crossbows
1C Hand to hand weapon
1D Spears
1E Halberds
1F Bolts
20 Cloaks and Robes
21 Gold Pieces
22 Gems
23 Wands
24 Containers
25 Books
26 Familiar
27 Tatoos
28 Lenses
29 Bucklers
2A Candles
2B Shield bodies
2C Clubs
2D Female bodies
2E Keys (old)
2F Large Shields
30 Male bodies
31 Medium shields
32 Notes
33 Rods
34 Skulls
35 Small Shields
36 Spides Bodies
37 Telescopes
38 Bottles
39 Greatswords
3A Bags
3B Fur and pelts
3C Leather armor
3D Studded armor
3E Chain mail
3F Splint chain mail
40 Plate mail
41 Full plate
42 Hide armor
43 Robes
44 Scale mail
45 Bastard swords
46 Scarves
47 Rations
48 Hats
49 Gloves