Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > Premium Archives > RPG Integration Hack

Closed Thread
 
Thread Tools
RPG Integration Hack - Old Support Thread Details »»
RPG Integration Hack - Old Support Thread
Version: , by MindTrix MindTrix is offline
Developer Last Online: Jul 2013 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 08-17-2004 Last Update: Never Installs: 0
 
No support by the author.

Nice conversion there mate, lot of work has gone into it so well done and thanks for sharing it

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #562  
Old 09-30-2004, 07:47 PM
rinkrat's Avatar
rinkrat rinkrat is offline
 
Join Date: Jan 2002
Location: Long Beach
Posts: 530
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My site has been going slow since I added this hack and I'm not real sharp on queries but one of my tech guys sent me a list from the logs saying there are a ton of queries in showthread.php, including a lot of RPG stuff. Any way I can clear out some of this stuff and speed things up a bit because I'm getting server busy with only 50 people online? (He says the LEFT JOIN's at the bottom are killing me)

Code:
From showthread.php:
SELECT
post.*, post.username AS postusername, post.ipaddress AS ip,
user.*, userfield.*, usertextfield.*,
user.ma AS uma,user.hp AS uhp,user.pp AS upp,user.ap AS uap,".TABLE_PREFIX."rpg_battle_options.namefield,".TABLE_PREFIX."rpg_battle_options.exprate,".TABLE_PREFIX."rpg_battle_options.privacy AS battleprivacy,".TABLE_PREFIX."rpg_items_user.*,".TABLE_PREFIX."rpg_battle_stats.*,".TABLE_PREFIX."rpg_rpg_race.name AS rpgracename,".TABLE_PREFIX."rpg_rpg_race.alignment AS rpgalignmentname,".TABLE_PREFIX."rpg_rpg_classf.name AS fclassname,
".TABLE_PREFIX."rpg_rpg_classf.folder AS fclassfolder,".TABLE_PREFIX."rpg_rpg_classm.name AS mclassname,".TABLE_PREFIX."rpg_rpg_classm.folder AS mclassfolder,".TABLE_PREFIX."rpg_rpg_element.name AS elename,
" . iif($forum['allowicons'], 'icon.title as icontitle, icon.iconpath,') . "
" . iif($vboptions['avatarenabled'], 'avatar.avatarpath, NOT ISNULL(customavatar.avatardata) AS hascustomavatar, customavatar.dateline AS avatardateline,') . "
" . iif($vboptions['reputationenable'], 'level,') . "
" . iif(!$deljoin, 'NOT ISNULL(deletionlog.primaryid) AS isdeleted, deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason,') . "
editlog.userid AS edit_userid, editlog.username AS edit_username, editlog.dateline AS edit_dateline,
editlog.reason AS edit_reason,
post_parsed.pagetext_html, post_parsed.hasimages,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
" . iif(!can_moderate(), $datastore['hidprofilecache']) . "
FROM " . TABLE_PREFIX . "post AS post, ".TABLE_PREFIX."rpg_battle_options, ".TABLE_PREFIX."rpg_items_options
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = post.userid)
LEFT JOIN " . TABLE_PREFIX . "userfield AS userfield ON(userfield.userid = user.userid)
LEFT JOIN ".TABLE_PREFIX."rpg_items_user ON ".TABLE_PREFIX."rpg_items_user.userid=user.userid
LEFT JOIN ".TABLE_PREFIX."rpg_battle_stats ON ".TABLE_PREFIX."rpg_battle_stats.userid=user.userid
LEFT JOIN ".TABLE_PREFIX."rpg_rpg_classf ON ".TABLE_PREFIX."rpg_rpg_classf.id=user.rpgclass
LEFT JOIN ".TABLE_PREFIX."rpg_rpg_classm ON ".TABLE_PREFIX."rpg_rpg_classm.id=user.rpgclass
LEFT JOIN ".TABLE_PREFIX."rpg_rpg_element ON ".TABLE_PREFIX."rpg_rpg_element.elementid=user.element
LEFT JOIN ".TABLE_PREFIX."rpg_rpg_race ON ".TABLE_PREFIX."rpg_rpg_race.raceid=user.rpgrace AND ".TABLE_PREFIX."rpg_rpg_race.alignmentid=user.alignment
LEFT JOIN " . TABLE_PREFIX . "usertextfield AS usertextfield ON(usertextfield.userid = user.userid)
" . iif($forum['allowicons'], "LEFT JOIN " . TABLE_PREFIX . "icon AS icon ON(icon.iconid = post.iconid)") . "
" . iif($vboptions['avatarenabled'], "LEFT JOIN " . TABLE_PREFIX . "avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN " . TABLE_PREFIX . "customavatar AS customavatar ON(customavatar.userid = user.userid)") .
iif($vboptions['reputationenable'], " LEFT JOIN " . TABLE_PREFIX . "reputationlevel AS reputationlevel ON(user.reputationlevelid = reputationlevel.reputationlevelid)") . "
" . iif(!$deljoin, "LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND deletionlog.type = 'post')") . "
LEFT JOIN " . TABLE_PREFIX . "editlog AS editlog ON(editlog.postid = post.postid)
LEFT JOIN " . TABLE_PREFIX . "post_parsed AS post_parsed ON(post_parsed.postid = post.postid)
WHERE $postids
ORDER BY dateline $postorder
  #563  
Old 09-30-2004, 08:03 PM
Blam Forumz Blam Forumz is offline
 
Join Date: Jun 2004
Posts: 554
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Revan
Just alter the SQL to have Dropdown as default, and then remove the Choose stuff from the template AND the php
And how would i go about doing that ? :|
  #564  
