[Mod] Backpacks [backpacks]

ThorfinnS
Member
Posts: 311
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod] Backpacks [backpacks]

by ThorfinnS » Post

We're using unifieddyes. I think it's still throwing a palette warning message but Vanessa didn't think it was a big enough deal to fix. No crash errors, anyway. Someday, I'll probably look into it and see if I can't get rid of the warning, but not today.

DreamGuardian
Member
Posts: 12
Joined: Wed Feb 13, 2019 02:10
In-game: Dream_Guardian

Re: [Mod] Backpacks [backpacks]

by DreamGuardian » Post

Sorry it took me forever to respond. I added the Unified Inventory Plus but still got this

2019-10-05 17:44:51: [Main]: Automatically selecting world at [C:\Users\Sandman\Downloads\minetest-5.0.1-win64 (1)\minetest-5.0.1-win64\bin\..\worlds\0001]
2019-10-05 17:45:20: WARNING[Main]: Undeclared global variable "dye" accessed at ... (1)\minetest-5.0.1-win64\bin\..\mods\backpacks\init.lua:84
2019-10-05 17:45:20: ERROR[Main]: ModError: Failed to load and run script from C:\Users\Sandman\Downloads\minetest-5.0.1-win64 (1)\minetest-5.0.1-win64\bin\..\mods\backpacks\init.lua:
2019-10-05 17:45:20: ERROR[Main]: ... (1)\minetest-5.0.1-win64\bin\..\mods\backpacks\init.lua:84: attempt to index global 'dye' (a nil value)
2019-10-05 17:45:20: ERROR[Main]: stack traceback:
2019-10-05 17:45:20: ERROR[Main]: ... (1)\minetest-5.0.1-win64\bin\..\mods\backpacks\init.lua:84: in main chunk
2019-10-05 17:45:20: ERROR[Main]: Check debug.txt for details.
2019-10-05 17:45:20: ACTION[Main]: Server: Shutting down
2019-10-05 17:45:30: ERROR[Main]: Please choose a name!

***EIDT***
I also added unified dyes mod too and still the same error

ThorfinnS
Member
Posts: 311
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod] Backpacks [backpacks]

by ThorfinnS » Post

Boy, you got me.

I just cloned backpacks into a fresh download of sfan5's latest build, enabled ONLY backpacks, unified_inventory and unified_inventory_plus (fresh as of an hour ago or so) and here's my entire debug.txt:

Code: Select all

2019-10-05 22:25:57: ACTION[Main]: World at [C:\games\mt\latest\bin\..\worlds\test2]
2019-10-05 22:25:57: ACTION[Main]: Server for gameid="minetest" listening on 0.0.0.0:53540.
2019-10-05 22:26:20: ACTION[Server]: singleplayer [127.0.0.1] joins game. 
2019-10-05 22:26:20: ACTION[Server]: singleplayer joins game. List of players: singleplayer
2019-10-05 22:26:53: ACTION[Main]: Server: Shutting down
In game, all I did was open inventory to verify backpacks were there. Must be some other mod causing problems.

[EDIT]
Actually, why don't you pull a fresh copy of backpacks. Line 84 is only coordinates of a nodebox. There's no reference to "dye" at all.
[/EDIT]

DreamGuardian
Member
Posts: 12
Joined: Wed Feb 13, 2019 02:10
In-game: Dream_Guardian

Re: [Mod] Backpacks [backpacks]

by DreamGuardian » Post

@ThorfinnS

Would you be referring to the bag that's built in to the minetest game? Because I wanted to also have backpacks that I can physically place and store in my inventory and chests.

User avatar
jas
Member
Posts: 593
Joined: Mon Jul 24, 2017 18:15
IRC: Freenode
Location: IRC

Re: [Mod] Backpacks [backpacks]

by jas » Post

There are many versions of this mod. https://github.com/everamzah/backpacks is more to the original version, and https://github.com/jastevenson303/backpacks is a more recent version. I'm using yet another version in Lavaland.

I was a part of the "everamzah" organization to retain URLs that taikedz created, thank you -- but I think I left that group for whatever reason, and can't push there? I'll check, and ask, and see what happens.

Most likely, though, I'll push whatever updates to github.com/jastevenson303/backpacks when I'm done. The version I use on Lavaland places and digs anywhere, ignoring protection. Another version allowed to open the backpack an additional way, by swinging it in your hand, but was a little prone to bugs.

I'll reply when I'm finished and I've published any changes. I, too, like to have a backpack that isn't a part of the player inventory, but instead part of the in-game world. Original, years ago when I created the first version, I gave the player an 8*1 hotbar-only inventory and a backpack. The backpack was the lower 8*3. When you removed the backpack, the lower 8*3 inventory remained with the backpack. Changing backpacks would change inventory. The idea was to incorporate this into the player model.

Sadly, I haven't revisited that idea in years. Thanks for the interest,
James

ThorfinnS
Member
Posts: 311
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod] Backpacks [backpacks]

