Jump to content

Convenient Bags (1.8.2)


RoboMat

Recommended Posts

Hi Robomat, thanks a lot for this great mod, it's really good and useful.

You are very good!

Wow, excellent addition RoboMat.

I never considered using it to pack the items in your main inventory. While it's certainly an itch many players must have experienced, I know I have :) That's brilliant.

Thank you! Glad you like it :)

I am thinking about renaming the mod to "convenient bags" now and adding a few more features.

Link to comment
Share on other sites

I wasn't going to say this Robomat, because then I'm the guy who keeps going on with the requests... :P But since you're intending to add more features anyway :D

 

In space engineers there is this mod where you can name cargo containers. And then the mod moves items into the cargo containers with the appropriate names.

 

Basically if you call a bag "!Food,Nails" the mod would shove all items of category food, and all items with the word "nails" embedded in the title. from all over your inventory (And adjacent containers) into it. If you name the bag "!Weapons, Ammo" It'd move all weapons and ammo into that bag.

 

In space engineers the process is constant, it constantly rearranges your inventory.. But in zomboid, I think it's best to make it an action.

 

For the interested space engineers: The mod is called "Automated Inventory Sorting"

Link to comment
Share on other sites

Question: I implemented a custom text box for adding tags. I think that's better than using the container's name. What do you guys think?

I think it'll also be a bit more efficient since I can store each tag in a separate variable and don't have to split up the name string each time the bag is clicked. Tags are stored in the modData instead.

Removing tags could have its own context option or require a '!' before the name.

So 'clothing' would add a tag for clothes and '!clothing' would remove that tag again.

Link to comment
Share on other sites

Okay, the basic functionality is done: Adding tags, Removing tags and using the tags when packing bags:

NvqBzPd.png

