[BETA] HP/MP/EXP Mod

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
Antony
Registered User
Posts: 529
Joined: Wed Feb 12, 2003 9:06 am

Re: Did You Miss Me?

Post by Antony »

NightHawk wrote: Um, hi? :)

It's nice to see that other's have kept up with this mod in my absense. I suppose some sort of explanation is in order, but suffice it to say that due to personal matters, I was indisposed for some time last summer and fall. Only recently did I have the time, energy, and interest to return to this.

My apologies to go out to those who have tried to contact me regarding this mod. If anyone wishes to contact me about it, please do so via email. I do not accept ICQ or AIM messages from people that I do not know

But I digress. I perused this thread, and I'm impressed with some of the things that have been done. The idea of placing the bulk of the calculation in a separate php file was a brilliant idea. I wish I had thought of it. I like the class addition too, but I think it's a bad representation, especially considering the poor design of the HP and MP formulas. As someone pointed out in this thread, they measure much the same thing.

Which brings me to my point. I've taken some of the code from here, and redesigned it with new formulas. I've also updated the formatting to follow the latest version of the MOD Template.

I removed the class/skill ratio section, but if people really like it, I can put it back in easily enough. (But I really do think it's a silly measurement)

The new HP and MP forumulas are a bit more simple, make more sense, and give bonuses to more 'experienced' users.

HP: HP is roughly a measure of the "Quality" of a users post. In this case, quality is how long a user's recent posts are. It compares the average characters per post of the user's recent posts to an admit set "average". If a user has exactly the average, they have average hp.

A user recieves a bonus to his Max HP for each post he makes. This bonus is admin definable. The default setting is .1. Meaning after 10 posts, a user recieves 1 extra max HP. The idea is that users who post more should have to post "better" as well.

MP: MP is roughly a measure of "frequency" or "quantity" of posting. It looks at how many posts the user has made in a recent time period. Each post in made in that time period costs the user an admin definable ammount of MP. The longer a user goes without posting (or posting often), the more of his posts will fade past the "window" the script looks at, thus increasing (ie: regenerating) his MP.

A user recieves a bonus to his max MP based on how long he has been reistered. The default is 1 MP per week. This is admin definable. The idea is that an 'older' user should have more mp to post with than a newer poster, and be able to post more often.

The time period used for Bonus MP, and calculating current HP and MP is all the same time period, the defaul tis one week (7 days). But the value is admin definable, and expressed in seconds, so the user can make this as long or as short as he desires.

Regarding what seems to be a common bug, the "non-positive value" error. I seem to recall this bothering me, and I don't remember what caused it. *Sheepish grin* I hope I didn't write the code in such a way as to cause it this time. ;)

I've tested this on my boards, which are an almost-vanilla instlal of phpbb 2.0.4 (I've installed 3 mods, Custom Titles, smart Login, an Auto Topic, none of these should interfere with the Level mod, so i consider this a pretty clean install). I tested with a registered user, a guest user, and looked at it with zero posts, several posts. The only thing I havnt tested is large numbers of posts, which is difficult to test.

As far as I can tell, there are no bugs, but I may have overlooked something. I credited Antony and Mac (ycl6) with keeping up with the development of this. But if anyone else did any significant work, please contact me, I'd like to add you're name as well. (I give Credit where Credit is due, but I don't know everything)

so, without further ado, here's my latest version:
http://www.asylumsw.com/phpbb/level_mod.zip


Your welcome to any work i did on it.
To be quite honest I'm glad to be rid of this mod, and all I ask is a little recognition for my work. :D
I've Been Banned!
Q-Zar
Registered User
Posts: 779
Joined: Sun Nov 17, 2002 8:30 pm
Location: Brussels
Contact:

Post by Q-Zar »

I installed it again, because I prefer the way the stats are shown here.
But I've got two bugs :
1) everybody's HP is at 0%
2) everybody's MP is at 100%

:?

As for the EXP, the way it is shown, is it Total EXP/Total EXP required for next level ?
If so, I'd prefer it if it said EXP on this level/EXP required for next level, with the total EXP earned so far mentionned before it, or next to the level.
Traductions : Cash Mod v2.2.2 (Getting Started) / Dice Mod v1.2.3 / Activity Mod Plus 1.0.8
Remember this. Please read the F.A.Q/Troubleshooting of a mod before asking questions.
Image
NightHawk
Registered User
Posts: 28
Joined: Mon Dec 17, 2001 5:27 am
Location: Rochester, NY
Contact:

Post by NightHawk »

Alright, as for the exp problem. That was a minor typo on my part, it should correctly show exp now. And just for reference, the "correct" way is:
Exp Learned on this Level / Exp Required for the Next level

Total exp is your post count, that should be displayed normally. If you have 8/8 exp (ora similar value), it should correctly show 100% exp now as well.

The file has been fixed and updated (The link in my previous post will work)

(the typo was I used a capital L instead of a lower-case l on one of the variables, silly typo, eh? :P )

As for HP/MP levels, be sure to check the level_mod.php file, it contains several variables you can alter to change hp and mp levels. You can increase/decrease the cost of posts, as well as incrase/decrease the "average" post size. As well as a few other things can be tweaked. I think I've documented everything well enough, but if you have questions about any variable, feel free to ask.

I've posted a bit on my boards, and the values seem to increase and decrease appropriately, so my best guess would be to just alter those variables I mentioned.

Antony, thanks, I did mention you in the file. :)
User avatar
Red~Ice
Registered User
Posts: 181
Joined: Sat Jul 13, 2002 8:43 pm
Location: Incredible Designs World Known Office
Contact:

Post by Red~Ice »

wheres the mod?
http://www.incredibledesigns.tk
.::Incredible Designs\|/SkyTechModifications::.
Sky-Techknology2.2.0
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

