Author Topic: Adding spellcasting to a class  (Read 868 times)

Legacy_Einzbern

  • Newbie
  • *
  • Posts: 24
  • Karma: +0/-0
Adding spellcasting to a class
« on: August 28, 2010, 05:11:24 pm »


               Not sure if this is the right forum, but lets say I wanted to add spellcasting to a prexisting class that does not normally have it, or perhaps change the spellcasting(ie, make cleric an arcane caster). How would I go about doing it?

For this example, I wanted to add wizard spellcasting to a rogue baseline. After a little fiddling around, I opened up the classes.2da, went to the rogue line and added 'CLS_SPGN_WIZ' to the SpellGainTable column, and changed the SpellCaster column to 1.

I created a new rogue, yet I gained no spells. I have virtually no scripting experience(not sure if any would be required), so I may be in way over my head with this. Either way, any help would be greatly appreciated!
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Adding spellcasting to a class
« Reply #1 on: August 28, 2010, 06:53:13 pm »


               Not possible inless you would modify wizard to get rogues feats/skills etc
               
               

               
            

Legacy_ElgarL

  • Full Member
  • ***
  • Posts: 128
  • Karma: +0/-0
Adding spellcasting to a class
« Reply #2 on: August 28, 2010, 07:07:33 pm »


               Just about ALL character creation is hard coded. I've been digging in the code for a few weeks now and almost everything about initial character creation is hard coded and does NO reading from 2da's.



Any alterations you make to the 2da's will only take effect once you level up, and then it won't add spell casting as it wasn't hooked in at creation.
               
               

               
            

Legacy_Einzbern

  • Newbie
  • *
  • Posts: 24
  • Karma: +0/-0
Adding spellcasting to a class
« Reply #3 on: August 28, 2010, 07:51:07 pm »


               What about adding spellcasting to the classes added by the PRC? Particularly, Swashbuckler and adding full progression to the Bladesinger. Would it be better to ask on the PRC forums instead?
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Adding spellcasting to a class
« Reply #4 on: August 28, 2010, 08:54:43 pm »


               

ElgarL wrote...

Just about ALL character creation is hard coded. I've been digging in the code for a few weeks now and almost everything about initial character creation is hard coded and does NO reading from 2da's.

Any alterations you make to the 2da's will only take effect once you level up, and then it won't add spell casting as it wasn't hooked in at creation.

Not true. Feats/skills are not hardcoded, especially if I predict OP this is for singleplayer where are haks loaded before. So if you would make rogue-wizard combo, everything you need is to add rogue feats to wizard class cls_feat_wiz.2da and cls_feat_rog.2da. And you would want to change hitdice AB etc, this must be done in classes.2da, however there im not certain with hardcoding, maybe for first level the hitdice will be still d4 but other levels it will be correct. The bab works.

PRC uses ugly and troublesome workaround which uses feats. Every level you gain you must (re)select spells you want to learn via conversation which was(last time I tried PRC) bugged (not all choices may appear and then you are lost). Then you gain those spells you selected as feats into radial menu. Very ugly solution. And swashbuckler do not fully work too - the dodge +2> doesn't work properly, neither weakening/wounding critical.

BTW I have PW where I have added spellcasting ability to assassin, I used different approach than PRC however. The Assassin gets at levels 1,3,5,7 feat into radial menu "spells lvl 1-4" which has 5 subfeats with various spells. Then it works like sorcerrer's spells, you cast one, all other uses per day drops by one and the spells per day are dependant on assassin level and inteligence modifier. Its not exactly per rules, but its very user friendly and even more powerful and players likes this. + this enforce assassin to take any prestige class with 1-4 arcane restriction requirements.
               
               

               


                     Modifié par ShaDoOoW, 28 août 2010 - 07:57 .
                     
                  


            

Legacy_Guest_invisig0th_*

  • Jr. Member
  • **
  • Posts: 97
  • Karma: +0/-0