by ThorfinnS » Post

DreamGuardian wrote:@ThorfinnS

Would you be referring to the bag that's built in to the minetest game? Because I wanted to also have backpacks that I can physically place and store in my inventory and chests.
No.
Backpacks
Backpacks
backpacks.png (37.38 KiB) Viewed 1412 times
This is what you mean, right?

Jas, your version has dye.dyes, but on line 86. I don't think that's what he's running, either.

DreamGuardian
Member
Posts: 12
Joined: Wed Feb 13, 2019 02:10
In-game: Dream_Guardian

Re: [Mod] Backpacks [backpacks]

by DreamGuardian » Post

@ThorfinnS

Yess! Thats the picture and yes I just used the link to the backpack you posted and it loaded straight through
https://github.com/jastevenson303/backpacks
I haven't crafted it yet in game but I'm sure it works. If you do happen to make or know even more ways or ideas for backpacks i would love to see more but this should be efficient enough for me.

I have two other questions

1 If you guys have any other ideas for mods related to camping can you point me to the right direction for them, i found something close to a tent (indian teepee) and a bonfire but is there some of these items around?

tent
makeshift items for survival
sleeping bag
perhaps something cool like a lean to shelter like this:
https://www.bushcraftspirit.com/wildern ... helter.png

2 If I ever come to an error that says "a nil value", is there a way I can fix it? And how do I find the line its asking for because I dont have any program and notepad doesnt show the exact line

Thank you gus for your time and patience

User avatar
jas
Member
Posts: 593
Joined: Mon Jul 24, 2017 18:15
IRC: Freenode
Location: IRC

Re: [Mod] Backpacks [backpacks]

by jas » Post

I used viewtopic.php?f=9&t=11517 a long while ago, and always remembered it. It's called Survival, by NathanS.

Update: Updated https://github.com/jastevenson303/backpacks

All I did was put a local copy of dyes.dye, pretty much. The version on Lavaland has an 8*3 inventory instead of 8*2, and the backpacks can be named. I didn't have it in me to add those features here. I figure the inventory size might benefit from a variable setting.

Sorry for all the versions.

ThorfinnS
Member
Posts: 311
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod] Backpacks [backpacks]

by ThorfinnS » Post

DreamGuardian wrote:2 If I ever come to an error that says "a nil value", is there a way I can fix it? And how do I find the line its asking for because I dont have any program and notepad doesnt show the exact line
If you are on Windows, I recommend Notepad++. Has all the features I want, plus it has search in files, so if I want to see an working example of something I can't get to work, I need only search the entire mods folder. Someone will have used it correctly. Nice feature. Used to be easy, starting with DOS 2.1 or so, but for some reason, MS decided to take find away.

But finding a nil value error means some variable didn't get properly initialized. Something wrong in the code, in older code, often a deprecated function that got fully phased out or someone renamed a node or something. Not that learning scripting is hard, just that it's almost always more than just going to that line and changing something.

Incidentally, one of the kids did some standalone code that makes backpacks function like regular old chests when used with hoppers. It's easier to add the single block of code into the original mod, sure, but if it's no longer being maintained... Anyway, if you would like to try it, I'll push it to my git.

jas, thanks for that. One of my coders wants to make a larger backpack. The idea is put your backpack in the middle square and surround it with 8 of the correct color wool and it becomes an 8x3. Further upgrades possible, so far as I know. Interested in a PR when it's done?

[EDIT]
Ooh, coding it both ways, letting the user change the size via settingtypes.txt OR defining new larger backpacks would be a good exercise. Think I'll recommend it to him.

Re: naming bags, are you talking about the same way that Shad changes the "name" of tools in his lib_trm or something else?
[/EDIT]

User avatar
jas
Member
Posts: 593
Joined: Mon Jul 24, 2017 18:15
IRC: Freenode
Location: IRC

Re: [Mod] Backpacks [backpacks]

by jas » Post

I am interested in PRs for sure. Submit them and there's a 99% chance it'll get merged, mainly because I don't use that mod and haven't maintained the repository.

I rename bags on lavaland like so:
Image
Image
Image

https://github.com/jastevenson303/Laval ... /backpacks
Attachments
screenshot_20191118_012954.png
screenshot_20191118_012954.png (501.01 KiB) Viewed 1412 times
screenshot_20191118_012959.png
screenshot_20191118_012959.png (564.72 KiB) Viewed 1412 times
screenshot_20191118_013002.png
screenshot_20191118_013002.png (513.96 KiB) Viewed 1412 times

ThorfinnS
Member
Posts: 311
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod] Backpacks [backpacks]

by ThorfinnS » Post

Oh, thanks! I'll pull that so he can take a look. A named backpack is a good thing. In fact, it might be a good codeblock to add to chests...

Quick question. Is there a reason your fork requires something to be directly under the bag, while the everamzah does not? One could place the everamzah backpack on the front of the window or mese lamp in your first screenshot, for instance, while the jas backpack would have to be placed on the next tile down, so its base is resting on the solid dirt node. A realism thing, or are there circumstances where it throws errors or what?

