vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   RPG Stats, yet again! (https://vborg.vbsupport.ru/showthread.php?t=93552)

Zachery 08-02-2005 10:00 PM

RPG Stats, yet again!
 
This hack is for RPG Based Stats for your users. Mostly just somthing nice to lookat.


If you are wondering how stats are calcuated: https://vborg.vbsupport.ru/showpost....0&postcount=37

v1.2 fixed mp


To upgrade, delete the old RPG STats plugin, and add the new one provided in the zip.


All Hail Knoman the original (as far as I can see) creator of this hack which is now spaning vB2.0-3.5

Bro_Joey_Gowdy 08-03-2005 09:59 PM

1st !!

Thanks for porting this Zach, I greatly appreciate it.

*Rowdy click install, then downloads and installs*

I'll post a picture asap.

Link14716 08-04-2005 01:03 AM

One zip file please, Zachery. :p *cough*

Zachery 08-04-2005 01:16 AM

I detest zip files :p

Jenta 08-04-2005 03:27 AM

thems the rules, all hacks must be released in one zip file :p
btw, whats is RPG stats?
RPG means role playing game I presume...

vBintense 08-04-2005 03:30 AM

I hit install, although I altered it to work more like the old vb2 activity hack (rpg does not fit the board) but the code was useful in making part of an activity hack.

Bro_Joey_Gowdy 08-04-2005 11:51 AM

Quote:

Originally Posted by Jenta
btw, whats is RPG stats?
RPG means role playing game I presume...

Its the Hp/Mp/Exp/Level Hack I requested here :
https://vborg.vbsupport.ru/showthread.php?t=93153

The vb3.0.x version can be found here:
https://vborg.vbsupport.ru/showthread.php?t=59750

:nervous:

TheComputerGuy 08-04-2005 12:16 PM

as requested.

I thought personally it was the image stats...but this is cool too :)

Barakat 08-04-2005 01:06 PM

i want it to be like this ..... but thanks installed

Zachery 08-04-2005 01:22 PM

Quote:

Originally Posted by Barakat
i want it to be like this ..... but thanks installed

I was being lazy and getting it out :p

I will update the installer with graphical stats soon :)

reteep 08-04-2005 04:12 PM

What's the source for the calculation? How is it being calculated?

Zachery 08-04-2005 05:43 PM

Quote:

Originally Posted by stormblast
What's the source for the calculation? How is it being calculated?

Math!

dastar 08-05-2005 07:12 PM

Quote:

Originally Posted by Bro_Joey_Gowdy
The vb3.0.x version can be found here:
https://vborg.vbsupport.ru/showthread.php?t=59750

:nervous:

That's really cool. Make this one the same and i'll be plenty happy. :)

Kaelon 08-06-2005 01:53 AM

Quote:

Originally Posted by Zachery
Math!

Can you be a bit more specific? How is HP, MP, and Exp being derived? How is it calculating Level?

dastar 08-10-2005 11:49 AM

Any chance we'll see image stats soon? :)

haiboss 08-10-2005 01:03 PM

You can use the image version for this modication
This is my way :

Upload the provided XML file
Open template posbit or postbit_legacy
where you see fit.

Quote:

Level: $showlevel<br />
HP: $hp / $maxhp
<table width="100%" >
<tr style="background-image:url(level/red_faded.gif)">
<td nowrap="nowrap" ><img src="level/red_left.gif" height="8"><img src="level/red.gif" width="$hpf% " height="8" /><img src="level/red_faded_right.gif" width="1" height="8" /></td>
</tr>
</table>
<span>MP: $mp / $maxmp</span>
<table width="100%" >
<tr style="background-image:url(level/green_faded.gif)">
<td nowrap="nowrap" ><img src="level/green_left.gif" height="8"><img src="level/green.gif" width="$mp / $maxmp" height="8" /><img src="level/green_faded_right.gif" width="1" height="8" /></td>
</tr>
</table>
<span>EXP: $ep% </span>
<table width="100%" >
<tr style="background-image:url(level/grey_faded.gif)">
<td nowrap="nowrap"><img src="level/grey_left.gif" height="8"><img src="level/grey.gif" width="$ep%" height="8" /><img src="level/grey_faded_right.gif" width="1" height="8" /></td>
</tr>
</table>
Upload level directory to your forum root
All Done !

haiboss 08-11-2005 05:50 PM

Any one can fix the MP ?

Zachery 08-11-2005 06:11 PM

Quote:

Originally Posted by haiboss
Any one can fix the MP ?

Whats "wrong" with the mp?

Wait I see whats wrong, I didn't update a varible for 3.5, will fix shortly,

Will add your instructions for pretty stats too as long as you don't mind :)

haiboss 08-11-2005 06:39 PM

The MP is not work , it show 0 / 0

dastar 08-29-2005 04:54 PM

What happened to the download link for this mod?

SnitchSeeker 09-01-2005 08:32 AM

haiboss, I love your graphical version! Very nice job!

Still, I wonder the same as Kaelon. How are the stats derived (other than math)? What figures does it use to come up with these variables. Or are they all random and completely pointless (other than for fun)?

dastar 09-01-2005 01:50 PM

I'd still like to know what happened to the download link for this mod. :(

Zachery 09-01-2005 02:12 PM

odd... I never remvoed this.

