• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Best AK mechanism for a cost table

Kairos

Well-known member
So, I've been thinking about a game like DC Heroes/MEGS. Character generation relies on a cost table that, as far as I can tell, does not break down cleanly into a calculation. The idea is that you cross reference a trait value (rows) with a particular factor cost (columns) to arrive at the cost for that trait.

I thought a it could be done as a matrix field or more roughly as a series of if statements in a procedure. Any suggestions as to the best AK mechanism for handling such a table? And by "best" I mean most functional without creating a performance hit.
 
I'm not familiar with those games, so I'm not sure how their costs are calculated.

If one cost table is used for everything, I'd put a matrix field on a mechanic, and then write a macro that simplifies the lookup, like:

Code:
#cost[i,j]

is

Code:
hero.childfound[mechCstMat].field[mechCstMat].matrixvalue[i,j]
 
Back
Top