Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

New Premium Module: Tyrants of the Moonsea! Read More
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

druid weapons restrictions for ranger kit?

marcosmarcos Member Posts: 65
Like the title says, I'm trying to put together a kit where the ranger can only use weapons open to druids. I can't get it to work. Giving the kit a druid's unusability code has no effect; I can't seem to combine druid and ranger restrictions successfully either. I can only give my kit the restrictions of ranger classes. What should I do?

Blackraven

Comments

  • elminsterelminster Member, Developer Posts: 15,982
    Yea I haven't had much luck with it either. Maybe @CrevsDaak knows?

  • argent77argent77 Member Posts: 2,809
    If your kit is based on the ranger class, then only ranger usability flags will affect it. I don't think it's possible to make items unusable exclusively for a custom kit. You can limit all rangers and their associated kits to druid weapons however, by mirroring the druid's usability flag to the ranger's usability flag (and optionally all of its multiclass combinations) in all relevant item resources of the game.

    elminsterCrevsDaak
  • marcosmarcos Member Posts: 65
    Okay, I have a work-around. Edit the CLAB file and add a passive ability with opcode 181: Disallow Item Type. The disallowed item even has the nice red overlay.

    Downside: No message that you cannot use the item when you try to equip the item, and no little buzzing sound either. Anyone know how to add these?

    Anyway, it looks like I can add the restrictions to my kit...weapon by weapon.

    elminster
  • CrevsDaakCrevsDaak Member Posts: 7,145
    Edit the .spl's effect header with that opcode and hange whatever the parameter1 is to the string you want. The file item_use.2da has the value in it (check the 3rd column), which I don't recall right now. It has the sound attached to th string.

    marcoselminster
  • marcosmarcos Member Posts: 65
    edited November 2014
    Found it: String 9382. Thanks. Even gives me the little buzzing sound.

    elminsterCrevsDaak
  • marcosmarcos Member Posts: 65
    edited November 2014
    Damn: Bastard swords, longswords, short swords, katanas, scimitars, and two-handed swords are all longswords (20). I'll have to take all of them out individually, except the scimitars.

    And opcode 180 will let me exclude them, but they don't have the correct red overlay, letting me know that they're unusable.

    Post edited by marcos on
  • kjeronkjeron Member Posts: 2,137
    You could add opcode 319, Restrict Item, to every Druid-restricted item, targeting your specific kit.

  • subtledoctorsubtledoctor Member Posts: 11,467
    argent77 said:

    If your kit is based on the ranger class, then only ranger usability flags will affect it.

    Wait really?? I thought you could give a kit a usability code from another class and it would have all of the restrictions of both.

    *runs off to check some code*

  • CamDawgCamDawg Member, Developer Posts: 3,397
    marcos said:

    Like the title says, I'm trying to put together a kit where the ranger can only use weapons open to druids. I can't get it to work. Giving the kit a druid's unusability code has no effect; I can't seem to combine druid and ranger restrictions successfully either. I can only give my kit the restrictions of ranger classes. What should I do?

    There are some tricks to be used here, but custom usabilities for kits are not for the faint of heart and involve a crapton of hacks. You're never going to get precisely what you want, I'm afraid. My best advice would be to drop it or, slightly better, simply adopt a usability scheme from an existing kit. You could easily make the kit be limited to druid items by adding the totemic druid unusability flag, but that's not the weapon-only solution you're looking for.

    180 or 319 abuse is an option, but can't affect players who add mods after yours, and also has functional differences (e.g. the red overlay). 181 is overly broad. The only way to really do precisely what you want is to hijack another kit's flag (none of the cleric kits do anything special with their flags). Even then, this is a very bad thing compatibility-wise, and still won't affect mods after yours.

    elminster
  • argent77argent77 Member Posts: 2,809
    edited November 2014

    I thought you could give a kit a usability code from another class and it would have all of the restrictions of both.

    You are mostly correct. You can assign any kit usability of any class to your own kit, but it will only add restrictions defined for this specific kit (which is usually only the difference between the kit's parent class and the kit itself). In the case of the OP you still have to add the basic restrictions of the druid class manually, e.g. by mapping the druid usability flag to the ranger flag or by using techniques suggested by CamDawg.

  • CamDawgCamDawg Member, Developer Posts: 3,397
    argent77 said:

    I thought you could give a kit a usability code from another class and it would have all of the restrictions of both.

    You are mostly correct. You can assign any kit usability of any class to your own kit, but it will only add restrictions defined for this specific kit (which is usually only the difference between the kit's parent class and the kit itself).
    Yeah, for the most part kit flags generally aren't set since they're redundant--e.g. an item marked unusable by a druid generally won't have the totemic druid flag since the item is already disallowed by the class. So if you use the totemic druid flag on a non-druid kit, you'll need a regexp copy to add all of these redundant flags to items as there's no way to directly assign a class usability flag. This is not without a downside--dual-classes out of the kit flag you select may have additional restrictions that they should not have.

  • subtledoctorsubtledoctor Member Posts: 11,467
    edited November 2014
    CamDawg said:

    for the most part kit flags generally aren't set since they're redundant

    Interesting. Makes sense.
    CamDawg said:

    you'll need a regexp copy to add all of these redundant flags to items

    Easy enough I guess, if someone wants to do this. I might actually have to add this to my mod now that I understand it better. But,
    CamDawg said:

    This is not without a downside--dual-classes out of the kit flag you select may have additional restrictions that they should not have.

    Hmm, I'm having trouble envisioning an example of this. Is it something like the following:

    - regexp copy all items such that ranger class restrictions are added to, say, stalker kit restrictions. This should have zero effect for single-class stalkers.

    - Dual-class a stalker to cleric (let's assume that has been enabled). Level up as a cleric until you get your ranger abilities back.

    - Now, (this is the question part) the game sees you not as a [ranger class + stalker kit + cleric class], but as a [cleric/ranger class + stalker kit]...? And if the cleric/ranger usabilities differ from the ranger usabilities + cleric usabilities (possible since there is a dedicated flag for cleric/rangers) then something will be amiss...?

  • kjeronkjeron Member Posts: 2,137


    - Now, (this is the question part) the game sees you not as a [ranger class + stalker kit + cleric class], but as a [cleric/ranger class + stalker kit]...? And if the cleric/ranger usabilities differ from the ranger usabilities + cleric usabilities (possible since there is a dedicated flag for cleric/rangers) then something will be amiss...?

    It's while your first class is inactive that the problem exists. Kit unusabilities apply regardless of your current or active class. This issue already exists for your specific example: a stalker dual-classed to cleric will not be able to wear chain mail or heavier armor while their ranger class is inactive, which is not how it should be.
    Similar thing happens to a Kensai, they are unable to wear any armor or bracers while their fighter class is inactive.

    elminster
  • subtledoctorsubtledoctor Member Posts: 11,467
  • marcosmarcos Member Posts: 65
    CamDawg said:

    There are some tricks to be used here, but custom usabilities for kits are not for the faint of heart and involve a crapton of hacks. You're never going to get precisely what you want, I'm afraid. My best advice would be to drop it or, slightly better, simply adopt a usability scheme from an existing kit. You could easily make the kit be limited to druid items by adding the totemic druid unusability flag, but that's not the weapon-only solution you're looking for.

    180 or 319 abuse is an option, but can't affect players who add mods after yours, and also has functional differences (e.g. the red overlay). 181 is overly broad. The only way to really do precisely what you want is to hijack another kit's flag (none of the cleric kits do anything special with their flags). Even then, this is a very bad thing compatibility-wise, and still won't affect mods after yours.

    Okay, I'm new at all of this--how do I "hijack another kit's flag"? Why and how is it bad for compatibility--the dual class issue people have been talking about above, or something else?

    Thanks for your patience with me--I'm learning.

  • subtledoctorsubtledoctor Member Posts: 11,467
    edited March 2016
    I think it's bad for compatibility because there are only a few flags free for hijacking, but here are dozens - if not more - mods who would like to claim those flags. Every kit mod which has an inkling to have unique item usabilities (meaning, basically every kit mod) would try to claim one of those flags and prevent other mods from doing so. Or really, they wouldn't prevent other mods from doing so, and they would all interfere with each other and the poor player wouldn't know why his game doesn't work right.

    It would be chaos. In a bad way. Better for mods to leave such usabilities alone and figure out a more creative way to make your kit unique.

    Post edited by subtledoctor on
Sign In or Register to comment.