Zachery 09-02-2005 11:54 AM

MP is fixed now.

dastar 09-02-2005 02:27 PM

Quote:

Originally Posted by Zachery
MP is fixed now.

Thanks!

Bojangles 09-03-2005 02:57 AM

I was able to install this and get it up and running on a temp Style just fine (before I put it in the main style that everyone else uses). However, it looks like the greater someone's level is, the more their left column sticks out into the post. It looks like anyone who is over level 20 causes problems.

I copied code that haiboss provided in the install.txt file.

Attached is a screenshot of how it looks. Let me know if you guys need anymore info from me regarding this.. would love to get this awesome hack up and running for everyone :)

rjerina 09-03-2005 05:52 AM

that a problem with the graphical part of the mod. maybe haiboss can fix it?

eNforce 09-03-2005 03:11 PM

Any reason why this users' stats stretch?

Edit: Sorry, didn't see Bojangles post on the same issue.

LockeAG 09-03-2005 05:32 PM

Quote:

Originally Posted by eNforce
Any reason why this users' stats stretch?

Edit: Sorry, didn't see Bojangles post on the same issue.


I think u are using the code of haiboss isn't it? if not.. well hope this help you

only change the width , with this values $hpf%, $mpf% and $ep%.

change in the code of haiboss :


Find

Code:

width="$mp / $maxmp"
change to

Code:

width="$mpf%"
and also you can reduce the table width:

changing this vlaues:

Find (they are 3 of them)

Code:

<table width="100%" >
change

Code:

<table width="the porcent you want" >



Hope this help.

eNforce 09-03-2005 05:59 PM

Thank you, that worked wonderfully :)

Bojangles 09-03-2005 08:34 PM

That did work great.. thanks! :)

Toky0 09-06-2005 05:57 PM

Love this hack, great work Zachery! :cool:

bi11i 09-06-2005 09:49 PM

I like this mod, I can see that it provides some interesting figures, but for those of us that know nothing of RPG, what ARE these stats exactly? HP, MP, EXP? I can imagine that EXP might stand for experience, how is experience calculated?
Quote:

Originally Posted by SnitchSeeker
haiboss, I love your graphical version! Very nice job!

Still, I wonder the same as Kaelon. How are the stats derived (other than math)? What figures does it use to come up with these variables. Or are they all random and completely pointless (other than for fun)?


LockeAG 09-07-2005 04:37 AM

Quote:

Originally Posted by bi11i
I like this mod, I can see that it provides some interesting figures, but for those of us that know nothing of RPG, what ARE these stats exactly? HP, MP, EXP? I can imagine that EXP might stand for experience, how is experience calculated?

Mh.. well...

HP : HIT POINTS
MP: MAGIC POINTS
EXP: EXPERIENCE

and I think teh experience its calculated based on the Join Time and the number of post.

I would like to know if its possible to calculate the MP based on the Reputation if it is in use .

bi11i 09-07-2005 01:58 PM

Quote:

Originally Posted by LockeAG
Mh.. well...

HP : HIT POINTS
MP: MAGIC POINTS
EXP: EXPERIENCE

and I think teh experience its calculated based on the Join Time and the number of post.

I would like to know if its possible to calculate the MP based on the Reputation if it is in use .

well that makes a little more sense, but yes - how are the MP's and HP's calculated?

Zachery 09-07-2005 02:51 PM

Quote:

Originally Posted by bi11i
well that makes a little more sense, but yes - how are the MP's and HP's calculated?

Again its all math :p

Let me go find Komans post.. whereever it may be hidden deep in the recesses of the vBulletin 2 hacks.

Zachery 09-07-2005 02:55 PM

Quote:Knoman

HP drops and rises according to the members activeness.
MP determins how long a user has been with the forums, and how active they are.
EXP determins how close a user is to reaching the next level.

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.

like i've mentioned earlier, this hack was spun off of role playing games (i.e. final fantasy). hp stands for health points. the more your points, well.... the better your health is. mp stands for magic points, your ability to cast certain spells and such. and, well... you know what experience is.

now, what drives this entire system is this one code:
$level = pow (log10 ($post[posts]), 3);

what that code does is set the standard at when a member is able to level up, and how much hp/mp s/he should recieve. a low level member is able to reach the next level very easily (only requiring a handful of posts). those at the high end levels would require a whole lot more posts to achieve the next level.

the rise and fall of the hp meter is determine by this variable $postperday. what that does is take the total number of posts and devide it by the total number of days the person has been registered. the quotient is then taken and divided even further by the max hp... by doing so, it gives me a percentage that changes constantly.

i've feel that i've explained everything the best way that i could. any further would be me teaching you how to read and understand php... or any programming language for the matter. none of this is technical, it's mostly multiplication and division. this was my very first project with php. i knew nothing about it. but what i did was open a math book and headed to php.net.

you give a man a fish, he feeds for a day.
you teach a man to fish, he feeds for life.

bi11i 09-07-2005 03:00 PM

...the post I never could find. Thanks!

Zachery 09-07-2005 03:20 PM

Those are several of his posts from his original thread :)

I updated the hack post with a link to the post above and gave credits where credit was due

angelo70 09-11-2005 12:49 AM

plz..
i want view private message..


All times are GMT. The time now is 09:53 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01296 seconds
  • Memory Usage 1,832KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete