[Mod] More Chests [0.0] [chests_0gb_us]

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Sat Jan 19, 2013 12:16

I got that already. But what keep one from using some file with tables to store inventories? Just like sethome or warps mods do? (they're storing, but not inventories)
If the inventory's owner is not online, then files should be used anyway so when he/she'll come back he/she would get his/her stuff back.
Last edited by 4aiman on Sat Jan 19, 2013 12:19, edited 1 time in total.
 

User avatar
Chinchow
Member
 
Posts: 683
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Sat Jan 19, 2013 13:13

Ogb.us if you do make a follower with an inventory could you post here please? Since technically it is a chest
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
 

User avatar
0gb.us
Member
 
Posts: 841
Joined: Sun Sep 16, 2012 01:55

by 0gb.us » Sun Jan 20, 2013 12:06

Yes, I'll post it if I figure it out.

The problem with storing it in a file, is there would need to be some sort of unique identifier for each following chest. Insuring no is no identifier reuse in a non-hacky way would be difficult to figure out. Not only that, but I still haven't figured out how to save an inventory to a file, which I also need for that mega wifi chest.

The wifi chest will happen, I just need time to figure it out, but I'm not sure the following chest can be done very well. I'll try when I can, but I have a lot to work on right now.
 

rarkenin
Member
 
Posts: 668
Joined: Tue Nov 20, 2012 20:48

by rarkenin » Sun Jan 20, 2013 13:43

0gb.us wrote:Yes, I'll post it if I figure it out.
Not only that, but I still haven't figured out how to save an inventory to a file, which I also need for that mega wifi chest.


UUIDs aren't hacky... Just give each chest a UUID.
Admin pro tempore on 0gb.us:30000. Ask me if you have a problem, or just want help.
This is a signature virus. Add me to your signature so that I can multiply.
Now working on my own clone, Mosstest.
I guess I'm back for some time.
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Sun Jan 20, 2013 14:49

Why not use player's name? One server - one 4aiman, one 0gb.us etc. The authentication using password when connecting to a server will ensure that 4aiman is 4aiman. Or at least someone who stole 4aiman's password if he's stupid enough to tell that to anyone.
Also you can cycle through the entities and check for 2 things: is this a chest? does it belongs to the disconnected player?
If both is yes then receive inventory via minetest.get_inventory()
and then cycle through the stacks of list by the name "main" to save name and count into the file. (Minetest can't serialize invref atm)

Edit:
Idea: before killing an entity, create a chest (maybe invisible and/or locked and/or not walkable) and store entity's inventory there
Last edited by 4aiman on Sun Jan 20, 2013 15:13, edited 1 time in total.
 

User avatar
0gb.us
Member
 
Posts: 841
Joined: Sun Sep 16, 2012 01:55

by 0gb.us » Sun Jan 20, 2013 17:00

rarkenin wrote:
0gb.us wrote:Yes, I'll post it if I figure it out.
Not only that, but I still haven't figured out how to save an inventory to a file, which I also need for that mega wifi chest.


UUIDs aren't hacky... Just give each chest a UUID.


IDs aren't hacky, but I don't know a non-hacky way to make sure they are unique.

4aiman wrote:Why not use player's name? One server - one 4aiman, one 0gb.us etc. The authentication using password when connecting to a server will ensure that 4aiman is 4aiman. Or at least someone who stole 4aiman's password if he's stupid enough to tell that to anyone.
Also you can cycle through the entities and check for 2 things: is this a chest? does it belongs to the disconnected player?
If both is yes then receive inventory via minetest.get_inventory()
and then cycle through the stacks of list by the name "main" to save name and count into the file. (Minetest can't serialize invref atm)

Edit:
Idea: before killing an entity, create a chest (maybe invisible and/or locked and/or not walkable) and store entity's inventory there


Using the player's name causes it to only be possible for a player to have a single following chest, not multiple following chests. At that point, we might as well store the inventory in the player. So yes, there is only one 4aiman, but there in not necessarily only one following chest belonging to 4aiman.

The invisible chest would be hacky. Particularly because the chest would have to be not buildable_to, to prevent item loss. And it might be underwater. So we would have an odd patch of air that liquids can't flow through, and which cannot be built in. And if someone calls /clearobjects while people are logged in, those people are out of luck, and their chest contents are lost no matter what they do.

Thanks for the pseudo-serialization technique! No wonder I couldn't find it in the documentation when I was looking for it.
 

Ragnar
Member
 
Posts: 850
Joined: Thu Oct 25, 2012 15:19

by Ragnar » Sun Jan 20, 2013 17:29

the WiFi chest should be called an ATM machine :D
it would make MUCH more sense :D
Are you saying that I put an abnormal brain into a seven and a half foot long, fifty-four inch wide GORILLA?
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Sun Jan 20, 2013 18:49

More than 1 following chests? O_o
That'll be totally COOL!!!
This way even offline one will be able to create his own glitching army-o-Wi-Fi-chests!
Well, that wouldn't glitch unless one wants a hundred and one minions ;)

I hadn't thought about buildable_to... there are a lot of unused space up in the sky. Well, forget I even mentioned that, 'cause using that IS hacky for sure :)
But the whole idea to create wi-fi chest instead of entity doesn't seem wrong to me - right now players have wifi chest as a block. So maybe make a compromise? When wifi chest is dug - create an entity of the following wi-fi chest. And if that get killed then add wifi chest to the player's inventory and store the contents of wifi chest in a bag (look into "bags" mod to depend on it or to take an idea of really vast inventory). The only difference with a bag will be the inaccessibility of the wi-fi chest contents from the inventory.

As for /clearobjects... Maybe we should create an "issue" at the github? Or ask someone, who can make a callback for "on_clear_objects", to do it? I got an impression that I'm somewhat annoying with my "issues", though.
It's only my suggestion, but I believe that not only /clearobjects should require a privilege but also have a parameter to specify the radius of the effect. Yes, we could simulate /clearobjects with radius, but I'm talking about changing /clearobjects itself.
How does /clearobjects works anyway? Anyone knows?
 

User avatar
0gb.us
Member
 
Posts: 841
Joined: Sun Sep 16, 2012 01:55

by 0gb.us » Sun Jan 20, 2013 19:18

Ragnar wrote:the WiFi chest should be called an ATM machine :D
it would make MUCH more sense :D


They're called ATMs, as "ATM machine" is redundant. "ATM" means "automatic teller machine". So an "ATM machine" would be an "automatic teller machine machine".

I'll talk to my partner about that, and see if he likes the name change. It may require a texture redesign, and he might like the current textures or current name better. I manage the code, but other than that, this is his plugin.

4aiman wrote:More than 1 following chests? O_o
That'll be totally COOL!!!
This way even offline one will be able to create his own glitching army-o-Wi-Fi-chests!
Well, that wouldn't glitch unless one wants a hundred and one minions ;)


Huh. You do have a point. While a bit cumbersome to work with, that would basically give players an unlimited inventory ....

4aiman wrote:I hadn't thought about buildable_to... there are a lot of unused space up in the sky. Well, forget I even mentioned that, 'cause using that IS hacky for sure :)
But the whole idea to create wi-fi chest instead of entity doesn't seem wrong to me - right now players have wifi chest as a block. So maybe make a compromise? When wifi chest is dug - create an entity of the following wi-fi chest. And if that get killed then add wifi chest to the player's inventory and store the contents of wifi chest in a bag (look into "bags" mod to depend on it or to take an idea of really vast inventory). The only difference with a bag will be the inaccessibility of the wi-fi chest contents from the inventory.


Okay. that sounds doable. We don't even need the bag code though. The wifi chest already stores its information outside the node, in the players themselves. By getting the entity to use that same inventory space, items will not be lost, and can be accessed from elsewhere, preserving the wifi chest's intended functionality.

I think maybe a button in the chest's formspec might be a better idea than having it follow every time it is dug. I'll direct Rarkenin to this topic when I see him, and see what he thinks.

4aiman wrote:As for /clearobjects... Maybe we should create an "issue" at the github? Or ask someone, who can make a callback for "on_clear_objects", to do it? I got an impression that I'm somewhat annoying with my "issues", though.
It's only my suggestion, but I believe that not only /clearobjects should require a privilege but also have a parameter to specify the radius of the effect. Yes, we could simulate /clearobjects with radius, but I'm talking about changing /clearobjects itself.
How does /clearobjects works anyway? Anyone knows?


Nah, I don't think it's an issue in Minetest, but us trying to do things that shouldn't be in the game anyway. Storing inventories in objects was always a bad idea. Even with a callback function, any preservation of entity inventories would only be doable in a hacky way, in my opinion.

As for /clearobects, all I know is that it's handled in C++, not Lua. The Lua command just calls a C++ command (and sends a couple chat messages), but I forget which one.
 

rarkenin
Member
 
Posts: 668
Joined: Tue Nov 20, 2012 20:48

by rarkenin » Sun Jan 20, 2013 19:22

Regarding WiFI chests->ATMs, I think that;s a great idea, so I;ll work on a texture redesign when I have time. Just the front, though.

Regarding UUIDs, they're known to be unique since they;re based on the MAC address of the machine, and the time, and it doesn't wrp around for years on end. Do something like rarkenin_UUID1, rarkenin_UUID2 using concatenation, or make a list of UUIDs for each player.
Admin pro tempore on 0gb.us:30000. Ask me if you have a problem, or just want help.
This is a signature virus. Add me to your signature so that I can multiply.
Now working on my own clone, Mosstest.
I guess I'm back for some time.
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Wed Jan 23, 2013 11:44

the download does not work for me. when i unzip it gives me a tar
Last edited by jojoa1997 on Wed Jan 23, 2013 11:45, edited 1 time in total.
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

User avatar
0gb.us
Member
 
Posts: 841
Joined: Sun Sep 16, 2012 01:55

by 0gb.us » Wed Jan 23, 2013 12:28

jojoa1997 wrote:the download does not work for me. when i unzip it gives me a tar


Try unziping the tar. If that doesn't work, let me know, and I'll start posting zip files in addition to tarballs.
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Wed Jan 23, 2013 12:45

i did and nothing came out
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

rarkenin
Member
 
Posts: 668
Joined: Tue Nov 20, 2012 20:48

by rarkenin » Wed Jan 23, 2013 13:55

jojoa1997 wrote:i did and nothing came out


The tarball works(or worked) for me.
Admin pro tempore on 0gb.us:30000. Ask me if you have a problem, or just want help.
This is a signature virus. Add me to your signature so that I can multiply.
Now working on my own clone, Mosstest.
I guess I'm back for some time.
 

User avatar
0gb.us
Member
 
Posts: 841
Joined: Sun Sep 16, 2012 01:55

by 0gb.us » Wed Jan 23, 2013 14:55

jojoa1997 wrote:i did and nothing came out


Okay, I'll upload a zip.

My web server is not currently set up to handle zip downloads right now. I need to recode some stuff, then I'll get the zip up. Although, I'm getting pressure to update four different plugins as well, so I can't get this up right away. I have a week off from school now though, so I'll get this done soon.

rarkenin wrote:
jojoa1997 wrote:i did and nothing came out


The tarball works(or worked) for me.


I know the tarball works, it's just a matter of whether or not Jojoa1997 has the software needed to open it. I'd rather not make people install extra software that they don't want, so I'll start uploading zips along with the tarballs. If that format doesn't work, I have a few other formats my computer will compress in, but if tarball and zip don't cover it, I'm not sure the other formats will help.
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Wed Jan 23, 2013 15:55

0gb.us wrote:Okay, I'll upload a zip.

My web server is not currently set up to handle zip downloads right now. I need to recode some stuff, then I'll get the zip up. Although, I'm getting pressure to update four different plugins as well, so I can't get this up right away. I have a week off from school now though, so I'll get this done soon.

Thank you and take your time.
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

User avatar
0gb.us
Member
 
Posts: 841
Joined: Sun Sep 16, 2012 01:55

by 0gb.us » Thu Jan 24, 2013 09:09

Okay, here we are: http://0gb.us/minetest/download.php?plugin=chests_0gb_us&zip

Please note that as I don't feel like keeping two archives of each past version, only tarballs of old versions will be available. A zip will only be provided for the very latest version.
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Thu Jan 24, 2013 12:21

0gb.us wrote:Okay, here we are: http://0gb.us/minetest/download.php?plugin=chests_0gb_us&zip

Please note that as I don't feel like keeping two archives of each past version, only tarballs of old versions will be available. A zip will only be provided for the very latest version.
thanks. will you be adding the link to the first post.
Last edited by jojoa1997 on Thu Jan 24, 2013 12:22, edited 1 time in total.
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Thu Jan 24, 2013 12:32

i get an error saying that Google chrome and internet explorer cant display the webpage. could you make a zip from omploader.
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

lord_james
Member
 
Posts: 51
Joined: Sun Mar 11, 2012 22:06

by lord_james » Thu Jan 24, 2013 13:21

0gb.us wrote:You know what? I think it is possible. Entities CAN have inventories. I don't know how to make one follow you though. I haven't done much with entities. I've only made one, which was static, and I didn't even completely make it on my own. Zeg9 made part of it.


So... It's just a theory. It's possible create a node that place a entity like a chest and this chest is animated when you see in the inventory, isn't it?
 

User avatar
0gb.us
Member
 
Posts: 841
Joined: Sun Sep 16, 2012 01:55

by 0gb.us » Thu Jan 24, 2013 21:37

jojoa1997 wrote:thanks. will you be adding the link to the first post.


At some point, once I get caught up with everything, yes.

jojoa1997 wrote:i get an error saying that Google chrome and internet explorer cant display the webpage. could you make a zip from omploader.


Internet Explorer has issues, so I wouldn't bat an eye at that, but I'm not sure why Chrome can't find it. Perhaps you hit the server at a bad time. The server shuts down for fifty minutes each day. I just checked though, and the link is working right now.

I will not be using Omploader, but I plan to migrate my stuff to Github when I have time, which I think will cover what you want from Omploader.

lord_james wrote:
0gb.us wrote:You know what? I think it is possible. Entities CAN have inventories. I don't know how to make one follow you though. I haven't done much with entities. I've only made one, which was static, and I didn't even completely make it on my own. Zeg9 made part of it.


So... It's just a theory. It's possible create a node that place a entity like a chest and this chest is animated when you see in the inventory, isn't it?


No, I wouldn't say it is just a theory. All the pieces are there, they just haven't been put together. We have cubic entities, entities with inventories, and entities that follow you. This is 100% doable, without a doubt. I probably don't have the skill to do it, but it CAN be done.

What do you mean by "animated when you see it in the inventory? I don't think things in your inventory can animate.
 

lord_james
Member
 
Posts: 51
Joined: Sun Mar 11, 2012 22:06

by lord_james » Thu Jan 24, 2013 22:20

I'm sorry, I tried to say that the entity's model do an animation (for example a opening a chest or whatever)
 

User avatar
0gb.us
Member
 
Posts: 841
Joined: Sun Sep 16, 2012 01:55

by 0gb.us » Fri Jan 25, 2013 04:50

lord_james wrote:I'm sorry, I tried to say that the entity's model do an animation (for example a opening a chest or whatever)


I think it could be done, especially with the unstabe version's API, which includes an on_rightclick option (I may have the name wrong). But I'm more into functionality than ascetics, so I'm not going to try my hand at this. I'm still not even convinced 3D players were worth the trouble to code! I mean, it's not like they bother me or anything, they just don't seem to be good for anything. The same applies to animated chest lids.

PilzAdam wrote:
Josh wrote:
cornernote wrote:PilzAdam, bet you can't make an animated opening chest. ;)


I wonder if he is up for the challenge?

As I said: convince me that this is useful.


As PilzAdam said, you'd need to convince someone that they would somehow be useful before you can get them to build it.
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Fri Jan 25, 2013 11:10

i can help you with entities chasing people. though not with following a specific person
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Fri Jan 25, 2013 12:01

jojoa1997 wrote:i can help you with entities chasing people. though not with following a specific person

You missed my post about this, jojoa1997 ;)
All you need to do is to set an additional property inside every chest to mark it's owner.
Then instead of cycling through all of the players you should get player by name and follow him.

