MyBB Community Forums

Full Version: RPG Stats on Postbit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Download
https://community.mybb.com/mods.php?acti...w&pid=1242

Screenshot
[attachment=41744]

Major Updates
  • 1.2.0 - Now supports "Gil" and "Equipment" (just more roleplay options, Gil is not a full-fledged points system).
  • 1.1.5 - Works with Welcome Box plugin found here.
  • 1.1.5 - Compatible with future plugins and no longer bound to postbit.
  • 1.1.0 - Now supports "Elements" (which are basically sets of different HP/MP bases/coefficients) which, using language files, can be turned into "Class" or another attribute you wish to have influence over growth. This feature can be turned off in the control panel.
  • 1.1.0 - You can now turn on/off Limit Break system.
  • 1.1.0 - Image paths are fully configurable.

Description
This is one of my site's custom plugins that has been ported from vBulletin. MyBB is soon to be our new permanent home, and I decided that I'd share these with the community. This plugin displays RPG stats derived from user post counts on their user details postbit. It was originally intended for our "Battle Arena" like a decade ago, but now we just keep it around for fun. The current values are malleable through use of custom field IDs, in case you intend on using these stats.

Features
  • Displays current Lv and Exp progress.
  • Exp coefficient can be modified to differentiate it from post count.
  • HP and MP initial and coefficient values can be modified.
  • Current HP and MP values may be edited via hidden profile fields that you create.
  • Current Limit Break level may be edited via a hidden profile field that you create.
  • Users can name their Limit Break via a custom profile field that you create.

Notes
This plugin is intended to be used with postbit_classic out of the box, but it can easily be used on postbit. I would recommend creating a separate author_statistics div below the first one containing the {$post['rpgstats']} variable. It should look something like this:

 <div class="author_statistics">
 {$post['user_details']}
 </div>
 <div class="author_statistics">
 {$post['rpgstats']}
 </div>

You would probably want to remove the <br /> from the top of the postbit_rpgstats template and add that manually to postbit_classic after completing the above.

To make HP Damage/MP Spent, Limit Break, and Elements work properly, be sure to create custom profile fields. You'll need 5 total for all features: HP Damage can be used by your mods to subtract HP from users or heal them by resetting the field (over their max or blank will default to max, negative will default to 0). MP Spent is the same as HP Damage, but for MP. Limit Break should have two fields, one for your mods to adjust limit meters (1-100, at 100, a meter is full and is called "Limit Break" which indicates a user is able preform their special ability), the second limit field is is Limit Name, the field where users can name their special ability or "Limit Break".

Here's an example of a HP Damage profile field, editable by staff only, and with proper regex:
[attachment=42107]

Here's how to accurately grab a FID of a profile, just click on that profile field and check your URL bar:
[attachment=42106]

The elements field should be a single-choice drop down menu with the names of elements that users can choose. In RPG Stats Options, under Element Options & Stats, add the same elements to the text area, and separate them by line. The format is like this:

NAME|IMAGE|HP BASE|HP COEFFICIENT|MP BASE|MP COEFFICIENT|USERID (optional)

For example, a few element options may look like:

Nature|nature.png|120|80|100|40
Dark|dark.gif|140|90|80|30
Light|light.gif|100|70|120|80
Uber|uber.png|300|240|200|180|1

Notice the last line has an extra option, a "1" at the end. This means that element will OVERWRITE whatever userid 1 has chosen. You can use this feature to have special, "unique" elements for admins, mods, or special users. Of course, for these options to be unique, don't add them to your custom profile field. Only add them in the RPG Stats Options and they will automatically override the stats.

If no elements are used, default HP/MP base/coefficients will be used as defined in the admin control panel.

If you'd like to create equipment slots, add fields for each slot you would like to add, then add them to the Equip Options & IDs with a new slot each line. The format is like this:

NAME|FID

For example, say you added a custom fields (fid = 8 and fid = 9) for a weapon and an armor and you want them to show in their equipment area:

Weapon|8
Armor|9

To Do
At some point, I will be adding support to show RPG Stats on members' profiles.

Help & Support
Your best bet is to post in this thread, because I'll be checking it to see what people think and what's broken. Barring that, feel free to contact me, but only if you attempted posting here first.

Thanks for taking a look and let me know what you think.
Hello, i have installed this plugin and thanks for sharing it with us.

I have some questions regarding this plugin.

Could you explain me the meanings of:

HP, MP AND LIMIT ?

How does it exactly work?

Regards.
(2019-04-26, 08:59 AM)kbilly Wrote: [ -> ]Could you explain me the meanings of:

HP, MP AND LIMIT ?
HP is referred to as hit points and is commonly used for health. MP is referred to as magic points and is used as a magic stockpile, like ammunition for magic. Using the language files, you can rename these to whatever you want, like Health and Stamina, etc...

Limit is a guage that goes 0 - 100. When it's full, the user gets to use a special attack. The concept as such is from Final Fantasy, but you can also think of it like a super meter from Street Fighter. This feature can be turned off.

The current numeric values can be adjusted if you create custom fields, and then enter those field IDs into the corresponding fields in RPG Options.
(2019-04-26, 07:50 PM)Settyness Wrote: [ -> ]
(2019-04-26, 08:59 AM)kbilly Wrote: [ -> ]Could you explain me the meanings of:

HP, MP AND LIMIT ?
HP is referred to as hit points and is commonly used for health. MP is referred to as magic points and is used as a magic stockpile, like ammunition for magic. Using the language files, you can rename these to whatever you want, like Health and Stamina, etc...

Limit is a guage that goes 0 - 100. When it's full, the user gets to use a special attack. The concept as such is from Final Fantasy, but you can also think of it like a super meter from Street Fighter. This feature can be turned off.

The current numeric values can be adjusted if you create custom fields, and then enter those field IDs into the corresponding fields in RPG Options.

Thanks a million.
after update new version it wont work 1.5 to 1.6 version upgrade it won't show anything how to fix
(2019-06-02, 07:49 PM)kuttysoft Wrote: [ -> ]after update new version it wont work 1.5 to 1.6 version upgrade it won't show anything how to fix
That update added the ability to disable display for certain usergroups. Go into the RPG Stats Options and make sure the appropriate usergroups are able to see the stats.
Not working on 1.8
(2019-06-16, 08:21 AM)vonmhel1995 Wrote: [ -> ]Not working on 1.8
The plugin targets 1.8. Can you be more specific? Did you select usergroups that can view the plugin?
Interestingly, as soon as I turn on all group options, the RPG will not be displayed, I choose the option 'Select group', are they displayed? Is this a bug?
Pages: 1 2