Terraria Guides

TShock Terraria Plugin Guide: PermaBuffs

Thank you for reading our article. Our articles are hand tailored to our user's needs. If you have an idea or suggestion for an article, we'd love to hear it! You can contact us via support ticket or our 24/7 live chat, we'd love to hear from you! If you are interested in becoming a customer, go ahead and check out our competitive pricing on our TShock Terraria Hosting Page

If this guide helped you, please check out our Terraria Knowledge Base. It's our pleasure to help you, and we've crafted our knowledge base to show you all things Tshock Terraria. Thank you again for reading this article, it means a lot to us and we hope to work with you in the near future!

You should read these guides first:

Navigation:

Introduction

If you're a TShock Terraria server owner with GameServerKings, you may understand the feeling. You've got a large spawn region, safe from all mobs and user griefing. But its so large, your players can't get around quick enough! Say they want to have increased movement speed, or maybe, you'd want to have bonus money weekends where everyone has the midas buff. Maybe, it's your "One year of 24/7 service" and you want to celebrate by giving all your users a buff that makes confetti appear with melee attacks. There are over 200 Buffs with TShock terraria, with PermaBuffs, you can have any of them active, all the time, wherever you want. By reading this guide, you should know everything there is to know about the PermaBuffs TShock Plugin. Thank you for reading!

Official Features

  • While active, all buffs are auto-renewed until the command is turned off.
  • All player buffs are saved even if the server is shut down
  • Definable buff groups with specific permissions
  • Staff command to view active permabuffs
  • Global buffs
  • Region specific auto-renewing buffs as well

You can find a link to the Official PermaBuffs TShock Plugin Page here.
You can find a link to the Author of PermaBuff's TShock User Panel here.

 

Commands

Below we have listed the available commands as well as a description of what each command does. A command with the parameter tags "<>" indicates a required tag, while tags "[]" represents an optional tag. 

Command

Description

/permabuff <buff name/ID>

Activates a specific buff

/buffcheck <player> Gives a list of permabuffs that the specified player has activated
/gpermabuff<buff name/ID><player> Activates a specific buff for a specific player
/gpermabuff-g<"list"/buff group name> Creates a buffgroup
/regionbuff<add/del><region name><buff name/ID> [duration in seconds] Adds or deletes a region specific buff
In this case, duration is required, but not for the delete function.
/globalbuff<buff name/ID> Activates/deactivates a global buff
/clearbuffs [playername/all] Deactivates all buffs on a specific player or all players if "all" is the specified parameter
/pbreload Reloads the config file

 

Additional Plugin-related Permissions

Note* Provided on the plugin page are example permissions: pb.probuffs, pb.petbuffs, pb.debuffs. These permissions are for the default permissions within your config file. Certain buffs may or may not work depending on armor or weapon uses. For example, Beetle Armor buffs will only work while wearing beetle armor. These buffs will not work via config or commands.

Permission

Description

pb.<buffname> Allows users to buff themselves with buff permissions which have been applied to them or their group.
pb.debuff Allows players to apply debuffs to themselves
pb.check Allows players to use /buffcheck
pb.clear Allows players to deactivate all active buffs
pb.global Allows a player to set global buffs
pb.useall Allows a player access to all buffgroups.

 


How To Access PermabuffsConfig.json

The way this plugin works, is after it's installed it creates a config file located at "/tshock/permabuffsConfig.json." To make any buffgroups or regionbuffs, you must do so in this file. To access this file, you can do so by connection to an FTP Client such as FileZilla, or by using our Game Server Management panel. If you would like to access your server file by an FTP Client, read our Knowledge Base guide: How to Use FileZilla with your GameServerKings Server. Using our Management panel:

  1. Click on "Game Services" and select your TShock Terraria server.
  2. From here, click on "File Manager"
  3. Within the file manager, click on the tshock folder, and then find the PermabuffsConfig.json folder
  4. Click the image that looks like the earth to download this file.

Once you have completed those steps, you will have downloaded your current PermabuffsConfig.json folder and can now edit it. Open your config file with any text editor such as notepad or notepad++ and you will be greeted with sample code. It should look something similar to this:

{
  "buffgroups": [
    {
      "groupName": "probuffs",
      "groupPerm": "probuffs",
      "isperma": true,
      "buffIDs": [
        1,
        ...,
        205
      ]
    },
    {
      "groupName": "petbuffs",
      "groupPerm": "petbuffs",
      "isperma": false,
      "buffIDs": [
        19,
        27,
        40,
        ...,
        202
      ]
    },
    {
      "groupName": "debuffs",
      "groupPerm": "debuffs",
      "isperma": true,
      "buffIDs": [
        21,
        24,
        ...
        203
      ]
    }
  ],
  "regionbuffs": [
    {
      "regionName": "spawn",
      "buffs": {
        "11": 10
      }
    }
  ]
}


