Author Topic: Community Patch discussion and development thread  (Read 20323 times)

Legacy_Tonden_Ockay

  • Hero Member
  • *****
  • Posts: 891
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #795 on: February 16, 2016, 11:12:08 am »


               

Nice I love your work Shadooow. 



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #796 on: February 17, 2016, 04:14:14 am »


               

I am making progress.


 


Managed to enable the spellbook for custom class.


 


Showcase image


 


Its still just beginning, although I can prepare spells and cast them, I still need to figure out spellbook population as currently every single spell with same innate level shows there. And thats only the prepared and non-learner class type, the spontaneous or learning type of class will need to be coded separately.


 


Still its very promising I was able to make such big progress in matter of hours which I really didn't expect lol.



               
               

               
            

Legacy_Tonden_Ockay

  • Hero Member
  • *****
  • Posts: 891
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #797 on: February 17, 2016, 10:50:51 am »


               

WOW this is very good to hear.



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #798 on: February 17, 2016, 02:32:58 pm »


               

I finished the first task of this project and its available for testing.


 


download


EDIT: reuploaded new version which now properly calculates bonus spellslots for high ability score


 


instructions:


 


put nwncx_patch.dll and nwnx_patch.dll into NWN folder


put classes.2da and spells_levels.2da into override folder


 


now, run nwn server via NWNX2.exe or nwn client via NWNCX_Loader.exe. Note, that in multiplayer, clients without nwncx_patch wont be able to see "known" spells in the spellbook panel as thats entirely client-side thing. So in multiplayer it needs both client and server run with NWNX.


 


the classes.2da included in this package is modified to make assassin base class, arcane spellcaster with a divine-type of spelllist ie. character knows all spells from given level automatically. Also I modified class commoner to be spellcaster. This is quite messed up, I definitely recommend to make your own classes.2da, perhaps to use it for PRC classes like Anti-Paladin. Note: I dont think the class needs to be base class. It should normally work on prestige class too - I changed assassin to be base class just for easier testing.


 


now technical info


 


classes.2da


SpellCaster must be 1 to allow spellcasting (obviously)


SpellGainTable  must be filled


SpellKnownTable  musntn't be filled


CastingAbility is now equal to PrimaryAbil column and it should now be possible to change this for vanilla spellcasters


LearnScroll column is unfinished - it will show the learn scroll GUI but clicking on it will not work for non-wizard yet, so ignore this


CastType is supposed to be a bitflag, but at this moment it has only one flag and thats Arcane = 128, so if you want your spellcaster to be arcane set CastType = 128, otherwise leave 0, arcane spellcasting is affected by armor/shield failure, deafness and maybe something else, not sure


spells_level.2da


this is special 2da that controls which spell shows in custom spellcaster class spellbook


basically, if you add a custom spellcaster class, you need to add a new column in this 2da with name = row_id of the class


so in my case as I allowed to cast Assassin which ID is 30 I added new column "30" without quotes, then just add values for each spell you want this class to know, values are the same as for classes.2da columns.


 


I tested this in both singleplayer and multiplayer, however my testing wasn't very thorought and Im especially curious whether it will work in a multiplayer without player neededing these 2das in override. It should, however untested.


 


This is very limited in the current state and only allow to create a memorization spellcaster with preset known spells. It should also be possible to set certain spells to be spontaneous for custom spellcaster via the nwnx_patch spontaneous casting feature as explained in readme. But untested.


 


Oh yea and I don't think it will be compatible with nwnx_spells plugin for linux. The possibility is there, but I doubt it, the linux plugin works completely differently.



               
               

               
            

Legacy_WodahsEht

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #799 on: February 22, 2016, 12:34:22 am »


               

Shadooow... I can't believe you've done it.  I think the community needs to get hyped!


 


Any chance you can make this system work with the Sorcerer/Bard and leveling up in a Prestige Class?  There's already a class in the game that could benefit greatly from this - the Pale Master.  PM's are pretty much Wizard-only at the moment.



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #800 on: February 22, 2016, 09:02:15 am »


               


Shadooow... I can't believe you've done it.  I think the community needs to get hyped!


 


Any chance you can make this system work with the Sorcerer/Bard and leveling up in a Prestige Class?  There's already a class in the game that could benefit greatly from this - the Pale Master.  PM's are pretty much Wizard-only at the moment.




im working on the spontaneous casters since saturday and i managed to make a progress but spontaneous casters turned to be much more problematic than memorized


 


atm i am able to get the lvlup spell selection and it shows up in spellbook but spells from custom spontaneous class has 0 spell uses and it will take me a while to fix this


 


the prestige class levelling + sorc/bard is completely different issue, Im not even sure whether the spell selection should be there per rules- this is not priorty for me atm and it can be workarounded via nwnx_funcs - I have a script system that allows to add new spells via store inventory - i will make an image, its not perfect solution but it worked for me in past


               
               

               
            

Legacy_WodahsEht

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #801 on: February 23, 2016, 12:47:37 am »


               

I can definitely see why it's not a priority, but since you're already in there, figuring out the inner workings of how NWN does its thing, it should be doable.


 


As for the "spells known" question... I think it was always pretty vague.  Sometimes they explicitly said it does increase spells known, other times it's left out.  I'm not aware of any classes that use the spells per day mechanic that explicitly state that the character does NOT gain spells known.  Community consensus seems to be that it does include spells known.  This is how NWN2 implemented it.


 


All that being said, a Sorcerer (or Bard) taking a caster-advancing PrC is really handicapped without the "spells known" rule.



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #802 on: February 24, 2016, 07:54:22 pm »


               