Hi NightHawk & Antony, as to the submission of this MOD to phpbbhacks, as I've guessed, it is rejected because I am not the original MOD author. So, sorry Antony, I wasn't able to get this MOD to phpbbhacks. I hope when this MOD is finally released as the Final version, NightHawk can submit it then.

My work is done too :o

~Mac
Patrick
Registered User
Posts: 221
Joined: Wed Oct 31, 2001 12:13 am
Location: Harbinger, NC, U.S.A.
Contact:

Post by Patrick »

ycl6 wrote: Hi NightHawk & Antony, as to the submission of this MOD to phpbbhacks, as I've guessed, it is rejected because I am not the original MOD author. So, sorry Antony, I wasn't able to get this MOD to phpbbhacks. I hope when this MOD is finally released as the Final version


As I said, if you have permission for distribution from the other hack authors involved in it, it can be added no problem. :) Thanks.
Patrick O'Keefe - ManagingCommunities.com
"why don't you just sign up with Patrick and create the "anti-phpBB" brigade"
Q-Zar
Registered User
Posts: 779
Joined: Sun Nov 17, 2002 8:30 pm
Location: Brussels
Contact:

Post by Q-Zar »

NightHawk wrote: As for HP/MP levels, be sure to check the level_mod.php file, it contains several variables you can alter to change hp and mp levels. You can increase/decrease the cost of posts, as well as incrase/decrease the "average" post size. As well as a few other things can be tweaked. I think I've documented everything well enough, but if you have questions about any variable, feel free to ask.


I installed the fixed version, which indeed fixed the EXP problem, but after lowering the MP cost and post size, the stats for each user still stay the same :? Like this :

Image

HP and MP are that way for everyone :? (EXP and level are fine though)
Traductions : Cash Mod v2.2.2 (Getting Started) / Dice Mod v1.2.3 / Activity Mod Plus 1.0.8
Remember this. Please read the F.A.Q/Troubleshooting of a mod before asking questions.
Image
NightHawk
Registered User
Posts: 28
Joined: Mon Dec 17, 2001 5:27 am
Location: Rochester, NY
Contact:

Post by NightHawk »

Well, I just thought of something that may be causing the problem. Both the calculations for current HP and MP use sql statements to retrieve information from the database. I wrote the sql statements with mySql in mind, and it didn't occur to me that they might not work in other databases.

Out of curiosity, Alienz and Q-Zar, what databases are you using?

If you're not using mySql, that could be a problem. And on that note, does anyone happen to know a way to fix this problem? :)
User avatar
Red~Ice
Registered User
Posts: 181
Joined: Sat Jul 13, 2002 8:43 pm
Location: Incredible Designs World Known Office
Contact:

Post by Red~Ice »

where is the link to the mod...
http://www.incredibledesigns.tk
.::Incredible Designs\|/SkyTechModifications::.
Sky-Techknology2.2.0
Q-Zar
Registered User
Posts: 779
Joined: Sun Nov 17, 2002 8:30 pm
Location: Brussels
Contact:

Post by Q-Zar »

I'm using MySQL :?
Traductions : Cash Mod v2.2.2 (Getting Started) / Dice Mod v1.2.3 / Activity Mod Plus 1.0.8
Remember this. Please read the F.A.Q/Troubleshooting of a mod before asking questions.
Image
Antony
Registered User
Posts: 529
Joined: Wed Feb 12, 2003 9:06 am

Post by Antony »

Patrick wrote:
ycl6 wrote:Hi NightHawk & Antony, as to the submission of this MOD to phpbbhacks, as I've guessed, it is rejected because I am not the original MOD author. So, sorry Antony, I wasn't able to get this MOD to phpbbhacks. I hope when this MOD is finally released as the Final version


As I said, if you have permission for distribution from the other hack authors involved in it, it can be added no problem. :) Thanks.


Patrick, he had my permission as I rewrote it. And his own, we had assumed it have been abbandened. And as I have said many times, I don't want a mod I wrote on phpBB.com on at phpBBHacks.com. ;)
I've Been Banned!
Alienz
Registered User
Posts: 53
Joined: Thu Mar 13, 2003 12:16 am

Post by Alienz »

I'm using MySQL too :(
NightHawk
Registered User
Posts: 28
Joined: Mon Dec 17, 2001 5:27 am
Location: Rochester, NY
Contact:

Post by NightHawk »

Ok.. so.. its not a database issue. I was -so- hoping. :|

Well, I updated the mod. I changed the sql statement to be explicit as to which tables/fields to refer to. It worked fine before and after the change on my boards, so I'm not confident about this working. But it's worth a shot.

As far as I can tell, the problem is that the mod doesn't see any of the posts you've made. Since it doesnt see those posts, it thinks you havn't made any, which results in 0 HP and 100% MP.

The only way that should happen is if you havn't posted in 7 days (Or whatever you set the $level_time_interval variable to. Which I sincerely doubt. So i'm thinking its still a problem with the SQL statement, as that's what retrieves the post data.

Hmm.

Red~Ice, read back a few posts, I made a long post with a link at the end, and Antony quoted my entire post.. with the link at the end. Just look, it's there.
User avatar
Red~Ice
Registered User
Posts: 181
Joined: Sat Jul 13, 2002 8:43 pm
Location: Incredible Designs World Known Office
Contact:

Post by Red~Ice »

Red~Ice wrote: where is the link to the mod...
http://www.incredibledesigns.tk
.::Incredible Designs\|/SkyTechModifications::.
Sky-Techknology2.2.0
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

I've not see the new calculation made by NightHawk, but I don't have the problem using Antony's file.

Download link to NightHawk file is HERE in page 15

or you fancy trying THIS ONE in page 12

~Mac
Locked

Return to “[2.0.x] MODs in Development”