Code Breakdown

To give you a better understanding of this code, I will break down the information into a format that's easily understandable. If you have experience with plugin configuration, you may already understand this much and would wish to move forwards. All this section will be explaining is how to read and understand this code in a way that will make it easier for someone who's new to server hosting to manipulate. 

As you can see, this code is broken into two container groups, "buffgroups" and "regionbuffs" and then three individual groups with their own buff settings. The way this computer reads this code is by compiling it line by line, so whenever there is a list of data, it's [written, like, this]. Which is why, as you can see, the last member of any list does not have a comma. Note this, as it's very important not to add a comma to the last buff ID in your list. It will break the code. Within the sample code given to you inside of your PermabuffsConfig.json file, you will see that these lists are much more extensive, as they are organized by groups. Combat buffs/probuffs, pet buffs/mounts and pets, debuffs, and region specific buffs. You can use this as a reference, or you can use our TShock Terraira's Buff List located here.

As you can see, the container group "buffgroups" contains a list, within the list are all of your buff groups. An example of a buffgroup list item would be:

{
      "groupName": "probuffs",
      "groupPerm": "probuffs",
      "isperma": true,
      "buffIDs": [
        1,
        ...,
        205
      ]
    },


Configuration Variable List

Below is a list of all variables within "buffgroup" lists and a description of what they do.

Variable

Description

groupName The name of the buff group
groupPerm The permissions needed to use permabuffs in this group.
isperma If set to false, buff will be given but will not be auto renewed. 
buffIDs This is a list of buff ID's to add to this buff group.

 

Below is a list of all variables within the "regionbuffs" lists and a description of what they do.

Variable

Description

regionName The name of the region which the buffs are applied
buffs A list of buff ID's and their duration in seconds. (referring to when they leave the region. Buffs will auto renew if the "isperma" value is set to true)
For example, 11:10.

 


How To Set Up A Buff Group

So, to actually make a buff group, it's very easy. All you will need is a unique name, as well as a name for your permission, and the buffs that will be part of your buff group. Say, for example, you have a large base surrounded by water, but you want your users to enter, or your spawn is in a base underwater, and you want them to be able to leave. We'll set up a basic group with one buff that allows them to breathe underwater and once they're out of water, or in spawn, increase movement speed.

{
      "groupName": "deapthstriding",
      "groupPerm": "deapthstriding",
      "isperma": true,
      "buffIDs": [
        3,
        4

      ]
    },

This would set up an infinitely refreshing gills buff, allowing users to breathe underwater, and giving them swiftness, allowing their movement speed to raise 25%.

Application of Buff Groups

To apply buff groups, you must apply the permission of the group to individual users or groups. To show you, I'm going to make a group called "fish_men" who will receive this buff group.

/group add fish_men pb.deapthstriding
/group parent default fish_men

So, what I've done here, is I've created a new group called fish men, and given them the permission pb.deapthstriding, which was set in the "groupPerm" parameter. I've also made them a child group to the parent, "default" which gives them all permissions that the default group has.

If you would like to read more into permissions read our guide located here: TShock Permissions Reference


Region Buff Settings

Region Buffs are somewhat easier to handle as the only parameters required are that of your regions name, the buffs you want, and the duration of time for the buff to be refreshed once the user leaves the region. For this example, we want to make it so users receive increased health regeneration while they're in the region, have increased speed, and invulnerability from lava. There are a couple ways of doing this, you can use the config file, which may be more convenient for you:

"regionbuffs": [
    {
      "regionName": "spawn",
      "buffs": {
        "1": 10,
        "2": 10,
        "3": 10

      }
    }
  ]

Or, you could use this line of code ingame on a superadmin account:

/regionbuff add <regionname><buffID/name><duration>

To delete a region buff

/regionbuff del <regionname><buffID/name>

Duration IS a required value as it lists the time it requires for the buff to wear off once outside the region. For this situation:

/regionbuff add spawn 1 10
/regionbuff add spawn 2 10
/regionbuff add spawn 3 10

To delete a region buff:

/regionbuff del spawn 1

All this does is add three buffs to be auto reset within the boundaries of your spawn region. Once they leave the region, they'll keep their buffs for 10 seconds. For more information on regions refer to this link: TShock Region Management

Special Offer for new customers only

We noticed you stumbled upon our Knowledge Base from a search engine.

The guide you're reading right now was created to help our customers of our Terraria hosting service. We decided to share them for free!

If your current game server provider, is unable or unwilling to go the extra mile, switch to Gameserverkings.

We utilize the best hardware, the fastest connections and a very user friendly control panel.

Switching is easy! Sign up today, we'll transfer your files and handle everything else.

Click below, and receive a lifetime 5% discount on your service.