As for 3d players - there is one big plus: we can see now if someone is digging or not. Sometimes that helps a lot to know who has dug the block beneath you without asking admins about that.
Animated lids... well, that just adds "prettiness" and the whole game looks more professional to many peoples, especially non developers.
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Fri Jan 25, 2013 12:05

4aiman wrote:
jojoa1997 wrote:i can help you with entities chasing people. though not with following a specific person

You missed my post about this, jojoa1997 ;)
All you need to do is to set an additional property inside every chest to mark it's owner.
Then instead of cycling through all of the players you should get player by name and follow him.

As for 3d players - there is one big plus: we can see now if someone is digging or not. Sometimes that helps a lot to know who has dug the block beneath you without asking admins about that.
Animated lids... well, that just adds "prettiness" and the whole game looks more professional to many peoples, especially non developers.
ok but i still dont know what property make
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Fri Jan 25, 2013 12:12

Look into the boats mod or my prototype of 3d armor ;)
 

User avatar
GloopMaster
Member
 
Posts: 213
Joined: Wed Aug 01, 2012 18:03

by GloopMaster » Fri Jan 25, 2013 15:26

An animated opening chest only costs FPS for no gain.

Seeing as minetest already runs at 20fps or so, what's the point?
Meow.

That is all.
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Fri Jan 25, 2013 18:53

