Volcanoids

Volcanoids

Not enough ratings
Player Weapon Modding Guide
By Captain
This guide will lead you through making new weapons for the game!
   
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 are 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 up the weapon modding scene
Player weapons Modding Scene:

To get to the Weapons modding scene, all you need to do is open the assets folder in your project and select "WeaponCreationScene".






Weapon modding scene screenshot:








Steps inside the newly created modding scene:

1 - Select template

We provide the playable firearms and melee weapons. To work easy , start by picking whatever asset you would like to modify. Once selected, hide everything else and unpack the selected prefab completely, and hide the weapon model. Dont delete it though, you might need this for reference.


2 - Assemble new model

This step is straight forward.
On top of the selected prefab, create any weapon you like, using the shape gallery we provided.











If you need to move the hands -
We have an offset object, that is connected to the IK’s and animations, that you can rotate and move to adjust the hands,while still have the aniamtions.
Fp- First person
Tp- Third person
Its not advised to move it drastically away from the position, but rather rotate slightly to adjust .













3 - Create the folder

In the mod there’s a structure that you have to maintain. You can try to organize things differently, but it may not work. For the best, and tested, results follow this guide's structure.

Mod structure:



  1. All your mods have to be within the Assets folder. Within, there will be one folder for each mod. (Sample mods do not count)
  2. All your Texts, Materials, Icons, Meshes and .asset files have to be within the Data folder.
  3. All scripts have to be in the Mod folder, doesn’t matter where, but it’s better to avoid the Data folder.

Your Root folder must contain the following files:

  1. Data folder
  2. Mod.asset file - file that connects all your data and scripts together.
  3. When you are using scripts, you have to add an Assembly Definition file.
2. Baking the mesh
To bake the mesh, open the mesh baker tool
Go to Tools > Mesh baker
Create new GameObject (GameObject-> Create Empty)















Make sure the object’s transforms are zeroed -




Drag the weapon parts you want to merge together into this object







Remember - Magazines, Reload handles, for mortar and shotgun - bullets should be a different object.
3. Making the icons
To make the icon for your weapon select game window.
  • Turn on _IconLights_ object in inspector.
  • Turn off WorldLight object in inspector
  • Place the new mod under _PlaceObjectsHere_
  • Reset transforms and hide the indication cube.
  • Take a printscreen





4. Creating definitions - ammo, recipe, weapon definition
Let’s create a new Ammo Type:

  1. Go to: Packages/VolcanoidsAssets/Game/Items/Ammo
  2. Drag and drop the RevolverAmmo.asset file to your mod Data folder. (or any other ammo definition)
    optional - create a new definition by clicking Assets → Create → Game → Weapons → AmmoDefinition)
  3. Change the name of the file to (WeaponName)Ammo.
  4. Click on the file and set the Name to (Weapon Name) Ammo., expand it and click the A button next to it.
  5. Expand the description and write any description you want, and click the A button next to it.
  6. The Item Category should be: CategoryAmmo




















  7. Drag and drop your ammo Icon file into the Mod/Data folder




















  8. Change the item icon in the Icon field by either selecting the circle, or drag and drop the icon from the Data folder.Note: Your icon has to be TextureType: Sprite (Set it on icon and Apply)
  9. Expand Ammo Stats and set it up as you wish
  10. The Projectile Prefab should not be null and should be ProjectileRevolver!
  11. When you are done it should look like this:




























Now let’s create a recipe for your ammo:

  1. Go to your mods Data folder
  2. Go to → Create → Game → Recipe
  3. Name your file as you wish, and open it.
  4. Expand the inputs field and click the plus. These are items and their amounts that you need to craft your ammo. Select any materials and amounts you wish.
  5. Expand the Output window and set Item tobe your new ammo, and set the amount to whatever you wish it to output
  6. Expand the Categories window and add as many categories as you want. It defines where this item is craftable.
  7. You can also change the production time, this defines how fast your ammo will be crafted in game.
  8. When you are done it should look like this:





















