Skip to content

Restrict Item to a Custom Kit

GreenerGreener Member Posts: 430
Would it be possible to restrict an item to a custom kit? As each time a custom kit is installed it takes a new kit number based on what else is already installed...thus there is no way to guarantee that the custom kit will be kit number 43 for example.

Any idea's of a work around?

Comments

  •  TheArtisan TheArtisan Member Posts: 3,277
    COPY ~%MOD_FOLDER%/item/xxxx.itm~ ~override~
    LPF ADD_ITEM_EQEFFECT
    INT_VAR
    opcode = 319
    target = 1
    timing = 2
    parameter1 = (IDS_OF_SYMBOL (~kit~ ~C0SADEPT~))
    parameter2 = 9
    power = 1
    special = RESOLVE_STR_REF (~Shadow Adept~)
    END
  • GreenerGreener Member Posts: 430

    COPY ~%MOD_FOLDER%/item/xxxx.itm~ ~override~
    LPF ADD_ITEM_EQEFFECT
    INT_VAR
    opcode = 319
    target = 1
    timing = 2
    parameter1 = (IDS_OF_SYMBOL (~kit~ ~C0SADEPT~))
    parameter2 = 9
    power = 1
    special = RESOLVE_STR_REF (~Shadow Adept~)
    END

    Thank you
  • [Deleted User][Deleted User] Posts: 0
    edited January 2018
    The user and all related content has been deleted.
  •  TheArtisan TheArtisan Member Posts: 3,277

    Doesn't 319 restrict items from the kit?

    I.e. It acts as unusability.

    No. A power value of 0 affects unusability.
  • GreenerGreener Member Posts: 430
    In that case, any other suggestions?
  •  TheArtisan TheArtisan Member Posts: 3,277
    I’ve used 319 for several of my mods and it works...
  • GreenerGreener Member Posts: 430

    I’ve used 319 for several of my mods and it works...

    I'll try it out, just to clarify if my kit name was ~custom~ would I use the following? I'm a little unclear regarding parameter1

    COPY ~%MOD_FOLDER%/item/xxxx.itm~ ~override~
    LPF ADD_ITEM_EQEFFECT
    INT_VAR
    opcode = 319
    target = 1
    timing = 2
    parameter1 = (IDS_OF_SYMBOL (~custom~ ~custom~))
    parameter2 = 9
    power = 1
    special = RESOLVE_STR_REF (~custom~)
    END
  •  TheArtisan TheArtisan Member Posts: 3,277
    For IDS_OF_SYMBOL, the first entry has to be ~kit~ and the second is whatever reference name the kit is. RESOLVE_STR_REF affects the text that appears in the description so you get an actual kit name instead of “C0SADEPT” or whatever.
  • RaduzielRaduziel Member Posts: 4,714
    You can also restrict a bunch of items in the same code.

    Take a look at the files from my I Hate Undead Kitpack and you'll be able to see a lot of those restrictions (especially for the Burial Defender and Undead Predator) all of them a generous courtesy from my teachers @Gwendolyne and @kjeron .
  • GreenerGreener Member Posts: 430
    Thank you to all who have commented.
  • The user and all related content has been deleted.
  • AquadrizztAquadrizzt Member Posts: 1,065
    If I remember correctly, @subtledoctor , an item with 2 "usable by" effects is unusable by both unfortunately... but I could be wrong, it has been a long time since I used it.
  • kjeronkjeron Member Posts: 2,367
    edited January 2018

    If I remember correctly, @subtledoctor , an item with 2 "usable by" effects is unusable by both unfortunately... but I could be wrong, it has been a long time since I used it.

    This is because it's not really "usable by".
    It's two modes are:
    Not usable by (Parameter1|Parameter2) match.
    Not usable by (Parameter1|Parameter2) mismatch.
  • The user and all related content has been deleted.
  • kjeronkjeron Member Posts: 2,367

    And the mode is set by the "power" value?

    Yes
    0 power = not usable by match
    1 power = not usable by mismatch
    All other values are the same as zero.
Sign In or Register to comment.