Warhammer 40,000: Rogue Trader

Warhammer 40,000: Rogue Trader

Warhammer 40,000: Rogue Trader Worskhop
Explore other users' modes. Subscribe so you don't miss new content!
了解更多
Blueprint mods are broken?
I'm following the modding guide and am trying to change some cue and answer blueprints, but

1. blueprint editor doesn't support overrides for half the fields
2. blueprint editor doesn't support creating inherited copies (though you can make them manually)
3. if I try to manually craft a patch, it doesn't seem to be applied (I tried the new and old syntax)
4. if you try to replace the whole existing blueprint (just copy/paste the whole cue/answer blueprint and change it), the game will hang at 40% loading, with exception in player.log about trying to insert the item with the same guid in the dictionary
5. if you change the assetId to unique guid, the replacement blueprint won't be applied

so, at the end of the day, current official modding support is kinda broken
最后由 13xforever 编辑于; 1 月 2 日 上午 6:28
< >
正在显示第 1 - 5 条,共 5 条留言
13xforever 1 月 2 日 上午 7:04 
If you try to use new jbp_patch format, you have two issues:
1. the example patches only have FieldOverrides and ArrayPatches, but these will throw an exception, you actually also need to have empty ComponentsPatches as well
2. you can't patch some fields (probably the same fields that you can't override in the blueprint editor), you get an exception like this:

System.ArgumentException: Object of type 'System.String' cannot be converted to type 'Kingmaker.ElementsSystem.ConditionsChecker'. at System.RuntimeType.CheckValue(System.Object,System.Reflection.Binder,System.Globalization.CultureInfo,System.Reflection.BindingFlags) (in :0) at System.Reflection.RuntimeFieldInfo.SetValue(System.Object,System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Globalization.CultureInfo) (in :0) at System.Reflection.FieldInfo.SetValue(System.Object,System.Object) (in :0) at Code.GameCore.Blueprints.BlueprintPatcher.BlueprintFieldOverrideOperation.Apply(Kingmaker.Blueprints.SimpleBlueprint) (in :0) at Code.GameCore.Blueprints.BlueprintPatcher.BlueprintPatcher.TryPatchBlueprint(Code.GameCore.Blueprints.BlueprintPatcher.BlueprintPatch,Kingmaker.Blueprints.SimpleBlueprint,System.String) (in :0)

(I tried using serialized json and plain object as the FieldValue in the patch, both fail to be converted)

e.g.
{ "TargetGuid": "a903589840ba4ab683d6e6b9f985d458", "FieldOverrides": [ { "FieldValue": "{\"Operation\":\"And\",\"Conditions\":[]}", "FieldName": "Conditions" } ], "ArrayPatches": [], "ComponentsPatches": [] }
or
{ "TargetGuid": "a903589840ba4ab683d6e6b9f985d458", "FieldOverrides": [ { "FieldValue": { "Operation": "And", "Conditions": [] }, "FieldName": "Conditions" } ], "ArrayPatches": [], "ComponentsPatches": [] }
ADDB 1 月 2 日 上午 7:09 
The modding tool indeed has some issues currently. There are a few known problems already, but I’ll forward this just in case.
最后由 ADDB 编辑于; 1 月 2 日 上午 7:43
13xforever 1 月 2 日 上午 7:16 
When using the old patch format, it doesn't seem to be applied as expected. There are no errors in gamelogfull.txt, only the message that patch was applied (also, you have to use .jbp_patch extension instead of .patch like described in the modding readme).

[02.01.2024 20:14:12:520 - Mods][Message]: Patching blueprint: Cue_24 (a903589840ba4ab683d6e6b9f985d458)

for this patch:
{ "_#Entries": [ { "_#ArrayMergeSettings": "Replace", "Conditions": { "Operation": "And", "Conditions": [] } } ] }
最后由 13xforever 编辑于; 1 月 2 日 上午 9:03
13xforever 1 月 2 日 上午 7:19 
And finally when you try to replace the whole bluepring, you get this in player.log:
ArgumentException: An item with the same key has already been added. Key: a903589840ba4ab683d6e6b9f985d458 at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x0015a] in <b89873cb176e44a995a4781c7487d410>:0 at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <b89873cb176e44a995a4781c7487d410>:0 at Kingmaker.Blueprints.JsonSystem.BlueprintsCache.Init (Kingmaker.Blueprints.JsonSystem.EditorDatabase.ResourceReplacementProvider.IResourceReplacementProvider resourceReplacementProvider) [0x0007b] in <caf9fb7a52a448fe9cfec15ad00c2f36>:0 at Kingmaker.Blueprints.JsonSystem.StartGameLoader.LoadPackTOC (Kingmaker.Blueprints.JsonSystem.EditorDatabase.ResourceReplacementProvider.IResourceReplacementProvider resourceReplacementProvider) [0x00000] in <caf9fb7a52a448fe9cfec15ad00c2f36>:0 at Kingmaker.GameStarter+<StartGameCoroutine>d__26.MoveNext () [0x00230] in <565daa4c3d1c4acf9e5e67b0a660585c>:0 at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00026] in <a8fc136049044b19982b5abcb6f6b426>:0
13xforever 1 月 2 日 下午 12:11 
I've implemented the same changes through UMM, it took considerably less time 😹

But I really wish the normal blueprint patch/replacement system was more generic and better supported, as I think it's cleaner and more approachable for normal people.
< >
正在显示第 1 - 5 条,共 5 条留言
每页显示数: 1530 50