In the image above I added tags for clothing and weapons. In the last view you can see how the one vest (which wasn't equipped on the player) and both weapons have been moved to the pack.

Link to comment
Share on other sites

That's pretty cool RoboMat

In space engineers the only variable they had to play with was the name of the container. I didn't know you had others available for zomboid.

 

From a UI perspective you could consider making a box with a list of checkboxes telling what to pack inside a bag. Most of those checkboxes would have labels behind them to show what they stand for, some have textboxes to allow for partial string matches. (So "Knife" would fit "hunting knife", "combat knife" and "kitchen knife")

 

Leaving you with three options. Pack bag, Unpack bag, Configure bag.

 

I have no idea how much work it is to do this via a Lua interface. My experience is that as soon as GUI comes into play you can multiply your development time by a stiff factor...

Link to comment
Share on other sites

Pushed version 1.7.0

- Renamed mod to Convenient Bags- Added option to add labels to bags in order to limit them to certain item types (Closes #7)	- Tags can be item types (food, weapon, etc.) or a part of the item's name (Water, Bottle, Baseball Bat, Nails, etc.)	- When using the "packing" option only items which match the bag's tags will be transferred into the bag- Traits "Dextrous" and "Allthumbs" affect the time it takes to unpack a bag (Closes #6)

A gif of the system in action:

5e3c2c66-2a3f-11e5-976e-50dcb14e9658.gif

Link to comment
Share on other sites

I have no idea how much work it is to do this via a Lua interface. My experience is that as soon as GUI comes into play you can multiply your development time by a stiff factor...

Adding a custom UI - especially in PZ - can be pretty time consuming. I'd love to hear how you like the current system.

Link to comment
Share on other sites

Adding a custom UI - especially in PZ - can be pretty time consuming. I'd love to hear how you like the current system.

 

I figured as much. Gui is always a bit of a b*tch..

 

I think the system is awesome, congrats on a great mod, I'll install the latest version tonight. I also think it's pretty impressive the speed at which you can churn out those changes.

Link to comment
Share on other sites

Pushed version 1.7.0

- Renamed mod to Convenient Bags- Added option to add labels to bags in order to limit them to certain item types (Closes #7)	- Tags can be item types (food, weapon, etc.) or a part of the item's name (Water, Bottle, Baseball Bat, Nails, etc.)	- When using the "packing" option only items which match the bag's tags will be transferred into the bag- Traits "Dextrous" and "Allthumbs" affect the time it takes to unpack a bag (Closes #6)
A gif of the system in action:

5e3c2c66-2a3f-11e5-976e-50dcb14e9658.gif

 

Amazing.....

You are a genius, Robomat,   :o

Link to comment
Share on other sites

It works like a charm :) 

It's pretty epic, I reorganized my inventory instead of putting things in cupboards and crates I now keep the little stuff in bags. Doing this I unloaded one bag on the floor accidentally. You should have seen the mess :P

 

I did note however, that the category ammo didn't seem to include every item that was identified by my inventory list as that category.

 

Also, it doesn't gather items from non inventory containers(Cupboards, fridges) you're looking at does it? It'd be pretty epic to be able to put all perishables from inventory into the fridge. (Lets be honest, zomboid apart from being a post apocalyptic carpentry/farming simulator is also often a post apocalyptic sorting game.)

Link to comment
Share on other sites

I did note however, that the category ammo didn't seem to include every item that was identified by my inventory list as that category.

Can you try to find out which types of ammo are affected? RJ said that he wanted to add more item categories in the future, which would greatly benefit this mod.

Also, it doesn't gather items from non inventory containers(Cupboards, fridges) you're looking at does it? It'd be pretty epic to be able to put all perishables from inventory into the fridge. (Lets be honest, zomboid apart from being a post apocalyptic carpentry/farming simulator is also often a post apocalyptic sorting game.)

Right now it does not, but I talked about it with TurboTuTone yesterday. For now you can just drop the bag into the container and it should work like in the player's inventory.

Link to comment
Share on other sites

  • 3 weeks later...

I was wondering if you could add Tag Support for the "DisplayCategory" item flag. I've been working on an expanded categories mod, and It doesn't seem to work with your tags.

e

example:

item whatever

{

   DisplayCategory = Carpentry,

}

 

 

translate file

{

    IGUI_ItemCat_Carpentry = "Carpentry",

}

Link to comment
Share on other sites

Hm that's strange. How do you add the custom tags to your mod?

 

 

item whatever{DisplayCategory = Carpentry,}

on the item itself

 

and in shared/translate/en/IG_UI_EN.txt

IGUI_EN = {    IGUI_ItemCat_Carpentry = "Carpentry",}

My custom categories show up fine in game and can be used to sort, but it doesn't work with your tag system, since it doesn't actually CHANGE the item categories, but just how they show up

Link to comment
Share on other sites

Ah I think I understand. Could you send me a preview of your mod? Then I'll see if I can fix it :)

Man, if you can manage to pull off having your tags work with display categories you will open up a lot of custom categories in one of my potentially releasable mods to work with your bags... Like 20+ potentially..

 

This is how I came across the problem. I wasn't able to use the Carpentry tag, since it's only a displayed category, and not the actual item category.. LOL

Link to comment
Share on other sites

Pushed version 1.7.1:

- Fixed #8 - Mod now uses custom item categories, when checking for tagged items to pack into a bag

Man, if you can manage to pull off having your tags work with display categories you will open up a lot of custom categories in one of my potentially releasable mods to work with your bags... Like 20+ potentially..

This should fix the issue. Thanks for the report!

Link to comment
Share on other sites

Pushed version 1.7.1:

- Fixed #8 - Mod now uses custom item categories, when checking for tagged items to pack into a bag

Man, if you can manage to pull off having your tags work with display categories you will open up a lot of custom categories in one of my potentially releasable mods to work with your bags... Like 20+ potentially..

This should fix the issue. Thanks for the report!

 

I'll try it out. Thanks a lot!

 

Edit: It worked almost perfectly. I made a change to your check to allow it to work a little better.

if category:lower():find(tag:lower()) or item:getName():lower():find(tag:lower()) then

As I have DisplayCategories that display as

 

Long Blade Weapon - Carpentry, and Blunt Weapon - Carpentry

 

So now it works with your mod better.

 

Again, Thanks a lot for the fix.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...