Leave corpse on exit

by Pi-C

In multiplayer games, corpses will be created for the characters of players who leave or are permanently removed from the game.

Content
a month ago
1.1
35
Storage

Changelog

Version: 1.1.2
Date: 2024-05-27

  Bugfixes:
    - Fixed crash caused by trying to access an uninitialized table. (https://mods.factorio.com/mod/leave_corpse_on_exit/discussion/6650098d06adf5e81bfe0bb4)
    - Fixed crash in migration script.

  TODO:
    - Ignore characters from "Avatars" mod?
    - Back up inventory if player is switching to editor mode?
Version: 1.1.1
Date: 2024-05-04

  Bugfixes:
    - Added missing strings to the German locale.
    - Fixed that wrong surface was passed on when chart tag for an invalid corpse was changed.
    - Fixed that some uninitialized variables were used, and removed several unused variables.
    - Disabled debugging code that would create forces/surfaces for testing purposes, assign new players to a testing force and put them on a testing surface.

  Changes:
    - Added player setting allowing to opt out of receiving messages printed to force.
    - Players on force will be informed when a corpse has disappeared (restored to returning player, mined, or expired).
    - Reduced number of calls to functions checking whether optional events handlers are needed.
    - All portals are now registered for on_entity_destroyed so we can remove the chart tags immediately even if they are removed by other mods that don't raise an event.
    - Added migration script to register existing portals for on_entity_destroyed.
Version: 1.1.0
Date: 2024-04-23

  Info:
    - Initial Release
    - When a player is leaving a multiplayer game, or is permanently removed from the game, a corpse will be created for all items of the player character and for each associated character the player may have. Unless such a corpse has been looted by another player, or has expired (time_to_live is 2^32 -1 ticks, about 828 real-time days!), the remaining items will be returned to the main/associated character when the player rejoins the game.
    - You can build portals to the central burial site of your force. If players die or leave the game while they are on a surface where their force has a portal, the corpse will be moved to the central burial site.

  Credits:
    - I've stolen the Battle Marker graphics from Natural Evolution Buildings for the portals. :-)