Feature request: Debugging and configuration support #33


  • Enhancment
  • Accepted
Open
Assigned to mcgamer199
  • SpigotSlimeDog created this issue Jan 4, 2018

    It would be nice to have a debugging facility, to display the data and logic for each luckyblock decision in the console/log. This would make it much easier to configure drops efficiently. Of course, it should be controlled by a config.yml node, say

    debug: true | false

    Default should be false. Useful debug data would include:

    • Luck value (from the item lore)
    • File selection: plugins/LuckyBlock/Drops/default/lb_*
    • Probability values
      • Luck (from the selected file)
      • Total luck (from all files)
      • Chance (from the item)
      • Calculated probability
    • Selected Drops node values:
      • node name
      • Chance

      • DropName

      • Title

      • File

      • Path or Path1

      • ShowItemName

      • Effects
      • Message
    • Drop location
  • SpigotSlimeDog added a tag Enhancment Jan 4, 2018
  • SpigotSlimeDog edited title and description Jan 4, 2018
  • MCGamer199 self-assigned this issue Jan 4, 2018
  • SpigotSlimeDog posted a comment Jan 4, 2018

    A debugging protocol is essential, in order to test/verify that LB works as expected.

  • SpigotSlimeDog posted a comment Jan 5, 2018

    With the need to reconfigure the luck factors, debugging facilities are even more important to verify correct selection of luck outcomes.

    For example, with a single lb_all.yml file, and Chance for all negative outcomes reduced by half, I am getting almost completely negative outcomes. This should not be the case, since the combined negative chances are now 150/950 (originally 300/1100). Please introduce debugging facilities, so these issues can be verified and (if needed) corrected.


    Edited Jan 5, 2018
  • SpigotSlimeDog posted a comment Jan 5, 2018

    Additional request: In debug mode, the outcomes should be reported, but not actually produced. This would allow for fast testing, without having to survive all the consequences.

  • SpigotSlimeDog posted a comment Jan 5, 2018

    Basically, debug should provide all the information sufficient to verify that the plugin is working as designed; see above for a minimal dataset. An example of how this could work:

    In config.yml:

    debug: true (default false)

    break-block-on-debug: false (default true)

    would activate debug mode, which should be available only to ops, or to players with a specific permission, say lb.debug. In debug mode, the analysis would be reported when a luckyblock is broken. The luckyblock would be either be replaced (break-block-on-debug:false) or the outcome would be produced (break-block-on-debug:true). The analysis could be written to the in-game chat, but in any event should be written to the console/log.


    Edited Jan 5, 2018
  • SpigotSlimeDog posted a comment Jan 5, 2018

    You could add more debug output control with something like:

    debug: true

    break-block-on-debug: false

    debug-report-luck-value: true

    debug-report-filename: true

    debug-report-luck-range: true # from selected file

    debug-report-total-luck: true # from all files

    debug-report-file: true

    debug-report-node: true

    debug-report-chance: true

    debug-report-path: true

    debug-report-path1: true

    debug-report-dropName: true

    All should default to true.


    Edited Jan 5, 2018
  • MCGamer199 posted a comment Jan 5, 2018

    So if debug is set to true the plugin will show messages on server console, i guess?

  • SpigotSlimeDog posted a comment Jan 5, 2018

    On the console (and therefore, log) at the very least. You might consider

    debug-report-in-game:true

    (or similar) as well, but I would be happy with console/log output.

  • SpigotSlimeDog posted a comment Jan 6, 2018

    It's completely up to you, but an alternative configuration arrangement, that is perhaps easier to read -- follow the layout of the actual file entries. Something like:

    debug:

      enable: true

      break-block: false

      report-in-game: false

      report-values:

        Luck:

          value: true

          file: true # the name of the lb_* file

          range: true # from selected file

          total: true # from all files

        Drops:

          all: true # OR THE INDIVIDUAL NODES

          node: true

          Chance: true

          DropName: true

          Title: true

          File: true

          Path: true

          Path1: true

          Effects: true

          Message: true

          ShowItemName: true

          Times: true

          BlockMaterials: true

          ItemMaterials: true

          LocationType: true

          Location: true

          Items: true

     

  • SpigotSlimeDog posted a comment Jan 6, 2018

    Just to be clear, I am available to test these changes. Please let me know what you would like me to do.

  • MCGamer199 posted a comment Apr 21, 2018

    Breaking a lucky block now shows a debug message.

  • SpigotSlimeDog posted a comment Apr 21, 2018

    I would be happy to test it. Where is the build?

  • MCGamer199 posted a comment Apr 22, 2018

    Still not released. I'm not sure when it will be fully ready.

  • SpigotSlimeDog posted a comment Apr 22, 2018

    OK. Sorry to jump the gun. No worries.

  • MCGamer199 added a tag Accepted Jun 4, 2019

To post a comment, please login or register a new account.