• 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

Logarithm?

Gomo

Well-known member
I can't find any info on the implementation of the logarithm on forum or wiki.
Is there any function in scripts for it?
 
Hi Gomo,

Logarithms are a bit more advanced than most of the other mathematical functions we support in Hero Lab. :) Can you tell me more about how you'd use them if we implemented them in Hero Lab?

Thanks!
 
Basically I will calculate a movement penalty based on load.
The equation is:
x = 5*log2LOAD - 5 - Strength.
 
Basically I will calculate a movement penalty based on load.
The equation is:
x = 5*log2LOAD - 5 - Strength.

Gomo,

Is there a table that shows loads and penalties or this really the equation for figuring out the load penalty? This seems a bit more complex than necessary for encumbrance. If you're doing base 2 arithmetic isn't there an easier way to do this? Hero Lab handles exponents, but when you get into logarithms you don't always get nice clean whole numbers out of the log function.
 
Yes, there will be a table, but for prototyping purposes it would be nice to have to get this calculated.
Also I am testing how it would behave with Strength gradually weaken during combat with Stamina drop.
The point is to simulate that if you are tired enough heavy armour start to play against you. Also any unnecessary load.
I admit it is complicated but in the end it should all get to just few values in real play.

I came up with idea of getting percentage of load and as I will usually get just five stages of this penalty, perhaps I would manage to do this with "if" statements.

Also clean numbers are not the case because I usually convert them to integers.
 
Converting to integers helps but it depends on how many decimals that hero lab is having to calculate. Usually when I handle attribute drops in a game, the attribute drops one whole point rather than using complex math. If you look at Dungeons & Dragons, the encumbrance systems are a bit abstract because too much realism tends to bog down a game session. I take it this is for a game system you are creating. Since you said there will be tables, what I would do is figure out the table values based on whatever math you want, and then have hero lab store the tables and lookup the values. This way the software isn't having to run long calculations (which can cause software to crash on lower RAM systems).
 
I'll probably go with percentage solution.
Thanks

That would work well. However you feel like handling it, I just would avoid doing Logarithms in a game system. That kind of math is cumbersome to deal with at a table. Having an actual table to work with that lists the penalties is easier. Hero Lab already has an accessible example of encumbrance tables in the 4e files you can look at for reference too, which is one reason I suggested tables.
 
Back
Top