PDA

View Full Version : Modifying the "Tables" dice formula



brochr
August 7th, 2014, 15:05
Hi Folks,

Posting this this here, though it may be rule set specific...

Is there a simple way to modify the campaign XML to extend the dice options in a custom table? I would like to add an ability modifier to one, do it is D20 + ABILITY +/- integer

The XML in the db.xml is:

<dice type="dice">dxx</dice>
<hiderollresults type="number">0</hiderollresults>
<labelcol1 type="string">xyz</labelcol1>
<locked type="number">1</locked>
<mod type="number">0</mod>

Are there other options for the XML "<mod type =" ?

Otherwise, I assume it would have to be done by scripting like in manager_action_skill.lua

Just looking for a quick fix here, not a major extension.

Thanks

Toph

Zeus
August 9th, 2014, 11:05
For a quick no-coding option, just use the desktop modifier panel (bottom left) to apply a mod before you roll on the table. Click on the Campaign Modifier's window (+- icon top right). Create a new entry in the list e.g. Lucky 2. Now click the + symbol next to the Modifier and it gets applied to the desktop Modifier panel (bottom left of desktop). Now roll on your table, watch the result and it should auto apply +2.

Otherwise, you will have to edit the campaign/campaign_tables.xml to add your ability mod tag and then you will also have to edit the TableManager (scripts/manager_table.lua) code to apply the ability mod in performRoll(). If you go this route, probably better to implement your changes as an extension.

brochr
August 10th, 2014, 02:52
Thanks DrZues

Using the modifier stack was my planned 'no code' work around. Thanks for the leads on the XML and LUA. I agree if one starts changing the base XML an extension is a much better idea.

Deep thanks

Toph