To add this to DMGenie as an action button do the following:
- Select Windows --> General Script Editor from the menu
- In the Source drop down select 'Action Buttons'
- In the Function drop down select 'ActionButton##' where ## is replaced with a number. Make sure you find one that isn't being used. Unused ones do not have any scripting between the 'Public Sub ActionButton##' and 'End Sub' lines.
- Set the 'Button Label' field to something so you can tell what it does like 'RPTools Group XML'. You can set the tooltip if you want.
- Copy the script in the code box below into the text area at the bottom of the dialog. Make sure it goes between the 'Public Sub ActionButton##' and 'End Sub' lines.
- Click the check syntax button to make sure you copied it right. A little message dialog should come up and say that no syntax errors were found.
- The button is now ready to use. It will be located on the Actions or Attacks Tabs in DMGenie. The Description and Hints text box may tell you where to look.
Code:
func.AddToCombatLog "<group-set>"
func.AddToCombatLog " <game-name>Rodinia</game-name>"
func.AddToCombatLog " <groups>"
func.AddToCombatLog " <group>"
func.AddToCombatLog " <name>DMGenie Group</name>"
func.AddToCombatLog " <combatants>"
func.GetNextCreatureInit 0
Set MyCreature = func.GetNextCreature
While (Not MyCreature Is Nothing)
func.AddToCombatLog " <combatant>"
func.AddToCombatLog " <name>" & MyCreature.Name & "</name>"
func.AddToCombatLog " <count>1</count>"
func.AddToCombatLog " <init-modifier>" & MyCreature.InitBonus & "</init-modifier>"
func.AddToCombatLog " <player>" & MyCreature.Desc_PlayerName & "</player>"
func.AddToCombatLog " <type>PC</type>"
func.AddToCombatLog " <token/>"
func.AddToCombatLog " <notes>" & MyCreature.Desc & "</notes>"
func.AddToCombatLog " <alignment>" & MyCreature.Alignment & "</alignment>"
func.AddToCombatLog " <family>" & MyCreature.RaceName & "</family> <!-- TODO: Change family to race -->"
func.AddToCombatLog " <size>" & MyCreature.SizeStr & "</size>"
func.AddToCombatLog " <ac>" & MyCreature.AC & "</ac>"
func.AddToCombatLog " <touchAc>" & MyCreature.ACTouch & "</touchAc>"
func.AddToCombatLog " <flatFootedAc>" & MyCreature.ACFF & "</flatFootedAc>"
func.AddToCombatLog " <speed>" & MyCreature.SpeedStr & "</speed>"
func.AddToCombatLog " <baseAttack>" & MyCreature.CalculateBABFromClasses() & "</baseAttack>"
func.AddToCombatLog " <str>" & MyCreature.Str & "</str>"
func.AddToCombatLog " <dex>" & MyCreature.Dex & "</dex>"
func.AddToCombatLog " <con>" & MyCreature.Con & "</con>"
func.AddToCombatLog " <int>" & MyCreature.Intel & "</int>"
func.AddToCombatLog " <wis>" & MyCreature.Wis & "</wis>"
func.AddToCombatLog " <cha>" & MyCreature.Cha & "</cha>"
func.AddToCombatLog " <grapple>FIXME</grapple>"
func.AddToCombatLog " <fortSave>" & MyCreature.FortSave & "</fortSave>"
func.AddToCombatLog " <reflexSave>" & MyCreature.RefSave & "</reflexSave>"
func.AddToCombatLog " <willSave>" & MyCreature.WillSave & "</willSave>"
func.AddToCombatLog " <strBonus>" & MyCreature.StrMod & "</strBonus>"
func.AddToCombatLog " <dexBonus>" & MyCreature.DexMod & "</dexBonus>"
func.AddToCombatLog " <conBonus>" & MyCreature.ConMod & "</conBonus>"
func.AddToCombatLog " <intBonus>" & MyCreature.IntMod & "</intBonus>"
func.AddToCombatLog " <wisBonus>" & MyCreature.WisMod & "</wisBonus>"
func.AddToCombatLog " <chaBonus>" & MyCreature.ChaMod & "</chaBonus>"
func.AddToCombatLog " <gender>" & MyCreature.Gender & "</gender>"
func.AddToCombatLog " <levels>" & MyCreature.LevelStr & "</levels>"
func.AddToCombatLog " <height>" & MyCreature.Height & "</height>"
func.AddToCombatLog " <weight>" & MyCreature.Weight & "</weight>"
func.AddToCombatLog " <age>" & MyCreature.Age & "</age>"
func.AddToCombatLog " <damageReduction>" & MyCreature.DamageReductionStr & "</damageReduction>"
func.AddToCombatLog " <hp>" & MyCreature.HPBase & "</hp>"
func.AddToCombatLog " <fortBase>" & MyCreature.FortBase & "</fortBase>"
func.AddToCombatLog " <fortMagic>" & MyCreature.FortBonus & "</fortMagic>"
func.AddToCombatLog " <reflexBase>" & MyCreature.RefBase & "</reflexBase>"
func.AddToCombatLog " <reflexMagic>" & MyCreature.RefBonus & "</reflexMagic>"
func.AddToCombatLog " <willBase>" & MyCreature.WillBase & "</willBase>"
func.AddToCombatLog " <willMagic>" & MyCreature.WillBonus & "</willMagic>"
func.AddToCombatLog " <sizeBonus>" & MyCreature.SizeStr & "</sizeBonus>"
func.AddToCombatLog " <armorCheckPenalty>" & MyCreature.FinalCheck & "</armorCheckPenalty>"
Dim MySkill, i
for i = 1 to func.GetNumberOf_Skills
Set MySkill = func.GetSkillObj(CInt(i))
if func.ValidSk(MySkill) then
tag = lcase(MySkill.NameUcase)
tag = replace(tag, "(", "")
tag = replace(tag, ")", "")
words = split(tag)
if ubound(words) >= 0 then
tag = "skill." & words(0)
if ubound(words) > 0 then
for j = 1 to ubound(words)
tag = tag & func.Capital(words(j))
next
end if
func.AddToCombatLog " <" & tag & ".total>" & MyCreature.SkillTotal(i) & "</" & tag & ".total>"
func.AddToCombatLog " <" & tag & ".rank>" & MyCreature.SkillRanks(i) & "</" & tag & ".rank>"
func.AddToCombatLog " <" & tag & ".misc>" & MyCreature.SkillTotal(i) & "</" & tag & ".misc>"
else
func.AddToCombatLog " <!-- skipping a skill without a name -->"
end if
end If
next
func.AddToCombatLog " </combatant>"
Set MyCreature = func.GetNextCreature
Wend
func.AddToCombatLog " </combatants>"
func.AddToCombatLog " </group>"
func.AddToCombatLog " </groups>"
func.AddToCombatLog "</group-set>"
Edit 05/09/2008: Added <notes> field to output
Edit 05/15/2008: Fixed problem of forum removing text after dashes.