Overview
This is the official guide on making your items for Yet Another Zombie Defense HD and uploading them to Steam Workshop.
Introduction
First of all thank you for your interest in creating new items for Yet Another Zombie Defense HD! This guide will be continually updated as we add support for more types of items you can create for YAZD HD. If you have any suggestions or something isn’t clear or doesn’t work, please let us know by sending an email to contact[at]awesomegamesstudio.com
YAZD HD is build with Unity engine and to build an item that can be loaded by the game you need to download it and install it on your machine. The version that is currently used by the game is Unity 5.6.4f1 2017.3.0f3 and you can download it from this link:
[link]
After you launch the installer choose the 64-bit version of Unity Editor and install it with default components selected. If you need instructions on how to use the Unity Editor there’s an extensive guide on Unity’s website:
[link]
This Guide assumes some familiarity of Unity Editor and does not explain everything step by step. If you don’t know how to use Unity Editor, please check Unity documentation or look for another tutorial online.
Creating an item
The starting point of creating any Steam Workshop item is to download a corresponding Template Project.
The Template Project for Character item type can be downloaded here:
[link]
The Template Project for Level item type can be downloaded here:
[link]
Then open the project with Unity and follow the instructions in an item-specific section of this Guide.
Creating a Character
After you have downloaded and opened the Character Template Project you need to copy your character model into the project somewhere in Assets directory. Unity should handle the most popular 3D file formats, for a full list check Unity’s documentation.
Your model needs to be properly rigged, but animations can be automatically transferred from characters that are built into the game. In order for animations to be retargeted you need to setup a Humanoid Avatar in Unity. Follow the instructions found on this page of Unity’s documentation in order to setup Humanoid Avatar:
[link]
Make sure there’s no errors in Avatar’s configuration, otherwise the animation will not transfer properly and your character will be displayed in T-pose.
Next you’ll need to open the template Scene that is found in Assets directory. Then drag your character model into Scene Hierarchy and attach it under MainObject that is already created on the Scene, right next to existing Dude object. Your character model should appear somewhere in the Scene, it might be very small or very big depending on how was it prepared in 3D modelling software. Try to resize it to match the existing Dude character and rotate it so that the character faces the same direction as the Dude character (positive X axis). After that find Animator component on your model in scene hierarchy and make sure that Apply Root Motion is unchecked.
Now you need to create new GameObjects to indicate where the character’s weapon should be attached. Those should be attached under your character’s hand transforms and called “RightWeaponPositionTransform” for the left hand and “LeftWeaponPositionTransform”. Check the existing Dude character object for reference.
The next step is to indicate the character’s blood particle spawn region. You need to create a BoxCollider component attached to your character’s chest bone, or just copy it from Dude character – it can be found under “Spine2” GameObject.
You can attach additional Unity’s built-in components to the character, like Lights or Particle Systems, however custom Scripts aren’t allowed due to safety issues.
After you have done the steps above you can delete the old Dude GameObject from the scene. Unity will ask you to confirm breaking prefab instance, select Continue here. Then you’ll need to drag MainObject from Scene Hierarchy to MainObject prefab that can be found in Project window in Assets/Workshop/Character directory. If Unity asks you about Prefab replacement, choose Replace anyway.
If you have followed all the steps above, you are now ready to build the AssetBundle that can be loaded by YAZD HD. In order to do so, choose Assets -> Build AssetBundles from the menu. This should build the AssetBundle and the resulting file can be found in Assets/AssetBundles directory and be called “characterassetbundle” (with no file extension).
Creating a Level
After you have downloaded and opened the Level Template Project you can place any objects you want to use on your level in Assets directory. Unity should handle the most popular 3D file formats, for a full list check Unity’s documentation.
Next you’ll need to open the template Scene that is found in Assets directory. Then place any items you want on your custom level into Scene Hierarchy under “MainObject” that is already created on the Scene. You can use textures, models, particle systems, light, even sound emitters that are native Unity components, however custom Scripts aren’t allowed due to safety issues.
The objects attached under “OtherObjects” are there for you to be able to preview what the level will look like in the game. You can disable “Spotlight” object and enable “Directional light” object to see what the level will look like during the day.
There should be an object in the center of the level that will serve as a replacement for the lamp post. It will have collision added by the game and building will be impossible there, it will also be source of light in the night.
You can also delete any objects attached under “MainObject”. If you do so Unity will ask you to confirm breaking prefab instance, select Continue here. Then you’ll need to drag MainObject from Scene Hierarchy to MainObject prefab that can be found in Project window in Assets/Workshop/Level directory. If Unity asks you about Prefab replacement, choose Replace anyway.
If you have followed all the steps above, you are now ready to build the AssetBundle that can be loaded by YAZD HD. In order to do so, choose Assets -> Build AssetBundles from the menu. This should build the AssetBundle and the resulting file can be found in Assets/AssetBundles directory and be called “levelassetbundle” (with no file extension).
Uploading an item
First you need to create a directory for your item in the game’s installation files in “WorkshopItems” subfolder. To view the game’s installation files right click Yet Another Zombie Defense HD in your Steam Library, choose Properties, switch to Local Files tab and click Browse Local Files – the “WorkshopItems” directory should be there already.
After you have created a subdirectory inside “WorkshopItems” you to copy your previously build AssetBundle inside this subdirectory. Then you need to create a text file matching your AssetBundle file with a “.iteminfo” extension, for example “characterassetbundle.iteminfo” with at least the following contents:
ItemType=Character
NameEN=<Your item name in English>
YAZDVersion=6009
The ItemType indicates what type your item is – currently available options are “Character” and “Level”. The NameEN is the English name for your item that will be displayed inside the game. And the YAZDVersion indicates the game’s version that the item was tested with – this can be checked in the main menu of YAZD HD.
If you’d like to localize the item’s name you can add additional lines with the following parameters:
NameZH-CHS for Chinese (simplified)
NameFR for French
NameDE for German
NameIT for Italian
NameJA for Japanese
NameKO for Korean
NamePL for Polish
NamePT for Portuguese
NameRU for Russian
NameES for Spanish
NameTR for Turkish
If you’re making a female character, you should also add the following line:
IsFemale=True
After you’ve done that you just need to add a Preview.png file that represents an image of your item. For reference you can download an example Character item from the link below:
[link]
Or example Level:
[link]
In order to test an item in the game you just need to launch YAZD HD, choose “Steam Workshop” from the main menu and next “View your items”. Your newly created item should appear on the list – if it did it means that the AssetBundle loaded successfully. For Level type items you need to Enable them from your Workshop Items list. Now you can start a new game and see it your item works correctly in the game.
If everything looks alright you just need to go back to “View your items” section and click “Publish”. After it’s done uploading it should open up Steam Overlay and show your item. If it’s the first time you publish a Workshop item you’ll have to accept Steam Workshop agreement before the item is made public – a message box will appear above your Workshop item.
If you everything worked and your item was uploaded to Steam Workshop you can update it anytime by pressing “Update” button on “View your items” list.