Jump to content

Smarter inventory


HAL9000

Recommended Posts

Hey guys,

 

This is a mod that makes the inventory remember the last slot you used for an item. It will also try and fill the toolbelt before filling the backpack.

 

There's a known issue on slot 0 for the toolbelt where it can't push an item but other than that it's working pretty well. So much nicer to have a repaired item go back to the slot it was assigned.

 

A16.4 Download Link

A16.3 Download Link

A16.2 Download Link

 

A16.1 Download Link

* Added the ability to shift click items to an entity container

 

A16 Download Link

Link to comment
Share on other sites

hmm, anyway it could also show a 50% transparent image of what item it remembers in that slot?

 

2) will this make it so that: if i pull water out of a chest, drink water, and shift click it - then will the water auto go back to that spot?

Link to comment
Share on other sites

Hello layarion,

 

It's probably a no on the first one, it'd need a lot of recoding for the UI system which is something I haven't got into yet but yeah there's plans to expand the mod to work with any container in the game rather than just the player inventory and belt.

Link to comment
Share on other sites

  • 2 weeks later...

If a new item occupies the remembered slot, and there is room in my inventory, could this be setup to move items around so that item goes back in remember slot?

 

As is, if i put an item in slot 4, and put item in chest. If i come back to the chest, and shift click, and slot 4 is occupied by something else, then it goes to the enxt availible slot.

 

Not a big deal, and i'm not sure i would want it on all the time, but could be useful.

 

Perhaps if i hold Shift+F +left click or something.

 

2) maybe the possibility that, if inventory is full, swap slot 4 to chest and chest item back to slot 4.

 

anyway i finally figured out how to get SDX and this working. This will be a useful mod because it was annoying to have repaired items go somewhere else.

Link to comment
Share on other sites

If a new item occupies the remembered slot, and there is room in my inventory, could this be setup to move items around so that item goes back in remember slot?

 

As is, if i put an item in slot 4, and put item in chest. If i come back to the chest, and shift click, and slot 4 is occupied by something else, then it goes to the enxt availible slot.

 

Not a big deal, and i'm not sure i would want it on all the time, but could be useful.

 

Perhaps if i hold Shift+F +left click or something.

 

2) maybe the possibility that, if inventory is full, swap slot 4 to chest and chest item back to slot 4.

 

anyway i finally figured out how to get SDX and this working. This will be a useful mod because it was annoying to have repaired items go somewhere else.

 

Yeah I thought about all that when doing the mod but it becomes a farce pretty quickly with unintended behaviours. The best way I found is to just drop the item in all the slots you want to "reserve" for that item and then when it gets added it fills up those slots. If no slots are available it just uses the vanilla placement method

Link to comment
Share on other sites

  • 2 weeks later...

Hal, i dunno what it is...but the "moves items to hotbar first" works fine at first. Then it stops working after a short bit. I'll try to get a video of it, but i'm caught up in some things right now. On a new world, punching grass puts it in my hotbar. Not long after though, mining things doesn't put rocks and stuff in my hotbar. I created a wrench with giveself wrench, and pressed E to pick it up. It didn't go to my hotbar again.

 

Everything else works as advertised, just not the hotbar feature.

Link to comment
Share on other sites

Hal, i dunno what it is...but the "moves items to hotbar first" works fine at first. Then it stops working after a short bit. I'll try to get a video of it, but i'm caught up in some things right now. On a new world, punching grass puts it in my hotbar. Not long after though, mining things doesn't put rocks and stuff in my hotbar. I created a wrench with giveself wrench, and pressed E to pick it up. It didn't go to my hotbar again.

 

Everything else works as advertised, just not the hotbar feature.

 

I'll have a look next time I'm playing and see if I can reproduce

Link to comment
Share on other sites

Hal, here is the issue i experience with the "items go to hotbar first" feature.

 

https://youtu.be/ktXsb0KYf6Y

 

Yeah I noticed that behaviour but I prefer it the way it is. I don't want clutter like that appearing on the toolbar and preventing me from punching stuff by constantly taking the slot up. Slot zero happens cause there's no real way to "reserve" that slot in the code.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

Hey Hal,

 

I'm sure you're busy but wanted to let you know that the latest version (16.3) won't compile in SDX 0.7.1 for 7dtd 16.4. I'm sure this is not unexpected but I wanted to flag it for you. BTW, I'm having a lot of fun with the Halicopter mod. It's really cool.

 

PS- you may want to trim the recipe for the Halicopter pad because all of the ingredients don't show up in the crafting menu (the last ingredient plastics doesn't show up).

 

Here are the errors from SDX:

 

c:\7DTD\SDX_0.7.1\Targets\7DaysToDie\Mods\HalSmartInventory\Scripts\InventoryExtended.cs(28,23): error CS1061: 'XUiC_ItemStack' does not contain a definition for 'OHT' and no extension method 'OHT' accepting a first argument of type 'XUiC_ItemStack' could be found (are you missing a using directive or an assembly reference?)

