Howdy, Stranger!

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

Categories

Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

how to get spell info and/or class use limitation type from a scroll?

Hi,
I am just modding the legend lore spell and one effect I want it to have is to remove any class use limitations from arcane scrolls. How can I determine if the scroll has an arcane spell or a Wizard class use limitation?

Comments

  • GrymlordeGrymlorde Member Posts: 121
    The simplest and fastest way is to make a copy of the legend lore scroll, remove the use limitation class properties, save it, and use it instead of the standard one.

  • CalgacusCalgacus Member Posts: 272
    edited August 2018
    Hi Grymlorde,
    You are right about that but what I want to do is change the Legend Lore spell. I want the spell to remove class use limitations on arcane scrolls. The idea is to
    A: give the Legend Lore spell something useful to do and
    B: to have a way in the game for non-casters to use arcane scrolls when really needed but at a price. A fighter for example might have to make nice with a grumpy wizard and pay to remove the class use restriction removed from some scrolls he found. I only want this to work for arcane scrolls though and to cost according to the level of the spell and caster level of the scroll. I will also need to make the spell target an item/object so I can have it run any other effect I want relating to the given target.

    However, given the way UMD works I guess it might make sense to drop the "only arcane" requirement as my motive for that rule is just that I don't like the idea of an evil character who worships the Norse God of Evil Darkness using a scroll created by a good cleric of the Egyptian God of Good Lightness. I would prefer if Divine scrolls did not work with UMD or Legend Lore. But then I guess I would want to expand that rule to include other magic items of a divine-magic nature. Not sure how to do that and therefore might end up with an inconsistently applied rule.

    On a related note I also want to tweak the Identify spell so it applies to a single item or object and maybe not give the Lore bonus. I guess I will make it give a small fixed (+5 maybe) Lore bonus if triggered from Potion of Lore or targeted on a character - might be useful to cast on the parties designated item identifier for example.

  • MelkiorMelkior Member Posts: 9
    I'm not sure if it's possible to find and remove the class limitation on a scroll. I'd have to look into that to see if it can be done or if there's a work-around (other than Use Magic Device skill points).

    But as for identifying items, you can change the spell in the 2da file so that it's cast on an object instead of self-only, and then change the coding so that if it's cast on self it behaves as normal, but if it's cast on an item it sets the item identified flag.

    Alternatively, if you don't want to fiddle with the Identify spell, you can give the player a custom object which can "Cast Spell" on an item and which then identifies the item.

  • MermutMermut Member Posts: 44
    The class restriction is an item property. You should be able to remove it via scripting. Alternately, you can make a custom version of the scrolls without any class restrictions (or with modified one).

  • CalgacusCalgacus Member Posts: 272
    edited August 2018
    Thanks all but I think I got it now, basically as follows but with some finer points to be hammered out later:

    itemproperty ip = GetFirstItemProperty(oItem); int found = FALSE; while (GetIsItemPropertyValid(ip)) // valid ip? { // same property type? if ((GetItemPropertyType(ip) == ITEM_PROPERTY_USE_LIMITATION_CLASS)) { SpeakString("has sub-property == "+ IntToString(GetItemPropertySubType(ip))); if (GetItemPropertySubType(ip) == IP_CONST_CLASS_WIZARD) { SpeakString("has sub-property wizard " ); found = TRUE; } if (GetItemPropertySubType(ip) == IP_CONST_CLASS_SORCERER) { SpeakString("has sub-property sorc " ); found = TRUE; } if (GetItemPropertySubType(ip) == IP_CONST_CLASS_BARD) { SpeakString("has sub-property bard " ); found = TRUE; } if (GetItemPropertySubType(ip) == IP_CONST_CLASS_CLERIC) { SpeakString("has sub-property cleric " ); } if (GetItemPropertySubType(ip) == IP_CONST_CLASS_DRUID) { SpeakString("has sub-property druid " ); } if (GetItemPropertySubType(ip) == IP_CONST_CLASS_PALADIN ) { SpeakString("has sub-property paladin " ); } if (GetItemPropertySubType(ip) == IP_CONST_CLASS_RANGER) { SpeakString("has sub-property ranger " ); } if(found){ RemoveItemProperty( oItem, ip); } } ip = GetNextItemProperty(oItem); }

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