Volcanoids

Volcanoids

Not enough ratings
COG enemy mod guide
By Captain
In this tutorial we will take a look on how to add your own extra enemies. It can be anything you can imagine, but we will use Humanoid for now.

   
Award
Favorite
Favorited
Unfavorite
Before you start!
Please make sure you are familiar with all the modding basics covered in the "Basics Modding Guide" and the basics of unity navigation, links below. This guide assumes you already know how to navigate the scene and is familiar with the interface, and have Unity and Mod SDK installed. Without this crucial info, it will be difficult to go through this specialized guide.

Steam Guide - Basic Modding Guide Link

https://docs.unity3d.com/Manual/UsingTheEditor.html
https://docs.unity3d.com/Manual/SceneViewNavigation.html
https://docs.unity3d.com/Manual/ViewModes.html
https://docs.unity3d.com/Manual/GizmosMenu.html
https://docs.unity3d.com/Manual/ImportingAssets.html
1. Setting everything up
First of all you have to have Volcanoids Mod SDK installed and your mod created. In this guide we will be working with this set up.

Prerequisities:
  1. ModSDK Installed
  2. Created new mod
  3. Created Assembly Definition with Rock.Unity , Rock.Base and Volcanoids references
  4. Added COG soldier Sample Mod in your SDK
Video tutorial
- For easier work, a video tutorial on how to do it well will help you.
- If you have problems with the skeleton and the number of bones, use the instructions from the "Player character modding guide"
Link: Player character guide


Tutorial guide for Cog enemy
Volcanoids - Cog mod tutorial

2. Setting up the model
In this section, we will set up your character. Follow these steps:

Important - models in our game do not support facial bones!

  1. Find a model. Our preferred source is Mixamo [www.mixamo.com]


















  2. For mixamo, select “FBX for unity”. The same goes for any other website if the option is available.






    If you are Downloading a model from any other source, make sure to work only with FBX or OBJ format.

    - if you got a model from any other source, and it does not have a skeleton, rig model via Mixamo [www.mixamo.com]. it is easy to use and gives good results.
    Make sure to use the standard skeleton LOD at the bottom of the screen, for finger animation.

    For better performance, it's better to check the model in a blender for the correct scale. some free models come in unexpected sizes, and running a safe check through blender will help the mod to be stable.
    NOTE- If the model does not have the hands in a horizontal line, the website might glitch on the fingers.












  3. set up unity avatar - this is the step that will transfer the animations to the characters step should be automatic.
    In Unity, select the model fbx
    Through Inspector, go to the Rig tab
    In Animation Type, select Humanoid









    in case of errors in the definition, press the Configure button.
    Make sure the hands are assigned correctly, and when you did, enforce Those at the bottom of the inspector.


























    Some free models also have a second forearm rotation, so make sure it's not assigned.
    This is how a healthy definition should look like -












  4. creating materials
    Models from mixamo come with the textures embedded in the FBX

    But we need to extract them for the mod to work correctly.

    To do so - select the fbx tab, and in the inspector, under the Materials section, click on Extract textures, and then extract materials -








    Then, assign the textures to the material
    Most important are Albedo (base color) and Normal Map, but it depends on the model and whether those textures are available.
















    Models from mixamo often come with materials and textures already assigned, but for the mod to properly work, it's better for the materials and textures to be extracted and accessible throughout the project.









    If the fbx does not highlight the Extract textures button in unity, check if the model has the textures via the default windows 3d view, or any 3d software, like a blender.
    If the fbx does not highlight the Extract textures button in unity, check if the model has the textures via the default windows 3d view, or any other 3d software, like a blender.

    Suppose the textures are there in the preview. - here is a tutorial on how to extract them with the blender.
    https://www.youtube.com/watch?v=lhY03M1Nb0Y
