Additional notes to the release:
1) New polymorph engine new feature.
I will probably write a tutorial for this but this is a very exciting feature, I get this idea when I was helping WhiteTiger with his module, he needed to disable polymorphing to anyone with special variable - this needed to modify every single polymorphing script.
Now, this can be done in the OnPolymorph event script without any modification to polymorphing spells. Because newly, the OnPrePolymorph event allows to cancel the polymorph (using function CancelPolymorph() ). And not just that, it also allows to overwrite the actual polymorph, whether is the polymorph locked or number of temporary hitpoints. With this you can code very interesting features such as +100 temp hitpoints for shifters lvl 20+ or replace drow polymorph by new custom polymorph of elf type if the character natural race is drow. Etc. etc. almost no limits. And all in single script without need to recompile anything.
2) Removal of the null tail
According to the internal comments, the purpose of the null tail is to preload horse animations to avoid the big lag when mounting/unmounting. I don't really believe that though based on my experiences with custom content... And since it can cause issues in older modules I decided to remove this. However, if someone can proof this actually really works, I will get it back immediately. Does anyone know anything about this?
3) weaponfeats.2da
This allows to configure weapon feats, focus, imp crit, spec, overwhelmin, devast and weapon of choice. Only vanilla weapons are preconfigured there, to support cep weapons you need to add new lines. The line number in weapon feats matches line number in baseitems. Non weapon items should have values set to "-". I could in near future prepare a CEP1 / CEP2 version of this 2da if desired, lmk. Also, what is not so clear is that this actually allows to set weapon of choice for ranged weapons/unarmed strike. Usually you would want to make new feats for this, but you can do this easily also without haks. Example: line 8 collumn WC set to 977 - this should make the longbow weapon of choice for characters with 11+levels of AA. Though I haven't tested it and its possible it will require the WM feats (Ki critical etc.) - this are however possible to add via bonus feat now. This is 100% backwards compatible - if the 2da cannot be located (which can happen only in case that someone will try to use NWNX_Patch plugin without CPP installed) the default functionality + trident fix is restored.
4) weapon finesse / monk weapons
These two features are independant on the 2DA from main reason. It is expected that builder would want to configure this option dynamically based on character class/abilities/anything else.
The recommended usage is to add the "finesse" or "ubab" variable in OnAcquireItem event. Additionally you can set it directly on a specific weapon to make only this weapon work as monk weapon. etc. While a little hard to configure it has basically no limits this way. Or would you like to configure this with 2DA as well?
BTW: I was hesitating whether to set quarterstaff as a monk weapon by default. (As its basic rule in DnD 3.0) - shuriken should be as well but the original creator of this functionality, Terra777 stated that making ranged weapons to be a monk weapons causes big lags - so be aware of that.
Also, I do recommend not to use Terra777's nwnx plugins for this - those plugins doesn't take into consideration the Disciple of Shou prestige class and might result in lost of functionality in regards to martial flurry weapon feat.
5) Defensive stance bug
I fixed this by canceling the mode propertly, the question however is whether not to allow casting spells (from items/potions) though. I see not reason why not to, and from the code I am not convinced this canceling was on purpose. Suggestions needed.
6) No Tumble AC switch and option to override Tumble AC by own value
When writing these notes I realized this feature could be done without NWNX. It would not be 100% backwards compatible as it would be solely dependant on the PC skin and several events, but it is possible to do this. Probably not worth it though.
7) No Monk Abilities in polymorph switch
Atm, this disables all monk abilities. I assume you would like to be able to specificy each monk ability separately right?
INI settings and module switches settings (info for NWNX experts)
If you are a NWNX developer you might ask why I did it the way I did - using variables on modules instead of using INI and why I decided to reuse nwnplayer.ini instead of using NWNX.ini
Its simple, I am using nwnplayer.ini because it suits my project more and because NWNCX package doesn't come with this ini file. And I need to guarantee same functionality for both client and server.
As for using module variables - this is not obvious for those who develop for server, but when I thought about this I realized that using ini for features such as monk AC is inapplicable for client as thats not player decision but module builder's. And different modules might want to do this differently, so this needs to be loaded from 2DA or module variable. I inherited this way for server as well since the basic goal of my plugin is to provide same functionality on both client and server.
9) Disabling some NWNX features (info for NWNX experts)
If you are using more NWNX plugins, you might need to disable feature in either other plugins or NWNX_Patch plugin as they won't work well together. What to disable and in what plugin is something I can't tell you, you need to find out yourself. I cannot support every possible plugins thats not how NWNX development works. So to disable specific NWNX_Patch features you need to edit nwnplayer.ini, and add a new section [Community Patch]. Then put these lines under this:
DisableSetLocalStringHook = 0
DisableLoadModuleFinishHook = 0
DisableWeaponHooks = 0
DisableGetTotalACSkillModHook = 0
DisableGetUseMonkAbilitiesHook = 0
DisableGetCriticalHitRollHook = 0
DisableResolveAttackHook = 0
DisableAddEquipItemActionsHook = 0
DisableSummonAnimalCompanionHook = 0
DisableSummonFamiliarHook = 0
DisableSummonAssociateHook = 0
DisableGetAssociateIdHook = 0
DisableUseItemHook = 0
DisableEffectImmunityHook = 0
DisableResolveDamageShieldsHook = 0
DisableGetRelativeWeaponSizeHook = 0
DisableHolyAvengerHook = 0
DisableToggleModeHook = 0
DisableResolveAmmunitionHook = 0
DisableSetActivityHook = 0
DisableResolveSpecialAttackDamageBonusHook = 0
DisableGetMinEquipLevelHook = 0
DisableClearAllPartyInvalidActionsHook = 0
DisableSpellSlotsInPolymorphHook = 0
Change to 1 to disable specific feature. Previously, I wanted to allow disabling each hook one by one, but then I realized this is not possible because one hook is dependant on other and disabling only one could lead to hazardous behavior such as spell slots duplicating.
EDIT:
10) regarding Devastating critical
The fix for the issue with whirlwind attack actually removed the "Devastating Critical" message from the attack roll inn combat log. I wasn't able to restore that functionality while fixing the crash bug and I am not sure if I will be able to in future. For now, I recommend to print that message as FloatingString in the 70_s3_devattk script manually...
Modifié par Shadooow, 14 août 2014 - 12:12 .