MinicraftPlus / minicraft-plus-revived

Minicraft+, an extension of Notch's original minicraft project, with tons more features.
GNU General Public License v3.0
484 stars 97 forks source link

Ways to do with Power Glove #567

Open BenCheung0422 opened 1 year ago

BenCheung0422 commented 1 year ago

The code for the power glove has existed but considered to be removed, as described in #258. However, completely removing the item is not a way, as we need an alternative to handle furniture holding.

Suggestions

There are several plans to be done on the power glove:

Remake it as an equipable gear

The item may be renamed, but the use is similar. Player needs to equip the glove onto their hand before picking up any furniture, but without the extra hotkey. The hotkey is useful only for picking up furniture, so the usage may not be high, thus the removal is recommended (as per my previous comments elsewhere).

Based on #718, it can be made as an equipable gear, so it can be directly enabled on the HUD like the map (#568), or just staying in a slot on the hotbar instead. If it is an equipable gear, the hand must be empty to use the glove; if just staying on the hotbar, only switching to the slot is required, and even more simple. When it is used, player can just use (may along with sneaking) on a furniture. Player would still be able to put it back to inventory, but the implementation depends (on the furniture), since it may not be a good idea for a filled chest to be put into inventory as portable storage (too powerful).

Proposal A (comment):

When glove is not equipped
Player cannot pick up any furniture
When glove is equipped on hand
Player can only pick up furniture and only one capacity
When glove is equipped on hand and occupied
Player can only put it down before picking up another furniture
When glove is equipped in inventory
Player can equip the glove onto hand when hand is empty

Additional features:

  • Stamina consumption: In the current implementation, picking up does not consume stamina, but should be and just for the action (not continuous consumption as it could be troublesome)

