3. Get your Sosigs into H3VR

Updated 2 months ago

This wiki page assumes you have a Custom Sosig in a mod folder ready to go, if not check Sosig Creation Page

As of writing this article there is no Spawner Tool for spawning sosigs from the loader yet

Sandbox (Atlas)

Sosigs are created through Atlas enums and the Spawn Point component in the scene. If you need help setting up an Atlas Meatkit project look at their wiki here

  1. Inside of Unity Editor, Right click in the Project tab and navigate Create > MeatKit > Assembly Editors > Enum and label it
  2. Set the Type to `FistVR.SosigEnemyID
  3. Open Added Values, increase size to amount of sosigs you wish to add, include Sosig with their DisplayName as Name and Value as the SosigEnemyID of each custom sosig.
  4. Top menu of Unity Editor MeatKit > Scripts > Import Game to refresh the internal data
  5. Create an empty Game Object in your scene's Hierarchy and Add the Component Sosig Spawn Point
  6. Set the Sosig Type in the component to your entry (If it doesn't show up, restart Unity)
  7. Make sure Spawn Active and Spawn On Start are both ticked
  8. Build and test

Spawn in Code

//Basic Sosig Spawn Options
public readonly SosigAPI.SpawnOptions _spawnOptions = new SosigAPI.SpawnOptions
{
   SpawnState = Sosig.SosigOrder.PathTo,
   SpawnActivated = true,
   EquipmentMode = SosigAPI.SpawnOptions.EquipmentSlots.All,
   SpawnWithFullAmmo = true,
};

//Spawn transform in a scene
Transform spawnPoint; 

// Your Sosig Enemy ID here
SosigEnemyID id = 420; 

//Sosig spawn code with a reference of the Sosig
Sosig sosig = Sodalite.Api.SosigAPI.Spawn(
      IM.Instance.odicSosigObjsByID[id],
      _spawnOptions,
      spawnPoint.position,
      spawnPoint.rotation);

Supply Raid

Sosigs are added via the factions, the images generated in the CSE can be placed inside the Supply Raid Editor CustomSosigs folder to show up in the Sosig Browser.

  1. Create a SR Sosig Faction
  2. Add a Level
  3. Add the custom sosig ID to the SosigEnemyID field
  4. Save faction into a mod folder
  5. Test faction in H3VR