Jump to content

Grimwar/Custom content

From Vellocet Developer Community
Revision as of 11:55, 4 October 2026 by DocumentationBot (talk | contribs) (Guide custom Unity materials and models into Vertex)

Use Content in Vertex or VSDK to import your own media. A map or VMod can own its files, or reference assets from another installed add-on. The SDK builds the required files and records those dependencies.

Creating materials or model prefabs in Unity? Follow Unity materials and models for Vertex. It shows exactly where to create your textures, .mat files, models, and .prefab files, how to export their catalog, and how to use them in an add-on map. The file-import workflow on this page creates content from supported source files; it does not import Unity .mat or .prefab files.

Add a sound to a map

  1. Save the map, for example my_arena.vertex.
  2. Open Settings → Map details → Content…, choose Sound, then Import files. Select wind_loop.wav.
  3. Set Playback to AmbientLoop for a looping sound with a world position. Adjust Volume between 0 and 1.
  4. Place an env_ambient entity and select the imported sound in Custom Cue. Leave Play On Start enabled to hear it when the map loads.
  5. Build with Play in Game and check the volume and placement in Grimwar.

The imported sound has a key such as asset:my_arena/wind_loop. Custom Cue takes priority over the entity's base-game Event Name. You do not need to build Wwise banks or write an audio manifest.

The source stays under Content/, with its settings in content.json. Keep both with the map. Use Replace media to update the sound without changing its key.

Pick the playback type

Type Use
Announcer Non-spatial announcements.
Sfx2D A non-spatial one-shot sound.
Sfx3D A one-shot sound at a world position.
AmbientLoop A looping sound at a world position.
MusicLoop Looping music.
Ambience2DLoop Looping non-spatial ambience.

For a sound that starts from a door or objective, disable Play On Start and call the ambient entity from a client VSig handler. See Server and client logic.

An ambient entity's Audible Distance is its emitter radius, not a guaranteed cutoff distance. Point mode stays at the marker. Volumetric mode follows the nearest boundary of its oriented box when the listener is outside and plays in 2D inside.

Make a reusable media pack

  1. Open VSDK and select Media pack, then Create…. Choose a new source folder outside the SDK installation, such as shared_sounds. The folder name becomes the pack's stable ID.
  2. Open Content… and set its title, author, and version.
  3. Import your files and choose their settings. Mark assets intended for other packages with Include in build.
  4. Select Check build contents and review the file list and size.
  5. Build into Grimwar's add-on folder and enable the package in the game.

In another map or VMod's Content window, select an installed asset from this pack and choose Use this package. A reference such as asset:shared_sounds/wind_loop points to the provider. The consuming build records shared_sounds as a requirement and leaves the sound bytes in the provider's package.

Install and enable both packages to test them. Publish the media pack first, then the map or mod that depends on it. Keep the provider ID and asset keys stable in updates. Removing or renaming a published key can break consumers even if the pack's display title stays the same.

Choose Copy files into this package when you want an independent copy you can edit and distribute. Check the creator's redistribution terms first. Other external references still keep their own dependencies.

Use media in a VMod

Open the VMod's Content… controls in VSDK. For an attached VMod, select it under the map's SDK resources and use that resource's Content button. Importing there gives the script local names for its own assets.

For a sound imported as round_start with the Announcer or Sfx2D playback type:

var result = context.Audio.PlayToAll("round_start");
if (!result.Success)
    context.Log.Warn(result.Message);

Use a full asset key for a sound from a shared pack:

var result = context.Audio.PlayFromPlayer(
    playerId, "asset:shared_sounds/wind_loop", 0.5f);

Here context is the IModContext saved in OnLoad, and playerId identifies a connected player. This second example needs an AmbientLoop or Sfx3D cue. PlayFromPlayer uses the player's authoritative pawn position. Save result.Value from a successful play if you need to stop it later with context.Audio.Stop.

PlayToAll and PlayToPlayer accept non-spatial cue types. PlayAt and PlayFromPlayer accept Sfx3D and AmbientLoop. Playback gain multiplies the cue's own volume.

Use Use this package to record a selected provider. When declaring a dependency directly in a VMod manifest, put its add-on ID in requires. dependencies instead lists VMod IDs for script load order.

API 15 also exposes declared text/data through Content:

string rules;
if (context.Content.TryReadText("rules", out rules))
    context.Log.Write(rules);

Import the file through the resource's Content window and keep it included in the build. Content.Describe(key) reads asset metadata. These APIs operate on declared assets; they do not give a VMod access to arbitrary files.

Supported imports

Type Source formats Notes
Sound WAV, Ogg Vorbis, MP3 Up to 32 MiB per source. Set the playback type and volume.
Surface material PNG, JPG/JPEG, TGA Creates a surface material from an image. Up to 16 MiB per source.
Image / texture PNG, JPG/JPEG, TGA Up to 16 MiB per source. Select the type the consuming field expects.
Model FBX, OBJ Import supported MTL and image companions alongside it. Review scale and collision.
Font TTF, OTF Requires a supported game consumer.
Video MP4, WebM, MOV Requires a supported game consumer; importing a clip does not place a video screen.
Text / data TXT, JSON, CSV, Markdown Up to 8 MiB per source; usable through the VMod Content API.
Binary data BIN Packaged data for supported consumers, not executable code.

Native Unity media, including models, materials, textures, fonts, and video, needs the SDK's pinned Unity compiler and target modules. Sounds and ordinary data use platform-independent files. Import support does not imply that every entity or VMod service can consume every type.

Keep builds small and repeatable

Use Check build contents to see what is included and why. Unreferenced files can stay in your source folder without shipping. Include in build keeps an asset available when code chooses its key at runtime; a referenced asset is included even if that checkbox is off.

Keep model companion files together. Use Rebuild model previews after editing a model externally. Rebuild the package after any source change; the compiler reuses matching verified output where it can.

Avoid copying the same large library into every map. Put shared assets in a media pack when you want a common update and dependency. Use an owned copy when a map needs to keep its own version.

Artwork and distribution

Set a media pack's title, author, version, and PNG thumbnail in Content. Use a 1920 × 1080 thumbnail for Release. Enable Release package in VSDK, build, and publish the result as Content from Grimwar's Addons screen.

Keep the entire output folder, including its generated addon.json and catalogs. The editable content.json is source; it is not an installable package by itself. See Grimwar/Steam Workshop addons for dependencies and updates.