Adding spellcasting to a class
« Reply #5 on: August 28, 2010, 10:32:05 pm »


               

ShaDoOoW wrote...

ElgarL wrote...
Just about ALL character creation is hard coded. I've been digging in the code for a few weeks now and almost everything about initial character creation is hard coded and does NO reading from 2da's.

Not true. Feats/skills are not hardcoded, especially if I predict OP this is for singleplayer where are haks loaded before. So if you would make rogue-wizard combo, everything you need is to add rogue feats to wizard class cls_feat_wiz.2da and cls_feat_rog.2da.

No, ShaDoOoW , you are completely wrong about that.

As ElgarL correctly said above, the initial character creation screens do not use anything loaded from the module's associated HAKs and therfore does not read the 2DAs. You will not see ANY of the changes you are referring to here until AFTER the module is started. This limitiation has been well known among the NWN builder community every since the game was released, and this is one of the main reasons why those seperate character creation tools you mentioned had to be made.

In the future, you should consider trying things like this out in the toolset before telling someone else they are wrong. Running a quick test in the toolset would have quickly shown you that you didn't actually understand how this works.

And you don't have to take my word for it. If you read the many threads about this in the old Bioware NWN forums, you'll see this is correct.
               
               

               


                     Modifié par invisig0th, 28 août 2010 - 09:50 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Adding spellcasting to a class
« Reply #6 on: August 28, 2010, 10:54:55 pm »


               no you are 100% wrong, again

general feats, custom skills, custom spells, base attack bonus (cls_atk_x.2da if you didn't know), skill selection (cls_skill_*.2da if you didn't know), hitdie, bonus feats (cls_bfeat_*.2da if you didn't know), class feats gained at 1. level (cls_feat_*.2da), saving throws (cls_savthr_*.2da if you didn't know) and even skill points base are loaded from override/haks(if SP) in character creation.

All hardcoded whats left is alignment and ability to take other custom classes.

invisig0th, stop echoing false claims and TRY IT ON YOUR OWN next time, its pretty annoying really
               
               

               
            

Legacy_Guest_invisig0th_*

  • Jr. Member
  • **
  • Posts: 97
  • Karma: +0/-0
Adding spellcasting to a class
« Reply #7 on: August 28, 2010, 11:01:30 pm »


               I have, and you're wrong. The game does not read in custom content from a HAK before the character creations screens appear.  And I'm not the only person in this thread who has explained this.
               
               

               


                     Modifié par invisig0th, 28 août 2010 - 10:13 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Adding spellcasting to a class