spontaneous spellcasting is almost fully done


 


screenshot


 


still have some issues with saving/loading (no spell uses after loading a saved game) that I need to solve before I will release a working dll.


 


 




I can definitely see why it's not a priority, but since you're already in there, figuring out the inner workings of how NWN does its thing, it should be doable.




 


Unfortunately this looks extremely complicated. I dont think its even possible to show up spell selection window when leveling Pale Master (or custom class enhancing base spellcasting). Probably the best I can do is to calculate PM into max number of the spells known which should theoretically allow to fill those extra spells known at next sorc/bard level.


 



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #803 on: February 24, 2016, 10:51:35 pm »


               

Ok I have a compiled plugin for testing. Atm only client version. There will be issues thats guaranteed and before they get all fixed its pointless to maintain two versions client and server.


 


Plugin download - for those who didn't follow it, its available as a nwncx_patch plugin to be used with NWNCX.


Test 2DAs I used in work - grab if you need help to understand how to configure it or if you are lazy to make your own 2das.


Rough readme - should explain everything.


 


Base features:



  • cleric-type of casting (automatically knows all spells of given level) - done




  • wizard-type of casting (knows only spells from lvl up) - done




  • sorcerer-type of casting (spontaneous) - done




  • fully working level up/character creation for custom spellcasters



  • fully controlled by 2DA

Additional features:



  • removed hardcoded restriction on paladin and ranger spellcasting - both classes can now cast from lvl 1 if builder changes cls_spgn_rang/pal.2da appropriately




  • hardcoded intelligence, charisma and wisdom for spellcasting purposes changed to class primary ability




  • custom spellcasters can learn spells from scrolls (note multiclass of two or three such classes is not supported atm - need to figure how to select which class to use)




  • complete rewrite of the familiar and animal companion selection - will now dynamically appear at the level the class gets the summon familiar/animal companion feat and regardless of casting type. This works with vanilla classes and custom classes, if you change ranger to obtain animal at lvl 1, the selection will automatically appear, if you change summon familiar for summon animal companion for sorcerer, he get animal companion selection instead of familiar.




  • softcoded familiar and animal companion summoning - already existing CPP feature - this is needed to calculate level or rather resref of the summoned creature as normally the level is calculated from sorc+wiz and druid+ranger levels



  • fixed vanilla bug in spellbook where spontaneous caster at the 3rd class position had no spell icon for cantrips if such class had only cantrips (which was true for bard)

If you encounter some issue, like incorrectly calculated spell uses, spells known, or something not working at all send me a savegame before that problem occurs with instructions what to do to reproduce it. Also I might need your classes.2da and spells_level.2da files.



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #804 on: February 25, 2016, 08:37:54 pm »


               

Im waiting for any betatest reports before I will continue with custom spellcasting in the meantime I enabled customization of the unarmed damage via 2da.


 


This was actually quite tricky to do, because I found out that there is hidden interaction with Shou Disciple and Monk and their unarmed damage. Turns out that medium sized Monk11+/Shou5 has due to the bug/overlook in code 2d20!! damage.


 


The way it should work is that it takes better of shou unarmed damage or monk unarmed damage, but monk unarmed damage calculation stacks shou levels. Very confusing, but I managed to make it work and fix the bug.


 


The 2da customization however won't allow to stack with monk like Shou, but the code will automatically take best result. So if you had a build:


Monk 11 (1d20 as it stacks with shou)


Shou 5 (2d6)


Brawler 20 (2d12)


it will take the 2d12


 


this also enables to input different values for tiny, large and huge creature size



               
               

               
            

Legacy_WodahsEht

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #805 on: February 26, 2016, 01:47:31 am »


               

Are you talking about the Brawler from the PRC?  (I actually designed and implemented that class... many moons ago.)  It's designed to be an non-mystical, martial alternative to the monk, and it does not stack.



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #806 on: February 26, 2016, 01:58:56 am »


               


Are you talking about the Brawler from the PRC?  (I actually designed and implemented that class... many moons ago.)  It's designed to be an non-mystical, martial alternative to the monk, and it does not stack.




thats just example, it can be used also to modify base unarmed damage for anyone specifying 2da for every class


 


I know the unarmed dmg can be workarounded via the creature weapon slots, but I needed to fix the bug with Shou anyway and it will be easier to use since creature weapons have many issues as you surely know.


 


But yes, ultimately I want my plugin to enable virtually anything from PRC for example. Im already working on a custom Smite damage calculation whch will automatically calculate any custom prestige class with smite together wth pal/cot or bg


               
               

               
            

Legacy_WodahsEht

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #807 on: February 26, 2016, 02:46:52 am »


               

Everything I tested seems okay.  One thing you may not be able to work around is that I don't think you can select a domain and an animal companion at the same time.  I took your custom druid class and added domains.  I could select domains at Level 1 but I couldn't select an animal companion until Level 2.



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #808 on: February 26, 2016, 03:07:27 am »


               


Everything I tested seems okay.  One thing you may not be able to work around is that I don't think you can select a domain and an animal companion at the same time.  I took your custom druid class and added domains.  I could select domains at Level 1 but I couldn't select an animal companion until Level 2.




Hmm I see, that won't be in my abilities, so I will add it into the list of missing features.


There will be similar problem with spellschools - selecting spell schools will automaticaly enable spell selection even if its class that doesnt learn spell.


 


Stll both domains and spell school is hardcoded to cleric and wizard only, I only allowed to select it atm.


               
               

               
            

Legacy_WodahsEht

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #809 on: February 26, 2016, 04:02:31 am »


               

Here's another request to mull over: softcoded metamagic.