I learned programming in college, yes. And I rely quite heavily on it for my work actually, I'm doing numerical mechanics ^^ (I like programming a lot actually, otherwise I wouldn't have done what I did for this conversion...)
I'm not using the GUI tools from Qt yet (maybe in the future, not sure about that), I chose QtCreator because it can install/compile/run C++ code on Windows without too much pain. I'm using Linux at work, but I don't have a Linux computer at home for a couple of years now, so I'm doing with whatever I can with the Windows computer I have here ^^ Also, the Qt library is good for all kind of file and string manipulations (much better than the standard C++ lib), which is really useful for what I'm doing.
Essentially, now that the code is done, what I'm doing is writing text files that contain the description of monsters and/or special abilities (because they are plenty of abilities out there that I don't want to copy-paste over and over again), with special keywords to indicate where to put the damage, DC, etc etc. Then the C++ program crunches the numbers and transforms it in a LaTex file with the final numbers.
For example, here is a text file with a basic "Melee Weapon Attack" ability
Code: Select all
MWA#7
#5=Str
#6=5
#7=one target
$name=#1
$dmg=#2
$dmgd=#3
$dmgt=#4
$bba=#5
\textit{Melee Weapon Attack:} {#bba} to hit, reach {#6} ft, {#7}. \textit{Hit:} {#dmg}.
The first line is the keyword used to identify the ability, followed by "#", then the number of variables required to call it
Lines 2-4 define the default values of arguments #5 to #7, if they are not defined
Argument 1 is the printed name of the ability (i.e. Tail, Bite, etc)
Argument 2 is the total amount of damage it should do
Argument 3 the type of dice used for the damage
Argument 4 the type of damage (bludgeoning, acid, etc)
Argument 5 the ability used to calculate the attack and damage bonus
Argument 6 is the reach
Argument 7 is the type of target
The last line is the text that will be printed in the end
Then, in a monster file, I simply have one line to create the attack ability, for example
With the first token (MWA) being the keyword of the ability, then all necessary arguments, separated by "#"
This will print, in fine, in the LaTeX file:
Slam: Melee Weapon Attack: +X to hit, reach 5 ft, one target.
Hit: Y (Ad8+B) bludgeoning damage.
With X, Y, A, and B automatically calculated...
And more or less any ability can be created like that, so in a way, it is a kind of specific language for 5E monsters^^