Line 362: |
Line 362: |
| | | |
| ===Custom melee weapons=== | | ===Custom melee weapons=== |
− | {{/doc status|[[Modding:Items#Weapons]]|done=false}} | + | {{/doc status|[[Modding:Items#Weapons]]|done=true}} |
| | | |
| [[Modding:Items#Weapons|Melee weapons]] are still stored in <samp>Data/Weapons</samp>, but that asset has been overhauled in Stardew Valley 1.6. The slash-delimited entries are now models to simplify edits and enable new features (like the new <samp>Projectiles</samp> feature). | | [[Modding:Items#Weapons|Melee weapons]] are still stored in <samp>Data/Weapons</samp>, but that asset has been overhauled in Stardew Valley 1.6. The slash-delimited entries are now models to simplify edits and enable new features (like the new <samp>Projectiles</samp> feature). |
− |
| |
− | This consists of a string → model lookup, where...
| |
− | * The key is the unqualified [[#Custom items|item ID]] for the weapon.
| |
− | * The value is model with the fields listed below.
| |
− |
| |
− | ====Basic weapon info====
| |
− | {| class="wikitable"
| |
− | |-
| |
− | ! field
| |
− | ! effect
| |
− | |-
| |
− | | <samp>Name</samp>
| |
− | | The internal weapon name.
| |
− | |-
| |
− | | <samp>DisplayName</samp><br /><samp>Description</samp>
| |
− | | A [[Modding:Tokenizable strings|tokenizable string]] for the translated display name & description.
| |
− | |-
| |
− | | <samp>Type</samp>
| |
− | | The weapon type. One of <samp>0</samp> (stabbing sword), <samp>1</samp> (dagger), <samp>2</samp> (club or hammer), or <samp>3</samp> (slashing sword).
| |
− | |}
| |
− |
| |
− | ====Appearance====
| |
− | {| class="wikitable"
| |
− | |-
| |
− | ! field
| |
− | ! effect
| |
− | |-
| |
− | | <samp>Texture</samp>
| |
− | | The asset name for the spritesheet containing the weapon's sprite.
| |
− | |-
| |
− | | <samp>SpriteIndex</samp>
| |
− | | The index within the <samp>Texture</samp> for the weapon sprite, where 0 is the top-left sprite.
| |
− | |}
| |
− |
| |
− | ====Stats====
| |
− | {| class="wikitable"
| |
− | |-
| |
− | ! field
| |
− | ! effect
| |
− | |-
| |
− | | <samp>MinDamage</samp><br /><samp>MaxDamage</samp>
| |
− | | The minimum and maximum based damage caused when hitting a monster with this weapon.
| |
− | |-
| |
− | | <samp>Knockback</samp>
| |
− | | ''(Optional)'' How far the target is pushed when hit, as a multiplier relative to a base weapon like the [[Rusty Sword]] (e.g. <samp>1.5</samp> for 150% of Rusty Sword's weight). Default 1.
| |
− | |-
| |
− | | <samp>Speed</samp>
| |
− | | ''(Optional)'' How fast the player can swing the weapon. Each point of speed is worth 40ms of swing time relative to 0. This stacks with the [[speed|player's weapon speed]]. Default 0.
| |
− | |-
| |
− | | <samp>Precision</samp>
| |
− | | ''(Optional)'' Reduces the chance that a strike will miss. Default 0.
| |
− | |-
| |
− | | <samp>Defense</samp>
| |
− | | ''(Optional)'' Reduces damage received by the player. Default 0.
| |
− | |-
| |
− | | <samp>AreaOfEffect</samp>
| |
− | | ''(Optional)'' Slightly increases the area of effect. Default 0.
| |
− | |-
| |
− | | <samp>CritChance</samp>
| |
− | | ''(Optional)'' The chance of a critical hit, as a decimal value between 0 (never) and 1 (always). Default 0.02.
| |
− | |-
| |
− | | <samp>CritMultiplier</samp>
| |
− | | ''(Optional)'' A multiplier applied to the base damage for a critical hit. This can be a decimal value. Default 3.
| |
− | |}
| |
− |
| |
− | ====Game logic====
| |
− | {| class="wikitable"
| |
− | |-
| |
− | ! field
| |
− | ! effect
| |
− | |-
| |
− | | <samp>CanBeLostOnDeath</samp>
| |
− | | Whether the player can [[Adventurer's Guild#Item Recovery Service|lose this tool when they die]]. Default true.
| |
− | |-
| |
− | | <samp>MineBaseLevel</samp><br /><samp>MineMinLevel</samp>
| |
− | | ''(Optional)'' The base and minimum mine level, which affect [[#Mine container drops|mine container drops]]. Both default to -1, which disables automatic mine drops.
| |
− | |}
| |
− |
| |
− | ====Advanced====
| |
− | {| class="wikitable"
| |
− | |-
| |
− | ! field
| |
− | ! effect
| |
− | |-
| |
− | | <samp>Projectiles</samp>
| |
− | | ''(Optional)'' The projectiles fired when the weapon is used, which continue along their path until they hit a monster and cause damage. A separate projectile is fired for each entry in this list.
| |
− |
| |
− | This consists of a list of models with these fields (one projectile will fire for each entry in the list):
| |
− | {| class="wikitable"
| |
− | |-
| |
− | ! field
| |
− | ! effect
| |
− | |-
| |
− | | <samp>Id</samp>
| |
− | | The [[Modding:Common data field types#Unique string ID|unique string ID]] for the projectile within the current weapon's data.
| |
− | |-
| |
− | | <samp>Damage</samp>
| |
− | | ''(Optional)'' The amount of damage caused when the projectile hits a monster. Default 10.
| |
− | |-
| |
− | | <samp>Explodes</samp>
| |
− | | ''(Optional)'' Whether the projectile explodes when it collides with something. Default false.
| |
− | |-
| |
− | | <samp>Bounces</samp>
| |
− | | ''(Optional)'' The number of times the projectile can bounce off walls before being destroyed. Default 0.
| |
− | |-
| |
− | | <samp>MaxDistance</samp>
| |
− | | ''(Optional)'' The maximum tile distance the projectile can travel. Default 4.
| |
− | |-
| |
− | | <samp>Velocity</samp>
| |
− | | ''(Optional)'' The speed at which the projectile moves. Default 10.
| |
− | |-
| |
− | | <samp>RotationVelocity</samp>
| |
− | | ''(Optional)'' The rotation velocity. Default 32.
| |
− | |-
| |
− | | <samp>TailLength</samp>
| |
− | | ''(Optional)'' The length of the tail which trails behind the main projectile. Default 1.
| |
− | |-
| |
− | | <samp>FireSound</samp><br /><samp>BounceSound</samp><br /><samp>CollisionSound</samp>
| |
− | | ''(Optional)'' The sound played when the projectile is fired, bounces off a wall, or collides with something. All three default to none.
| |
− | |-
| |
− | | <samp>MinAngleOffset</samp><br /><samp>MaxAngleOffset</samp>
| |
− | | ''(Optional)'' A random offset applied to the direction of the project each time it's fired. Both fields default to 0, in which case it's always shot at the 90° angle matching the player's facing direction.
| |
− | |-
| |
− | | <samp>SpriteIndex</samp>
| |
− | | ''(Optional)'' The sprite index in the <samp>TileSheets/Projectiles</samp> asset to draw for this projectile. Defaults to 11 (a glowing-yellow-ball sprite).
| |
− | |-
| |
− | | <samp>Item</samp>
| |
− | | ''(Optional)'' The item to shoot. If set, this overrides <samp>SpriteIndex</samp>.
| |
− |
| |
− | This consists of a list of models with these fields:
| |
− | {| class="wikitable"
| |
− | |-
| |
− | ! field
| |
− | ! effect
| |
− | |-
| |
− | | ''common fields''
| |
− | | See [[Modding:Item queries#Item spawn fields|item spawn fields]] for the generic item fields supported for ammo items.
| |
− |
| |
− | If set to an [[Modding:Item queries|item query]] which returns multiple items, one of them will be selected at random.
| |
− | |}
| |
− | |}
| |
− |
| |
− | Note that these are magic projectiles fired when the weapon is used, they're not aimed directly like [[slingshot]] projectiles.
| |
− | |-
| |
− | | <samp>CustomFields</samp>
| |
− | | The [[#Custom data fields|custom fields]] for this entry.
| |
− | |}
| |
| | | |
| ===Custom movie concessions=== | | ===Custom movie concessions=== |