• 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

Multiclassed Class Levels

chava

Well-known member
If you have a character that is multiclassed, for this example Fighter4/Monk2, how can you have the program give me the number of Monk levels.

I know that 'herofield[tHitDice]' will give me total HD.

I tried '#levelcount[cMonk]', but I just got error messages, and then I saw that Mathias said that #levelcount doesn't work well in information codes.

So I tried to modify 'field[cTotalLev].value' to 'field[cMonkLev].value'.

Question: What code do I use to pull out the number of levels in a specific class?
 
Last edited:
The value that's used in #levelcount[] is not exactly the same as the Id of the class level. Strip the "c" off the beginning of the Id, and that's the value to use, so #levelcount[Monk].

Where did I say that #levelcount doesn't work well in information codes?
 
is

addthis = (herofield[tHitDice].value - #levelcount[Monk]) / 4

a valid way to write a formula?

I thought this would give me the number of non-monk levels (divided by 4) in a multi-classed character, but it doesn't seem to be coming out.
 
Sorry,

I was trying to work it step by step, so that I know what I'm doing for the future.

Phase: Post-levels, Priority: 500, Index: 1, no timing
Code:
	~ If we are a monk reduce bonus by monk levels
	if (hero.tagis[Classes.Monk] <> 0) then

	var damageadds as number
	damageadds = (herofield[tHitDice].value - #levelcount[Monk]) / 4
	field[abValue].value += round(damageadds,0,-1)
	var i as number
	for i = 0 to damageadds
	perform hero.child[wUnarmed].assign[Helper.DamageUp]
	next
	else

	~divide our total level by 4 and round down
	var damageadds as number
	damageadds = herofield[tHitDice].value / 4
	field[abValue].value += round(damageadds,0,-1)

	~apply that many Help.DamageUp tags
	var i as number
	for i = 0 to damageadds
	perform hero.child[wUnarmed].assign[Helper.DamageUp]

        next
        endif

It seems to be adding the monk levels instead of subtracting them for purposes damageadds. Line 5 of the code.

However, I'm trying out the specific with a simpler code so I can see if I can fix the individual parts. So if you are busy... I will figure this out. I will.
 
First, don't use Post-Levels/0 to Post-Levels/1000 if at all possible - there's too much being calculated during that time within the program to know what results you'll get on various things.

I'd suggest adding this in-between lines 5 and 6:

Code:
debug herofield[tHitDice].value
debug #levelcount[Monk]
debug damageadds

You can see the results by going to the Develop menu...floating info windows...Show Debug Output.

That should help you track down what's going wrong.
 
Thank you for the note on the priority.

moving it back to Post-Levels/10000 got rid of the too many damage levels added.

Now however, I get no damage increases from fighter levels added.

Weirdness: the debug window shows the right numbers.... (on both priority)

For example for the Monk3/Fighter4 that I am testing it in -

******** Start Evaluation Cycle **********

7
3
1

But the damage is still 1d6 (if it is doing what I want it should be 1d8) which would be a 1d6 from monk and +1 damageadd from the 4 fighter levels.

can I throw another debug in elsewhere to see where I am having issue.
 
At 5000 priority - the monk levels are adding despite the debug showing that damageadd = 0.

Excuse me while I go bang my head against a wall - maybe that will allow for inspiration. (Or me just giving up and disabling the feat for monks.)
 
Back
Top