Floppy Heroes Guide

Equipment Creation Guide for Floppy Heroes

Equipment Creation Guide

Overview

This guide will show you how to create and import your own weapons and armor for Floppy Heroes.

What Do I Need?

To begin creating your own custom equipment for Floppy Heroes, you’ll first need a couple things:

  • A drawing program of your choice (ie. Flash, Photoshop, etc.) GIMP[www.gimp.org] is a nice free alternative to Photoshop.
  • The (free) Personal Edition of Unity (version 2018.2.14f1 or newer), available at the Unity Download Page[store.unity.com]
  • The Equipment Creator asset package, available at ModDB

Getting Started

Important: Make sure your copy of Unity is version 5.5.1f1 or higher. Older versions will result in errors and corrupt sprites when you import the modding package.

1) Start by unzipping EquipmentCreator.zip. Inside you’ll find “EquipmentCreator.unitypackage”, which we’ll use in a moment, and a folder called “Base Sprites”, which contains sprites of the basic character body that you can use as a template when drawing your own equipment.

2) Install and start Unity. On the top right you should see a ‘New’ button. Go ahead and click on it.

3)

  1. Name your project and select a location
  2. Set project type to ‘2D’
  3. Click ‘Create Project’

4)

  1. Right-click inside the Assets panel
  2. Select ‘Import Package’ -> ‘Custom Package…’

5) Locate your unzipped EquipmentCreator folder and select the EquipmentCreator.unitypackage, then click ‘Open’.

6) A list of files will pop up. Make sure every file is checkmarked, then click ‘Import’.

7) Click and drag ‘Character_Base’ from the Assets panel to the scene. (Important: Make sure only one Character_Base is present on the scene at a time)

8) Explore the following sections to learn how to make different types of weapons and armor.

A Few Important Notes

  • The following sections of the tutorial build off each other, so it’s highly recommended to read them in order.
  • ‘Sprites’ -> ‘Example’ contains an entire set of sprites if you don’t feel like drawing your own.
  • The ‘Example’ scene contains a full set of equipment that’s ready to be exported. Refer to this scene if you have any trouble or confusion creating a certain type of equipment.
  • In this guide, “left” and “right” refer to the character’s left and right sides. This means that, for example, the character’s hand on the left side of the screen is their right hand.
  • Item rotation and scale aren’t saved, so make sure your sprite is the correct size and orientation when you import it into Unity.
  • Hovering your mouse over a setting in the ‘Equipment Creator’ component will display a tooltip briefly explaining the setting.

Creating A Melee One-Handed Weapon

Note: When creating a one-handed weapon, you want to place it in the character’s right hand (left side of the screen). The left-hand version will be created automatically when you add the weapon in Floppy Heroes.

1) Import the sprite of your weapon into Unity by right-clicking inside the Assets panel and selecting ‘Import New Asset…’

2) Click and drag your sprite from the Assets panel onto the stage.

3)

  1. Click the sprite on the stage to display it’s component panel on the right
  2. Click and drag the EquipmentCreator script from the Assets panel to the sprite’s component panel. (Note: A ‘PolygonCollider2D’ will also be automatically created).

4) In the newly attached ‘Equipment Creator’ script, change the ‘Item Name’ to something unique. (Important: If another item in the Export folder has the same name, that item will be overwritten).

5) Leave the ‘Equipment Type’ as ‘Weapon 1H’

6) Select whichever ‘Material’ you want, this simply affects the sound effects of the weapon in the game.

7) If you want you weapon to have the option to be wielded backwards, turn on ‘Is Flippable’.

8) Leave ‘Is Ranged Weapon’ turned off for now; we’ll be creating a ranged weapon in the next section.

9) Use the sliders to set the ‘Mass’ and ‘Melee Damage’ stats of the weapon.

10) The ‘Min Angle’ and ‘Max Angle’ determine how much the weapon can rotate in the character’s hand. 0-30 is a good default value, but feel free to experiment with these later.

11) ‘Trail Start Point’ and ‘Trail End Point’ are the endpoints of the weapon trail effect when the weapon is swung around. For a bladed weapon, it’s recommended to set one point at the base of the blade, and the other at the tip of the blade.

12) The green outline around your weapon is it’s collider. By default, Unity attempts to tightly wrap the sprite, which leads to a collider with many points, which can lead to low FPS. In your weapon’s ‘PolygonCollider2D’ component, click the icon next to ‘Edit Collider’ to manually edit the collider. (Note: You can move existing collider points by dragging them, create new points by dragging part of a line, and delete points by holding CTRL and clicking on them).

13)

  1. Click and drag the weapon into the Character_Base’s right hand, exactly the position you want the weapon attached to the character. (Note: The left-hand version of the weapon is created automatically on export. Don’t try to manually create one, as it will just attach to the character’s right hand).
  2. Click the play button at the top of the screen to see a preview of how the character will look with the weapon. Press the play button again to return to edit mode.
  3. When you’re happy with everything, click the ‘Export’ button to generate the item file in the Export folder.
  4. Messages and errors will appear here. (Note: Your item will only export if there are no errors).

14) Scroll down to the “Adding Items to Floppy Heroes” section to learn how to import your new weapon into Floppy Heroes.

Creating A Ranged Two-Handed Weapon

Note: It’s recommended that you first read the “Creating A Melee One-Handed Weapon” section, as this section builds on top of it and glosses over previously mentioned stuff.

1) Follow steps 1-4 identically to the “Creating A Melee One-Handed Weapon” section.

2) This time, change the ‘Equipment Type’ to ‘Weapon 2H’.

