Changing dice that are being rolled
LordPas
Member Posts: 47
I got a tricky question here.
I am wondering if it's possible to change AC and make it a random dice roll instead of a set number. So, instead of AC being 10+dex bonus+Armour bonus, I want to make it, for example, 5 + d 20 vs attacks.
Or
Can I make it so attack rolls are opposed by the opposing characters attack roll instead of the AC?
I get the feeling I'm asking for something that might not be possible but I figured I'd try anyways.
I am wondering if it's possible to change AC and make it a random dice roll instead of a set number. So, instead of AC being 10+dex bonus+Armour bonus, I want to make it, for example, 5 + d 20 vs attacks.
Or
Can I make it so attack rolls are opposed by the opposing characters attack roll instead of the AC?
I get the feeling I'm asking for something that might not be possible but I figured I'd try anyways.
0
Comments
Your previous suggestion is possible through work around scripting and some caveats. For example it would probably be easier with NWNXEE, on the other hand you can replace the attack dialog lines in dialog.tlk but keep in mind doing so does not really play nice. It will mean you only play your own module, in that case you're hiding what is going on, which you then combine with creating a scripted alternative to combat, and then you output that instead. The issue with that is you're working against the engine.
The suggestion has been made that Beamdog opens up all combat events but they didn't and there was some concern custom combat could be buggy and slower than normal combat. Of course the alternative is orders of magnitude worse, so I'm not sure why they didn't, but they didn't.
Probably a very simple approach to your last suggestion would be to use the module heartbeat. If the character is in combat then apply the random bonus for 6 seconds, and probably apply a similar bonus to whoever their target is, or apply a bonus to any npc within a certain range.
Here's the code snippet:
This looks pretty promising.
By random number I mean a randomized number. So every round the game will randomly pick a number and apply it to AC.
So, combat starts, the on heartbeat script activates and both player and enemy one heartbeat script activates and a random number is assigned to player AC and another Random number is assigned to enemy AC. They then attempt their attack rolls.
I'd prefer if the the random number = the attack roll but that would mean that the character who is attacked first would not have rolled yet nor gained an AC bonus yet.
If a PC is in combat with some number of enemies around them, what would the penalty calculation to the PC look like? What would the penalty calculation to the enemy look like?
It occurred to me after that I do know that it can be randomized.
What I'm thinking for the AC calculation is:
(AC - Attack bonus) = penalty to AC.
Then roll 1d20 and add to AC.
It's not perfect but it represents a contested AC roll.
Btw, as I understand it, setting a script to heartbeat can slow down a module, is that correct?
As for AC/Attack contests I'm not really sure what you want to achieve. There are some ways you can change the spread of results but if you're essentially just staying with checks in a positive linear scale then you can keep it simple. For example if you just want the average result for 1d20 vs 1d20 then you can add +10 to AC permanently following the rule of always floor decimals down. On the other hand if you want to keep the same scale and have a stochastic variable on both sides then it's just -10 + 1d20 AC. Subtracting the opposed attack bonus and adding 1d20 instead will just mean it favors defenders at lower levels and attackers at higher levels.
It helps to describe what you want to achieve and then find the numbers which will model that.
That's a bit difficult to pull off in NwN.
Instead, what seems to be a better idea is that characters make a standard attack roll vs AC +1d20.
I want AC to = BAB + str bonus (or dex bonus for dex fighters.)
What would help more is if I can make the attackers 1d20 roll get added to his AC (replacing the +1d20 on heartbeat) and The defenders +1d20 to AC become his attack roll.
So, heart beat script goes off, Character A does his attack, (str + BaB +1d20) vs Character B's AC + 1d20(from heartbeat script). On Character B's turn he attacks. I would like for character B's attack to be (str +BaB +1d20(from heartbeat script) vs Character A's AC + 1d20 (from attack roll).
If not I'll settle for both having individual attack rolls and heartbeat script adding +1d20 to their AC.