Old 10-01-2004, 02:12 PM
Revan's Avatar
Revan Revan is offline
 
Join Date: Jan 2004
Location: Norway
Posts: 1,671
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RMS
Ah, this isn't a big deal but what I meant was is there a way to get a link to display stats in the profile that anyone can see of a certain person? I have the link in the usercp but currently the only way to see another person's character is to find a thread he posted in and then look it up there.
No theres no such mod available atm.

Quote:
Originally Posted by RMS
Sorry if this has been asked before but is there a reason that classes are based upon gender? Maybe I'm just not clear on it but it seems that this isn't very useful. Races are based on alignment so in turn it would be nice to have classes that are exclusive to certain races. Is this possible?

What I would like to do is for example do something like make a race of dwarves where if you choose them you can then only choose a class that is proficient in melee and not magic. The way I see it now is that no matter your alignment or race, you can be pretty much any class that is availalable. This way I can't even divide it so that only the default race of orcs can only be black mages. Personally I find it a bit contradictory to allow good people to be a black mage.

At the very least is there any real purpose to creating more class types other than to organize things better?

Is this just the way it is, am I mistaken or is there a way to fix this?
The main reason to have Class Types is that you can limit the ITEMS each class can use.

Theres currently no way of seperating races by alignment. It would also be impossible to both seperate by alignment AND gender (afaik).
Redesigning this would mean having to mess about with JavaScript, which I dont know ANYTHING about, so no can do

Quote:
Originally Posted by RMS
Also I seem to have a problem. After battles (and maybe something else) it seems that some or all characters have their max MP and PP calculated incorrectly, making it become some huge number. When I was level one I could go to my character edit screen and update it which would fix it. Now even when I do that nothing happens. :surprised:
Weird. You could try lowering the MA and PP modifiers in the acp, then update stats.
Recommended values for versions < 2.5.3 is 0.003



Quote:
Originally Posted by rinkrat
My site has been going slow since I added this hack and I'm not real sharp on queries but one of my tech guys sent me a list from the logs saying there are a ton of queries in showthread.php, including a lot of RPG stuff. Any way I can clear out some of this stuff and speed things up a bit because I'm getting server busy with only 50 people online? (He says the LEFT JOIN's at the bottom are killing me)
If you know any other way of merging all those different tables that uses less query time, do let me know


Quote:
Originally Posted by Blam Forumz
And how would i go about doing that ? :|
1. Open profile.php and pick out all that has anything to do with rpgpostbit, namely:
PHP Code:
        if ($bbuserinfo['rpgstats'] == 1)
        {
            
$rpg_postbit1 '<input type="radio" name="rpgpostbit" value="1" CHECKED /> Display RPG stats in postbit';
            
$rpg_postbit2 '<input type="radio" name="rpgpostbit" value="0" /> Display RPG stats in dropdown';
        } 
        else if (
$bbuserinfo['rpgstats'] == 0
        {
            
$rpg_postbit1 '<input type="radio" name="rpgpostbit" value="1" /> Display RPG stats in postbit';
            
$rpg_postbit2 '<input type="radio" name="rpgpostbit" value="0" CHECKED /> Display RPG stats in dropdown';
        } 
and
PHP Code:
rpgstats='$rpgpostbit' 
Then pick out the stuff that shows the $rpg_postbit variables, the entire table preferrably :P

Then run this:
[sql]
ALTER TABLE `user` CHANGE `rpgstats` `rpgstats` CHAR( 1 ) DEFAULT '0' NOT NULL ;
UPDATE `user` SET `rpgstats`='0';
[/SQL]
Remember to add a prefix if you use it.
  #565  
Old 10-01-2004, 02:35 PM
TJFweb TJFweb is offline
 
Join Date: Dec 2001
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Revan: Any ETA on v3?

I check this thread every day in anticipation ;-)
  #566  
Old 10-01-2004, 04:51 PM
RMS's Avatar
RMS RMS is offline
 
Join Date: Mar 2002
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah thanks. Indeed if the MA and PP modifiers should be something around .003 then my values were a bit off. I think they were default but I had 2 and 3. So far it seems to be fixed
  #567  
Old 10-01-2004, 04:55 PM
Revan's Avatar
Revan Revan is offline
 
Join Date: Jan 2004
Location: Norway
Posts: 1,671
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TJFweb
Revan: Any ETA on v3?

I check this thread every day in anticipation ;-)
About 3-4 months would probs not be too far off the mark.
  #568  
Old 10-01-2004, 07:42 PM
rinkrat's Avatar
rinkrat rinkrat is offline
 
Join Date: Jan 2002
Location: Long Beach
Posts: 530
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I removed the RPG stats in postbit and it seems to have speeded up things dramatically.
  #569  
Old 10-02-2004, 03:37 AM
starfantazy starfantazy is offline
 
Join Date: Apr 2004
Location: Bythemoon
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

could you let me know when you get the female part of the hack fixed..... i really want to use it and im one of the few that cant, its such a tease :nervous: haha
  #570  
Old 10-02-2004, 07:56 AM
Revan's Avatar
Revan Revan is offline
 
Join Date: Jan 2004
Location: Norway
Posts: 1,671
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would send you the alpha build of the "new feature-less" v3 once I get the acp done redesigned, but I dont want to upload it anywhere and link to it in PM, and I most def dont want to attach it here cos I dont want everyone grabbin it
lol
  #571  
Old 10-02-2004, 09:38 AM
Blam Forumz Blam Forumz is offline
 
Join Date: Jun 2004
Posts: 554
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wanna send it to me? my board is so small it almost doesnt exist :P
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:00 PM.


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.05348 seconds
  • Memory Usage 2,337KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (2)bbcode_php
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete