Mods / dummyPlayer - pvp anti-leave

Tags: #Other #Tweak
Author: KenigVovan
Side: Both
Created: Feb 5th 2022 at 8:39 PM
Last modified: 5 days ago
Downloads: 10342
Follow Unfollow 17

Recommended download (for Vintage Story 1.21.5):
dummyplayer_1.4.1.zip  1-click install


Mod adds behavior "pvp tag" - if you hit another player or you are attacked - next X seconds you are in a combat state.

If you leave during this state, clone entity will be spawned on the same place with your current health. This entity will have
items in it's enventory depending on setting (can be bags, hotbar etc, more info below). If entity is killed it drops everything it
has from source player entity. On next login of the player(whose clone entity was killed) is killed as well.

If entity wasn't killed, only player's health will be changed to clone's one if it changed.

There is time period after clone will be despawn - 30 sec by default.

 

Big thanks to jakecool19 for very useful example in "Lands of Chaos" mod (https://news.kalataka.ru/show/mod/847)

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

Videos:

How it works

 

KILL_AFTER_LOGIN - if true - player will be killed if his clone was killed and inventories which were selected by settings will be cleared for player

DROP_BAGS, DROP_HOTBAR, DROP_CLOTHS, DROP_ARMOR - if true, copy of inventory will be placed in the clone, if player logout during combat

SECONDS_PVP_TAG_TIMER - how long pvp state is active for player after he attacked or was attacked

TIME_TO_DISAPPEAR - how long clone will exist

By default: 

  1. DROP_HOTBAR and DROP_BAGS are true; DROP_CLOTHS and DROP_ARMOR are false;
  2. KILL_AFTER_LOGIN is true
  3. SECONDS_PVP_TAG_TIMER - 30 seconds
  4. TIME_TO_DISAPPEAR - 30 seconds

Mod Version Mod IdentifierFor Game version Downloads Released Changelog Download 1-click mod install*
1.4.1 dummyplayer 11 5 days ago dummyplayer_1.4.1.zip 1-click install
1.4.0 dummyplayer 800 Aug 26th at 8:11 PM dummyplayer_1.4.0.zip 1-click install
  • EntityClonePlayer now has it's own clothes behavior cloneinventory
1.3.4 dummyplayer 490 Jul 15th at 3:36 PM dummyplayer_1.3.4.zip 1-click install
  • fix for clones
  • hud image
1.3.3 dummyplayer 700 Mar 29th at 7:57 AM dummyplayer_1.3.3.zip 1-click install
  • client crash fixed
1.3.2 dummyplayer 322 Feb 15th at 11:35 AM dummyplayer_1.3.2.zip 1-click install
  • PlayerCorpseCompat logout crash fix
1.3.1 dummyplayer 118 Nov 19th 2024 at 5:37 PM dummyplayer_1.3.1.zip 1-click install
  • CLONE_IS_DAMAGABLE to set clones immortal
1.3.0 dummyplayer 78 Nov 19th 2024 at 4:38 PM dummyplayer_1.3.0.zip 1-click install
  • SPAWN_CLONE_ON_PLAYER_LEAVE added
1.2.5 dummyplayer 123 Oct 25th 2024 at 4:16 PM dummyplayer_1.2.5.zip 1-click install
  • compatibility with PlayerCorpse
1.2.4 dummyplayer 964 May 9th 2024 at 3:45 PM Empty dummyplayer_1.2.4.zip 1-click install
1.2.3 dummyplayer 998 Nov 16th 2023 at 7:26 PM dummyplayer_1.2.3.zip 1-click install
  • structures save moved to GameWorldSave event
1.2.2 dummyplayer 176 Nov 15th 2023 at 10:34 PM dummyplayer_1.2.2.zip 1-click install
  • DamageSource added to player.Entity.Die call
  • /dummyplayer todie  - command to check which player will die on login
1.2.1 dummyplayer 1047 Aug 21st 2023 at 4:16 PM dummyplayer_1.2.1.zip 1-click install
  • net7
1.2.0 dummyplayer 910 Apr 26th 2023 at 5:24 PM Empty dummyplayer_v1.2.0.zip 1-click install
1.1.1 dummyplayer 722 Nov 13th 2022 at 1:50 PM Empty dummyplayer_v1.1.1.zip 1-click install
1.1.0 dummyplayer 273 Jul 9th 2022 at 2:58 PM Empty dummyplayer_v1.1.0.zip 1-click install
1.0.4 dummyplayer 1197 May 1st 2022 at 7:57 AM dummyplayer_v1.0.4.zip 1-click install

- after TIME_TO_DISAPPEAR clone of the player will disappear

1.0.3 dummyplayer 277 Mar 27th 2022 at 11:37 AM dummyplayer_v1.0.3.zip 1-click install

config options

1.0.2 dummyplayer 447 Mar 5th 2022 at 10:27 PM Empty dummyplayer_v1.0.2.zip 1-click install
1.0.1 dummyplayer 307 Mar 4th 2022 at 3:41 PM Empty dummyplayer_v1.0.1.zip 1-click install
1.0.0 dummyplayer 343 Feb 5th 2022 at 8:40 PM Empty dummyplayer_v1.0.0.zip 1-click install

13 Comments (oldest first | newest first)

💬 AgataPrisma, Nov 24th at 7:37 PM

For some reason this mod is causing on online players a "shivering" effect. To find out the issue I tested turning on mods one by one and when turning this one the effect started again. The "shivering" effect on players is only visible on other clients, not on self. and looks like if the player was lagged, even when the player is standing still, it "vibrates" 

is this something known?

💬 Wahazar, Mar 21st at 1:11 PM

Is it possible to have setting causing dummy created whenever player is logged out, not just due to PVP tag?

Also maximal timer at least 24x longer or even indefinite.

I'm thinking about anti-theft server measure (together with interaction logger) - to avoid situation when player is just grabbing things to his inventory and logout himself.

💬 Raithe, Jan 24th at 5:48 AM

This is causing a crash with Player Corpse whenever we log out of the world.

Game Version: v1.20.1 (Stable)
1/23/2025 6:27:50 AM: Critical error occurred in the following mod: dummyplayer@1.3.1
Loaded Mods: brickmold@1.2.0, canoemod@1.0.2, combatoverhaul@0.1.9, craftablecompanion@1.2.0, dummyplayer@1.3.1, floralzonescaperegion@1.0.13, floralzonescaribbeanregion@1.0.10, floralzonescentralaustralianregion@1.0.7, floralzoneseastasiaticregion@1.0.5, floralzonesmediterraneanregion@1.0.3, floralzonesneozeylandicregion@1.0.6, caninae@1.0.25, capreolinae@1.2.1, casuariidae@1.0.17, dinornithidae@1.0.9, elephantidae@1.0.2, felinae@0.2.4, machairodontinae@1.0.18, pantherinae@1.1.18, rhinocerotidae@1.0.12, sirenia@1.0.13, vombatidae@0.1.1, millwright@1.1.8, pipeleaf@1.10.0, primitivesurvival@3.7.5, repairablelocust@1.4.0, Sergsmetaltongs@2.0.0, spyglass@0.5.2, terraprety@6.0.1, upgradeablelocust@1.0.3, game@1.20.1, vsimgui@1.1.7, AgeOfConfession@2.1.3, alchemy@1.6.42, armory@0.1.1, flags@1.1.5, betterruins@0.4.6, butchering@1.7.8, cancrops@0.2.11, canmarket@0.4.8, carryon@1.8.0-pre.1, coinage@1.12.1, commonlib@2.6.1, configlib@1.4.3, decayingcreatures@0.1.2, fieldsofsalt@1.2.2, fromgoldencombs@1.8.2, gourmand@1.5.0, hardcorewater@1.3.2, herbarium@1.4.0, hydrateordiedrate@1.7.1, liquidcontainers@1.3.1, maltiezcrossbows@0.6.1, moreanimals@1.3.6, noticeboard@1.1.0, petai@3.0.1, playerlist@2.1.5, pysicalmap_tk@1.0.0, rivers@4.1.0, rpgdifficulty@1.1.4, smithingplus@1.1.8, SoundOfConfession@1.0.4, stonebakeoven@1.1.4, tentbag@2.2.0, th3dungeon@0.4.0, thievery@1.0.0, trailmodcupdate@1.2.0, traitacquirer@0.9.6, unconscious@1.8.3, creative@1.20.1, survival@1.20.1, wearandtear@1.1.6, wildfarmingrevival@1.3.4, woodenfortifications@1.0.0, xlib@0.8.9, bookbinders@1.3.0-pre.1, em@3.0.0, playercorpse@1.11.0, shearlib@1.1.1, stonequarry@3.4.2, thebasics@5.0.1, wolftaming@3.0.2, xdiseases@0.1.0, xskills@0.8.10, tailorsdelight@1.8.0, wool@1.5.1
System.NullReferenceException: Object reference not set to an instance of an object.
at dummyplayer.src.compat.playercorpse.PlayerCorpseCompat.ShouldLoad(EnumAppSide forSide) in C:\Users\koeni\source\repos\dummyplayer_7\dummyplayer\dummyplayer\dummyplayer\src\compat\playercorpse\PlayerCorpseCompat.cs:line 28
at Vintagestory.Common.ModLoader.RunModPhase(List`1& enabledSystems, ModRunPhase phase) in VintagestoryLib\Common\API\ModLoader.cs:line 576
at Vintagestory.Common.ModLoader.RunModPhase(ModRunPhase phase) in VintagestoryLib\Common\API\ModLoader.cs:line 564
at Vintagestory.Common.ModLoader.Dispose() in VintagestoryLib\Common\API\ModLoader.cs:line 668
at Vintagestory.Client.NoObf.SystemModHandler.Dispose(ClientMain game) in VintagestoryLib\Client\Systems\ModHandler.cs:line 253
at Vintagestory.Client.NoObf.ClientMain.Dispose() in VintagestoryLib\Client\ClientMain.cs:line 2700
at Vintagestory.Client.NoObf.ClientMain.DestroyGameSession(Boolean gotDisconnected) in VintagestoryLib\Client\ClientMain.cs:line 2647
at Vintagestory.Client.NoObf.GuiDialogEscapeMenu.OnLeaveWorld() in VintagestoryLib\Client\Systems\Gui\Dialogs\GuiDialogEscapeMenu.cs:line 349
at Vintagestory.API.Client.GuiComposer.OnMouseUp(MouseEvent mouse) in VintagestoryApi\Client\UI\GuiComposer.cs:line 445
at Vintagestory.API.Client.GuiDialog.OnMouseUp(MouseEvent args) in VintagestoryApi\Client\UI\Dialog\GuiDialog.cs:line 591
at Vintagestory.Client.NoObf.GuiDialogEscapeMenu.OnMouseUp(MouseEvent args) in VintagestoryLib\Client\Systems\Gui\Dialogs\GuiDialogEscapeMenu.cs:line 422
at Vintagestory.Client.NoObf.GuiManager.OnMouseUp(MouseEvent args) in VintagestoryLib\Client\Systems\Gui\GuiManager.cs:line 415
at Vintagestory.Client.NoObf.ClientMain.OnMouseUpRaw(MouseEvent args) in VintagestoryLib\Client\ClientMain.cs:line 1960
at Vintagestory.Client.GuiScreenRunningGame.OnMouseUp(MouseEvent args) in VintagestoryLib\Client\MainMenu\Screens\GuiScreenRunningGame.cs:line 357
at Vintagestory.Client.NoObf.ClientPlatformWindows.Mouse_ButtonUp(MouseButtonEventArgs e) in VintagestoryLib\Client\ClientPlatform\Input.cs:line 208
at OpenTK.Windowing.Desktop.NativeWindow.MouseButtonCallback(Window* window, MouseButton button, InputAction action, KeyModifiers mods)
--- End of stack trace from previous location ---
at OpenTK.Windowing.Desktop.NativeWindow.RethrowCallbackExceptionsIfNeeded()
at OpenTK.Windowing.Desktop.GameWindow.Run()
at Vintagestory.Client.ClientProgram.Start(ClientProgramArgs args, String[] rawArgs) in VintagestoryLib\Client\ClientProgram.cs:line 334
at Vintagestory.Client.ClientProgram.<>c__DisplayClass10_0.<.ctor>b__1() in VintagestoryLib\Client\ClientProgram.cs:line 130
at Vintagestory.ClientNative.CrashReporter.Start(ThreadStart start) in VintagestoryLib\Client\ClientPlatform\ClientNative\CrashReporter.cs:line 93

 

 

💬 KenigVovan , Oct 25th 2024 at 4:17 PM

Wahazar

Hey, I don't know if you still need compatibility with PlayerCorpse, but 1.2.5 version should work with it

💬 Wahazar, Aug 4th 2024 at 6:33 PM

KenigVovan this mod doesn't work with Player Corpse mod - if dummy player is killed, it drops items. I imagine it is not possible to fix without having have Player Corpse functionality integrated within this mod?

💬 Wahazar, Jul 25th 2024 at 8:48 AM

Is it possible to have version/config leaving dummy player always, regardles of PVP flag?

Also for infinity time, if TIME_TO_DISAPPEAR = -1

It would be very helpful for multiplayer servers to deal with thieves, griefers or just causal players borrowing things and quitting forever - if their dummy stays, their inventory also stays on server.

Also solid house with padlocks would be even more important for regular players, to be here on logout.

💬 KenigVovan , Jul 7th 2024 at 9:39 AM

Wahazar

The main unknown here is chunk loader's behavior when there is no players left on server/in near area, I'll take a look when I'll have time but after updates I planned for other mods.
[But otherwise to set drifters or other mobs agressive towards player's clone and add "delay" on logout without any PVP tag shouldn't be complicated.]

💬 Wahazar, Jul 5th 2024 at 8:10 AM

Is it possible to have option with dummy player (and chunk loader) regardless of PVP tag? I mean, to avoid PVE meta "drifter attacking? lets disconnect".

💬 Marlim, Jan 20th 2024 at 5:50 PM

Will the mod be updated to 1.19?

💬 KenigVovan , Aug 13th 2023 at 4:01 PM

Ryuu

No, it just catchs event "PlayerDisconnect" from api and spawn a clone and remove it after some time or if player is back online on "PlayerNowPlaying"

💬 Mogadis, Aug 8th 2023 at 7:35 PM

Great solution for people wanting to go pve on a pvp server or pve in a pvp zone on a pvpve server to avoid PVP. If ya don't like PVP, why join a PVP game/server, you know? I know a lot of other games that could learn from this mod tbh. Thanks, KenigVovan! 
A question though, does it detect players with unstable internet and allow sufficient time for the player to log back in before the clone is attackable?

💬 YourCreator, May 1st 2022 at 11:01 AM

Very useful, noice. (thieved silently )
image

💬 TeacupAngel, Feb 5th 2022 at 11:15 PM

In case anyone is curious - this seems to add PvP tag functionality, where you leave behind a "dummy player" with all your items if you log out within 30 seconds of being hurt or attacking someone.

 (edit comment delete)
Основной веб-сайт | Почтовый сервер | FTP сервер | Административная панель | API интерфейс | Content Delivery Network | Статические файлы | Ресурсы сайта | Изображения | Файловое хранилище | Блог | Интернет-магазин | Техническая поддержка | Справочная система | Документация | Форум | Новости | Загрузки | Демонстрация | Тестовая среда | Приложение | Медиа контент | Разработка | Промежуточная среда | Бета версия | Безопасная зона | Вход в систему | Панель управления | Портал | Система управления контентом