Triggering time of day changes - SekiroResurrection/modding-wiki GitHub Wiki

A short tutorial on how to change the time of day functions, for screenshot purposes. It should, ideally, work in all regions — please let me know if it doesn't.

After the following changes are done in your game, you will be able to change the time of day every time you drink a gourd.

This is strictly for screenshots only, not to be used with normal game progression.

NG+ is recommended for this; in fact, any save that has not triggered night time in Ashina by visiting Fountainhead Palace. This does not work in Reflections, unfortunately.

Table of contents

Setup

In order to set up these scripts, these requirements must be met.

  1. Unpack the Sekiro .exe with UXM.
  2. Have DarkScript 3 installed.

Download UXM and DarkScript 3 in the Tools page.

Getting started

  1. Backup your common.emevd.dcx file present in mods/event.

  2. Open your common.emevd.dcx file in mods/event using DarkScript3.

  3. Copy the following code at the end of all the InitializeEvent in event 0.

     InitializeEvent(0, 922, 923, 4, 10);
     InitializeEvent(0, 928, 923, 4, 10, 11, 0, 1100970);
     InitializeEvent(0, 929, 923, 4, 10, 11, 0, 1100970);
     InitializeEvent(0, 930, 923, 4, 10, 11, 0, 1100970);
     InitializeEvent(0, 931, 923, 4, 10, 11, 0, 1100970);
     InitializeEvent(0, 932, 923, 4, 10, 11, 0, 1100970);
     InitializeEvent(0, 933, 923, 4);
    
  4. Copy the following code to the end of the file

    Event(922, Restart, function(X0_4, X4_4, X8_4) {
    IfCharacterHasSpEffect(MAIN, 10000, 3000, true, ComparisonType.Equal, 1);
    IncrementEventValue(X0_4, X4_4, X8_4);
    });
    
    Event(928, Restart, function(X0_4, X4_4, X8_4, X12_4, X16_4, X20_4) {
        IfEventValue(MAIN, X0_4, X4_4, ComparisonType.Equal, 1);
        IncrementEventValue(X0_4, X4_4, X8_4);
        PlayCutsceneAndWarpPlayerWithLighting200213(-1, CutscenePlayMode.Skippable, -1, X12_4, X16_4, 10000, TimeofDay.Morning, Enabled);
        WarpPlayerNew(X12_4, X16_4, X20_4);
        SaveRequest(0);
    });
    
    Event(929, Restart, function(X0_4, X4_4, X8_4, X12_4, X16_4, X20_4) {
        IfEventValue(MAIN, X0_4, X4_4, ComparisonType.Equal, 3);
        IncrementEventValue(X0_4, X4_4, X8_4);
        PlayCutsceneAndWarpPlayerWithLighting200213(-1, CutscenePlayMode.Skippable, -1, X12_4, X16_4, 10000, TimeofDay.Noon, Enabled);
        WarpPlayerNew(X12_4, X16_4, X20_4);
        SaveRequest(0);
    });
    
    Event(930, Restart, function(X0_4, X4_4, X8_4, X12_4, X16_4, X20_4) {
        IfEventValue(MAIN, X0_4, X4_4, ComparisonType.Equal, 5);
        IncrementEventValue(X0_4, X4_4, X8_4);
        PlayCutsceneAndWarpPlayerWithLighting200213(-1, CutscenePlayMode.Skippable, -1, X12_4, X16_4, 10000, TimeofDay.Afternoon, Enabled);
        WarpPlayerNew(X12_4, X16_4, X20_4);
        SaveRequest(0);
    });
    
    Event(931, Restart, function(X0_4, X4_4, X8_4, X12_4, X16_4, X20_4) {
        IfEventValue(MAIN, X0_4, X4_4, ComparisonType.Equal, 7);
        IncrementEventValue(X0_4, X4_4, X8_4);
        PlayCutsceneAndWarpPlayerWithLighting200213(-1, CutscenePlayMode.Skippable, -1, X12_4, X16_4, 10000, TimeofDay.Evening, Enabled);
        WarpPlayerNew(X12_4, X16_4, X20_4);
        SaveRequest(0);
    });
    
    Event(932, Restart, function(X0_4, X4_4, X8_4, X12_4, X16_4, X20_4) {
        IfEventValue(MAIN, X0_4, X4_4, ComparisonType.Equal, 9);
        IncrementEventValue(X0_4, X4_4, X8_4);
        PlayCutsceneAndWarpPlayerWithLighting200213(-1, CutscenePlayMode.Skippable, -1, X12_4, X16_4, 10000, TimeofDay.Night, Enabled);
        WarpPlayerNew(X12_4, X16_4, X20_4);
        SaveRequest(0);
    });
    
    Event(933, Restart, function(X0_4, X4_4) {
        IfEventValue(MAIN, X0_4, X4_4, ComparisonType.Greater, 10);
        ClearEventValue(X0_4, X4_4);
    });
    

Returning to the normal game

  1. Backup the edited common.emevd.dcx.
  2. Restore the original file from the mod.