GloopMaster wrote:An animated opening chest only costs FPS for no gain.

Seeing as minetest already runs at 20fps or so, what's the point?

As always that should be configurable.
Besides it's natural that more advanced graphics demands more powerful PC. Do not need=play as it is, DO need = enable and enjoy useless, but nice effects.
As an old consoles geek I'd say that graphics aren't that important, but nice graphics make already awesome game prettier. This matters when spoiled by HD graphics user refuses to play a good game "just because there are no animations". Yep, it's them who suffer by not giving that kind of a game any chance, not we. But if animated things would bring more contributors or payers - then animation definitely should be implemented.
 

lord_james
Member
 
Posts: 51
Joined: Sun Mar 11, 2012 22:06

by lord_james » Fri Jan 25, 2013 21:13

0gb.us wrote:
lord_james wrote:I'm sorry, I tried to say that the entity's model do an animation (for example a opening a chest or whatever)


I think it could be done, especially with the unstabe version's API, which includes an on_rightclick option (I may have the name wrong). But I'm more into functionality than ascetics, so I'm not going to try my hand at this. I'm still not even convinced 3D players were worth the trouble to code! I mean, it's not like they bother me or anything, they just don't seem to be good for anything. The same applies to animated chest lids.

PilzAdam wrote:
Josh wrote:
I wonder if he is up for the challenge?

As I said: convince me that this is useful.


As PilzAdam said, you'd need to convince someone that they would somehow be useful before you can get them to build it.


GloopMaster wrote:An animated opening chest only costs FPS for no gain.

Seeing as minetest already runs at 20fps or so, what's the point?


Well... It's only a suggestion (brainstorming), so... "don't worry, be happy" ;) I think that it's a gameplay feature: the opened chest warns to other players if a player is searching in the chest. It's possible find another way to add this feature, and more FPS friendly, but I like it. In the another hand, it's a step for anothers coders for using it in another way.

I'll tell you a secret: I love 2d players (like infiniminers) because look like more "vintage" or "retro" than 3d players, but I hope improvements for both features because I also like variety ;)
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 57 guests

cron