Plane Sailing said:If you are one of the 324 people who downloaded the original, you might want to grab a copy of the revised version
Cheers
Thenkew!Nail said:Davin, that is amazing. Seriously.
Nail said:Err...why? The revised version seems to have an error in it. I tried giving my mixed party of 5th and 6th level characters an encounter with 6 CR1's. The sheet is telling me that the 6th level PCs get 0 XP, while the 5th level PCs get 360 XP. This is a problem that the old version (1.1) didn't have.
Plane Sailing said:I'll have a look at the problem mentioned and update the update.
Public Function Experience(ByVal LVL As Integer, ByVal CR As Integer)
LVL = Math.Max(LVL, 3)
Dim XP As Double = (300 * LVL)
For above As Integer = (LVL + 1) To CR Step 1
If IsOdd(above - LVL) = True Then XP = XP * (3 / 2)
If IsOdd(above - LVL) = False Then XP = XP * (4 / 3)
Next
For below As Integer = (LVL - 1) To CR Step -1
If IsOdd(LVL - below) = True Then XP = XP / (3 / 2)
If IsOdd(LVL - below) = False Then XP = XP / (4 / 3)
Next
If CR = 1 Then XP = Math.Min(XP, 300)
Experience = Math.Round(XP)
End Function
morpheous1777 said:Code:Public Function Experience(ByVal LVL As Integer, ByVal CR As Integer) LVL = Math.Max(LVL, 3) Dim XP As Double = (300 * LVL) For above As Integer = (LVL + 1) To CR Step 1 If IsOdd(above - LVL) = True Then XP = XP * (3 / 2) If IsOdd(above - LVL) = False Then XP = XP * (4 / 3) Next For below As Integer = (LVL - 1) To CR Step -1 If IsOdd(LVL - below) = True Then XP = XP / (3 / 2) If IsOdd(LVL - below) = False Then XP = XP / (4 / 3) Next If CR = 1 Then XP = Math.Min(XP, 300) Experience = Math.Round(XP) End Function
Public Function Experience(ByVal LVL, ByVal CR)
If LVL <= 3 THEN LVL = 3
Dim XP
XP = (300 * LVL)
For above = (LVL + 1) To CR Step 1
If Int(above - LVL) <> (above - LVL) Then
XP = XP * (3 / 2)
Else
XP = XP * (4 / 3)
End If
Next
For below = (LVL - 1) To CR Step -1
If Int(LVL - below) <> (LVL - below) Then
XP = XP / (3 / 2)
Else
XP = XP / (4 / 3)
End if
Next
If CR = 1 Then
IF XP >= 300 Then XP = 300
End If
Experience = Int(XP)
End Function