Author Topic: Renaming Spells with spells.2da  (Read 521 times)

Legacy_ConnHurr

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Renaming Spells with spells.2da
« on: February 26, 2015, 11:22:28 pm »


               

I'm trying to modify the label of a spell so when you hover over it on the quickbar it is not the default name (i.e. Magic Missle). 


 


I edited the name column in the spells.2da to **** and put the custom name under the Label Column "Towel". When I launch the game however it says bad strref. I can't seem to get rid of this error.


 


Any suggestions? Thank you!



               
               

               
            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
Renaming Spells with spells.2da
« Reply #1 on: February 26, 2015, 11:51:08 pm »


               

That's because the "Name" column is meant to hold the index of the string to display, instead of the string itself. The index points to a string in dialog.tlk. 



               
               

               
            

Legacy_ConnHurr

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Renaming Spells with spells.2da
« Reply #2 on: February 26, 2015, 11:57:01 pm »


               

I put **** for the name column. And according to http://nwn.wikia.com/wiki/Spells.2daif the name column contains ****, the Label will be displayed.


So what I have:

Label               Name

Towel              ****

 


In game I get BadStrRef instead of towel.


Thanks in advance.



               
               

               
            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
Renaming Spells with spells.2da
« Reply #3 on: February 27, 2015, 11:14:24 pm »


               

I am also unable to get the "Label" column to work as the wiki describes.  I am betting the explanation was based on released BioWare documentation, which in this case means this feature was not implemented.



               
               

               
            

Legacy_3RavensMore

  • Hero Member
  • *****
  • Posts: 1153
  • Karma: +0/-0
Renaming Spells with spells.2da
« Reply #4 on: February 27, 2015, 11:49:45 pm »


               


I am also unable to get the "Label" column to work as the wiki describes.  I am betting the explanation was based on released BioWare documentation, which in this case means this feature was not implemented.




 


The wiki states the Label fields is not used by the game engine, it just makes it easier to locate specific spells within the file 2da.  You'll need to edit the .tlk file to change the spell name. 


 


To make it work:


Pick a blank entry in the .tlk file, and add the new spell name. 


In the spells.2da, add the line number in the .tlk file to 16777216.  That is number you'll need to enter in the Name field in the spells.2da file for your spell. 


               
               

               
            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
Renaming Spells with spells.2da
« Reply #5 on: February 27, 2015, 11:57:46 pm »


               


The wiki states the Label fields is not used by the game engine, it just makes it easier to locate specific spells within the file 2da.  You'll need to edit the .tlk file to change the spell name. 




 


Correct, I updated the wiki to reflect ConHurr's and my experience (see the page history).