Allows changing the buffs the teas provide to players. These buffs are controlled by permissions and you can add as many permissions as you would like.
Note: Any duration over 1 hour will display incorrectly on the client. On the client once it reaches 0 it will roll over to 60 minutes again. There does not cause any issues with tea's it's just a display issue.
Permissions
**Permissions are controlled by the name used before the number in the config. **
teamodifiers.use
- Default use permission from config
Configuration
There are three levels to the configuration of the teas. The global duration and amount will effect all teas. The Modifier Type Amount will effect all tea's with the given buff. The Item List Modifiers lets you modify the settings of each tea individually. The levels are all multiplied together to get the final value.
{
"Global Duration Multiplier": {
"teamodifiers.use": 1.0
},
"Global Amount Multiplier": {
"teamodifiers.use": 1.0
},
"Global Modifier Type Amount Multiplier": {
"Wood_Yield": {
"teamodifiers.use": 1.0
},
"Ore_Yield": {
"teamodifiers.use": 1.0
},
"Radiation_Resistance": {
"teamodifiers.use": 1.0
},
"Radiation_Exposure_Resistance": {
"teamodifiers.use": 1.0
},
"Max_Health": {
"teamodifiers.use": 1.0
},
"Scrap_Yield": {
"teamodifiers.use": 1.0
}
},
"Item List Modifiers": {
"maxhealthtea.advanced": [
{
"Modifier Duration (Seconds)": {
"teamodifiers.use": 1200.0
},
"Modifier Amount": {
"teamodifiers.use": 0.125
},
"Modifer Type": "Max_Health"
}
],
"maxhealthtea": [
{
"Modifier Duration (Seconds)": {
"teamodifiers.use": 1200.0
},
"Modifier Amount": {
"teamodifiers.use": 0.05
},
"Modifer Type": "Max_Health"
}
],
"maxhealthtea.pure": [
{
"Modifier Duration (Seconds)": {
"teamodifiers.use": 1200.0
},
"Modifier Amount": {
"teamodifiers.use": 0.2
},
"Modifer Type": "Max_Health"
}
],
"oretea.advanced": [
{
"Modifier Duration (Seconds)": {
"teamodifiers.use": 1800.0
},
"Modifier Amount": {
"teamodifiers.use": 0.35
},
"Modifer Type": "Ore_Yield"
}
],
"oretea": [
{
"Modifier Duration (Seconds)": {
"teamodifiers.use": 1800.0
},
"Modifier Amount": {
"teamodifiers.use": 0.2
},
"Modifer Type": "Ore_Yield"
}
],
"oretea.pure": [
{
"Modifier Duration (Seconds)": {
"teamodifiers.use": 1800.0
},
"Modifier Amount": {
"teamodifiers.use": 0.5
},
"Modifer Type": "Ore_Yield"
}
],
"radiationresisttea.advanced": [
{
"Modifier Duration (Seconds)": {
"teamodifiers.use": 1800.0
},
"Modifier Amount": {
"teamodifiers.use": 0.15
},
"Modifer Type": "Radiation_Resistance"
},
{
"Modifier Duration (Seconds)": {
"teamodifiers.use": 0.0
},
"Modifier Amount": {
"teamodifiers.use": 0.5
},
"Modifer Type": "Radiation_Exposure_Resistance"
}
],
"radiationresisttea": [
{
"Modifier Duration (Seconds)": {
"teamodifiers.use": 1800.0
},
"Modifier Amount": {
"teamodifiers.use": 0.05
},
"Modifer Type": "Radiation_Resistance"
},
{
"Modifier Duration (Seconds)": {
"teamodifiers.use": 300.0
},
"Modifier Amount": {
"teamodifiers.use": 0.5
},
"Modifer Type": "Radiation_Exposure_Resistance"
}
],
"radiationresisttea.pure": [
{
"Modifier Duration (Seconds)": {
"teamodifiers.use": 1800.0
},
"Modifier Amount": {
"teamodifiers.use": 0.25
},
"Modifer Type": "Radiation_Resistance"
},
{
"Modifier Duration (Seconds)": {
"teamodifiers.use": 300.0
},
"Modifier Amount": {
"teamodifiers.use": 0.5
},
"Modifer Type": "Radiation_Exposure_Resistance"
}
],
"scraptea.advanced": [
{
"Modifier Duration (Seconds)": {
"teamodifiers.use": 1800.0
},
"Modifier Amount": {
"teamodifiers.use": 1.0
},
"Modifer Type": "Scrap_Yield"
}
],
"scraptea": [
{
"Modifier Duration (Seconds)": {
"teamodifiers.use": 1800.0
},
"Modifier Amount": {
"teamodifiers.use": 0.5
},
"Modifer Type": "Scrap_Yield"
}
],
"scraptea.pure": [
{
"Modifier Duration (Seconds)": {
"teamodifiers.use": 1800.0
},
"Modifier Amount": {
"teamodifiers.use": 2.0
},
"Modifer Type": "Scrap_Yield"
}
],
"woodtea.advanced": [
{
"Modifier Duration (Seconds)": {
"teamodifiers.use": 1800.0
},
"Modifier Amount": {
"teamodifiers.use": 1.0
},
"Modifer Type": "Wood_Yield"
}
],
"woodtea": [
{
"Modifier Duration (Seconds)": {
"teamodifiers.use": 1800.0
},
"Modifier Amount": {
"teamodifiers.use": 0.5
},
"Modifer Type": "Wood_Yield"
}
],
"woodtea.pure": [
{
"Modifier Duration (Seconds)": {
"teamodifiers.use": 1800.0
},
"Modifier Amount": {
"teamodifiers.use": 2.0
},
"Modifer Type": "Wood_Yield"
}
]
}
}
API
Methods
//Returns if there are any modifiers for the given item
bool HasModifiers(string shortName)
//Returns the duration of the tea for the given item and modifier type
float GetTeaDuration(BasePlayer player, string shortName, Modifier.ModifierType type)
//Returns the value of the tea for the given item and modifier type
float GetTeaValue(BasePlayer player, string shortName, Modifier.ModifierType type)
Hooks
//Returning non null cancels applying the tea item
object CanApplyTeaModifier(BasePlayer player, Item item, ItemModConsumable consumable)
//Returning non null cancels applying the modifer type for the given item
object CanApplyTeaModifierType(BasePlayer player, Item item, Modifier.ModifierType type)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.