Properties that only Consumables have - Catman-232/Homebrewery GitHub Wiki
This page was up to date as of version 4.0.0
An item's param.txt
file is a JSON formatted set of properties that HB will try to parse into data. You do not need to have every single property in a file, as any you don't have will be given its default value, which is displayed in each code block below.
The file starts with a left brace: {
, property names go in speech marks with a colon afterwards: "property":
, values go after the colon and will have a comma after them: 10,
or "stringvalue",
unless it is the last one in the file: 10
or "stringvalue"
, and finally the file ends with a right brace }
"_consumableObject": "",
String
This property can be used to specify a particle effect object to be spawned when you use the item, the default for Consumables is the Bunbag's green burst effect. If you want the item to have no particle effect, set the value to "Nothing"
. I will get around to documenting the valid values eventually, there are a lot of them being loaded from the game's resources.
"food": 2,
Integer (no decimal place allowed)
This defines the "size" of the consumable, I guess, you need to have spare capacity to consume the item. By default your capacity for food is 5, and the current value is decreased at a default rate of 1 per 40 seconds. There are config options in BepInEx > config > Homebrewery.cfg
that you can use to customise those values, or just bypass this entirely. The food value is allowed to be negative, which would act like erasing food you had consumed, but the minimum is capped to 0 (empty) of course.
"damage": 0,
Integer (no decimal place allowed)
This acts like a negative heal when consuming the item, it drains your health directly, this only works due to a patch I added because the vanilla behaviour is to ignore any 0 or lower value. I also added the aspect of it setting your character to the hurt eyes for a bit. Positive values will be turned into negative values. This does not spawn a damage numbers particle on you.
"cooldown": 7,
Float (decimal places allowed)
This property allows you to set how long it takes for the Consumable to be possible to use again, the default of 7 seconds was what Bunbags had when I implemented it. The minimum is 1 second, anything lower is raised to 1 second.
"usesound": "",
String
This property is where you define a sound effect for the Consumable to play when using it.
A custom SFX example would be: Catman-Homebrewery-SFX-MeteorSmash-UseSound
"cond1name": "",
String
Used to specify the name of a consumable effect. See: Consumable Effects List
"cond1duration": 0,
Float (decimal places allowed)
Used to specify a duration for the effect, some effects do not use this property. For properties that can have a Duration, leaving this set to 0 will invoke a single tick of the effect. Setting this to a negative value will prompt HB to choose a random value when the effect is being created (before being synced), this range is 2 - 3.5 seconds.
"cond1power": 1,
Float (decimal places allowed)
Used to set the strength of the effect, some effects do not use this property. Effects that increase something, can be made to decrease instead by using a negative value. Effects that concern character proportions will check if the value would push the relevant proportion value outside of the range specified in the race's yours and others limits CFG files, which you can find in BepInEx > config > HBLimitCFGs
"cond1interval": 0.0166666667,
Float (decimal places allowed)
Used to set a specific interval for the tick rate of effects that last for a duration. The default is vaguely 1/60, so about every frame at 60fps, this is also the minimum. A value of 1 would be roughly once per second, although the effect may not tick as many times total as you expect it to. Effects that don't use duration also do not use this.
"cond2name": "",
String
The name for a second effect the consumable applies when using it.
"cond1duration": 0,
Float (decimal places allowed)
Duration of the second effect.
"cond1power": 1,
Float (decimal places allowed)
Power of the second effect.
"cond1interval": 0.0166666667,
Float (decimal places allowed)
Interval of the second effect.
"cond3name": "",
String
The name for a third effect the consumable applies when using it.
"cond3duration": 0,
Float (decimal places allowed)
Duration of the third effect.
"cond3power": 1,
Float (decimal places allowed)
Power of the third effect.
"cond3interval": 0.0166666667,
Float (decimal places allowed)
Interval of the third effect.
"cond4name": "",
String
The name for a fourth effect the consumable applies when using it.
"cond4duration": 0,
Float (decimal places allowed)
Duration of the fourth effect.
"cond4power": 1,
Float (decimal places allowed)
Power of the fourth effect.
"cond4interval": 0.0166666667,
Float (decimal places allowed)
Interval of the fourth effect.
"cond5name": "",
String
The name for a fifth effect the consumable applies when using it. This is the last "slot" for now.
"cond5duration": 0,
Float (decimal places allowed)
Duration of the fifth effect.
"cond5power": 1,
Float (decimal places allowed)
Power of the fifth effect.
"cond5interval": 0.0166666667,
Float (decimal places allowed)
Interval of the fifth effect.