-
Notifications
You must be signed in to change notification settings - Fork 4
Pins
This wiki page contains a compilation of resources and tools shared in the mod-dev-technical channel of the Owlcat Games Discord. See Modding Resources for more resources.
- Description: Beginner's guide to modding.
- Link: Modding Starter Guide
- Description: NuGet templates for UnityModManager mods. Allows creating modding projects in one command. For KM, Wrath and RT.
- Link: OwlcatNuGetTemplates
Open
- Description: Wrath Library to better work with Blueprints.
- Link: WW-Blueprint-Core v2.8.5
- Description: Tool to browse Blueprints for KM, Wrath and RT
- Link: BubblePrints Releases
- Description: Compatible version of UnityExplorer with untested improvements for KM, Wrath and RT.
- Link: UnityExplorer Loader
- Description: A completed version of SpriteGallery with all features of the original.
- Link: SpriteGallery.Avalonia
- Description: Tool for debugging
- Link: Unity2Debug
- Description: Tool for removing blueprints/guids from save files. Wrath only I think...
- Link: BlueprintPurge v0.5.0
- Description: Harmony2.0 beta compatible version of DataViewer.
- Link: DataViewer v0.9.3a-beta
- Description: BubbleGauntlet.
- Link: BubbleGauntlet-PRE
- Description: ???
- Link: MewsifierConsole v1.1.1
Open
- Unity Version:
- Kingmaker:
2018.4.10f1
- https://unity.com/releases/editor/whats-new/2018.4.10#installs - Wrath:
2020.3.48f1
- https://unity.com/releases/editor/whats-new/2020.3.48#installs - RT:
2022.3.44f1
- https://unity.com/releases/editor/whats-new/2022.3.44#installs
- Kingmaker:
- Wwise Version:
- Kingmaker:
2016.2
- Wrath:
2019.2
- RT:
2022.1
- Kingmaker:
- Description: Title
- Link: RT Decompiled Source Code
- Description: Title
- Link: RT Modding Docs
- Description: Instructions for debugging using Unity Debugger in Visual Studio.
- Link: Debugging Guide
- Description: Title
- Link: UI Crash Course
Open
- Description: Guide for setting environment variables on Windows.
- Link: Environment Variables Setup Guide
- Description: General coding tutorials for beginners.
- Link: C# Tutorials Series
- Description: Just set it up to launch WoTR under unity profiling and it works great. You don't even need to use the debug binary or anything.
- Link: dotTrace Profiler
- Description: Tutorial on how to make UIs in WotR.
- Link: Tutorial Canvas
- Description: Step-by-Step guide for creating a Wrath Owlcat Template mod.
- Link: BubbleTeachesLesson0
Open
If we are talking about character textures:D is diffuse
RGB - diffuse
A - opacity
M is mask
R - roughness
G - emissive
B - metalness
A - translucency (thickness map)
N - normals
RGB - normals
A - none
S - shadow mask
It used to contain only shadows, now it also has masks for painting stuff in unity (like class outfit colors)
R - color 1
G - color 2
B - shadow mask
A - none
Shadow is basically a black diffuse layer that we place between multiple regular diffuse layers. For example, if you put on some robe and an armor, on your character's skirt bodypart they will be both painted on the same mesh. To make the top layer (armor in this case) stand out better, we add a shadow between the two layers. Shadow only appears where you can see the bottom layer sticking out. Shadow is a mask, and it does 2 things: paints diffuse with black and fills roughness with white to remove any reflections in the shadow area.
Thickness is for our fake SSS shader. Lets the light pass through the mesh and light up the texture a bit. Like the real skin. Leave it black for anything except skin. For skin you have to bake a thickness map (xnormal does that, for example). If you fill it with white, it will cause a weird subtle shine all over your texture.
Open
- Description: Code related to race things?
- Link (Gist): Race Nonsense
- Link (Project): Project
- Link (Setup Guide) Discord Message
Open
Edit Bundle Creation Script (microsoftenator2022)
Open \Assets\Editor\Build\Tasks\PrepareBundles.cs
and change
string assetPath = AssetDatabase.GUIDToAssetPath(assetGuid);
string bundleName = m_LayoutManager.GetBundleForAssetPath(assetPath, m_ModificationParameters.TargetFolderName);
if (bundleName == null)
{
continue;
}
to
string assetPath = AssetDatabase.GUIDToAssetPath(assetGuid);
string bundleName = m_LayoutManager.GetBundleForAssetPath(assetPath, m_ModificationParameters.TargetFolderName);
if (bundleName == null || bundleName.EndsWith("_content"))
{
bundleName = $"{m_ModificationParameters.TargetFolderName}_assets_all";
}
Replace RT Template's Blueprint Patch Editor Script (microsoftenator2022)
Download the edited script and replace the original in \Assets\Code\GameCore\Editor\Blueprints\
.
Fix the RT Template's FileNotFound Exception for references.xml on Startup (microsoftenator2022)
Open \Assets\Code\GameCore\Editor\Validation\ReferenceGraph.cs
and change
static ReferenceGraph()
{
BlueprintsDatabase.OnPreSave += Graph.CleanReferencesInBlueprintWithId;
BlueprintsDatabase.OnSavedId += Graph.ParseFileWithId;
}
to
static ReferenceGraph()
{
BlueprintsDatabase.OnPreSave += id => Graph?.CleanReferencesInBlueprintWithId(id);
BlueprintsDatabase.OnSavedId += id => Graph?.ParseFileWithId(id);
}
[InitializeOnLoadMethod]
static void InitGraph()
{
if (!File.Exists("references.xml"))
{
Debug.LogWarning("references.xml does not exist. Creating reference graph.");
CollectMenu();
}
}
Create a Bundle Assets Mapping File on Build for the Wrath Template (microsoftenator2022)
Open Assets\Editor\Build\Tasks\PrepareArtifacts.cs
, find:
return ReturnCode.Success;
}
}
}
and replace with:
const string bundlesLayoutFileName = "BundlesLayout.json";
File.Copy(
Path.Combine(intermediateFolderPath, bundlesLayoutFileName),
Path.Combine(targetFolderPath, bundlesLayoutFileName));
return ReturnCode.Success;
}
}
}
Open Assets\Editor\Build\Tasks\CreateManifestAndSettings.cs
, find:
return ReturnCode.Success;
}
}
}
and replace with:
var values = m_ModificationSettings.Settings.BundlesLayout.GuidToBundle.Values.ToArray();
File.WriteAllText(Path.Combine(buildFolderPath, "BundlesLayout.json"),
JsonConvert.SerializeObject(values.Distinct()
.ToDictionary(
value => value,
value => m_ModificationSettings.Settings.BundlesLayout.GuidToBundle.Keys
.Where(key => m_ModificationSettings.Settings.BundlesLayout.GuidToBundle[key] == value)
.Select(guid => new { AssetPath = AssetDatabase.GUIDToAssetPath(guid), AssetGuid = guid }))));
return ReturnCode.Success;
}
}
}
Add using Newtonsoft.Json;
to the list at the top of the file.
Add labelled drop-down drawers for enum-based fields for Wrath template (Kurufinve)
Go the template's Assets\Editor\
folder and create a new script named LongAsEnumAttributePropertyDrawer.cs
. Edit it and paste in the following:
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace MyOwlcatModification
{
[CustomPropertyDrawer(typeof(LongAsEnumAttribute), true)]
public class LongAsEnumAttributePropertyDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
var type = (attribute as LongAsEnumAttribute).EnumType;
var result = EditorGUI.EnumPopup(position, label, Enum.ToObject(type, property.longValue) as Enum);
property.longValue = (long)Enum.ToObject(type, result);
}
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
return EditorGUIUtility.singleLineHeight;
}
}
}
Create a new script named LongAsEnumFlagsAttributeAsDropdownDrawer.cs
and paste in the following:
using UnityEngine;
using UnityEditor;
using System;
using System.Collections;
using System.Collections.Generic;
namespace Kingmaker.Utility
{
[CustomPropertyDrawer(typeof(LongAsEnumFlagsAttribute))]
public class LongAsEnumFlagsAttributeAsDropdownDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
EditorGUI.LabelField(new Rect(position.x, position.y, EditorGUIUtility.labelWidth, position.height), label);
string text = property.hasMultipleDifferentValues ? "-multiple- " : property.longValue == 0 ? "None " : "";
var enumType = (attribute as LongAsEnumFlagsAttribute).EnumType;
var names = System.Enum.GetNames(enumType);
foreach (string name in names)
{
long value = (long)System.Enum.Parse(enumType, name);
if ((property.longValue & value) == value) text += string.Format("{0}, ", name);
}
text = text.Remove(text.Length - 2, 2);
Rect popupRect = new Rect(position.x + EditorGUIUtility.labelWidth, position.y, position.width - EditorGUIUtility.labelWidth, position.height);
if (GUI.Button(popupRect, new GUIContent(text), (GUIStyle)"miniPopup"))
{
GenericMenu menu = new GenericMenu();
foreach (var name in names)
{
long value = (long)System.Enum.Parse(enumType, name);
bool has = (property.longValue & value) == value;
menu.AddItem(new GUIContent("None"), property.longValue == 0, () =>
{
property.longValue = 0;
property.serializedObject.ApplyModifiedProperties();
});
menu.AddItem(new GUIContent(name), has, () =>
{
if (has) property.longValue ^= value;
else property.longValue |= value;
property.serializedObject.ApplyModifiedProperties();
});
}
menu.DropDown(popupRect);
}
}
}
}
Open
- Description: Dump created with KingmakerDataminer.
- Link: dump
- Description: Here is the current database of GUIDs found in mods, these are new GUIDs and in game ones. It's unknown if the original blueprint is modified by the mod author. If you have any troubles with a certain GUID this should help you narrow it down.
- Link: GUID Database
- Description: JSON dumps of blueprints for Kingmaker and Wrath.
- Links: Kingmaker Blueprints, Wrath Blueprints
- Description: AssetId to bundle mapping file.
- Link: AssetId to Bundle Mapping File
- Description: AssetId to bundle mapping file.
- Link: AssetId to Bundle Mapping File
- Description: CAB to bundle mapping file.
- Link: CAB to Bundle Mapping File
Getting Started
[Wrath] Game Structure
- Abilities
- Blueprints
- Blueprint Components