Yet Another Zombie Defense HD

Yet Another Zombie Defense HD

48 ratings
Official Workshop Guide for YAZD HD
By Awesome Games Studio
This is the official guide on making your items for Yet Another Zombie Defense HD and uploading them to Steam Workshop.
   
Award
Favorite
Favorited
Unfavorite
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:
https://unity3d.com/get-unity/download?thank-you=update&download_nid=49126&os=Win

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:
https://docs.unity3d.com/560/Documentation/Manual/UnityOverview.html

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:
http://www.awesomegamesstudio.com/_yazdworkshop/WorkshopCharacterTemplate.zip

The Template Project for Level item type can be downloaded here:
http://www.awesomegamesstudio.com/_yazdworkshop/WorkshopLevelTemplate.zip

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:
https://docs.unity3d.com/560/Documentation/Manual/class-Avatar.html

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:
http://www.awesomegamesstudio.com/_yazdworkshop/SoldierCharacter.zip
Or example Level:
http://www.awesomegamesstudio.com/_yazdworkshop/WinterLevel.zip

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.
37 Comments
KSyfer Jan 10 @ 4:42am 
Hello everyone.

I will be entering the modding scene because i love this simplistic zombie game. So much can be added to make it more fun in the long run and hopefully i can do this right. Excited to see what i can potentially make and also hope when i do finish anything that you guys will like it. Thumbs up.
]zFg[ | S1r0 Sep 8, 2019 @ 8:15am 
Couldn't get the level working properly...
When I add Unity primitives like Cubes and Spheres it works.
Even adding custom textures to them seems to work fine.
But when I add a model I created and stored in .fbx format (which is displayed as supposed in Unity), it simply wont show up when the level is activated in the game.
So it seems as if the custom mesh causes problems.

Furthermore, I noticed many log entries when using a custom level:


(Filename: Line: 29)

A non-multisampled texture being bound to a multisampled sampler. Disabling in order to avoid undefined behavior. Please enable the bindMS flag on the texture.


The log is spammed with this information, which could probably have a slight impact on performance?
污力洛奇 Aug 27, 2019 @ 12:05am 
留言
CharlieMack Jul 20, 2019 @ 7:45am 
I'm not sure what I'm messing up on. I think I followed the steps correctly but I'm not seeing the character when I launch the game.
MonsterPumpkin Nov 4, 2018 @ 6:01am 
So you mean like new guns when you are saying items right ?
MonsterPumpkin Nov 4, 2018 @ 3:20am 
I will be creating some content soon and I LOVE the fact you guys are doing this this is awesome
Osiris Jun 26, 2018 @ 7:02pm 
Please please please add the ability to tweak the in game settings like money drop rate, spawns, and wave counts. PLEASE. This would make the game a million times better
Loser May 12, 2018 @ 7:48pm 
Made a model, she showed up in the list but freezes the game T_T
Awesome Games Studio  [author] May 9, 2018 @ 3:08am 
@Cannon the cat: You can email your Unity project to contact[at]awesomegamesstudio[dot]com and we'll be happy to help you out with the issue.
Gabe Uttsex Jr. May 8, 2018 @ 10:45pm 
It won't show up in "My Items". I did everything correctly!