#(hmoe) script for balancing of 1.20 trimmed armor

22 messages · Page 1 of 1 (latest)

charred pivot
#

I want to make a script that balances all trimmed armor, so that players can trim gold armor and wear it as if it were netherite armor. I'd like to discuss how to go about doing something like this. Should it be done through enchantments, or can the base durability and toughness of armor be adjusted? The objective in one sentence is this: Create a script that makes all armor have the same base durability and protection once a smithing template is added to it in the smithing table.

Are there any mechanisms that could be adjusted? How can I change the output of a smithing table? many things to discuss here. Thanks

fresh forgeBOT
#

(hmoe) script for balancing of 1.20 trimmed armor

fresh forgeBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>

charred pivot
#

so, i've found EntityTag.armor_bonus mechanism which seems perfect for making all armor have the same strength, but is there any way to check if an armor has been trimmed? I can't find any mention of "trim" on the docs.

oak furnaceBOT
charred pivot
#

yay

uncut orbit
#

I don't believe you can change the maximum durability of an item, but I know you can change it's current durability.

Toughness and armor can be adjusted through...

#

!m itemtag.attribute_modifiers

grim pierBOT
# uncut orbit !m itemtag.attribute_modifiers

(Property) Controls the attribute modifiers of an item, with key as the attribute name and value as a list of modifiers,
where each modifier is a MapTag containing keys 'name', 'amount', 'slot', 'operation', and 'id'.
For use as a mechanism, this is a SET operation, meaning pre-existing modifiers are removed.
For format details, refer to !language attribute modifiers.

Group

Properties

Object

ItemTag

Input

MapTag

Tags

<ItemTag.attribute_modifiers> (Property) Controls the attribute modifiers of an item, with key as ...

uncut orbit
#

!l attribute modifiers

grim pierBOT
# uncut orbit !l attribute modifiers

In minecraft, the "attributes" system defined certain core numerical values on entities, such as max health or attack damage.
The value of an "attribute" is determined by its "base value" modified mathematically by each of its "attribute modififers".
"Attribute modifiers" can be added either directly to the entity, or onto items - when on an item, an entity can equip it into the correct slot to automatically apply the modifier.

These can be read via such tags as !tag EntityTag.attribute_modifiers, !tag ItemTag.attribute_modifiers,
!tag EntityTag.has_attribute, !tag EntityTag.attribute_value, !tag EntityTag.attribute_base_value, !tag EntityTag.attribute_default_value, ...

These can be modified by such mechanisms as <@link mechanism EntityTag.attri...

Group

Properties

charred pivot
#

thanks. i've read through there, i've written a little test script, but im having issues with the event:

armor_balance:
  type: world
  events:
    after player equips helmet:
    - definemap attributes:
        generic_armor:
          1:
            operation: ADD_NUMBER
            amount: 1
            slot: head
    - inventory adjust slot:head add_attribute_modifiers:<[attributes]>
    - narrate "You've been adjusted!"

this fires continuously after the player has equipped the helmet, but i want it to only fire once, after the helmet is added

#

is there a recommended alternative to using the event after player equips ...? in the docs it's mentioned that this event can be inconsistent

uncut orbit
#

!e on player clicks in inventory

grim pierBOT
# uncut orbit !e on player clicks in inventory
Group

Player

Event Lines

player (<click_type>) clicks (<item>) in <inventory>

Switches

with:<item> to only process the event if a specified cursor item was used.
in_area:<area> replaces the default 'in:<area>' for this event.
action:<action> to only process the event if a specified action occurred.
slot:<slot> to only process the event if a specified slot or slot_type was clicked. For slot input options, see !language Slot Inputs.

Triggers

when a player clicks in an inventory. Note that you likely will also want to listen to !event player drags in inventory.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.item> returns the ItemTag the player has clicked on.
<context.inventory> returns the InventoryTag (the 'top' inventory, regardless of which slot was clicked).
<context.clicked_inventory> returns the InventoryTag that was clicked in.
<context.cursor_item> returns the item the Player is clicking with.
<context.click> returns an ElementTag with the name of the click type. Click type list: <@link url...
<context.slot_type> returns an ElementTag with the name of the slot type that was clicked. Slot ty...
<context.slot> returns an ElementTag with the number of the slot that was clicked.
<context.raw_slot> returns an ElementTag with the raw number of the slot that was clicked.
<context.is_shift_click> returns true if 'shift' was used while clicking.
<context.action> returns the inventory_action. See <@link language Inventory Actions>.
... and 1 more.

Determine

ItemTag to set the current item for the event.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.