GymMed-Scene_Tester icon

Scene Tester

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

Last updated a day ago
Total downloads 6
Total rating 0 
Categories Libraries Utility
Dependency string GymMed-Scene_Tester-0.0.3
Dependants 0 other packages depend on this package

This mod requires the following mods to function

GymMed-Mods_Communicator-1.2.0 icon
GymMed-Mods_Communicator

Outward Mods Communicator enables seamless communication between mods through shared events and configuration syncing. It also lets users override any changes made by other mods, giving them full control over their settings.

Preferred version: 1.2.0
sinai-dev-SideLoader-3.8.4 icon
sinai-dev-SideLoader

API and Mod Development Toolkit for Outward.

Preferred version: 3.8.4
BepInEx-BepInExPack_Outward-5.4.19 icon
BepInEx-BepInExPack_Outward

BepInEx pack for Outward.

Preferred version: 5.4.19

README

Outward Scene Tester


Logo
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<string>("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

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

If you liked the mod leave a star on GitHub it's free