Author Topic: Need Help With a Custom Identify Spell  (Read 407 times)

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Need Help With a Custom Identify Spell
« on: July 17, 2012, 01:43:49 am »


               I'm trying to change the identify spell so that it can only be cast on items and just sets the identified flag to "identified". I've got the scripting finished and I changed the Target parameter in spells.2da to 0x08 (which should be an item). However, whenever I cast the spell it lets me target an item, but when the spellscript fires it says that the spell can't target that item. What 2da parameter did I miss?
               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Need Help With a Custom Identify Spell
« Reply #1 on: July 17, 2012, 02:01:16 am »


               Nevermind, I just did an override in my module spellhook script to change the effects of the spell. It now targets correctly.

I've got the spell so that it changes the identified flag to TRUE and has a 1% chance per level of identifying if an item is cursed - a nice little feature that will work well with my "true" cursed items.
               
               

               


                     Modifié par Pstemarie, 17 juillet 2012 - 01:01 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Need Help With a Custom Identify Spell
« Reply #2 on: July 17, 2012, 02:59:11 am »


               Nice idea. I should have thought of this!
               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Need Help With a Custom Identify Spell
« Reply #3 on: July 17, 2012, 05:48:40 am »


               Heh - I just got done putting in dynamic cursing. Basically what happens is when you equip an item that has the variable flag IS_CURSED set to true, the item's cursed and plot flags are set to TRUE and the "benevolent" properties on the item are replaced by "malignant" ones (i.e. anything that's a penalty). You can't unequip the item once the curse is activated (by equipping it). Nor can you drop it or sell it. The only way to get rid of it is to cast remove curse on it - which may not be successful - or perform some sort of quest.

The next step is to put in the code that allows the script to ignore certain properties when swapping, such as alignment, class, or gender restrictions.
               
               

               


                     Modifié par Pstemarie, 17 juillet 2012 - 04:50 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Need Help With a Custom Identify Spell
« Reply #4 on: July 17, 2012, 06:09:25 am »


               Interesting how similar stuff are we doing (you, me, henesua and ShadowM), i have done exactly this (cept the curse recognition via identify ofc).

Just dont swagger much about the idea. In older games, both curses and identify works this way so its not original '<img'>. You really didn't played BG II? Damn, those were the times... Ive get to NWN basically due to the trailer video when installing BG II 'B)'

Anyway, there is a problem I have with this. Player will see the cost of the item in shop and if the item is plot/stolen he will recognize it. Plot items shows 0gp cost and stolen items cannot be sold to most stores. On the other hand, if you dont give the item either of those flags then the player can sell the item for the value this item hardly can have... So far Im not solving this, set the item to be removed from store after sell and giving full price of the fake properties on item.
               
               

               


                     Modifié par ShaDoOoW, 17 juillet 2012 - 05:12 .
                     
                  


            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Need Help With a Custom Identify Spell
« Reply #5 on: July 17, 2012, 11:25:43 am »


               Of course I played BG2 - it was just so long ago that I've forgotten many of the features of that game '<img'>

I'm not really concerned about the whole store idea, since I've kind of fudged my way around that by making my cursed items pretty low-powered and generic.

Can the PC sell the item in a store before it gets flagged as cursed? Yes, since for all intents and purposes it appears to be a different item. The item's true nature isn't revealed until the item gets equipped, so it quite possible that that pair of dusty magical boots sitting on the store shelf is actually cursed!

Will this store "exploit" happen much? Not likely. The module is low-level so that means that when a PC finds a magical item he's probably going to use it. Once the item is used he won't be able to get rid of it until the curse binding it to him is broken. When the curse is broken I flag the item as "stolen" so that shops won't buy it. Of course that won't stop a less reputable shop keeper from buying the item, but the black-market tends to favor such things.
               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Need Help With a Custom Identify Spell
« Reply #6 on: July 17, 2012, 04:42:09 pm »


               Just added some more malicious fun to my cursed items. Whenever you cast a spell from a cursed rod, staff, or wand it has 15% of doing nothing, a 30% chance of working normally, and a 55% chance of misfiring with the effects of a rod of wonder.
               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
Need Help With a Custom Identify Spell
« Reply #7 on: July 17, 2012, 04:51:54 pm »


               Cursed potions with a chance of casting a random spell on the drinker?
               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Need Help With a Custom Identify Spell
« Reply #8 on: August 14, 2012, 12:50:57 am »


               Ooooo that's evil - I LIKE IT!