Page 1 of 2

[Request] On death, spawn a box with inventory of player

Posted: Wed Dec 10, 2014 10:30 am
by kyranzor
When you die, you unfortunately lose everything you had on you. Perhaps for multiplayer games in particular (seeing as singleplayer literally stops when you die hehe) it would be cool for a death-chest, of all your inventory, to spawn when you die.

I'm not sure if there is a lua hook for something like OnPlayerDeath and you can scan the contents of the player's inventory and copy it into the inventory of a wooden box/iron chest at the position of the player when they die, would be handy.

Re: [Request] On death, spawn a box with inventory of player

Posted: Wed Dec 10, 2014 4:29 pm
by berni1212
Would be cool but what Happens if u die from an train ?

Re: [Request] On death, spawn a box with inventory of player

Posted: Wed Dec 10, 2014 4:32 pm
by AlphaRaptor
berni1212 wrote:Would be cool but what Happens if u die from an train ?
The Chest is under the Track , DONE

Re: [Request] On death, spawn a box with inventory of player

Posted: Wed Dec 10, 2014 5:00 pm
by kyranzor
If you die from a train, then perhaps the lua script can just use a simple 3x3 search grid during the placement of the chest code, to find a valid position if (and only if) the player was standing on something that a chest can't be placed on. If the 3x3 search fails to find a valid position, then it can all abort and you lose your shit

Re: [Request] On death, spawn a box with inventory of player

Posted: Wed Dec 10, 2014 6:20 pm
by berni1212
thats true :) Would be cool because i died like 10 times on trains now :/ :mrgreen: :mrgreen:

Re: [Request] On death, spawn a box with inventory of player

Posted: Wed Dec 10, 2014 9:54 pm
by L0771
I take this :D

EDIT: It is a "virtual" box (only you can take this), implemented in Cursed v0.0.10

Re: [Request] On death, spawn a box with inventory of player

Posted: Wed Dec 10, 2014 10:27 pm
by berni1212
L0771 wrote:I take this :D

EDIT: It is a "virtual" box (only you can take this), implemented in Cursed v0.0.10
Can u make this one in an Extra Mod too like only the Death chest and MP compatible ?

Re: [Request] On death, spawn a box with inventory of player

Posted: Thu Dec 11, 2014 12:43 am
by L0771
berni1212 wrote:
L0771 wrote:I take this :D

EDIT: It is a "virtual" box (only you can take this), implemented in Cursed v0.0.10
Can u make this one in an Extra Mod too like only the Death chest and MP compatible ?
I don't know :twisted:

Re: [Request] On death, spawn a box with inventory of player

Posted: Thu Dec 11, 2014 6:12 am
by berni1212
L0771 wrote:
berni1212 wrote:
L0771 wrote:I take this :D

EDIT: It is a "virtual" box (only you can take this), implemented in Cursed v0.0.10
Can u make this one in an Extra Mod too like only the Death chest and MP compatible ?
I don't know :twisted:
because i don't want to download cursed

Re: [Request] On death, spawn a box with inventory of player

Posted: Thu Dec 11, 2014 6:29 am
by L0771
berni1212 wrote:because i don't want to download cursed
I've finished, but for this post i will post it tomorrow :twisted:
I have a optimization problem and I'm sleepy, but it works

Re: [Request] On death, spawn a box with inventory of player

Posted: Thu Dec 11, 2014 11:58 am
by Damrus
Doesn´t the scrap mod drop all your items on the ground?

I'm not sure but atleast one of my mods makes it happen in MP. (I thought it was standerd).

Re: [Request] On death, spawn a box with inventory of player

Posted: Thu Dec 11, 2014 12:43 pm
by kyranzor
L0771 wrote:I take this :D

EDIT: It is a "virtual" box (only you can take this), implemented in Cursed v0.0.10
Cool, thanks for having a go at it L0771. It might be nicer to the community to separate it from your Cursed mod. That mod looks crazy btw.

Re: [Request] On death, spawn a box with inventory of player

Posted: Fri Dec 12, 2014 4:07 am
by L0771
Cursed Tombs

Version english/spanish, very optimized, only works if someone die.
I can't test it, if i have 2 factorio i play in 10fps...
The tomb have your items, if you get close to tomb, it give all your items again (included if you have a item in your hand i think).
Is a container (like a box), all can see and open the tomb, but only give her items to owner.

mmm the tomb is delete after 2-3 minutes, but it alert to owner 1 minute before this.

... I don't know if tomb is cute, i can't test XD is only theory ;)

Aaaand can use it without Cursed Exp, but it work better with both i think.

Re: [Request] On death, spawn a box with inventory of player

Posted: Fri Dec 12, 2014 5:48 am
by berni1212
L0771 wrote:Cursed Tombs

Version english/spanish, very optimized, only works if someone die.
I can't test it, if i have 2 factorio i play in 10fps...
The tomb have your items, if you get close to tomb, it give all your items again (included if you have a item in your hand i think).
Is a container (like a box), all can see and open the tomb, but only give her items to owner.

mmm the tomb is delete after 2-3 minutes, but it alert to owner 1 minute before this.

... I don't know if tomb is cute, i can't test XD is only theory ;)

Aaaand can use it without Cursed Exp, but it work better with both i think.

does it work with MP :?

Re: [Request] On death, spawn a box with inventory of player

Posted: Fri Dec 12, 2014 5:52 am
by L0771
berni1212 wrote:does it work with MP :?
Sorry, if you die in SP, you lose, it's only for MP.

Re: [Request] On death, spawn a box with inventory of player

Posted: Fri Dec 12, 2014 4:54 pm
by berni1212
L0771 wrote:
berni1212 wrote:does it work with MP :?
Sorry, if you die in SP, you lose, it's only for MP.
Thats good thanks men :)

is it tested that its not desync the game if mods are installed ?

Re: [Request] On death, spawn a box with inventory of player

Posted: Fri Dec 12, 2014 11:36 pm
by L0771
berni1212 wrote:
L0771 wrote:
berni1212 wrote:does it work with MP :?
Sorry, if you die in SP, you lose, it's only for MP.
Thats good thanks men :)

is it tested that its not desync the game if mods are installed ?
L0771 wrote:only works if someone die.
Can you kill someone with this mod installed? :evil:

This mod can't descync only for install it.

Re: [Request] On death, spawn a box with inventory of player

Posted: Sat Dec 13, 2014 12:36 pm
by berni1212
Thats good thanks men :)


Can you kill someone with this mod installed? :evil:

This mod can't descync only for install it.[/quote]


By some mods it is so when u install it and start game it Instand Desync :D



Thats why i asked it if i am back home i will try this mod with my friend does it work for 11.6 too ? :D

Re: [Request] On death, spawn a box with inventory of player

Posted: Sat Dec 13, 2014 1:53 pm
by L0771
berni1212 wrote:
L0771 wrote:Can you kill someone with this mod installed? :evil:
This mod can't descync only for install it.
By some mods it is so when u install it and start game it Instand Desync :D
Thats why i asked it if i am back home i will try this mod with my friend does it work for 11.6 too ? :D
It's ok, i only respond your question ;)
The code is very simple, it works with version 0.11.3 and later, i've started moding on this version, i don't know before this.

Re: [Request] On death, spawn a box with inventory of player

Posted: Sat Dec 13, 2014 7:19 pm
by berni1212
Does it work for 11.6 too ?