c:\7DTD\SDX_0.7.1\Targets\7DaysToDie\Mods\HalSmartInventory\Scripts\InventoryExtended.cs(40,23): error CS1061: 'XUiC_ItemStack' does not contain a definition for 'OHT' and no extension method 'OHT' accepting a first argument of type 'XUiC_ItemStack' could be found (are you missing a using directive or an assembly reference?)

c:\7DTD\SDX_0.7.1\Targets\7DaysToDie\Mods\HalSmartInventory\Scripts\InventoryExtended.cs(62,22): error CS1061: 'Inventory' does not contain a definition for 'NH' and no extension method 'NH' accepting a first argument of type 'Inventory' could be found (are you missing a using directive or an assembly reference?)

c:\7DTD\SDX_0.7.1\Targets\7DaysToDie\Mods\HalSmartInventory\Scripts\InventoryExtended.cs(71,18): error CS1061: 'Inventory' does not contain a definition for 'NH' and no extension method 'NH' accepting a first argument of type 'Inventory' could be found (are you missing a using directive or an assembly reference?)

c:\7DTD\SDX_0.7.1\Targets\7DaysToDie\Mods\HalSmartInventory\Scripts\InventoryExtended.cs(80,21): error CS1061: 'Bag' does not contain a definition for 'HH' and no extension method 'HH' accepting a first argument of type 'Bag' could be found (are you missing a using directive or an assembly reference?)

c:\7DTD\SDX_0.7.1\Targets\7DaysToDie\Mods\HalSmartInventory\Scripts\InventoryExtended.cs(83,21): error CS1061: 'Bag' does not contain a definition for 'MH' and no extension method 'MH' accepting a first argument of type 'Bag' could be found (are you missing a using directive or an assembly reference?)

c:\7DTD\SDX_0.7.1\Targets\7DaysToDie\Mods\HalSmartInventory\Scripts\InventoryExtended.cs(88,17): error CS1061: 'Bag' does not contain a definition for 'HH' and no extension method 'HH' accepting a first argument of type 'Bag' could be found (are you missing a using directive or an assembly reference?)

c:\7DTD\SDX_0.7.1\Targets\7DaysToDie\Mods\HalSmartInventory\Scripts\InventoryExtended.cs(88,33): error CS1061: 'Bag' does not contain a definition for 'HH' and no extension method 'HH' accepting a first argument of type 'Bag' could be found (are you missing a using directive or an assembly reference?)

c:\7DTD\SDX_0.7.1\Targets\7DaysToDie\Mods\HalSmartInventory\Scripts\InventoryExtended.cs(89,45): error CS1061: 'Bag' does not contain a definition for 'HH' and no extension method 'HH' accepting a first argument of type 'Bag' could be found (are you missing a using directive or an assembly reference?)

c:\7DTD\SDX_0.7.1\Targets\7DaysToDie\Mods\HalSmartInventory\Scripts\InventoryExtended.cs(90,23): error CS1061: 'Bag' does not contain a definition for 'MH' and no extension method 'MH' accepting a first argument of type 'Bag' could be found (are you missing a using directive or an assembly reference?)

c:\7DTD\SDX_0.7.1\Targets\7DaysToDie\Mods\HalSmartInventory\Scripts\InventoryExtended.cs(172,21): error CS1061: 'Inventory' does not contain a definition for 'NH' and no extension method 'NH' accepting a first argument of type 'Inventory' could be found (are you missing a using directive or an assembly reference?)

c:\7DTD\SDX_0.7.1\Targets\7DaysToDie\Mods\HalSmartInventory\Scripts\InventoryExtended.cs(183,21): error CS1061: 'Inventory' does not contain a definition for 'NH' and no extension method 'NH' accepting a first argument of type 'Inventory' could be found (are you missing a using directive or an assembly reference?)

c:\7DTD\SDX_0.7.1\Targets\7DaysToDie\Mods\HalSmartInventory\Scripts\InventoryExtended.cs(194,21): error CS1061: 'Inventory' does not contain a definition for 'NH' and no extension method 'NH' accepting a first argument of type 'Inventory' could be found (are you missing a using directive or an assembly reference?)

ERROR: Failed to compile Mods.dll

ERROR: Task Compile mod scripts failed

Link to comment
Share on other sites

Hey Hal,

 

I'm sure you're busy but wanted to let you know that the latest version (16.3) won't compile in SDX 0.7.1 for 7dtd 16.4. I'm sure this is not unexpected but I wanted to flag it for you. BTW, I'm having a lot of fun with the Halicopter mod. It's really cool.

 

PS- you may want to trim the recipe for the Halicopter pad because all of the ingredients don't show up in the crafting menu (the last ingredient plastics doesn't show up).

 

Here are the errors from SDX:

 

Hello Kosmic Kerman,

 

I've got some time off next week so I'll probably get an update for this out for 16.4.

 

I think the latest version of SDX is 0.7.2, won't help with this mod in 16.3 but it does have a lot of other bug fixes.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...