Skip to content

Default Subplugin

Batfoxkid edited this page Sep 30, 2020 · 9 revisions

The default subplugin is based on a module system with each type of item in different files (eg. textstore/trails.sp)
It is also only optional for each file, meaning you can leave out files and the subplugin will still compile.
"type" setting determines which item is going to be used.

Standard Modules

Command

"command" Executes a server command or a player command.

  • "command" The command line to run there are some strings that can be replaced such as:

    • {clientid} Replaces with the client's id number
    • {userid} Replaces with the client's userid number
    • {steamid} Replaces with the client's steamid (AuthId_Steam2)
    • {name} Replaces with the client's username
  • "fail" If defined, if any part of the command output matches this string it'll consider as a fail and the item won't be used up

  • "success" If defined, if any part of the command output doesn't match this string it'll consider as a fail and the item won't be used up

  • "client" If to use a client command instead of the server running the command ("fail" and "success" aren't available with this)

Loot Boxes

"boxes" Allows creating crates, lootboxes, etc.

  • "locked" If defined, requires this item to unlock and use. (Will consume the item in the process.)

  • "#" The chance that this list of items will be given. Higher numbers will increase the chances.

Example

"4"
{
	"1"	"Item 1" // 23.5%
	"2"	"Item 2" // 23.5%
	"3"	"Item 3" // 23.5%
}
"2"
{
	"1"	"Item 4" // 11.8%
	"2"	"Item 5" // 11.8%
}
"1"
{
	"1"	"Item 6" // 5.9%
}

Trails

"trail" Attaches a trail to a client (automatically hides if cloaked in TF2).
Note this precaches automatically but doesn't add to the downloads table.

  • "material" Material path of trail (materials/.../file.vmt)

  • "color" The color of the trail (255 255 255 255 red green blue alpha)

  • "width" The width of the trail

Voting

"voting" Starts a vote with a yes/no, if successful, it runs a server command.

  • "title" The title of the vote

  • "command" The command line that runs if the vote is successful

  • "once" If this item can only be used once per a map

  • "maptime" How much to extend the map if the vote was successful

Third-Party Modules

Freak Fortress 2

"freak_fortress_2" Specific natives for Freak Fortress 2
This item does require the plugin installed in order to use it.

  • "points" How much queue points given to the player

  • "unlock" Unlocks the given boss from being blocked off (goes by boss's filename)

  • "select" Selects the given boss as the current selection (goes by boss's filename) (Only available on Unofficial Freak Fortress)

  • "change" Swap a specific boss with a different boss instead (goes by boss's name)

TF2Items

"tf2items" An equipable weapon using TF2Items.
This item does require the plugin installed in order to use it.

  • "class" Classes that can equip this item (Eg. "scout" "demo" "soldier pyro")

  • "weapon" Weapon slot that the weapon belongs to (0 is Primary, 1 is Secondary, 2 is Melee, etc.)

  • "classname" Weapon classname

  • "index" Weapon index

  • "attributes" Weapon attributes

  • "level" Weapon level

tVip

"tvip" An item that communicates with the tVip plugin.
This item does require the plugin installed in order to use it.

  • "duration" Duration of VIP in minutes