Anti Combat Logging System [anticombatlog]

User avatar
sparky
Member
 
Posts: 121
Joined: Sun Oct 05, 2014 00:54
Location: USA
IRC: ircSparky
In-game: sparky

Anti Combat Logging System [anticombatlog]

by sparky » Thu Apr 26, 2018 17:26

This is a mod that is good for pvp servers where players often log off when they are being killed by another player, in order to avoid losing items, or to avoid any other negative aspects of dying. Also known as "Combat Logging"

Image
(a player entering combat with a rifle)

How it works:
When a player punches another player, both players are in combat for a set time. (default 15 seconds)
A double swords icon will show up on each player's screen, indicating they are in combat, as shown in the pic.

if a player leaves while in combat, a "ghost" entity will be spawned, and remain until it has been 15 seconds since the last hit was taken or given.

The ghost has the same hp and armor values as the player did. Kill the ghost object to have all of their items drop.
when the combat logging player comes on next they will loose all their items and die.

if the player logs back on before the ghost disappears, the player will be whatever HP the ghost is, and will be in combat until the ghost would have otherwise disappeared. (15 seconds after the last hit taken or given)

In effect, the player is forced to stay online until they are out of combat. (though the client itself is disconnected)

Notes:
I might make a demonstration video sometime.
If the ghost entity is unloaded, it will despawn.
ATM there is only support for skins mod with 3d_armor
When you kill a "ghost" stuff will drop like dropondie, no usage of bones is supported yet.
It is only for pvp at the moment, pve combat with mobs or taking fall damage does not enter combat.
you can make the combat time longer or shorter with the "battletimeout" variable at the start of init.lua
I did have a mod that I edited, but I don't remember it's name, and most of the code is mine anyways. tell me if you find it.

As with any new mod, report any bugs and/or duped items here, git, or wherever.
And thanks to the minetest irc community for helping with solving problems.

Download: download latest or browse code
Last edited by sparky on Thu Apr 26, 2018 18:03, edited 1 time in total.
-"Never look down on someone unless you're helping them up"
 

Chem871
Member
 
Posts: 810
Joined: Sat Aug 19, 2017 21:49
Location: Ankh-Morpork, Sometimes the Nether
GitHub: Chemguy99
In-game: Chem Nyx
 

User avatar
Stix
Member
 
Posts: 1236
Joined: Fri Aug 04, 2017 14:19
Location: USA
IRC: Stix + Stix_
In-game: Stix

Re: Anti Combat Logging System [anticombatlog]

by Stix » Thu Apr 26, 2018 20:06

Chem871 wrote:Would be perfect for Skywars, good deterrent for wimps who run away at the slightest touch.

yes ill waste food fighting a guy and just as im gonna kill em they leave, i also have ppl immeidately log out on first damage, but there can be a reason, i was in a fight with enrico and was winning but then server lag cauzed me to teleport all over the place and i couldnt get a hit in, so i reconnected.
Hello, profile stalker...
Need to know something? "Google it" --GreenDimond
Next release of your favorite game? "Bugfixes" --Wuzzy
[OLD]The new Minetest-offtopic can be found here: https://minetestoftopic.createaforum.com/index.php
 

User avatar
sparky
Member
 
Posts: 121
Joined: Sun Oct 05, 2014 00:54
Location: USA
IRC: ircSparky
In-game: sparky

Re: Anti Combat Logging System [anticombatlog]

by sparky » Thu May 17, 2018 23:52

wimps can still run away, they just can't disconnect to do so. :P

(also, 100th post, yay)
-"Never look down on someone unless you're helping them up"
 


Return to WIP Mods



Who is online

Users browsing this forum: DoyleChris and 6 guests