Skip to content

[BUG] Opcode 181 (forbid itemtype) does not work

RequiemRequiem 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

Comments

  • SethDavisSethDavis Member Posts: 1,812
    Heya, had to change this effect a bit to fix it.

    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.
  • RequiemRequiem Member Posts: 187
    @sethdavis do you mean that it might be in the patch released today? or the next patch after the one today? I will try using the opcode like you said anyway, and thanks for the quick reply :).
  • SethDavisSethDavis Member Posts: 1,812
    looks like it'll be the next one after today
  • RequiemRequiem Member Posts: 187
    @sethdavis well I will be looking forward to that then, thank you very much for the information.
  • RequiemRequiem Member Posts: 187
    @sethdavis I just have one more request, is it possible to have items disallowed by either opcode 180 or 181 show up with the red overlay in a characters inventory? It's not a huge point but at the moment you can only tell you can't use it by trying to equip it and getting the "can not use item" message.
  • SethDavisSethDavis Member Posts: 1,812
    Hmmm, I don't think it'll be too hard, but I've thought that before. I'll make a note of it and see.
  • RequiemRequiem Member Posts: 187
    edited February 2013
    @sethdavis Outstanding, I really appreciate the quick replies.

    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
    Post edited by Requiem on
  • SethDavisSethDavis Member Posts: 1,812
    alrighty, the overlay wasn't much trouble at all. It should make it into the next patch.

    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.
  • RequiemRequiem Member Posts: 187
    @sethdavis thats great news about the overlay, thank you very much.

    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.
  • Papy_SilkPapy_Silk Member Posts: 44
    edited November 2013
    Hi !

    Does it work now ? If so, could someone explain me how to use it ? Near Infinity can't do it right now.
    Post edited by Papy_Silk on
  • Papy_SilkPapy_Silk Member Posts: 44
    edited November 2013
  • SethDavisSethDavis Member Posts: 1,812
    @Papy_silk - February?!? Sorry that was a previous model of Seth, this might take some thinking.

    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.
  • Papy_SilkPapy_Silk Member Posts: 44
    @SethDavis As far as I can tell, there's no IDS for weapons. Would you have a list by any chance ? (I can trial&error it to death too... but it will be quite long, depending on what's on the list)
  • Papy_SilkPapy_Silk Member Posts: 44
    @SethDavis Well I finally (accidentally) found the list. Thanks a lot for your help and for the tutorial, this will help me a lot.

    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

  • Papy_SilkPapy_Silk Member Posts: 44
    I didn't thought about looking in the "file formats". Not very intuitive. XD I wrote all this for nothing. /cry
Sign In or Register to comment.