[Mod] Backpacks [backpacks]

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

[Mod] Backpacks [backpacks]

by everamzah » Sun May 08, 2016 21:23

Adds backpacks made of wool and leather, that can store anything but themselves in an 8*4 8*2 inventory. The backpacks can only be accessed once they're placed. Picking them up preserves their contents. They obey regular protection rules.

License: GPL3+
Depends: defualt, wool
Download: GitHub or master.zip

Image
Attachments
backpacks-1.0.zip
1st version with bigger inventory and more backpacks
(16.15 KiB) Downloaded 185 times
screenshot_20160619_083215.png
(213.48 KiB) Not downloaded yet
screenshot_20160508_171313.png
1.0
(117.31 KiB) Not downloaded yet
Last edited by everamzah on Sun Jun 19, 2016 12:37, edited 1 time in total.
 

User avatar
Napiophelios
Member
 
Posts: 988
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Backpacks [backpacks]

by Napiophelios » Sun May 08, 2016 23:01

these are pretty neat, it reminds me of prestibags mod.

I think it should not be able to hold as much as a chest though.
Also think it would be better to just have one type based on a single texture
instead of registering 16 different backpacks using the wool textures.

any way, its a cool mod despite my opinion :)
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Backpacks [backpacks]

by everamzah » Sun Jun 19, 2016 12:38

Okay, now it's just a wool backpack and leather backpack. Inventory was reduced to half.
 

Sokomine
Member
 
Posts: 3956
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [Mod] Backpacks [backpacks]

by Sokomine » Sat Jul 16, 2016 17:59

unified_inventory also has bags, though those are mostly items that store other items. They do not really appear ingame apart from beeing a craftitem. Your bag gave me an idea...how about changing the player model if and when the player carries a bag?
A list of my mods can be found here.
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Backpacks [backpacks]

by everamzah » Sat Jul 16, 2016 18:03

That was the original intention. Also, swapping backpacks would swap your lower 8*3 inventory.
https://github.com/everamzah/dcb/commit ... ckpack.lua

PS. I got it to work, I don't remember where exactly I left off. Probably around the time I noticed problems with drag & drop into forbidden lists.
 

User avatar
Fixer
Member
 
Posts: 894
Joined: Sun Jul 31, 2011 11:23
Location: Ukraine
IRC: Fixer
In-game: Fixer
 

xisd
Member
 
Posts: 52
Joined: Sun Oct 02, 2016 22:38
GitHub: xisd

Re: [Mod] Backpacks [backpacks]

by xisd » Wed Jan 18, 2017 14:03

Nice mod ! I was looking for something like that !

depends.txt is wrong though : there is hard dependency on "mobs"

Checking for the mod existence before registering leather backpack recipe would fix it

Code: Select all
-- The recipe is only registered if mobs mod exist
if minetest.get_modpath("mobs") then
   minetest.register_craft({
      output = "backpacks:backpack_leather",
      recipe = {
         {"mobs:leather", "mobs:leather", "mobs:leather"},
         {"mobs:leather", "", "mobs:leather"},
         {"mobs:leather", "mobs:leather", "mobs:leather"},
      }
   })
end
 

User avatar
taikedz
Member
 
Posts: 692
Joined: Sun May 15, 2016 11:11
Location: Scotland, UK
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: [Mod] Backpacks [backpacks]

by taikedz » Wed Jan 18, 2017 15:37

Thanks for the suggestion

I've updated this so that the leather backpack and the recipe are both dependent on mobs
 

xisd
Member
 
Posts: 52
Joined: Sun Oct 02, 2016 22:38
GitHub: xisd

Re: [Mod] Backpacks [backpacks]

by xisd » Sat Jan 21, 2017 18:53

taikedz wrote:Thanks for the suggestion

I've updated this so that the leather backpack and the recipe are both dependent on mobs


Nice ! But you should check the existence of mobs mod using minetest.get_modpath instead of (or at least before) looking for the mobs variable, mainly because it result in this warning if the table doesn't exist :
Code: Select all
2017-01-21 19:27:36: WARNING[Main]: Undeclared global variable "mobs" accessed at .../minetest_game/mods/backpacks/init.lua:106

and also because an other mods could have a variable called mobs (even if they should not)
 

User avatar
taikedz
Member
 
Posts: 692
Joined: Sun May 15, 2016 11:11
Location: Scotland, UK
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: [Mod] Backpacks [backpacks]

by taikedz » Mon Jan 30, 2017 16:57

I've updated the mod to use colourful backpacks. Should make sorting a little easier.

Image
Last edited by taikedz on Tue Jan 31, 2017 18:24, edited 2 times in total.
 

User avatar
TenPlus1
Member
 
Posts: 2653
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Backpacks [backpacks]

by TenPlus1 » Mon Jan 30, 2017 20:18

I would remove the 'mobs' dependency from the depends.txt file and use something like this instead:

if minetest.get_modpath("mobs") then
-- add recipe here
end
 

User avatar
Chibi ghost
Member
 
