This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
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
Chance
DropName
Title
File
Path or Path1
ShowItemName
A debugging protocol is essential, in order to test/verify that LB works as expected.
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.
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.
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)
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.
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
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.
So if debug is set to true the plugin will show messages on server console, i guess?
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.
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
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
Just to be clear, I am available to test these changes. Please let me know what you would like me to do.
Breaking a lucky block now shows a debug message.
I would be happy to test it. Where is the build?
Still not released. I'm not sure when it will be fully ready.
OK. Sorry to jump the gun. No worries.
To post a comment, please login or register a new account.