Scene Tester

版本 v0.0.3·更新於 2025-11-02

Outward Scene Tester is a tool that automatically loops through scenes and executes functions from your mods.

模組介紹 作者原文

Outward Scene Tester

Outward Scene Tester is a tool that automatically loops through scenes and executes functions from your mods.

It uses the Mods Communicator framework to communicate with other mods.

Through this connection, it provides event listeners and emitters to exchange data.

You can also start or stop scene looping via a dedicated key binding.

When you register functions through events, they are added as SceneActionRules.

Each rule is checked whenever a scene loads — ensuring your code only runs once per area, avoiding duplicate executions.

Use Case

I used this tool to retrieve raw, unique enemy data in-game. The data was later

processed to build a dataset for Loot

Manager to determining whether certain loot criteria could be applied. The

Outward wiki does not provide all data correctly, and the game’s prefab values

are not always listed in a consistent order. Other mods can optionally use this

tool to access the same event-driven scene data directly.

Subscribing and Publishing Events

Listening to Events

Uses gymmed.scene_tester as mod namespace.

Here are provided all events you can subscribe to and listen:

Finished Scene Loop Action

Scene Tester mod gymmed.scene_tester fires event

FinishedSceneLoopAction with payload actionId. It

fires it after all action areas a looped and provided action code is executed.

actionId — the identifier you assigned when adding your action

(used to verify it’s your event).

Example

We'll use a ResourcesPrefabManager.Load patch to ensure Scene Tester is initialized before subscribing:

using OutwardModsCommunicator;...

[HarmonyPatch(typeof(ResourcesPrefabManager), nameof(ResourcesPrefabManager.Load))]

public class ResourcesPrefabManager_Load

{

static void Postfix(ResourcesPrefabManager __instance)

{

EventBus.Subscribe("gymmed.scene_tester", "FinishedSceneLoopAction", OnFinish);

}

}

public static void OnFinish(EventPayload payload)

{

if (payload == null) return;

string actionId = payload.Get("actionId", null);

if(string.IsNullOrEmpty(actionId))

{

Log.LogMessage($"MyMod@OnFinish didn't receive actionId variable!");

return;

}...continue with execution...

}

Publishing Events

Uses gymmed.scene_tester_* as mod namespace.

Here are provided all events you can publish:

Add Scene Loop Action

Event:AddSceneLoopAction

Registers a new looping action that will be executed on each scene load.

Payload:

actionId (optional) — a string to identify your action (useful for tracking or removing later).

action — a C# Action delegate (your function reference).

hashSetOfAreas — a HashSet<AreaManager.AreaEnum> defining which areas to loop over.

Example:

using OutwardModsCommunicator;...

HashSet<AreaManager.AreaEnum> areas = new HashSet<AreaManager.AreaEnum>();

areas.Add(AreaManager.AreaEnum.Abrassar);

areas.Add(AreaManager.AreaEnum.Emercar);

areas.Add(AreaManager.AreaEnum.HallowedMarsh);

Action function = () =>

{

string areaName = AreaManager.Instance.CurrentArea.GetName();

Log.LogMessage($"Current Area GetName:{areaName}");

};

var payload = new EventPayload

{

["actionId"] = actionId,

["action"] = function,

["hashSetOfAreas"] = areas,

};

EventBus.Publish("gymmed.scene_tester_*", "AddSceneLoopAction", payload);

Remove Scene Loop Action

Listens for event named RemoveSceneLoopAction with payload

actionId.actionId — the ID of the action you want to remove.

Code example:

using OutwardModsCommunicator;...

var payload = new EventPayload

{

["actionId"] = actionId,

};

EventBus.Publish("gymmed.scene_tester_*", "RemoveSceneLoopAction", payload);

How to set up

To manually set up, do the following

  • Create the directory: Outward\BepInEx\plugins\OutwardSceneTester\.
  • Extract the archive into any directory(recommend empty).
  • Move the contents of the plugins\ directory from the archive into the BepInEx\plugins\OutwardSceneTester\ directory you created.
  • It should look like Outward\BepInEx\plugins\OutwardSceneTester\OutwardSceneTester.dll

Launch the ga

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

GymMed-Mods_Communicatorsinai-dev-SideLoaderBepInEx-BepInExPack_Outward

檔案與校驗

檔案名稱
Scene_Tester-0.0.3.zip
檔案大小
116.3 KiB