[MOD 0.12.30+][MP-Only] KeepInv (Keep inventory on death!)

Topics and discussion about specific mods
User avatar
bloc97
Inserter
Inserter
Posts: 47
Joined: Sat Apr 16, 2016 4:57 am
Contact:

[MOD 0.12.30+][MP-Only] KeepInv (Keep inventory on death!)

Post by bloc97 »

Type: Mod
Name: KeepInv
Description: Lets you keep your inventory on death in multiplayer games. However to balance things, you lose items in your quickbar and guns. (I might add option to select which to keep)
Code is BETA, I did not try to do anything unexpected. I only tested normal gameplay with 3 people. If you can find bugs, post them in this thread or on github.
Friends were always complaining why they lost everything when they died...
License: Image
Version:
Image
Release: 2016-04-20
Tested With Factorio: 0.12.30
Category: (Multiplayer)
Tags: Inventory, Multiplayer, Misc
Downloads:
Image
Links:
Image

*Should* Be compatible with inventory altering mods, if they use the same table as the vanilla inventory, but I do not guarantee that since each modder has its own ways to save the inventory.

Planned features:
Option to choose to keep Inventory, Quickbar and Guns on death.
Option to choose to drop chest with inventory on death.
Singleplayer respawn system?

Want to contribute to the mod? Send me a PM and I'll allow you to push on the repo, or just make a fork yourself, since its public domain.
License
Long description
Versionning
Last edited by bloc97 on Fri Apr 29, 2016 1:38 am, edited 2 times in total.
Image-Vehicles, Defense, Energy & More!
Image-Keep inventory on death!

Zjarek
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sat Apr 16, 2016 9:10 pm
Contact:

Re: [MOD 0.12.30+][MP-Only] KeepInv (Keep inventory on death!)

Post by Zjarek »

I experimented with player deaths and keeping inventory for respawning a player after encounter with a train, you can check it out here: http://pastebin.com/xNi8k0jy. One issue I can see is that more complicated items like power armor or blueprints won't be preserved in your mod.

User avatar
bloc97
Inserter
Inserter
Posts: 47
Joined: Sat Apr 16, 2016 4:57 am
Contact:

Re: [MOD 0.12.30+][MP-Only] KeepInv (Keep inventory on death!)

Post by bloc97 »

Zjarek wrote:I experimented with player deaths and keeping inventory for respawning a player after encounter with a train, you can check it out here: http://pastebin.com/xNi8k0jy. One issue I can see is that more complicated items like power armor or blueprints won't be preserved in your mod.
Yea, I didn't have much time to experiment fully, one issue I can think of with power armour is the equipment... It would be complicated to keep track of different power armours and their equipments. I might look at that code to improve the mod, but keep in mind that this is "public domain", and I can only use parts of your code if your code was public domain too.
Image-Vehicles, Defense, Energy & More!
Image-Keep inventory on death!

Zjarek
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sat Apr 16, 2016 9:10 pm
Contact:

Re: [MOD 0.12.30+][MP-Only] KeepInv (Keep inventory on death!)

Post by Zjarek »

Paraphrasing from CC0 site, I, Zjarek to the extent possible under law waive all copyright and related or neighboring rights to the code linked in previous post in this topic and licence it under CC0 1.0 Universal licence.

User avatar
bloc97
Inserter
Inserter
Posts: 47
Joined: Sat Apr 16, 2016 4:57 am
Contact:

Re: [MOD 0.12.30+][MP-Only] KeepInv (Keep inventory on death!)

Post by bloc97 »

Zjarek wrote:Paraphrasing from CC0 site, I, Zjarek to the extent possible under law waive all copyright and related or neighboring rights to the code linked in previous post in this topic and licence it under CC0 1.0 Universal licence.
Cool, I'll see how I can integrate your code in this mod. (Your layout is way cleaner anyway)

And if you (or anyone else reading this) wish to contribute to this mod, send me a PM and I'll add you to the list of contributors and allow you to push on the repo.
Image-Vehicles, Defense, Energy & More!
Image-Keep inventory on death!

Gromp
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Apr 27, 2016 11:38 am
Contact:

Re: [MOD 0.12.30+][MP-Only] KeepInv (Keep inventory on death!)

Post by Gromp »

What do i need to do to download this mod?
if i put this mod in and play the game on multiplayer. does it work? or do i need to put it on the server somehow? i mean. is it something that changes the client in a way that it remains vanilla? if so does it mean i can just download the mod and play without needing to put the mod in the server or without needing other people to download the mod as well?

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: [MOD 0.12.30+][MP-Only] KeepInv (Keep inventory on death!)

Post by daniel34 »

Gromp wrote:What do i need to do to download this mod?
if i put this mod in and play the game on multiplayer. does it work? or do i need to put it on the server somehow? i mean. is it something that changes the client in a way that it remains vanilla? if so does it mean i can just download the mod and play without needing to put the mod in the server or without needing other people to download the mod as well?
All the clients and the server need to have this mod, otherwise you'll get an error (Mod mismatch).

"MP-only" just means that this mod does nothing in singleplayer, because the game ends when you die.
(Although you could play a multiplayer game with you as the only player, then this mod would work.)
quick links: log file | graphical issues | wiki

Sado Mundo
Burner Inserter
Burner Inserter
Posts: 6
Joined: Thu Apr 28, 2016 4:27 pm
Contact:

Re: [MOD 0.12.30+][MP-Only] KeepInv (Keep inventory on death!)

Post by Sado Mundo »

Hi,

Nice mod, but in singleplayer I get an error after generating a new map:

_ _KeepInv_ _/control.lua:33: attempt to index field 'plydead' (a nil value)

So I can't start a game with this mod activated, I can load one, but then the replay is lost because of the change in mods.

Could this be fixed so i don't need to switch mods inbetween MP and SP?

*EDIT: Using Factorio 0.12.29

User avatar
bloc97
Inserter
Inserter
Posts: 47
Joined: Sat Apr 16, 2016 4:57 am
Contact:

Re: [MOD 0.12.30+][MP-Only] KeepInv (Keep inventory on death!)

Post by bloc97 »

Sado Mundo wrote:Hi,

Nice mod, but in singleplayer I get an error after generating a new map:

_ _KeepInv_ _/control.lua:33: attempt to index field 'plydead' (a nil value)

So I can't start a game with this mod activated, I can load one, but then the replay is lost because of the change in mods.

Could this be fixed so i don't need to switch mods inbetween MP and SP?

*EDIT: Using Factorio 0.12.29
Bug noted and fixed, thank you for reporting this.
You can download version 0.0.2, and you should have no issues playing singleplayer with the mod.
Image-Vehicles, Defense, Energy & More!
Image-Keep inventory on death!

Zaflis
Filter Inserter
Filter Inserter
Posts: 504
Joined: Sun Apr 24, 2016 12:51 am
Contact:

Re: [MOD 0.12.30+][MP-Only] KeepInv (Keep inventory on death!)

Post by Zaflis »

Update to 0.14 pls?

Post Reply

Return to “Mods”