Combine it as an integrated picking up function
Just as the removal proposal (basically #258), completely removing the item from the code. And it would be completely integrated as an interaction function besides attacking and using.
BenCheung0422 commented 1 year ago

We should also have an ability to pick up tiles like signs like torches and non-empty furniture.

JamesTDG commented 1 week ago

Suggestion: Player gets the power glove item upon spawning, but it functionally acts as a "grab" mode that the player can toggle. Item should despawn from inventory upon death.

BenCheung0422 commented 1 week ago

If understand your point, you mean let it act as an equipable tool?

JamesTDG commented 1 week ago

That is correct

BenCheung0422 commented 1 week ago

Then, Proposal A for the new system:

When glove is not equipped
Player cannot pick up any furniture
When glove is equipped on hand
Player can only pick up furniture and only one capacity
When glove is equipped on hand and occupied
Player can only put it down before picking up another furniture
When glove is equipped in inventory
Player can equip the glove onto hand when hand is empty

Hmm, maybe a new inventory system has to be done before adding this glove system.

JamesTDG commented 1 week ago

That may be ideal. Speaking of which, what was decided upon for the system, weight of an object (seen in Ark or Rust), the size/shape of an object (seen in Subnautica or Backpack Hero), or stack limits per dedicated slot (seen in Minecraft)

BenCheung0422 commented 1 week ago

Interesting ideas. Actually weights can be complicated in Minicraft, but should be something addable by mods. Size/shape may not really fit the game system. Stack limit is implemented, but not fully (scalable).

Makkkkus commented 1 week ago

Why create a duplicate of #258 when this whole issue would better fit as a comment? This issue is not sustantially different, so I don't think it warrants a new thread.

I still stand for my original proposal to remove the power glove item. I don't see why it is needed, as it is currently only used internally, and removing it will be as simple as editing a couple of lines in the player code.

I did not remove it because of dependencies, but seeing as the multiplayer code has been removed and the multiplayer fork having stopped development, there is nothing stopping us from removing it. I also don't know what happened to the modding API, but it also seems to be inactive.

Using P to pick up furniture is also simply better because of three reasons:

  1. You don't need to find the item in your inventory every time you want to pick up something.
  2. We don't need to implement an item that cannot be dropped, put into chests, and otherwise be removed from the player's inventory.
  3. Simpler code when picking up (simply call a function in Player, instead of classes with interaction and etc.)

Weight can be implemented independently of using a powerglove or not.

BenCheung0422 commented 1 week ago

@Makkkkus based on your points, my new proposal, Proposal A for the power glove has improved such ideas. With the aid of #718, power glove (or as another item) is remade as a equipable gear. Once equipped as equipment, player can use the glove without needs to search through the inventory. It does not have to be unremovable as an ordinary item, but the point is probably that, picking up always requires the glove, and hence no reason to put it down (durability/equipment slots?). It could indeed add an element that player needs a tool to move furniture in the game.

Anyway, when the player has not equipped the glove, it is not possible to pick up furniture. It is not totally inconvenient, but able to free a hotkey from the keyboard for other uses. It is also possible to bind this action with sneaking.

Weight might be another point here. Currently, occupied chests cannot be picked up partly because of the item data. At the another point, it is an addition of element into the gameplay. I am not going to say implementing weight into the inventory, so picking up consumes stamina, including the moment of action and continuous holding for filled furniture. Still, I do not stand for implementation of weight here.

BenCheung0422 commented 1 week ago

I have updated the description to rewrite the suggestions more clearly.

Makkkkus commented 2 days ago

If I wasn't clear enough in my message, I apologise.

I completely disagree with keeping the power glove item in any form, as per my earlier comment. I still stand for my original proposal to have it removed. There is absolutely no need to make something that is as easy as pressing the P-key harder.

BenCheung0422 commented 2 days ago

Then, I am still in opposition.

I agree to keep the item functionality and originality as equipable gear and remove the extra occupied key binding for item implementation. This would allow one more hotkey for future functionalities in addition. I am not quite comfortable with the potential conflicts of interactions by just the picking up function. Also, this makes the code structure a bit harder to standardize well.

zandgall commented 1 day ago

Is there any particular reason why using space on furniture does not pick it up if you are empty handed? Playing the game, I would much rather just be able to pick furniture up without needing a special item for it. The P key works fine for me, as I have a keyboard layout that puts P where the R key is on QWERTY keyboards, but it seems a bit out of the way by default for what I would call a primary or secondary interaction.

BenCheung0422 commented 23 hours ago

There are several reasons why I would prefer the new proposal suggested.

Main reasons:

Minor reasons:

In fact, though little off the topic, the old hotkeys should be simplified to just the new keys to align with the convenience of functions also the availability of hotkeys, while users can still customize such keys.

zandgall commented 22 hours ago

A majority of your reasons appear to be satisfied with collapsing the pickup key into one of the generic 'interact' buttons. There should be no problem checking a few conditions and either attempting to pick up furniture or attempting default interact based on them, I'm sure this sort of thing is already done in the code somewhere.

Looking at the PR you linked, you advocate a 'use' key separate from the 'attack' key, but there's still a 'crafting' key that opens furniture menus. I think the 'use' key (or menu in current state, or even attack, just any primary or secondary interaction keys) could absolutely be used to also pickup furniture.

I agree that pickup being a dedicated key is a bit of a waste, since you can only use it in the right conditions. But that makes it perfect to be one of many functions of a generic interaction hotkey.

Unless the frustration of keeping around an item and making sure you have it equipped in order to pick up a piece of furniture adds something valuable to the gameplay, it should be simple and intuitive. The 'reward' of keeping around a P-glove and swapping out items/equipping it is something that I feel should just be possible via generic interaction.

BenCheung0422 commented 19 hours ago

The suggestions you mentioned could still violate the extensibility/moddability.

To answer your question previously:

Is there any particular reason why using space on furniture does not pick it up if you are empty handed?

We have to handle the code better to fit possible modded content, so this could highly conflict with some potential features. Again, this would limit the functionalities.

As for the pull request, I think you may have to read through the description again:

"Inventory" now only opens player inventory menus or closes some in-game menus (usually furniture-related); "attack" now only handles direct damage and tile destroys with bare hand (fists) or any item on tiles or entities; "use" is now used for interacting with furniture, placing tile and furniture, item interactions, etc.

INVENTORY only opens the inventory menu wherever in the world, regardless of world interaction used to with MENU. So, USE is used instead of furniture interactions, like opening the crafting menu from a workbench or opening the container menu from a chest.

In addition, mentioned that in the description above, there can be a combination of sneaking+glove+use to pick up furniture. I would not say these to be frustration, but can certainly reduce much potential hurdles and troubles when implementing future functions and features.

zandgall commented 17 hours ago

I still feel like using the P-glove is frustrating, I don't want that to be lost on anyone. Like it is obviously more cumbersome to use than a hotkey, but specifically I don't think it adds anything to the game within that cumbersomeness. It's not like working hard in order to do something special, it's just moving your crafting table a little faster than nudging it.

I also do not particularly see how it would take that much more effort to implement a multi-purpose interaction key than an item, obviously it would take more effort, but I'm not convinced that it's a significant amount of effort. Nor do I see why this would affect mod-ability, let alone why we should cater to modding functionality that doesn't even exist in the first place.

You could absolutely make this feature in a way that it is still easy to add on to. Unless you mean something else by 'extensible'. It's a simple matter of checking conditions (i.e. empty handed and looking at furniture), if those conditions are met, then run the pickup interaction. If they aren't, then move on. You can then either check a different interaction condition, or run the default interaction.

If you're really sure this would limit future functionality, what specific potential limits do you see happening with this kind (or any kind) of implementation for this feature?

JamesTDG commented 17 hours ago

I feel like we need more mechanics surrounding the glove if we were to try and keep it, such as the ability to throw stuff (tnt use case?)

zandgall commented 16 hours ago

I like the idea of being able to pick up things you're not typically able to pick up using the power glove. Mobs would also be an interesting idea, (it would need a lot of discussion and consideration as to whether or not that fits the game/is a good idea), and in that case you would probably want to make the glove something you have to work for, like make it hidden in lower level dungeon chests.

BenCheung0422 commented 2 hours ago

Like I have mentioned, keeping it as a hotkey already takes up a key space, so one less function can be bound to the key, thus the extensibility. On the other hand, if it is implemented by empty hand + use, it is even more limited to future implementations. If later there is a feature requiring using the empty hand to interact the furniture, which has already been the conflict, thus less functions can be implemented. This is why I suggest keeping it as a single item implementation without bothering the global interaction system.

We allow mods to be made on this game, even this Minicraft+. This is one of our goals, allowing more and better customization, moddability, etc. We even had discussions to whether implement a mod loader directly into the game, but a reserved idea instead.

It is not an ideal case to have a functionality being limited by certain conditions and do not work universally. It is not whether it is a simple condition check or not, though even worse if it is simple actually. It was an item, so it could be made as an item, and could work as intended.

BenCheung0422 commented 1 hour ago

In addition, I do not see how it is a multi-purpose interaction key, but instead, I can see it as a poorly utilized hotkey for interaction. So, there is no quite a great point to make it dedicated key in the first place. Then, to reduce the barriers we may eventually come to, this proposal can work well.

At the moment, I would not discuss whether to add new features to the picking function, but just the implementation style of the interaction. I have to emphasize again that, I absolutely do not agree implementing to be just "when empty hand in front of furniture". Equipping the item could let the system know the player actually want to pick it up without normal use interactions. It is not a cumbersomeness problem, but functionalities.