And finally lets set up the mod asset
















  1. Workshop Item ID - This is your mod’s ID on Steam
  2. Unique Mod ID - This is your mod ID in the format: CreatorName.ModName (Has to be unique)
  3. Title - Name of the mod, that will be displayed in the workshop, game and in all lists. You can use spaces
  4. Thumbnail - The Icon of your mod that will be uploaded on the Steam Workshop
  5. Load Group - When your mod will be loaded. (Optional)
  6. Load order - The order that mods will be loaded. (Optional)
  7. Version - This is the version number set by you, it is displayed on Steam
  8. Change Note - What has been changed since the last upload. It will be displayed on Steam.
  9. Skip Content Patches - Whether to skip the automatic application of *.patch files after your mod is loaded.
  10. Debug Build - Whether the Mod is debuggable in Visual Studio.
  11. Assembly Definitions - Here you add All Assembly definitions that are inside the Mod folder. You can use multiple definitions for each mod.
  12. Assemblies - If you are using 3rd party assemblies or dlls, add them here.
  13. Other Files - You can attach text files and so on here.
  14. Bundles - All the bundles that your mod uses. They are children of the Mod.asset file.
5. Implementation as new prefab
Now that the definition are made, and we have our meshes ready and saved -
Parent the meshes under the corresponding bones -
Body parts under Root_SKN
Magazines under AMMO_SKN
And reload handels under the Reload_handle_SKN








Next step - creating the prefab

Simply drag and drop the unpacked prefab you been working on into the project window, and a new prefab will be created











Further implementation - mesh renderers and LODs

In the prefab, under “states” find “FirstPerson”
Open the inspector, and add the new meshes to the list.







Next Replace the ammo definition in the root of the prefab -




















And thats it ! the mod is ready to use and build!

How to build the mod described in the Basic modding guide , section 5. Building your first mod
Bonus - Custom animations
To create your own animations for the weapons:
  • Duplicate the base animations the prefab uses to your folder .
  • Duplicate Animator override controllers for first and third person and give it a unique name
  • Assign the new animations to the new Controller
  • Record the new animation, its better to do it in play mode.
  • You only need to do it once, preferably in first person, and copy it to the third person animation.









  • Assign the new controllers in “states”













And thats it, now you can have your own custom animations aswell!
17 Comments
vulkaan 12 Oct, 2024 @ 10:26am 
@Arling i wonder whether or not you will see this, but reinstalling the sdk (ofcourse backup your assets / projects folder!) results in having hands visible.
Arling 9 May, 2023 @ 9:09am 
Same problem as PhantomFox describes. Hands are invivsible, and i can't work with models in such situation - i just don't see how hands hold the guns.
Mayor of Sillyville 21 Mar, 2023 @ 10:00am 
why cant i use my own models to make a custom weapon
Captain  [author] 13 Jun, 2022 @ 5:01am 
:steamthumbsup: Guide was checked
KaiFox 23 May, 2022 @ 7:32pm 
Hey so uuuuh i got a little bit of a problem where i cannot see the hands on the templates...
Merpus 11 Feb, 2022 @ 7:05pm 
I am really sorry about this incredibly late reply and I have another question to ask, if you don't mind. How do you get the character to to grasp the weapon? Also I just ended up manually positioning my weapon for the icon photo.
Captain  [author] 10 Jan, 2022 @ 4:11am 
Merpus -
I have asked Dolphin about your problem - He provided some info

1-when reseting transform , the object’s pivot will go wherever the parent object is .
if there is an error in the pivot placement , he should check it out .
he probably made it in an offset in step 2- baking the mesh . thats the only thing i can think of regarding that issiue .
so the solution would be to work at the 0.0.0 coordinates. but i dont know what he did as he didnt provide any info .
thou this isnt mentioned, so ill talk with hab on adding that info there.

2- how to make it a prefab? image from the guide below.

(check the guide part "Next step - creating the prefab
Simply drag and drop the unpacked prefab you been working on into the project window, and a new prefab will be created")


Let me know if that helped you.
Merpus 3 Jan, 2022 @ 4:59pm 
I also don't get how to make it prefab
Merpus 3 Jan, 2022 @ 9:08am 
For some reason when I reset the transform of the weapon I made, it doesn't go where the indication cube is.
Captain  [author] 9 Nov, 2021 @ 3:07am 
The guides aims to be done in a way that if you follow it step by step - you will be able to create a mod and this way learn how it works. If you get stuck at any step in the guide - please let us know and we will make the part more clear.