From c4584554c71a69e504a04b675546a6634b9444c5 Mon Sep 17 00:00:00 2001 From: aradix85 Date: Wed, 30 Sep 2026 17:18:41 +0200 Subject: [PATCH] fix: pass the `Scripts` root to Caprica so Fallout 4 namespaces resolve Caprica derives a script's expected namespace from its path relative to the input directory. The rule passed the temp directory above `Scripts`, so every Fallout 4 script failed with "expected namespace 'Scripts:...'". Pass `Scripts` itself and write to `/Scripts`, which keeps the output layout the archive and install hooks rely on. --- xmake.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmake.lua b/xmake.lua index b15dcaf..8e6c157 100644 --- a/xmake.lua +++ b/xmake.lua @@ -415,7 +415,7 @@ rule("commonlib.papyrus", function() return end - local args = { tempdir, format("--game=%s", target:data("commonlib.papyrus.game")), "--recurse", "--ignorecwd" } + local args = { rootdir, format("--game=%s", target:data("commonlib.papyrus.game")), "--recurse", "--ignorecwd" } local imports = { rootdir } if data.options.imports then if type(data.options.imports) ~= "table" then @@ -446,7 +446,7 @@ rule("commonlib.papyrus", function() table.append(args, format("--flags=%s", target:data("commonlib.papyrus.flags"))) local scriptdir = path.absolute(target:targetdir()) - table.append(args, format("--output=%s", scriptdir)) + table.append(args, format("--output=%s", path.join(scriptdir, "Scripts"))) if data.options.optimize then table.append(args, "--optimize") end if data.options.release then table.append(args, "--release") end