Posts: 845
Joined: Fri Jan 08, 2016 21:17
In-game: Ghost
 

Drgnrdr
Member
 
Posts: 34
Joined: Tue Jul 11, 2017 08:57

Re: [Mod] Backpacks [backpacks]

by Drgnrdr » Tue Jul 11, 2017 09:14

Leather backpack craft not showing in craft guide. Changing this - if minetest.get_modpath("mobs") and mobs and mobs.redo then to this - if minetest.get_modpath("mobs") then gets the leather backpack to show in the craft guide.
 

User avatar
taikedz
Member
 
Posts: 692
Joined: Sun May 15, 2016 11:11
Location: Scotland, UK
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: [Mod] Backpacks [backpacks]

by taikedz » Tue Jul 11, 2017 09:35

Sorry, i'm having trouble following what you said...

Also, which craft guide is not showing this recipe?
 

Drgnrdr
Member
 
Posts: 34
Joined: Tue Jul 11, 2017 08:57

Re: [Mod] Backpacks [backpacks]

by Drgnrdr » Tue Jul 11, 2017 21:48

Unified_inventory. In init.lua on line 171 it said:
if minetest.get_modpath("mobs") and mobs and mobs.redo then
craft doesn't show in guide. Change to
if minetest.get_modpath("mobs") then
Able to craft leather backpack.
 

User avatar
taikedz
Member
 
Posts: 692
Joined: Sun May 15, 2016 11:11
Location: Scotland, UK
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: [Mod] Backpacks [backpacks]

by taikedz » Wed Jul 12, 2017 08:51

I believe the correct fix is to re-add an optional dependency on `mobs` ; please try it again from the master branch.

If I apply the changes you suggest (removing sanity checks), at best I'll just get reports of "the mod does not check for the presence of the right `mobs` mod" bug reports instead for people who use different `mobs` mods; at worst it will cause crashes.
 

Drgnrdr
Member
 
Posts: 34
Joined: Tue Jul 11, 2017 08:57

Re: [Mod] Backpacks [backpacks]

by Drgnrdr » Wed Jul 12, 2017 10:15

Just tried it. Back to not being able to craft leather backpacks. The only way I can get them is by using creative.
 

User avatar
taikedz
Member
 
Posts: 692
Joined: Sun May 15, 2016 11:11
Location: Scotland, UK
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: [Mod] Backpacks [backpacks]

by taikedz » Wed Jul 12, 2017 10:53

Right well I'll havea deeper look at this when I have a proper moment. Thanks for letting me know
 

User avatar
taikedz
Member
 
Posts: 692
Joined: Sun May 15, 2016 11:11
Location: Scotland, UK
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: [Mod] Backpacks [backpacks]

by taikedz » Wed Jul 12, 2017 11:09

Fixed. It was mobs_redo, it changed the way it identified itself.

backpacks now does a check for both the old and the new mobs_redo
 

Drgnrdr
Member
 
Posts: 34
Joined: Tue Jul 11, 2017 08:57
 

User avatar
texmex
Member
 
Posts: 1692
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Backpacks [backpacks]

by texmex » Thu Jul 13, 2017 16:04

Would you care to look at the bug I filed some time ago taikedz?
Mods | Support Mesehub: bc1qluuests9rxmlnvpjrhsnyjg9ucwy6z3r0y3srw
 

User avatar
taikedz
Member
 
Posts: 692
Joined: Sun May 15, 2016 11:11
Location: Scotland, UK
GitHub: taikedz
IRC: DuCake
In-game: DuCake
 

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

Re: [Mod] Backpacks [backpacks]

by DreamGuardian » Wed Oct 02, 2019 21:31

This shows up with only unified_inventory toolranks mods on:

2019-10-02 13:42:52: ERROR[Main]: ... (1)\minetest-5.0.1-win64\bin\..\mods\backpacks\init.lua:84: attempt to index global 'dye' (a nil value)
2019-10-02 13:42:52: ERROR[Main]: stack traceback:
2019-10-02 13:42:52: ERROR[Main]: ... (1)\minetest-5.0.1-win64\bin\..\mods\backpacks\init.lua:84: in main chunk
2019-10-02 13:42:52: ERROR[Main]: Check debug.txt for details.
2019-10-02 13:42:52: ACTION[Main]: Server: Shutting down
 

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

Re: [Mod] Backpacks [backpacks]

by ThorfinnS » Wed Oct 02, 2019 22:27

Try adding Unified Inventory Plus, since you are running Unified Inventory. Backpacks are already incorporated.
 

User avatar
jas
Member
 
Posts: 470
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas

Re: [Mod] Backpacks [backpacks]

by jas » Wed Oct 02, 2019 23:25

Does the dye mod no longer have a dye global? Are you not using the dye mod? I should update the mod if dye mod changed.

In the version I use in Lavaland, bags can be dug and placed anywhere and can be named. I really should update then..
2009-10-7 02:04:55: ACTION[Server]: jas activates
 

Next

Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 11 guests