The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Comments |
#72
|
|||
|
|||
What line(s) do I modify so that members require more posts to increase to a new level.
Some of my members have made 300+ posts and they are at level 16 with the current hack. I would prefer if they would only be at say... level 8. Once the levels start getting in the double digits, it looses it's appeal for me. So I would like it to be harder (require more posts) for members to get a new level. Thanks!! PS - I am also interested in having the stats (level specifically) on the members profile. Any idea what needs to be done there? |
#73
|
|||
|
|||
It worked finein the 2.20 but now in 2.21 it displays all wierd like no exp on a 1100 post user
and the userlevel is like 1.112332243243 I copied andpasted it perfectly in admin/ functions.php |
#74
|
||||
|
||||
i think a breakdown of what HP, MP, and EXP are would be very good....
i have members wondering how it works exactly also |
#75
|
||||
|
||||
i have removed this hack but when i did you it i had a link to my faq3 and i put
<p>You have probably noticed the coloured bars at the side of each post, just below the member's avatar. This is our graphical system which lets you see how active and experienced a member is.</p> <p>The bars represent : <ul><li><font color="red">The Red Bar </font>: Drops and rises according to the members activeness.</li> <li><font color="green">The Green Bar </font>: Determines how long a user has been with the forums, and how active they are. </li> <li><font color="blue">The Blue Bar</font> : Determines how close a user is to reaching the next level.</li></ul> </p> I hope this helps you out winston |
#76
|
||||
|
||||
Just look at the code for an explanation of how it's worked out. All the maths is in there and is reasonably easy to work out most of it, even if you are not a coder.
Code:
$level = pow (log10 ($post[posts]), 3); $ep = floor (100 * ($level - floor ($level))); $showlevel = floor ($level + 1); $hpmulti =round ($postsperday / 6, 1); if ($hpmulti > 1.5) { $hpmulti = 1.5; } if ($hpmulti < 1) { $hpmulti = 1; } $maxhp = $level * 25 * $hpmulti; $hp= $postsperday / 10; if ($hp >= 1) { $hp= $maxhp; } else { $hp= floor ($hp * $maxhp); } etc........................... |
#77
|
||||
|
||||
yea, i don't really get that either.....
plain english would be good |
#78
|
||||
|
||||
Let's break it down to simple English, shall we?
$level = pow (log10 ($post[posts]), 3); This is a simple logarithm that will calculate the how much post a member needs in order to get to the next level. This is the engine that will control all other calculations. Now, I've cubed it so leveling resembles Final Fantasy; where the max level is 99. If you are into D&D, squaring the formula would be best, requiring a lot of post before a user can reach level 20. In short, the higher the exponent, the quicker it is to level up. $ep = floor (100 * ($level - floor ($level))); This is the basis for the Experience system. What i did here, was take the remainder (or mod) from the Level logarithm and converted it to a percentage. I wasnt sure if PHP had a MOD function, so I did it the hard way. $showlevel = floor ($level + 1); I cant have a user with level zero, but i didnt want to affect the engine with a false number either. So, I created another variable $showlevel and added 1, which will only be used to show users, and wont affect the calculations. $hpmulti =round ($postsperday / 6, 1); if ($hpmulti > 1.5) { $hpmulti = 1.5; } if ($hpmulti < 1) { $hpmulti = 1; } This code here was to add to the randomness. This is my HP bonus multiplier. I took the post per day and divided by six and rounded it to the tenths decimal. I use a few IF functions to prevent it from being too high and too low. $maxhp = $level * 25 * $hpmulti; Determins the Max HP. Not much to be said here, 25 just seem to be a nice number. $hp= $postsperday / 10; If a person couldnt perform a ten post per day average, HP will drop. if ($hp >= 1) { $hp= $maxhp; } else { $hp= floor ($hp * $maxhp); } Sets the limit on how high your HP will go. Keeps it at or under the Max HP $hp= floor ($hp); $maxhp= floor ($maxhp); HP calcualations are down. Rounding down for viewing sake. if ($maxhp <= 0) { $zhp = 1; } else { $zhp = $maxhp; } Debugs the Divide by Zero error. $hpf= floor (100 * ($hp / $zhp)) - 1; Is used in the templates. $maxmp= ($jointime * $level) / 5; Determins Max MP. Again, the 5 just seems right. $mp= $post[posts] / 3; Determins MP, not sure why I chose to do what I did, but it works. This is the reason why MP is still a mystery to my members and even to me. if ($mp >= $maxmp) { $mp = $maxmp; } Keeps MP from going above its max. $maxmp = floor ($maxmp); $mp = floor ($mp); MP calculations done. Rounding down. if ($maxmp <= 0) { $zmp = 1; } else { $zmp = $maxmp; } Debugs the divide by zero error. $mpf= floor (100 * ($mp / $zmp)) - 1; Is used in the templates. |
#79
|
||||
|
||||
Thank you, Knoman ... lovely hack!
Afterlab ... i found a way to get it into the members profile. See how i did it in the member.php: PHP Code:
PHP Code:
PHP Code:
Maybe this helps you. If not and you encounter problems feel free to ask. But the hardest thing (for me) was to find the right place in member.php ... the finetuning isn't hard. Nice hack, Knoman, did i mention it? Thank you! |
#80
|
||||
|
||||
Thanks meta, that worked. I mixed it up a bit too in my profile. Cya around.
|
#81
|
||||
|
||||
I have 2.2.1, and i cant find that first line we need, the 'if ($post' thingy, any help? I looked in showthread.php!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|