
I'm building a mind-bendingly extensive set of abilities for the FFG 40kRPGs, that will process virtually everything with as much automation as possible, but I think I'm running into a system limitation. The framework is thus: After to hit and dodge/parry, I have a set of abilities written for damage. The abilities show as a self-whisper under the template when your to-hit ability posts, giving a bunch of different hit locations, so that you can click one of them, and it will prompt for number of hits, degrees of success, range to target, and a couple other minor factors, then automatically test everything in a big batch. This single ability is doing all of the following: > Damage dice with a roll and keep for proven/primitive value (proven sets a lower limit on individual dice faces, primitive sets an upper limit), as well as highlighting natural 10s for critical hits (or above 10 if weapons have exploding 10s from a certain quality) > Adds static mods > Calculates crushing blow/mighty shot based on a 0/1 flag and applies that extra damage > Calculates if the target has an active ionic flare shield that subtracts a small amount of damage from certain weapon types (again based on a set of 0/1 flags to multiply particular bits to zero them out if needed) > Calculates and subtracts target toughness, including unnatural toughness vs Felling, daemonic toughness vs sanctified weapons (even more 0/1 flags) > Armour of the target location, minus penetration > Calculates added penetration for degrees of success (razor sharp, melta expertise, etc) > Added penetration for talents (tank hunter) > Added/adjusted armour or pen based on weapon damage type (ceramite plating, lathe-pattern alloy, etc) > Added armour based on ablative plating (characters have a series of flags to turn the extra armour on/off on each location as the ablative layers are blasted away) > Calculates if a field save is active and would apply, automatically rolling it with an overload shown as a critical failure and multipliers to zero out the damage if the field save is successful > Queries for a number of hits with a slightly different modifier attached to the query on each hit, divisor, round up, so that if the ability supports 8 hits but you only land 3 of them, the remaining 5 will zero out, while also using that same query to turn off field saves (so they don't give the chance of overloads) and each individual damage dice (so they don't give the chance of criticals) Clever layout and putting them out of order sorts and batches these into grouped locations. As such, in theory, rolling the ability gives a template that looks like the following: Table header: TestPCKnight scores [X] hits with his Avenger Gatling Cannon against target Dummy, with the first hit landing on the Torso. Head = X Right Arm = X Left Arm = X Torso = X, X, X, X, X, X, X with damage values for each. The problem I'm running into, is that only the first damage value procs. The rest come out as half-parsed garbage. But if I copy only the broken chunk and past it alone, it procs fine. If I cut out the first damage value, then the second one procs and the remainder come out as garble. For reference, the damage ability macros, having so many nested elements, are clocking in at over 51,000 characters for the highest rate of fire weapons, so it's entirely possible that I'm running into a character limit here, or a maximum number of operations that can proc in a single post. I'm using Excel to compile code chunks together, since there are a lot of common elements that get combined together based on vlookup tables for slight differences in permutation. BTW, there are no nested abilities (thus no HTML replacements needed) - each chunk procs completely fine alone, but when I paste several of them together, sometimes it hangs, sometimes it seems to time out (which is tough to tell if it's timing out or if there's an error that's just causing the code to stop processing altogether). I would post the code, but it resembles a short novel at this point, so just unpacking it is crazy.