« Reply #8 on: August 28, 2010, 11:09:08 pm »


               Do you ever try it? I did, you did not, same as in the other thread you (didn't) wanted help. ':sick:'

OP: download this modified classes.2da and put it into your override then run HotU campaign and make new wizard character. You will retain spellcasting abilities and you get all rogue abilities except the DC 35> disarm traps. If you intend this for single player module add the classes.2da to your hak. If you want the players to be able to choose only this new wizard class, change the values in collumn Playerclass to 0 for every base class but Wizard (this works too).

(if you get problems with downloading click at ling right via mouse button and select save as)
               
               

               


                     Modifié par ShaDoOoW, 28 août 2010 - 10:13 .
                     
                  


            

Legacy_Guest_invisig0th_*

  • Jr. Member
  • **
  • Posts: 97
  • Karma: +0/-0
Adding spellcasting to a class
« Reply #9 on: August 28, 2010, 11:14:10 pm »


               Nice try. Didn't you think I'd notice you are changing your story? Above we were talking about HAKs, not overrides. Everyone knows that overrides change things for the entire game, and a HAK only applies to that specific module. Those are two completely different things.

ShaDoOoW wrote...
Feats/skills are not hardcoded, especially if I predict OP this is for singleplayer where are haks loaded before.

Now  try using a HAK, exactly like you quite clearly stated above, and let me know how it goes. Or haven't you tried it?
               
               

               


                     Modifié par invisig0th, 28 août 2010 - 10:22 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Adding spellcasting to a class
« Reply #10 on: August 28, 2010, 11:19:55 pm »


               ':lol:':lol:':lol:':lol:':lol:':lol:':lol:':lol:':lol:':lol:':lol:'

try it yourself, you rattle-head one

I really wonder what should Block this person button does. In our last convesation I decide to ignore you but this feature somehow doesn't work since I still can see your posts.
               
               

               


                     Modifié par ShaDoOoW, 28 août 2010 - 10:23 .
                     
                  


            

Legacy_Guest_invisig0th_*

  • Jr. Member
  • **
  • Posts: 97
  • Karma: +0/-0
Adding spellcasting to a class
« Reply #11 on: August 28, 2010, 11:21:30 pm »


               Post one more personal insult and you will be reported to forum moderators.

If you have questions about how the forum features work, please visit the help forum.
               
               

               


                     Modifié par invisig0th, 28 août 2010 - 10:23 .
                     
                  


            

Legacy_Einzbern

  • Newbie
  • *
  • Posts: 24
  • Karma: +0/-0
Adding spellcasting to a class
« Reply #12 on: August 28, 2010, 11:29:24 pm »


               Appreciate the help ShaDoOoW, but that's not quite what I wanted. Probably should have said this at the start, but I have already figured out how to add rogue feats, skills, bab, etc to the wizard(and thus, other classes). I'm playing with the prc, and wanted to create a 'super' class which included numerous feats. The two problems I ran into were with Insightful Strike from the Swashbuckler, and (although I haven't tried it yet), the int>AC bonus from Bladesinger.



After digging around a little bit, I found that the code for Insightful Strike was tied directly to the Swashbuckler class, so I would have to actually level up as a Swashbuckler instead of just adding iStrike to my feats upon level up.



After further messing around, I was unable to find a way to tie the iStrike script to the Wizard class to make the feat work.



I had originally just planned to give spellcasting to the rogue class baseline for this class, but after being unable to find a way to(this was before I made this thread), I just decided to add the rogue feats/skills/etc to the wizard class. I made this thread to see if there was in fact a way to add spellcasting to the rogue. I figured, if there was, I could apply the same method to the PRC classes and get the same result for adding spellcasting to the Swashbuckler, and full progression to the Bladesinger, so I could grab a (working) Insightful Strike and Int>AC conversion, while keeping my same caster level/spells known/etc as if I had just stuck with the wizard 100%.
               
               

               
            

Legacy_B_Harrison

  • Sr. Member
  • ****
  • Posts: 301
  • Karma: +0/-0
Adding spellcasting to a class
« Reply #13 on: August 28, 2010, 11:30:34 pm »


               Take it easy, guys. Modding's supposed to be fun.

ShaDoOoW's correct; associated haks (and overrides, with lower priority than haks in the case of identical resources) are loaded prior to character generation in single player modules. Alignment restrictions and custom base class selection are the only relevant hardcoded elements.

A distinction should probably be made between hardcode (cannot be modified by editing game files), and implementation limitations (varied behaviour, not applicable or can be overcome depending on game settings and environment).
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Adding spellcasting to a class
« Reply #14 on: August 28, 2010, 11:35:47 pm »


               

invisig0th wrote...

Didn't you think I'd notice you are changing your story? Above we were talking about HAKs, not overrides.

Lets clear this.

ElgarL and you were claiming its hardcoded.
I claimed you both were wrong. I didn't said anything about hak until I described to OP how to get these changes into hak.

So where am I changing my story? Do you ever admit your mistake? It works in override and even in hak (singleplayer-only as I toldd the OP)

So either it's not hardcoded or I have some hacks that allow me to see it in the initial character creation both with hak and override - which I does have not.