Page 1 of 1

[V2.0.22] How can you set the comparator with set_quick_bar_slot?

Posted: Wed Nov 27, 2024 6:38 pm
by picklock
With get_quick_bar_slot you get the name of the item, its quality and as table field comparator as ComparatorString the type of quality comparison of a quickbar slot.

With set_quick_bar_slot you can set the item and its quality for a quickbar slot, but not the type of quality comparison, i.e. the comparator field (ComparatorString).

In my opinion, this is inconsistent.

So how can I set the comparator field?

Re: [V2.0.22] How can you set the comparator with set_quick_bar_slot?

Posted: Wed Nov 27, 2024 7:39 pm
by robot256
You're right, that's a missing feature. This belongs in Modding Interface Requests.

It's easy to justify, because the devs intend for most "set" functions to accept the results of a "get" function. I just tested in 2.0.22 and this code:

Code: Select all

/c game.player.set_quick_bar_slot(1, game.player.get_quick_bar_slot(1))
will execute just fine, and matching the behavior in the documentation, erase the quality comparison the player configured for that slot.

Re: [V2.0.22] How can you set the comparator with set_quick_bar_slot?

Posted: Wed Nov 27, 2024 7:48 pm
by picklock
Thank you for the confirmation. I did a similar test with the same result.

@Moderators: So if this is a modding interface request, please move it accordingly.