3. Setting up Character Prefab
In this section, we will use the prepared model as an enemy. Follow these steps:
  1. create a folder for your mod - this is covered in the Basic Guide - 3.2.

    Duplicate the base cog prefab into your mod folder .either by dragging the prefab from the Packages folder or the game scene.
    the base prefab located in Packages/VolcanoidsAssets/Assets\Characters\Cog\Prefabs\CogCrew









    Open prefab (double click ) insert the new model FBX into the hierarchy














    disable the cog in the inspector. You might want to keep it for reference and copying components









    Create colliders on the bone components of your model and adjust them

    select bone, in the inspector, press add component, then search for the collider.
    you can create more than one collider on the same bone.
    not all the bones require colliders.



































    for standard mixamo these are the needed bones:




























    Assign physical material CogBody (or create your own) to all colliders and disable them.







    adjust the colliders so they won't intercut each other
    to edit a collider, press on the edit icon







    that will show the controll points on the collider itself












    that will show the control points on the collider itself
    for reference, you can look up how the setup on the cogs is made if you navigate to the cog skeleton that we disabled earlier -









    more on coliders, phisical materials - in this [docs.unity3d.com] manual -

















    Note, don't forget the feet colliders!

  2. Add an empty object under the spine bone, and call it “DeathLootIndicator” - we will need it later.

    NOTE: you cant rotate colliders. collider rotation is set by the bone /object they are assigned to. if you want to have a flat cube on the leg, try the next bone ( should be toes), option 2 - create a child object beneath the bone, assign the collider to it, or use a sphere.

    more on colliders -
    https://docs.unity3d.com/Manual/CollidersOverview.html

  3. Copy the LootAvailableEffect from the cog skeleton and paste it under the spine
  4. Set up Ragdoll (or copy component from the example mod. Cogs have disconnecting body parts, and that setting will break any model that does not build for that )
    • On each bone that should break, create the Ragdoll Element component, and set it up. Remember - the TOTAL mass of all the ragdoll components will affect how high will the enemy fly when he is dead or unconscious.
      Its recommended that the total mass will be around 100-120 units.


      This is the general setup -
      • Remember to connect the “connected Body” element, so the Ragdoll won't break into pieces and set the Break force to Infinity
























  5. Setting up the prefab -
    Once the ragdolls and colliders have been assigned, disable in inspector the cog bones (the hierarchy labeled with _SKN suffix)
  6. Select the top object in the hierarchy (prefab root)













    select the Ragdoll component, and set it up as in this example -
    (you can use the automation buttons - "fill elements" and "fill colliders")
























  7. Repeat for Ragdoll Blender components.
    press the Load Bones button
    the Transforms tab should auto-load the skeleton hierarchy to the list.
    the result should be like this.


















  8. Set up the Ragdol Damage Component
    • Below are settings so the ragdoll wont break apart.







  9. Assign the new DeathLootIndicator to the Agent Death component






  10. Assign the new LootAvailableEffect to the LootAvailability component







  11. Right-click on LOD groups and choose “populate LODs”














  12. In the Animator component, assign the Avatar from the FBX







  13. find the cog movement interpolation component on the prefab root,(same object as the ragdolls)
    if you didn't delete the hips_SKN, it should be fine.
    if you removed the original cog from the prefab, drag and drop the hips of the new model to the slot.

4. Scripting the mod
Now we have everything prepared to insert your model inside COG's crew.

  • in the "Project" window, right-click and select Create / Mods / CogDrillshipCrewMod


































----------------------------------------------------------------------
- In "Crew Definitions" specify in which Drillships your player models should be displayed. If you enter all possible types in the box, your models will appear in all emerging Drillships.

- for example
(You can create multiple characters and each type of ship can be different.)












----------------------------------------------------------------------

- Enter the prefab in "Crew Weights" and fill in all values to 0.7 - recommended.


Aaand you are done!
5. Building and testing
This part is covered in detail in Basic Guide . Section 5 +
5 Comments
LordKhalton 21 Feb @ 3:01pm 
Am I able to make melee based/weaponless cogs?
Nydus Ktinga 26 Sep, 2024 @ 9:07am 
made a dog :steamhappy:
Mr.Weakhand 4 Apr, 2024 @ 5:49am 
" a blender" :steammocking:
Captain  [author] 13 Jun, 2022 @ 2:34am 
:steamthumbsup: Guide was checked
M3di 25 Mar, 2022 @ 2:05am 
I appreciate the work!:steamthumbsup: