|
Post by scarface on Mar 23, 2009 21:13:38 GMT
Hey Acos, I remember a couple years ago this definantly wasn't possible with the available plugins at the time, but I thought I'd try asking again now since your plugins seem to be breaking the NWN laws of physics ^^
Is it possible in any way to modify a players AB or BAB and not be restricted by the +20 cap, with any of your NWNeXalt funcs? Or any ideas on some kind of workaround or is it possible you could add this function (if it's even possible at all)?
Specifically speaking, what I want to do is give +10 natural ab boost to all players level 60 that have base STR modifier >= 20.
|
|
|
Post by Acaos on Mar 24, 2009 3:40:52 GMT
Yes. Look at nwnx_weapons.
Acaos
|
|
|
Post by scarface on Mar 24, 2009 10:37:44 GMT
I've looked at nwnx_weapons and found I can modify the ab given by focus feats, however isn't this a global effect? What I want is only players specifically with > 20 str modifier to have the ab increase, I am unable to find anything that will help me in this manor, am I missing something?Or what particular functions should I be looking at for this?
|
|
|
Post by scarface on Apr 3, 2009 8:39:43 GMT
Is this possible or not?
|
|
|
Post by Acaos on Apr 3, 2009 15:08:50 GMT
Look at the file local/l_GetAttackBonusAdjustment.c under the source for the weapons plugin. The custom code we use on HG is there; you could write some similar code for your own purposes.
Acaos
|
|
|
Post by scarface on Apr 3, 2009 16:07:54 GMT
|
|
|
Post by FunkySwerve on Apr 3, 2009 16:16:21 GMT
|
|
|
Post by scarface on Apr 3, 2009 19:20:58 GMT
Thanks guys, I appreciate the help, but I really need to know which function(s) are used to actually apply the base AB, this function just returns the AB, I wouldn't have any problems making a function for what we need to get the AB, I just don't know how the AB is applied as in what function(s) to use, I'm bad at explaining myself it's probably my fault lol. Basically which function(s) are used to add the AB to the player?
|
|
|
Post by Acaos on Apr 5, 2009 8:01:59 GMT
You probably want something like this:
int Local_GetAttackBonusAdjustment (CNWSCreatureStats *attacker, CNWSCreature *target, CNWSItem *weapon, int ranged, int ab_abil, int ab_feats) { if (attacker != NULL && attacker->cs_original != NULL && attacker->cs_original->cre_is_pc && attacker->cs_original->cre_lootable == 60 && attacker->cs_str >= 50) ab_abil += 10;
return (ab_abil + ab_feats); }
This assumes you're using HGLL which stores the legendary level in Lootable. Acaos
|
|
|
Post by scarface on Apr 5, 2009 8:43:24 GMT
Ahh ok I see, thanks. Now do I just save this function in the same file as the original and then compile?
|
|
|
Post by Acaos on Apr 5, 2009 9:12:47 GMT
Replace the existing one in the file, not add (since you want to use your own and not the HG-specific one).
Then recompile.
Acaos
|
|
|
Post by scarface on Apr 5, 2009 15:01:45 GMT
Replace the existing one in the file, not add (since you want to use your own and not the HG-specific one). Then recompile. Acaos Ok I'll do that, but what I don't understand is how this is called and applied, is this automatic somehow without me adding anything else to the module? I don't really know how plugins work tbh.
|
|
|
Post by Acaos on Apr 5, 2009 19:02:42 GMT
Yes, it's automatic, the plugin edits the internal engine AB calculations.
Acaos
|
|
|
Post by scarface on Apr 5, 2009 19:34:22 GMT
Yes, it's automatic, the plugin edits the internal engine AB calculations. Acaos Great thanks, that's perfect, I'll try this out and if no problems arise, leave you alone Cheers.
|
|
|
Post by max196 on Apr 8, 2009 16:01:23 GMT
Are the modified rules defined in local script working at the moment? They don't seem to be applied in my test. The wm extra ab bonus at 10, 29 and 30 dont seems to be applied (so the rogue int ab bonus).
Thanks, Max
|
|