Skip to content

Building and Testing

DarthParametric edited this page Oct 15, 2024 · 3 revisions

Build in Visual Studio

Open the project solution in VS. Right click on the project in the Solution Explorer and choose Build. In the output window at the bottom of the screen you'll see the result. If everything worked as intended, you should see a Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped message.

VS will automatically create a folder for your mod in the game's Mod folder (if it doesn't already exist) and copy the the mod's DLL, Info.json, your soundbank/s, and SoundbanksInfo.xml to that folder. It will also zip up your mod's content ready for distribution, which you can find in <ProjectName>\<ProjectName>\bin\Debug or Release, depending on what you set the project to (drop-down at the top of VS).

With the mod built and exported, it's time to test it in-game.

Troubleshooting Build Errors

If your build fails for some reason, ensure the following:

  • You have previously run the game at least once to generate the player.log file that VS requires to find the game's install folder
  • You have Unity Mod Manager installed and applied to the game
  • VS found the game folder and created the publicized assemblies (located in <ProjectName>\<ProjectName>\obj\Debug\publicized)
  • You have generated your soundbanks (located in <ProjectName>\WrathWwiseTemplate\GeneratedSoundBanks\Windows)
  • You haven't changed the project's folder structure or folder names after the initial template generation

If the issues persist, please post your VS error log (and a link to your project repository, if you have one) in the #mod-dev-technical channel of the official Owlcat Discord server.

Testing the Mod

Run the game. You may want to open the Unity Mod Manager window at the main menu to confirm that your mod shows up in the list and that it is active. You have two options for an initial test. Either quickly start a new game, or load an existing game and hire a mercenary. Either way, you only need to skip through to the end of character creation to the Voice selection window.

Now the moment of truth. You should see your custom voice in the list below all the vanilla voices for whichever gender you assigned it to. Click on it to confirm you get sound playback. Click on it multiple times to confirm you're getting a randomised selection from your assigned samples. Click on some of the vanilla voices to compare the volume of their sounds to the volume of yours. Make a note if it needs to be adjusted either up or down later in Wwise. Also make sure that the music is being correctly ducked (i.e. its volume lowers) when your voice plays, and that there is no unwanted distortion or reverberation in your voice tracks.

To test the actual main content of your soundset, you'll need a character using it that you can move around the game world, cast spells, engage in combat, etc. Creating a mercenary in a save in the early part of the game in Kenabres is fine for this. The Market Square should provide plenty of combat as well as things like hidden objects to trigger the various sound Events. Toybox will allow you to teleport back and forth between the Market Square and the Defender's Heart to speed things up. Mercenaries are typically preferable to using the player character for testing since they are disposable in the event you need to make radical changes (such as changing your project's GUID/scrapping it entirely).

Alternatively, in KM you can use Visual Adjustments or in Wrath Visual Adjustments 2 to manually assign the soundset to an existing character if you prefer.

Testing Checklist and Troubleshooting

  • Ensure that your sounds don't have any unwanted distortion or reverberation
  • Ensure that your sounds are of equivalent volume to the vanilla soundsets at full zoom-out and full zoom-in
  • Ensure that your sounds have equivalent falloff to the vanilla soundsets as you pan the camera away from the selected unit
  • Ensure that your sounds properly play for given Events (note that some Events have a low probability to occur, e.g. moving)

Depending on the results of your testing, you may need to refer back to the custom settings section of the Creating the SoundBanks portion of the guide. If your soundset is not working at all, ensure that:

  • You have added all the Events to your soundbank
  • The Event names match the AkEvent names in the Asks blueprint (Main.cs)
  • The Events have attached audio (not flagged Missing)
  • You are not seeing any error messages in player.log

If the issues persist, please make a post in the #mod-dev-technical channel of the official Owlcat Discord server with the full details of your problem (and a link to your project repository, if you have one).

Publish the Mod

Assuming you plan on releasing your mod publicly, you may wish to try a small beta period first. You can try recruiting some willing guinea pigs volunteer testers in the #mod-user-general channel of the Owlcat Discord, or on the unofficial subreddit for Kingmaker and Wrath.

If you plan to upload your mod to Github, you'll want to edit the Repository.json file, found in the root <ProjectName> folder, in a text editor or directly on Github itself. You can add the DownloadUrl field to point to the archive of your latest release. Make sure to add the direct link to Repository.json in your mod's Info.json, in the Repository field. You may want to examine some other mods to see examples of how this is done.