emevd basics

clone jutsu tutorial:

in Smithbox's map editor, duplicate an npc, make its name and modelName after the characher ID that you want it to look like, give it an unused entityID (to make sure your ID is unused, right click on entityID, click on search, and in the "value" field, type your chosen ID, and if the result is your new npc or "no map objects found", if you haven't given it the ID yet, then you're good), make CollisionPartName blank, make EventFlagID -1, make ThinkParamID 14700000 (you can use your custom thinkparam, though) and give it an NpcParamID (this ID depends on the character ID. Duplicate the clone to every map so it works on every map (if you want that)

in param editor, make a new npcparam row (by duplicating one) with the ID you chose (make sure the row Id and behaviorVariationId start with the character's ID, so if the character's ID is c1470, then make the row Id and behaviorVariationId start with 1470), set npc type to 1, team type to 2, move type to 3 and phantomshaderid to 360 (or whatever you want)

in dark script, open common.emevd.dcx (it goes without saying, don't modify the game files you extract with UXM. copy the files you want to modify in the mods folder. make sure the file path in the mods folder mimics its vanilla counterpart, so "SekiroShadowsDieTwice\event\common.emevd.dcx" is copied to "SekiroShadowsDieTwice\mods\event\common.emevd.dcx"). at the top, where you see event initialization, initialize a new event with your chosen event ID. event initialization goes like this:

InitializeEvent(0, eventID, 0);

next, go a little down below where you see the actual events and copy this event (replace the IDs with the appropriate numbers you choose):

$Event(eventID, Restart, function() {
    ChangeCharacterEnableState(entityID, Disabled);
    SetCharacterAnimationState(entityID, Disabled);
    SetCharacterImmortality(entityID, Enabled);
    SetCharacterInvincibility(entityID, Enabled);
    SetCharacterHPBarDisplay(entityID, Disabled);
    WaitFor(
    CharacterHasSpEffect(10000, speffectID));
    ChangeCharacterEnableState(entityID, Enabled);
    SetCharacterAnimationState(entityID, Enabled);
        SetCharacterGravity(entityID, Disabled);
        SetCharacterAnimationState(entityID, Disabled);
        SetCharacterGravity(entityID, Disabled);
        SetCharacterMaphit(entityID, true);
    CharacterWarpRequest(entityID, TargetEntityType.Character, 10000, dummypolyID);
    ForceAnimationPlayback(entityID, animationID, false, false, true, 0, 1);
    WaitFixedTimeFrames(number of frames);
    RestartEvent();
});
--------------------------------------------------------------------------------------------------------------------------------------------------------------------

entityID is the one you specify in map editor

10000 is the player's entityID, so if you want the clone to belong to a different character, replace 10000 with that character's entityID (you can find it by looking up the character in map editor)

animationID is the number on the anim in DSAS (for example, if the anim is a000_003009, type 3009 as the animationID). the anim you specify is the anim that plays when the clone appears.

speffectID is the speffect that you make in speffect params that the event waits for in order to activate. put a speffect jumptable, with the ID you chose for its param, on any player animation (if you want the clone to belong to the player) you pick in DSAS and once the animation reaches the frames where you put the speffect, the clone appears

in WaitFixedTimeFrames, type the number of frames the animation is allowed to play for

if you want multiple animations to be played one after the other, just duplicate the "ForceAnimationPlayback" and "WaitFixedTimeFrames" lines, so for example, if you want the clone to perform two animations, it'll look like this:

    ForceAnimationPlayback(entityID, animationID, false, false, true, 0, 1);
    WaitFixedTimeFrames(number of frames);
    ForceAnimationPlayback(entityID, animationID, false, false, true, 0, 1);
    WaitFixedTimeFrames(number of frames);

- in this example the first WaitFixedTimeFrames will end the first animation after the specified amount of frames, and the clone will move to the second animation.

in DSAS, go to window, scene explorer, helpers and toggle dummypoly IDs to view dummypolies and select a dummypolyID to type in the event. the dummypoly is the where we want to spawn the clone.

you'll want to make new character files for your clone (or "subspecies" as they're called), so you can do what you want with them without messing with the existing npcs. so you'll need Mimic-Tear for that. use it to make subspecies of the texbnd, chrbnd, behbnd, anibnd and hks files that belong to that npc (I haven't tested to ensure whether you need all five or some or one of them, so just make subspecies of all five just in case, or if you're feeling adventurous, you can do some testing yourself to confirm which files are actually needed)

