Package: gbf-beautify-honors
Granblue Fantasy - Beautify HonorsA CLI tool to help you figure out how to beautify honors in the Guild War event. (古戦場の貢献度調整)Read this in other languages:English,中文.Table of contentsGranblue Fantasay - Beautify HonorsTable of contentsPrerequisitesSystem requirementsHow to installHow to useInteractive mode exampleDirect mode exampleExamplesCase 1: There is a solutionCase 2: There is no solutionHow it worksHow to developSetupPrerequisitesPlease read at least one of these well-written tutorials to known how to get the exact honors.kamigame - 古戦場の貢献度調整のやり方gbf.wiki - Beauty of Honor巴哈姆特 - 古戰場修分大法(控分技巧)System requirementsPython 3.7+How to installIt is recommended to usepipxto install this tool because the application will be installed into an isolated and clean environment.pipxinstallgbf-beautify-honorsHowever, you still can use pip to install this cli.pipinstallgbf-beautify-honorsHow to useSolo the NM Bosses until the difference between your current honors and expected honors is roughly greater than one million. An appropriate gap is a good start because there may be a greater chance of finding a good way to achieve the goal.Run the cli tool in interactive mode or direct mode. Help page is simply shown below:$gbf-beautify-honors--help
Usage:gbf-beautify-honors[OPTIONS]Options:--currentINTEGERYourcurrenthonors[required]--expectedINTEGERYourexpectedhonors[required]--configPATHCustomconfigpath--helpShowthismessageandexit.Interactive mode example$gbf-beautify-honors
Yourcurrenthonors:1398542611Yourexpectedhonors:1400000000Customconfigpath[]:Direct mode examplegbf-beautify-honors--current=1398542611--expected=1400000000ExamplesNext, we will use some examples to explain how to use this tool, and how to adjust the configuration file.Case 1: There is a solution$gbf-beautify-honors
Yourcurrenthonors:1398542611Yourexpectedhonors:1400000000Customconfigpath[]:
╒═══════════════════════════════════════╤═════════╤═════════════════╕
│Action│Honor│OptimalTimes│
╞═══════════════════════════════════════╪═════════╪═════════════════╡
│EyeballVH(0button)│8000│1│
├───────────────────────────────────────┼─────────┼─────────────────┤
│MeatBeastVH(0button)│21400│4│
├───────────────────────────────────────┼─────────┼─────────────────┤
│MeatBeastEX(0button)│50578│3│
├───────────────────────────────────────┼─────────┼─────────────────┤
│MeatBeastEX+(0button)│80800│10│
├───────────────────────────────────────┼─────────┼─────────────────┤
│MeatBeastEX+(1summon)│80810│5│
├───────────────────────────────────────┼─────────┼─────────────────┤
│JoinraidandonlyuseBreakAssassin│1│5│
╘═══════════════════════════════════════╧═════════╧═════════════════╛Please note that there may be multiple solutions to the same input and there is currently no guarantee of consistent results. Another possibility is shown below:$gbf-beautify-honors
Yourcurrenthonors:1398542611Yourexpectedhonors:1400000000Customconfigpath[]:
╒═══════════════════════════════════════╤═════════╤═════════════════╕
│Action│Honor│OptimalTimes│
╞═══════════════════════════════════════╪═════════╪═════════════════╡
│EyeballH(0button)│6000│3│
├───────────────────────────────────────┼─────────┼─────────────────┤
│EyeballVH(0button)│8000│3│
├───────────────────────────────────────┼─────────┼─────────────────┤
│MeatBeastVH(0button)│21400│1│
├───────────────────────────────────────┼─────────┼─────────────────┤
│MeatBeastEX(0button)│50578│2│
├───────────────────────────────────────┼─────────┼─────────────────┤
│MeatBeastEX+(0button)│80800│13│
├───────────────────────────────────────┼─────────┼─────────────────┤
│MeatBeastEX+(1summon)│80810│3│
├───────────────────────────────────────┼─────────┼─────────────────┤
│JoinraidandonlyuseBreakAssassin│1│3│
╘═══════════════════════════════════════╧═════════╧═════════════════╛Case 2: There is no solutionBasically, there is always a solution because we can join raid and only use Break Assassin to get exactly 1 honor.
However, this is usually an unrealistic approach, so the default config makes some constraints on the maximum time on each type of battle. This leads to the fact that sometimes it is not possible to find a solution.$gbf-beautify-honors
Yourcurrenthonors:1399999900Yourexpectedhonors:1400000000Customconfigpath[]:
Thereisnosolutiontoachievetheexpectedhonors.Pleaserelaxtheconstraintsandtryagain.To solve this problem, we can use custom config to relax the constraints to find a solution.Download the exampleconfig.json.Modify themax_acceptable_timesof the action "Join raid and only use Break Assassin" to100.Re-run the script with custom config.$gbf-beautify-honors
Yourcurrenthonors:1399999900Yourexpectedhonors:1400000000Customconfigpath[]:config.json
╒═══════════════════════════════════════╤═════════╤═════════════════╕
│Action│Honor│OptimalTimes│
╞═══════════════════════════════════════╪═════════╪═════════════════╡
│JoinraidandonlyuseBreakAssassin│1│100│
╘═══════════════════════════════════════╧═════════╧═════════════════╛The configuration is flexible and you can try to modify different values in it, re-run the script and see if there is a solution. You can also add self-defined action into the config.json as long as you know you can get the exact honor value from this action, e.g. you can add this object into the actions list,{"name":"Some custom action for demo","honor":11,"max_acceptable_times":10}Re-run the script, it just works!$gbf-beautify-honors
Yourcurrenthonors:1399999900Yourexpectedhonors:1400000000Customconfigpath[]:config.json
╒═══════════════════════════════════════╤═════════╤═════════════════╕
│Action│Honor│OptimalTimes│
╞═══════════════════════════════════════╪═════════╪═════════════════╡
│JoinraidandonlyuseBreakAssassin│1│1│
├───────────────────────────────────────┼─────────┼─────────────────┤
│Somecustomactionfordemo│11│9│
╘═══════════════════════════════════════╧═════════╧═════════════════╛How it worksWe can formulate this problem as an integer programming problem and solve it using theOR-ToolsIs this case, we use an integer variable hito represent the exact honor earned from battlei(ican beEyeball N,Meat Beast EX+, ...).
And use another integer variable nito represent the number of battles we need to fight for the battlei.We want to get exact honors with minimum number of battles (more efficient), so the corresponding integer programming problem is:Additionally, we can add additional constraints to the integer variable nito limit the maximum number of each battle. e.g.,How to developSetupUsepoetryto setup dev environment.poetryinstall
poetryshellUsepre-commithook to check coding style.pre-commitinstall-tcommit-msg-tpre-commit