Coder Social home page Coder Social logo

bruceofthebow / comfyarmorandquickslots Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 345 KB

Replacement of EquipmentAndQuickSlots mod by RandyKnapp meant to fix item deleting issues between modded and non-modded players.

License: GNU General Public License v3.0

C# 100.00%

comfyarmorandquickslots's Introduction

Comfy Armor and Quick Slots

Installation

Manual

  • Un-zip ComfyQuickSlots.dll to your /Valheim/BepInEx/plugins/ folder.

Thunderstore (manual)

  • Go to Settings > Import local mod > Select ComfyQuickSlots_v1.3.0.zip.
  • Click "OK/Import local mod" on the pop-up for information.

Features

Imgur Image

Armor Slots

  • Armor slots for items place in the bottom row of the new 8x5 inventory grid.
  • Armor may only be placed here on equip and moved out on unequip
  • Armor will not unequip if there is insufficient inventory space (no empty spots in the original 8x4 inventory grid or 3 quick slots)

Quick Slots

  • Quick slots are configurable via the F1 configuration manager but default to Z, V, and B for item use
  • GUI will display items in quickslots next to forsaken power. Configurable via configuration manager with F1

On Death

  • Items in armor slots and quick slots will be placed on a second, smaller grave that spawns on top of the regular player tombstone while the regular inventory will be in the usual 8x4 player grave. This is to avoid issues with unmodded players opening graves and thus deleting items.

Notes

  • If using better UI set showDurabilityColor to disabled to prevent error log spam.
  • If a character is logged into unmodded after a player save using this mod, any deltas in the inventory between the last modded save and a vanilla save will be overwritten by the last modded save.
  • This is a rework of Randy Knapp's Equipment and Quick Slots mod that looks to fix the issues around item deletion as well as issues around vanilla and modded player interaction. Tombstone handling modeled off Fang86's MoreSlots mod.
  • See source at: GitHub.
  • Looking for a chill Valheim server? Comfy Valheim Discord
  • Check out our community driven listing site at: valheimlist.org

Changelog

1.3.0

  • Updates for patch 0.216.8

1.2.1

  • Minor performance fixes.

1.2.0

  • Added enable/disable toggle for quickslots. Enabled by default. No restarts required.

1.1.0

  • Fixed positioning of open containers for compatibility with patch 0.214.2

1.0.10

  • Added IsQuickSlot method for mod compatibility purposes. Fixed fish bait return bug.

1.0.9

  • Fixed bug on initial load with mod.

1.0.8

  • Fixed bug where upgrading equipped armor/shoulder/utility items resulted in deletion when inventory otherwise full.

1.0.7

  • Changed reference for blocking equipment use to IsEquipActionQueued for mistlands ptb.

1.0.6

  • Fixed issues with item use on equip.

1.0.5

  • Disables debugging log statements.

1.0.4

  • Reduced pop of second grave to prevent clipping through low ceilings.
  • Disabled selecting of items in armor slots to prevent unwanted inventory behavior and related bugs. Armor and utility items must be unequipped before removing from inventory.

1.0.3

  • Disables debugging log statements.

1.0.2

  • Fixed issue where logging out after first log-in with mod enabled could delete armor. First log-in check now reset on player save.

1.0.1

  • Disables debugging log statements.

1.0.0

  • Initial release.

comfyarmorandquickslots's People

Contributors

bruceofthebow avatar

Stargazers

Felix avatar

Watchers

 avatar

comfyarmorandquickslots's Issues

[Feature request] ServerSync

I'd love to have ServerSync so my players keybinds are all set to the same. This helps not override other mods that the server has with conflicting keybinds.

Items are equipping in a weird way

Added this mod onto our mod list to replace the Equipment and Quick Slot mod, mainly so we can use the Quick stack / restack mod.

But since we have added this on players using a controller experience a weird bug when trying to use the equipment hot bar, some items will equip normally whilst others will equip but then automatically change to a different slot. For example i had a bow in slot 3, and a axe and shield in 6 and 7. When selecting to equip the axe the animation will equip the axe then shield and then switch to the bow.

When i took this mod off it all works fine, adding back in i get the same issue. I can't see any mods that would conflict with this one, and it works fine for mouse and keyboard.

Conflict with Jewelcrafting (and Soulcatcher)

Heyoo

I have discovered a mod conflict with Comfy Quickslots and Jewelcrafting (which has a secondary effect with Soulcatcher).

https://valheim.thunderstore.io/package/Smoothbrain/Jewelcrafting/

If I try to craft a gem in Jewelcrafting's crafting table, and it fails, it spawns Gem Shards, which throws a warning in the console only when Quickslots is also running (and no issue when it's not):