if you want the clone to be a clone of wolf, and not an NPC, you'll need these files (extract them to the mods folder), as there's no NPC version of wolf in the base game. this npc's ID is 8030, so make sure to use that in the npcparam row Id and behaviorVariationId, if you want to use this npc. the files are already mimic-teared.

you can now open the clone's anibnd in DSAS and add these jumptables (shift and right click on an empty space) to the animations you want to use: 19, 27, 51, 67, and AddSpEffect_Multiplayer with the speffect 5350.

of course, you'll have to make custom hitboxes for that character. with AtkParam_Npc and BehaviorParam in smithbox, and InvokeAttackBehvaior in DSAS, and projectiles with bullet param and InvokeBulletBehavior. do mind the character's ID when choosing the IDs of your hitboxes and bullets

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

if you want the clone to obey gravity and have collision with characters, you'll want to make the event without these four lines, and avoid using jumptables 19 and 27:

        SetCharacterGravity(entityID, Disabled);
        SetCharacterAnimationState(entityID, Disabled);
        SetCharacterGravity(entityID, Disabled);
        SetCharacterMaphit(entityID, true);

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

it's also advised, should you decide to make the clone on multiple maps, that you make the clone have a different entityID for each map, make the event in common_func.emevd.dcx instead, and write it like this (without the four lines that disable gravity and collision, if you want that):

$Event(eventID, Restart, function(X0_4) {
    ChangeCharacterEnableState(X0_4, Disabled);
    SetCharacterAnimationState(X0_4, Disabled);
    SetCharacterImmortality(X0_4, Enabled);
    SetCharacterInvincibility(X0_4, Enabled);
    SetCharacterHPBarDisplay(X0_4, Disabled);
    WaitFor(
    CharacterHasSpEffect(10000, speffectID));
    ChangeCharacterEnableState(X0_4, Enabled);
    SetCharacterAnimationState(X0_4, Enabled);
        SetCharacterGravity(X0_4, Disabled);
        SetCharacterAnimationState(X0_4, Disabled);
        SetCharacterGravity(X0_4, Disabled);
        SetCharacterMaphit(X0_4, true);
    CharacterWarpRequest(X0_4, TargetEntityType.Character, 10000, dummypolyID);
    ForceAnimationPlayback(X0_4, animationID, false, false, true, 0, 1);
    WaitFixedTimeFrames(number of frames);
    RestartEvent();
});

- then go to the file for each map, and initialize the event with the entityID you assigned for the clone in its respective map. the initialization goes like this:

InitializeCommonEvent(eventID, entityID);

don't forget to initialize the event for the files associated with reflections of strength that belong to their respective maps (if you want that). for example:
m10_00_00_00.emevd.dcx: hirata estate
m10_00_50_60.emevd.dcx: owl's reflection in hirata
m10_00_50_90.emevd.dcx: lady butter's reflection

you can tell by the numbers. owl's characterID is c5060, which is the number on the m10_00_50_60.emevd.dcx file, which means this file handles the reflection of owl father and inner father

- the reason this is more optimal is that, even though the game loads one map at a time, there are places where two maps are loaded and the game can get confused as to which clone it's supposed to teleport to you

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

Credit to Andmonika, Lord of Erdtree's author for the wolf NPC

Credit to RotoMaticYT, for showing me how to make the clone

Article information

Added on

Edited on

Written by

Broom000

0 comments