Epic Fight

Epic Fight

13M Downloads

[Suggestion]: Add query subcommand.

Raccffy opened this issue ยท 0 comments

commented

Have you checked if there's any similar suggestions ?

  • I checked, there are no similar suggestions that have been reported.

Are you using the latest Epic Fight ?

  • I checked I'm using latest Epic Fight version.

Is this suggestion related to another mod? (i.e: add animations for X mod)

  • This is related to other mods.

The mod

Epic Fight 20.7.4

Minecraft Version

1.20.1

What's your suggestion?

I suggest to add /epicfight query subcommand.

Why?

Developers can use queried data from Epic Fight in-game for checking current player's fight mode and learned skills. This can be useful for map making and mod debugging.

Example

User creates an adventure map with Epic Fight mod. One area of the world requires to have learned "Roll" skill. By querying, developer can check skill existence and, if it exists, allow the player to access that zone.

Implementation

[] - Required argument
{} - Optional argument

Base subcommand:

/epicfight query [mode/skill]

---

/epicfight query mode {selector}

  This returns player's current fight mode.

  0 - Mining mode;
  1 - Battle mode.

---

/epicfight query skill learned [selector] [dodge/guard/identity/mover/passive1/passive2/passive3] {skill}

  If optional argument was not specified, then it checks for any skill in
  provided slot. Returns skill internal number.

  If multiple entries were found, then it returns selected one.

  If skill name was provided, then it checks its existence in given slot.
  Returns skill internal number.

  Otherwise, return 0.

/epicfight query skill selected [selector] [dodge/guard/identity/mover]

  Returns player's selected skill internal number.

  Otherwise, return 0.

Notes

  • Passives are not included in /epicfight query skill selected due to redundancy. These skills are allocating full passive slot, so /epicfight query skill learned should be used instead;
  • Results can be stored using /execute store result command.

Error handling

Trying to query data from many entities will yield in "Provided selector error" ("Only one entity is allowed, but the provided selector allows more than one").