[Info : Unity Log] 12/11/2022 13:23:44: Item missing prefab $jc_shattered_green_crystal

This causes the shattered crystals to not save when going out of range of chests or when you log off with them in your inventory. If Soulcatcher is installed, that mod throws an error due to the missing prefab.

I've spoken to the author of Jewelcrafting and he indicated that it was probably an issue with this mod, not jewelcrafting.

incompatible with revel's 'betterprogression' mod. breaks ui, spawns inventory full of placeholder fork items. blocks ui interaction.

combo of two mods breaks the ui, spawns with inventory full of a random fork-like item, cannot craft; button blocked. clicking the crafting icon removes it...

not sure what to think, but there's some sort of bug or conflict here. between the two mods ComfyArmorAndQuickSlots (ComfyQuickSlots) which is your mod and BetterProgression which is made by revel but uploaded by someone unknown; i found no way to contact them.

BepInEx log output:
[Error : Unity Log] ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index Stack trace: System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <17d9ce77f27a4bd2afb5ba32c9bea976>:0) InventoryGrid.GetElement (System.Int32 x, System.Int32 y, System.Int32 width) (at <da52c09f594f4a7480000b7420815ba7>:0) (wrapper dynamic-method) InventoryGrid.DMD<InventoryGrid::UpdateGui>(InventoryGrid,Player,ItemDrop/ItemData) InventoryGrid.UpdateInventory (Inventory inventory, Player player, ItemDrop+ItemData dragItem) (at <da52c09f594f4a7480000b7420815ba7>:0) InventoryGui.UpdateInventory (Player player) (at <da52c09f594f4a7480000b7420815ba7>:0) (wrapper dynamic-method) InventoryGui.DMD<InventoryGui::Update>(InventoryGui)

and here's what it looks like and the list of mods enabled during testing:

image
image

Comfy Armor does not respect drop-on-death setting

Hildr's Request added "world modifiers" to change the difficulty of the game--
including a "Casual" death penalty setting where you lose very little skill progress and don't drop equipment when your character dies.

Comfy Armor and Quickslots doesn't appear to respect this setting. If you have death set to Casual, and gear equipped using this mod, your gear is still stripped and stashed in a tombstone on death.

[Feature Requests] Toggle slots layouts, toggle quick slots on/off, toggle unmodded player tombstone compatibility

This mod is meant to be a direct replacement for Equipment and Quickslots as stated on the Thunderstore page, so it would be very nice if it could also include some of the same features. Would you please consider implementing the following in a future update?

  • Toggle armor and quick slot layouts
    Basically, an option to replicate the slot layout of the mod that this one is meant to replace would be amazing.
    Screenshot_1

  • Toggle quick slots on/off
    Some players, myself included, would like the ability to fully disable the quick slots both visually and functionally, only using the equipment/utility slots. Again, this is an existing option in the mod that this one is meant to replace. It would be very great to have as a feature.

  • Toggle the tombstone compatibility with unmodded players
    This one's a little self-explanatory. Having it as an opt-out feature would allow single tombstones for multiplayer where everyone is using the same mods. It could include a disclaimer to use at your own risk.

Spams `ArgumentOutOfRangeException` once loaded into the game

After installing this mod and loading into a dedicated server the BepInEx console is spammed with this exception:
grafik

The exception occurs multiple times per second. I did not change any of the default configuration settings. The mod works as intended in any other way that I can see.

To ensure it is this mod I disabled the mod and loaded in again. The exceptions were gone. So I'm 100% sure its related to this mod. Judging from the exception message it is most likely a conflict with the BetterUI mod.

Add IsQuickSlot as public static method for compatibility

This isn't a bug, it would just make it easier for other mods to provide support for your mod.

We can check if a slot is an armor slot with IsArmorSlot, and we can kinda hack if a slot is an armor slot or a quick slot by additionally asking IsArmorSlot(new Vector2i(itemPos.x - 3, itemPos.y)) but that relies on your current index setup so it's not very safe.

It would be great if you could add a simple public static method IsQuickSlot that simply returns whether the vector is contained in an array of those 3 vectors even if you never use it in your own code (and maybe add a comment over both IsArmorSlot and IsQuickSlot to not rename or move them or put them in a separate class called API (please don't delete the current ComfyQuickSlots.IsArmorSlot immediately or at all to not break backwards compatibility immediately))

thank you for considering this change

random items will get stuck in an armor slot.

Random items will go into the armor slots and I can't get them out. For example, birch seeds are in my utility slot and neck tails are in my cape slot. I got the neck tails out by cooking them - the cooking station removed it automatically. I can also use an armor piece to trade it for the item that is stuck in the armor slot.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.