PDA

View Full Version : Access to weapon type in attack routine.



spiegdon
September 5th, 2012, 01:53
New around these parts, love this thing so far. I am working on a 5E hack job to faciliate playtesting for my group and I.

The challenge I am having is with weapon type. When the sysem fires the actionAttack from the combat tracker, it is making some decisions about the critical nature of the attack.

I have a table that I have used for years that has a few factors involved, and I would LOVE to get the data included in this. Fumbles are easy - a simple table of 1-100 and a call to that table seems to be working fine.

My critical hit tables are based on weapon type (slashing, piercing, and bludgeoning) and there is also a size factor (+30 for tiny target, -30 for a huge target, etc... making it difficult for a halfling to critically hit a giant's head).

The data I need to craft the proper conditional logic is as follows:
* The size of the target
* The size of the attacker
* The damage type for the weapon used

Can anyone point me in the right direction to get that data, and in what routine/file would you suggest that I implement this logic? (I am using a hacked up 3.5 ruleset).

Thanks in advance,
Stashravens

Moon Wizard
September 7th, 2012, 21:49
If you are using the built-in 3.5E ruleset, you can look at the manager_action_attack.lua file at the end of the onAttack function for the built-in fumble call.

At this point in the attack function, you have a rSource and rTarget, which are the attacker and defender respectively. They can potentially be nil, if source or target is unknown. You can then use the rSource.nodeCT and rTarget.nodeCT values (if not nil) to access the CT records for the attacker and defender to pull their size information.

The weapon type is going to be a bit more complicated, since weapon type is not passed in the attack description (only the damage description). You would need to modify the part of the attack action script to add the weapon type to the attack roll description (similar to how it's down for damage rolls). Then, you could parse that information from the roll description in the onAttack function.

While we will be eventually posting a 5E ruleset, as the rules coalesce; the features you are asking for appear to be house rules (i.e. custom fumble tables), so would need to be updated separately. Try looking into building an extension to override the ActionAttack script package to make your changes more portable.

Regards,
JPG

spiegdon
September 7th, 2012, 22:46
Awesome, thank you very much. That helps a bunch. I will let you know how it comes out.