Properties that only Weapons have - Catman-232/Homebrewery GitHub Wiki
This page was up to date as of version 4.1.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 }
"_textureColorAdjust": {
"_hue": 0.0,
"_saturation": 1.0,
"_brightness": 0.0,
"_contrast": 1.0
},
Float (decimal places allowed) x 4
Technically this is a nested object called a ColorAdjustShader_Profile
, which is comprised of four decimal values. They are the same properties that Dyes have in their equivalent property, since it is the same Class. These values are only used if the item is not dyable (and I believe weapons are never dyable), the game applies these values like a Dye.
This isn't that useful to us, Kiseff uses them in order to reuse textures with the shaders recolouring them based on the values. We have to supply individual textures per item anyway though so you might as well just recolour the PNG and probably get better results from that.
Valid value ranges:
- Hue: -360 to 360
- Saturation: 0 to 2
- Brightness: -1 to 1
- Contrast: 0 to 2
"weaponMesh": "",
String
This property is where you define either a vanilla or custom Mesh for the Weapon. It must be the name of a Mesh, such as the ones here: Vanilla Weaponmesh Names (There are too many weapons to cover so this link is to the other weapon creation guide where I had dumped the list of names)
A custom Mesh example would be: Catman-Homebrewery-Mesh-FryingPan
"weaponType": "",
String
This value determines what kind of weapon the game considers the item. The actual animation set is set by the _weaponHoldClipIndex
property, but is relative to this property.
Valid values:
"Unarmed"
"Dexterity_Melee_2H"
"Strength_Melee_1H"
"Strength_Melee_2H"
"Dexterity_Ranged_2H"
"Mind_Ranged_1H"
"Mind_Ranged_2H"
"_weaponHoldClipIndex": 0,
Integer (no decimal place allowed)
This value determines the animation set, it is an index for an array of sets under the weapon's type. Some weapon types only have one set.
Valid values: 0, 1 and 2, the value is clamped to the closest valid index.
(weaponType is "Unarmed"
) -> 0
is "Unarmed"
(weaponType is "Dexterity_Melee_2H"
) -> 0
is "Fist Weapons"
(weaponType is "Strength_Melee_1H"
) -> 0
is "Sword", 1
is "Mace",
(weaponType is "Strength_Melee_2H"
) -> 0
is "Hammer", 1
is "Great Weapon", 2
is "Polearm"
(weaponType is "Dexterity_Ranged_2H"
) -> 0
is "Bow", 1
is "Shotgun"
(weaponType is "Mind_Ranged_1H"
) -> 0
is "Scepter"
(weaponType is "Mind_Ranged_2H"
) - 0
is "Magic Bell"
"_weaponProjectileSet": "",
String
This value determines what kind of projectile the item fires, if it is actually supposed to, including this on a weaponType that does not fire anything will be redundant. Leaving this empty on a weaponType that is supposed to fire something will cause it to fire nothing at all.
Valid values:
"arrow"
"arrow_nature"
"arrow_pierce"
"arrow_shadow"
"arrow_water"
"scepter(ele_fire)_00"
"scepter(ele_fire)_01"
"scepter(ele_normal)"
"scepter(ele_shadow)"
"scepter(ele_shadow)_alt00"
"scepter(ele_water)_00"
"scepter(ele_water)_01"
"slmDivaBaton"
"scepter(wizscepter)"
"bell_coldgeist"
"bell_colossusTone"
"bell_normal"
"bell_shadow"
"magitekBurstGun"
"_hitSound": "",
String
This property is where you define a sound effect for the weapon to play when you hit something with it (and deal damage). This is quite tricky to actually implement since only the server actually knows you hit something, and what weapon you hit something with, so currently these do not play. They are still imported and set up for being used however.
An example would be: Catman-Homebrewery-SFX-FryingPan-HitSound
"_swingSound": "",
String
This property is where you define a sound effect for the weapon to play when you swing it. If this property is left blank, HB will assign the default sound effect from the weapon's type.
An example would be: Catman-Homebrewery-SFX-FryingPan-SwingSound
"_drawSound": "",
String
This property is where you define a sound effect for the weapon to play when you unsheath it. If this property is left blank, HB will assign the default sound effect from the weapon's type.
An example would be: Catman-Homebrewery-SFX-FryingPan-DrawSound
"_level": 1,
Integer (no decimal place allowed)
This is the item level of the weapon, apparently enchantments scale on this. As you can expect, if your character is lower in level than the weapon is, you can't equip it. Minimum is 1, maximum is 24 (from Valdur Blade).
"_weaponDamage": 1,
Integer (no decimal place allowed)
This is the base damage value of the weapon, it is the low end of the weapon's damage range. Minimum is 1, maximum is 42 (from Quake Pummeler).
"_damageBonus": 0,
Integer (no decimal place allowed)
This value, plus _weaponDamage
, plus 3 is the high end of the weapon's damage range. Minimum is 1, maximum is 15 (from Quake Pummeler). For example, a weapon with _weaponDamage
set to 5, and _damageBonus
set to 2, should show a damage range of 5 - 10 (5 + 2 + 3).
"_combatElement": -1,
Integer (no decimal place allowed)
This value determines the damage element for the weapon, if any. Leaving this set to -1 will leave the weapon without an element, unless it has a _weaponProjectileSet
, in which case it defaults to 0 "Normal". Vanilla weapons don't all have an element assigned unless the weapon shoots projectiles, in which case those are set to "Normal" element if nothing else.
Valid values:
-
-1
-> No element (or Normal if it has projectiles) -
0
-> "Normal" -
1
-> "Fire" -
2
-> "Water" -
3
-> "Nature" -
4
-> "Earth" -
5
-> "Holy" -
6
-> "Shadow"
"_scriptableCondition": "",
String
This property lets you add a chance based condition effect that can apply on hit. The valid values for this are the conditions that vanilla weapons have a chance to proc.
Valid values:
"Gash"
"Hex"
"Brittle"
"Burn"
"Cold"
"Poison"
"_chance": 0.0,
Float (decimal places allowed)
This property specified the odds of the condition effect applying on hit. If a valid condition is added to the weapon, the value's minimum is 0.001 (0.1%). The maximum is 0.12 (12%) which matches the odds of the Golemfist Katars applying Gash on hit.
"_trailColor1": "#FFF",
String
This property lets you customise the colours of the particle effects that show up when you swing the weapon. Expected values are either Hexadecimal colour codes (e.g. #FF0000), or HTML colour names. The colour codes can be RGB, RRGGBB, RGBA or RRGGBBAA format, I don't know if the alpha part will do anything though.
This works because the game is using the Color struct for setting the colours and Unity has some convenient utility methods for converting those structs to and from HTML colours. The default is White because the base ScriptableWeapon uses Color.white for the first index of the trail colours array.
"_trailColor2": "#F00",
String
As above but a second one, I don't really know where or when this is actually being used but it's in the code so I might as well hook it up. The default is Red because the base ScriptableWeapon uses Color.red for the second index of the trail colours array.
"_itemRarity": "0",
String
This property allows you to set the rarity of the weapon, this can be Common, Rare or Exotic. Bare in mind that Exotic items cannot be enchanted! You can use numbers as shorthand, but it's still a string property so don't remove the speechmarks.
Valid values:
-
"0"
-> Common -
"1"
-> Rare -
"2"
-> Exotic -
"Common"
-> Common -
"Rare"
-> Rare -
"Exotic"
-> Exotic
"_enchantCostItem": "Rock",
String
This property lets you define an item the game will use as the material cost for enchanting the weapon, you can use vanilla items here by their display name. If there isn't an exact match, HB will attempt to partially match via checking all item's object names to find anything that starts with the text, and if it finds anything it will take the first match. A warning will be logged if there is more than one match.
A value like "Scrap Metal"
might be fine until someone else makes an item in a pack also named that, to prevent it from potentially picking the wrong one, you can be more specific by adding the content pack folder's name to the string like "Scrap Metal-Catman-Homebrewery"
The default is the Rock, like the Iron weapons use.
"_enchantCostAmount": 1,
Integer (no decimal place allowed)
Sets how many of the _enchantCostItem
it takes to enchant the weapon. If the item is left to be the default (Rock), this will be set to 5. Otherwise the value is 1, and this is the minimum value too.
"_statStruct": {
"_maxStamina": 0,
"_attackPower": 0,
"_magicPower": 0,
"_dexPower": 0,
"_defense": 0,
"_criticalRate": 0.0,
"_magicCriticalRate": 0.0,
"_evasion": 0.0
},
StatStruct - a mix of Integers and Floats
This is a nested struct property with a dozen of its own properties, the ones listed in the code block are not all of them, but they are the only ones you can use. The available properties are the ones that vanilla weapons are using, and they are clamped to the maximums of any weapons with a stat bonus from the property. You don't need to have them in all in there if you are not using them, but make sure the last one does not have a comma at the end of the line!
Valid values:
-
_maxStamina
(Integer) 0 to 8 -
_attackPower
(Integer) 0 to 13 -
_magicPower
(Integer) 0 to 15 -
_dexPower
(Integer) 0 to 15 -
_defense
(Integer) 0 to 3 -
_criticalRate
(Float) 0.0 to 0.064 (6.4%) -
_magicCriticalRate
(Float) 0 to 0.025 (2.5%) -
_evasion
(Float) 0.0 to 0.028 (2.8%)