Skip to content

feat: Dummy actions & making Npc wrapper useful#787

Open
Saskyc wants to merge 6 commits into
ExMod-Team:masterfrom
Saskyc:Dummy-Action
Open

feat: Dummy actions & making Npc wrapper useful#787
Saskyc wants to merge 6 commits into
ExMod-Team:masterfrom
Saskyc:Dummy-Action

Conversation

@Saskyc

@Saskyc Saskyc commented Mar 27, 2026

Copy link
Copy Markdown

Description

Describe the changes

  • Item now has DummyKeyEmulator as DummyEmulator, so it can be worked with.
  • New methods
    • Shoot makes Npc shoot
    • Cancel use item makes Npc cancel using item such as medkit
    • Reload makes Npc reload
    • Holster makes Npc not equip anything (CurrentItem = null may also be used.)
    • Equip makes Npc equip specific item (CurrentItem = MyItem [Item Instance] may also be used.)
    • Move method that makes Npc move in specific direction (could be later improved to move to specific point in generating direction based on 2 Vectors npc::Position and other position.
    • Look has multiple methods like look in direciton, position vertical and horizontal
    • Jump makes Npc jump
    • Eat candy methods that interacts with candy and makes it the Npc eat. Could be later just moved into different part and that to Scp330 wrapper.
    • GetActions() is all actions Npc can do in a specific moment
    • RunAction() forces specific action to be run with DummyKeyEmulator
    • StopAction() forces specific action to be stopped with DummyKeyEmulator
    • IsBeingDone() checks if action is being executed at the moment. Eg. reload -> hold means it will be held and can't shoot so I can check if Reload IsBeingDone() and stop if it is.

What is the current behavior? (You can also link to an open issue here)

X

What is the new behavior? (if this is a feature change)

X

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

No this PR only introduces new methods and properties.

Other information:
Test reporitory: https://github.com/Saskyc/ExiledTest/tree/Dummy-Action-Test
Youtube video showing new behaviour: https://www.youtube.com/watch?v=HjHgxjdN6tA


Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentations

Submission checklist

  • I have checked the project can be compiled
  • I have tested my changes and it worked as expected

Patches (if there are any changes related to Harmony patches)

  • I have checked no IL patching errors in the console

Other

  • Still requires more testing

@Someone-193 Someone-193 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I just rewrite these docs for you? You arent a native english speaker right? Anyways, I commented here on some of the docs you could improve, but there's a lot of little grammatical changes I would make

Comment thread EXILED/Exiled.API/Features/Items/Item.cs
Comment thread EXILED/Exiled.API/Features/Npc.cs
Comment thread EXILED/Exiled.API/Features/Npc.cs
Comment thread EXILED/Exiled.API/Features/Npc.cs
Comment thread EXILED/Exiled.API/Features/Npc.cs Outdated
Comment on lines +434 to +437
/// <summary>
/// Forces Npc to look at certain point.
/// </summary>
/// <param name="dir">Position to look at.</param>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bro pulled a yamato 💔

@Saskyc

Saskyc commented Mar 28, 2026

Copy link
Copy Markdown
Author

Can I just rewrite these docs for you? You arent a native english speaker right? Anyways, I commented here on some of the docs you could improve, but there's a lot of little grammatical changes I would make

You are more then welcome. My English is not on a level that Exiled works with, so any gramatical changes are great.

@Someone-193 Someone-193 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I changed the docs myself. Verify this still works btw @Saskyc, I tried to use some better properties in TryMoveRelative

@louis1706 louis1706 requested a review from VALERA771 June 14, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants