Author Topic: Creating custom spells  (Read 440 times)

Legacy_Ckrauser

  • Newbie
  • *
  • Posts: 24
  • Karma: +0/-0
Creating custom spells
« on: October 06, 2014, 04:48:11 am »


               

I am trying to make some custom spells for a mod I'm working on, but I can't get it to work.


 


So far, I've created a spells.2da file, containing my spell info appended to what's already there, I made the icons I wish to use for the spells, and for the scripts that run for each spell they just print to the log for now.


 


Once I load the mod, and try to make a new character, the spells aren't available to choose from. I have the required level set to 0, and am using the correct spell school.


 


What else am I missing?


Here's what I have (just the barebones): https://www.dropbox....Y6vQhOi-Ga?dl=0



               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Creating custom spells
« Reply #1 on: October 06, 2014, 01:11:32 pm »


               

Without looking at the hak - haven't got NWN installed on this PC - my guess would be that you didn't define the spells in iprp.spells.2da. You'll need an entry in that 2da for each new spell you wish for a character to be able to use.


 


EDIT


 


The above is only true if you want the PC to be able to use the spell for a scroll or wand. Without the spell defined in iprp_spells.2da, the spell will not be a viable option for crafting. 



               
               

               
            

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
Creating custom spells
« Reply #2 on: October 06, 2014, 02:53:50 pm »


               

It looks like you have set the level to 0 for all classes, this means no class will have the spell available, unless given as a feat.


Try setting those columns to 1 for the classes you want to have this spell available to.


 


iprp_spells.2da is for spells you want to use with item properties. It doesn't matter for spells you want to have PCs learn and cast based on spell caster abilities. 


               
               

               
            

Legacy_Ckrauser

  • Newbie
  • *
  • Posts: 24
  • Karma: +0/-0
Creating custom spells
« Reply #3 on: October 07, 2014, 04:35:25 am »


               

Thanks for the replies, I seem to have it semi-working now. A few other questions while I'm here: How would I go about making a .tlk file for my module, and how does iprp_spellcost.2da work? I'm trying to make a spell that has unlimited uses.



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Creating custom spells
« Reply #4 on: October 07, 2014, 08:29:08 am »


               

You dont need to modify iprp_spellcost neither iprp_spells at all. It have to work this way normally. If it doesnt, then my guess is that your 2da is overriden. Are you doing this in clean module? If not does any hak contain spells.2da? If not, dont you have anything like that in any hak in patch folder? (override doesnt matter there as you either putting it into override or hak right?)



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Creating custom spells
« Reply #5 on: October 07, 2014, 08:56:18 am »


               


It looks like you have set the level to 0 for all classes, this means no class will have the spell available, unless given as a feat.




thats another nonsense in this thread, 0 = cantrips


 


what is the problem really (now when i downloaded the hak) is that your 2da is corrupted


 


how are you modifying 2das? do it either manually or use 2da edit v0.63 stop using the tool you using now for sure


               
               

               
            

Legacy_Ckrauser

  • Newbie
  • *
  • Posts: 24
  • Karma: +0/-0
Creating custom spells
« Reply #6 on: October 07, 2014, 09:31:25 am »


               

I got it working exactly how I want it now. I think the version of my 2da from the dropbox was corrupt, but I must have fixed it using my local version. All I was using was emacs. To get the infinite usage, in spells.2da I actually changed these into 'feat spells' by filling in the UserType column to 3 and making a feat.2da for the FeatID. Then it was a simple matter of filling in the appropriate columns and setting USESPERDAY to infinite. iprp_spellcost and iprp_spells don't seem to do anything, so I've removed them.



               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Creating custom spells
« Reply #7 on: October 07, 2014, 01:27:14 pm »


               

Its been a long time since I've done anything with actual custom spells - sorry for the misinformation.Thanks Shadow for setting him straight. 



               
               

               
            

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
Creating custom spells
« Reply #8 on: October 07, 2014, 02:06:46 pm »


               


thats another nonsense in this thread, 0 = cantrips




 


Hhm, forgot about cantrips. In most 2da columns **** is the same as 0 if you read them as ints.  That's how I was reading it.


Thanks for the correction.