Lembas-Modding-Team / pvp-mode

A Minecraft mod offering various options to manage availability for and ability to PvP.
GNU Lesser General Public License v3.0
5 stars 3 forks source link

Gear and item allowance for PvP #197

Closed AlteOgre closed 4 years ago

AlteOgre commented 6 years ago

This is a conditional override issue. Aim is to either disable PvP, block usage or let items drop when a player uses gear, weapons or draughts on a blacklist.

As noted in our issues list ex Fb group dd 20180602: "• Med Gear and item allowance: A system to limit the use of gear in PvP to specified items dependent on player alignment. Examples: 1) If player has positive alignment with Mordor, use of any elven gear will disable PvP. 2) Only if player has over +500 alignment with Rohan, player can use Marshall armour in PvP. 3) Use of any piece of mithril gear will disable PvP. A feature that prevents PvP if a player uses armour pieces on a blacklist, or in dependency of a players alignment? Think a configuration file for server owners in which they can indicate which requirements are to be met to use specific types of armour. Will require a lot of detailed work to code, but shouldn't be that difficult as an add-on to the current base functionalities. And I reckon there will be many server staff and players who would appreciate it. No, it's a feature desired for roleplay purposes. Many servers have rules prohibiting use of some armour types for players, dependent on their alignment, mostly just 'good' versus 'evil'. It requires a lot of checking to see if players obey such rules. Same holds for weapon types and draughts btw. Examples or rules in use:

Area overrides should prevail over inventory, so it would seem inconvenient to forced PvP Mode OFF when a biome forces it ON. Therefore, prohibited items should either be dropped or be made ineffective. If dropped, that should only be done if a player has had time to store it in a pouch. So, prohibited items shall only be dropped when in inventory as 'actively available item', i.e.: not in a pouch. PLayers should get a warning and some time to respond before a prohibited item drops. Alternatively, it may be possible to block usage of items, like armour not usable in armour slots, weapons not resulting in damage and draughts undrinkable. Up to the coders to decide on what would be the most feasible option.

In addition to this, the prohibition condition may be made alignment dependent for the players. Example: Players with negative MORDOR alignment cannot use MorgulDraught. And players with negative WOOD_ELF alignment cannot use WOOD_ELF scout armour.

In line with the spirit of the LOTRmod, I propose to use blocking mechanics, so players cannot get achievements for wearing armour or drinking draughts not available to them if they are of negative alignment with them.

We could provide a default list with conditions, but have the feature disabled by default.

The feature should also be able to cover items of other mods than the LOTRmod, and of vanilla Minecraft.

I would like to plan this feature for v2.0.0-BETA.

CraftedMods commented 6 years ago

Disabeling PvP for that is in by opinion a bad and too complicated way, because we have to take a lot of things into account. What rather makes sence would be to block that these items can be equipped or used. Would this suffice?

AlteOgre commented 6 years ago

Indeed. That is exactly what I was concluding as well.

CraftedMods commented 6 years ago

I know. The question is: Would it suffice to only implement these blocking mechanisms? If these work, the other things you proposed aren't necessary.

AlteOgre commented 6 years ago

I think that would suffice. I mentioned it as an alternative, implying exactly that. ;)

AlteOgre commented 6 years ago

In order to make this work effectively (as in 'players will adust their behaviour in agreement with their PvP Mode without exploiting the system'): The proposed 'Blocking of usage' should only be effective for the player using black-listed items/gear by negating the damage of blocked weapons, blocking the use of blocked draughts and negating the armour resistance of blocked pieces of armour. If that is possible ofc.

So, when a player has a piece of mithril armour on, and a mallorn mace, and Athelas, and all of these items are blocked for players (meeting the alignment requirements for the restrictions valid for those items), that player should not get armour points from his mithril armour piece, not be able to deal damage with his mallorn mace and not be able to use the Athelas he has. Meanwhile, his ability to PvP is not restricted, nor is the ability of others who can PvP restricted to damage the player that uses blocked items.

DwarfyAssassin commented 6 years ago

Would it also be possible to make this compatible with the per player safe biome for v3.0.0-BETA? So for example player who are assigned to the woodland realm as their safe biome can only use wood-elven armor and weapons.

mahtaran commented 6 years ago

I guess that could be incorporated when we move to Lembas

CraftedMods commented 6 years ago

Both of these things are defined via the alignment, so we don't even have to integrate these two features.

CraftedMods commented 5 years ago

Here's a suggestion for the file-format, it's similar to the biome overrides:

# item1, item2, and item3 are only useable if the player has minAlignment with FACTION_NAME
FACTION_NAME;minAlignment;item1,item2,item3

# These items are blocked for all players
ALL;aligmentIrrelevant;item1,item2,item3

# These items are allowed for all evil players, having the required minimum alignment with at least one evil faction
EVIL;minAlignment;item1,item2,item3

# These items are allowed for all good players, having the required minimum alignment with at least one good faction
GOOD;minAlignment;item1,item2,item3

It'll be configurable, which factions are considered evil and which good, with default values.

EDIT: Yes, there was an EVIL to much, it should mean GOOD

mahtaran commented 5 years ago
# These items are allowed for all evil players, having the required minimum alignment with at least one evil faction
EVIL;minAlignment;item1,item2,item3

# These items are allowed for all good players, having the required minimum alignment with at least one evil faction
EVIL;minAlignment;item1,item2,item3

is it just me or are these statements exactly the same?

mahtaran commented 5 years ago

Also, it might be nice to have an option to set a certain amount of positive or negative alignment required for the items.

CraftedMods commented 5 years ago

This is the minAlignment. People which have less than that are not able to use these items.

AlteOgre commented 5 years ago

Looks good. Small improvement: "... has minAlignment or higher with FACTION_NAME" I'd rather not use 'evil' or 'good', but specify all separately, but I understand others may prefer the easy way. Also add 'neutral'. This will require a txt file to show/adjust/read evil/neutral/good classified factions.

DwarfyAssassin commented 5 years ago

So how will this work exactly will players with those restricted items not be able to pvp or will they just be made useless (weapons do no damage, armor give to protection).

CraftedMods commented 5 years ago

The items will be made useless. Also, we prohibit that players can equip blocked armor items, though that can be bypassed eventually, and other mods could still place these armor items in the inventory slots. So additionally to that, if a player somehow manages to equip blocked armor items, the PvP Mode Mod will unequip them, how exactly this is done, has to be determined. Probably they'll be moved back into the inventory or dropped, and warnings will be displayed before.

mahtaran commented 5 years ago

Ah. So in a finalised config, minAlignment would be replaced by a number which is the minimum required alignment? Or should I look at it in a way of the maximum amount of alignment for which it is blocked, since the config is for blocking the use of items.

mahtaran commented 5 years ago

Also, may I suggest the universal and shorter * instead of alignmentIrrelevant?

CraftedMods commented 5 years ago

Ah. So in a finalised config, minAlignment would be replaced by a number which is the minimum required alignment? Or should I look at it in a way of the maximum amount of alignment for which it is blocked, since the config is for blocking the use of items.

Yes. Both ways to see it are possible.

Also, may I suggest the universal and shorter * instead of alignmentIrrelevant?

Instead of using that, I think that it would be better to leave it just empty. The * implies for me that all alignment values are valid, which is right, but because the * has no meaning and is not relevant, I would suggest that the column then is just left empty. That would apply to the biome overrides too then.

mahtaran commented 5 years ago

Yeah. I guess the ALL should be ommited too then. So you end up with just a list of items blocked for everyone.