3) Also turn on ‘Is Ranged Weapon’.

4) Import and drag the sprite you want to use as the ranged weapon’s projectile onto the scene.

5)

  1. Click on the weapon to select it.
  2. Drag the projectile sprite’s game object from the Hierarchy panel on the top left into the ‘Projectile’ field in the weapon’s ‘EquipmentCreator’ component.

6) Set ‘Mass’, ‘Melee Damage’, and ‘Ranged Damage’ as desired.

7) Set ‘Projectile Type’ to the desired behaviour of the projectile when it hits something. “Sharp” means the projectile will stick in the surface, “Blunt” means it will bounce off and become debris, and “Magic” means it will explode and disappear.

8) Set ‘Projectile Speed’, ‘Projectile Recoil’, and ‘Projectile Cooldown’ as desired.

9) Set ‘Projectile Trail Color’ to whatever color you want for the projectile’s trail effect (and explosion effect, if ‘Projectile Type’ is set to “Magic”). You may also set the alpha value (A) of the color to 0 if you don’t want the trail and explosion effects.

10) Set ‘Min Angle’ and ‘Max Angle’ as desired. The secondary angles are similar, but are for the character’s left hand.

11) Set ‘Trail Start Point’ and ‘Trail End Point’ as desired.

12) Manually edit the weapon’s ‘PolygonCollider2D’ component to reduce the collider’s complexity.

13) Click on the projectile and modify it’s collider component as well.

14)

  1. Drag the weapon and place it where you want the character’s right hand to hold it.
  2. Drag the character’s left hand and place it where you want it to also hold the weapon.
  3. Drag the projectile and place it where you want it to shoot from the weapon.
  4. If you’re happy with everything, export your weapon.

15) Scroll down to the “Adding Items to Floppy Heroes” section to learn how to import your new weapon into Floppy Heroes.

Creating Head/Torso Armor

Note: Creating head and torso armor is very similar, so they’re combined into a single section.

1) Similar to the weapon creation sections, import your sprite to the Assets panel, then drag it onto the stage and drag an EquipmentCreator script onto it’s component panel.

2) Set the ‘Item Name’ as desired.

3) Set the ‘Equipment Type’ to “Armor Head” if you’re creating head armor, or “Armor Torso” if you’re creating torso armor.

4) If you selected “Armor Head”, you’ll have a ‘Hide Hair’ option. Turning this option off will display the character’s hair even when wearing the head armor, which can be useful for certain headgear types, such as headbands, masks, goggles, etc.

5) Set the ‘Material’ as desired.

6) Set the ‘Mass’, ‘Health’, and ‘Melee Damage’ stats as desired.

7) Drag the head/torso armor sprite on top of the appropriate limb. The armor will be attached to the limb in this exact position.

8) Manually edit the ‘PolygonCollider2D’ component to reduce the collider’s complexity, as well as ensuring the entire limb is covered (as pictured above with the head armor)

9) Click ‘Export’.

10) Scroll down to the “Adding Items to Floppy Heroes” section to learn how to import your new armor into Floppy Heroes.

Creating Arm/Leg Armor

Note: Creating arm and leg armor is very similar, so they’re combined into a single section.
Note 2: Arm/Leg armor consists of 4 parts. Right Hand/Foot, Left Hand/Foot, Right Shoulder/Thigh, and Left Shoulder/Thigh.

1) Import your sprites to the Assets panel, then drag them onto the stage and drag an EquipmentCreator script onto each one’s component panel.

2) Set each ‘Equipment Type’ to “Armor Arm” or “Armor Leg”, depending on which one you’re making.

3) On each of the 4 pieces, set the ‘Armor Piece’ so you have one of each. (Right Hand/Foot, Left Hand/Foot, Right Shoulder/Thigh, and Left Shoulder/Thigh).

4) Click on the Right Hand/Foot piece, and set the ‘Material’.

5) Set ‘Glove Thumb Color’ to the color you want for the thumb of the glove. Usually, this is the same color as the majority of the glove. You may also set the color alpha (A) to 0 to have gloves without thumbs, which can be useful for certain types of hand armor (ie. handwraps, sleeves, etc.)

6) Drag each of the 4 pieces on top of the appropriate limb. The armor will be attached to the limb in this exact position.

7) Click on the Right Hand/Foot piece, and drag the game objects of the 3 other pieces from the Hierarchy panel on the top left into the appropriate fields on the ‘Equipment Creator’ component.

8) Set the ‘Mass’, ‘Health’, and ‘Melee Damage’ stats as desired.

9) Manually edit the ‘PolygonCollider2D’ component of each piece to reduce the collider’s complexity.

10) Click ‘Export’.

11) Scroll down to the “Adding Items to Floppy Heroes” section to learn how to import your new armor into Floppy Heroes.

Adding Items to Floppy Heroes

Once you’ve created your items, it’s quite easy to import them into Floppy Heroes.

1) Open the folder where your items were exported. This will be the ‘Export’ folder in the directory of your Unity project.

2) Open the location of Floppy Heroes on your computer. This will depend on where you have Steam installed, but should look something like:
“C:Program Files (x86)SteamSteamAppscommonFloppy Heroes”

3) Open the “Addons” folder

4) Copy and paste the your .item files from the Export folder to the Addons folder. Feel free to organize your items in sub-folders, as long as they’re somewhere inside the Addons folder.

5) Launch Floppy Heroes and pick any custom gamemode (Note: User-created items are not available in Singleplayer mode).

6) You should be able to find and equip your weapons and armor. (Note: User-created items have a blue shirt icon next to them on the character setup menu).

SteamSolo.com