User avatar
jas
Member
Posts: 593
Joined: Mon Jul 24, 2017 18:15
IRC: Freenode
Location: IRC

Re: [Mod] Backpacks [backpacks]

by jas » Post

The lavaland version places anywhere, and you can dig it anywhere. If you place it on a buildable_to node, that node I believe adds its drops to the world when you place the backpack where the buildable_to node was (eg. grass).

Lavaland backpack is checking that its replacing air, and not some other more important node. It is weird. The idea anyway was simply to allow the backpack to be dug and placed anywhere regardless of protection. In the Glitchtest version, the backpack respected protection, and to allow players to access the backpack in protected areas, I added an on_use action that opened the bag when you swung it. Hecks, I believe at the time, informed me he was able to lose items with this version, so I didn't keep it in lavaland.

I'm rambling, good luck!

u34

Re: [Mod] Backpacks [backpacks]

by u34 » Post

Try adding sfinv support please.

Ignaramico
Member
Posts: 78
Joined: Fri Sep 04, 2020 21:23
GitHub: ignaramico

Re: [Mod] Backpacks [backpacks]

by Ignaramico » Post

cHyper wrote:
Tue Jan 26, 2021 09:44
Try adding sfinv support please.
if i understood correctly, your request would be against the main point of this mod, no? xD
it works more as portable chest than a inventory expansion

Is anyone else having trouble where if you send another item (the one with the shift+click) to the backpack when it is already full it still gets send, but to oblivion...

User avatar
Minix
Member
Posts: 144
Joined: Thu Nov 12, 2020 13:51
In-game: Minix

Re: [Mod] Backpacks [backpacks]

by Minix » Post

These backpacks are overpowered, you can take 32 backpacks in your inventory, having a total of 512 slots, maybe it is better to limit them to only one in the inventory at the same time.

Ignaramico
Member
Posts: 78
Joined: Fri Sep 04, 2020 21:23
GitHub: ignaramico

Re: [Mod] Backpacks [backpacks]

by Ignaramico » Post

Minix wrote:
Sun Feb 28, 2021 02:03
These backpacks are overpowered, you can take 32 backpacks in your inventory, having a total of 512 slots, maybe it is better to limit them to only one in the inventory at the same time.
Well, it is possible, but in personal use, i only use one for each color, or else the organization becomes a hassle.

User avatar
Minix
Member
Posts: 144
Joined: Thu Nov 12, 2020 13:51
In-game: Minix

Re: [Mod] Backpacks [backpacks]

by Minix » Post

I really like them though, I will probably inspect the code to implement something like only one bag per player at the same time.

Nordal
Member
Posts: 158
Joined: Mon Jul 30, 2018 15:46
GitHub: Nordall

Re: [Mod] Backpacks [backpacks]

by Nordal » Post

Ignaramico wrote:
Fri Mar 05, 2021 23:02
Minix wrote:
Sun Feb 28, 2021 02:03
These backpacks are overpowered, you can take 32 backpacks in your inventory, having a total of 512 slots, maybe it is better to limit them to only one in the inventory at the same time.
Well, it is possible, but in personal use, i only use one for each color, or else the organization becomes a hassle.
I agree with Ignaramico. I seldom use more than 4 backpacks. In practice it slows down playing too much using too many backpacks. I think everybody should decide himself how many backpacks he wants to use. I am not a friend of a programmatical restriction.
CFS - still widely unknown

ThorfinnS
Member
Posts: 311
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod] Backpacks [backpacks]

by ThorfinnS » Post

One of the students added support for Hoppers. (I forget if it was FaceDeer's (?) or TenPlus1's fork) so that users were able to just place it on top of a hopper and have it empty. So long as, say, all ores were kept in orange backpacks, just put it on top of the hopper and let it feed into the furnace. Or put a gray backpack full of stone on the hopper above joe7575's Techpack grinder. Easily feed leaves into Locrates' Biofuel. Etc.

The point wasn't to be able to carry everything with you, rather to take away the tedious moving of piles of stuff into appropriate chests back home.

Teen_Miner
Member
Posts: 46
Joined: Fri Jun 03, 2016 18:21
GitHub: LapisWolf
IRC: LapisWolf
In-game: LapisWolf

Re: [Mod] Backpacks [backpacks]

by Teen_Miner » Post

The link for the newer version of the backpacks mod takes me to what looks like a deleted GitHub page. Is there another page where I can find the newer backpacks mod?
cdb_yuId0gpEgnYo

Duvalon
Member
Posts: 43
Joined: Thu Jun 18, 2020 00:32
Location: Canada

Re: [Mod] Backpacks [backpacks]

by Duvalon » Post

I'd recommend the original, or alternatively this one that had a few updates : https://github.com/minenux/minetest-mod-backpacks

Post Reply

Who is online

Users browsing this forum: Andrii and 17 guests