parser=GooeyParser(description=f'AzurLaneAutoScript, An Azur Lane automation tool. Config: {config_file}\nDo not forget to Press start button to save your settings in each function that modifies')
stage.add_argument('--enable_exception',default=default('--enable_exception'),choices=['yes','no'],help='Enable or disable some exceptions, ALAS will withdraw from the map when it occurs instead of stopping',gooey_options={'label_color':'#4B5F83'})
stage.add_argument('--enable_fast_forward',default=default('--enable_fast_forward'),choices=['yes','no'],help='Enable or disable clearing mode',gooey_options={'label_color':'#4B5F83'})
stage.add_argument('--enable_2x_book',default=default('--enable_2x_book'),choices=['yes','no'],help='Enable or disable 2x book (spends 2x oil/emotion for 2x item drops)',gooey_options={'label_color':'#4B5F83'})
stop=stage.add_argument_group('Stop condition','After triggering, it will not stop immediately. It will complete the current attack first, Set 0 to disable',gooey_options={'label_color':'#4B5F83'})
stop.add_argument('--if_count_greater_than',default=default('--if_count_greater_than'),help='How many map completions\n until ALAS enter in Reward loop.',gooey_options={'label_color':'#4B5F83'})
stop.add_argument('--if_time_reach',default=default('--if_time_reach'),help='How many time in minutes run ALAS until stop\n. It is recommended about\n 10 minutes to complete the current attack. Format 14:59',gooey_options={'label_color':'#4B5F83'})
stop.add_argument('--if_oil_lower_than',default=default('--if_oil_lower_than'),help='Will enter in reward loop when\ntriggered Oil limit',gooey_options={'label_color':'#4B5F83'})
stop.add_argument('--if_trigger_emotion_control',default=default('--if_trigger_emotion_control'),choices=['yes','no'],help='Will enter in reward loop when\ntriggered Mood limit',gooey_options={'label_color':'#4B5F83'})
stop.add_argument('--if_reach_lv120',default=default('--if_reach_lv120'),choices=['yes','no'],help='Will enter in reward loop when\na ship of lv119 reached lv120 in combat',gooey_options={'label_color':'#4B5F83'})
fleet=setting_parser.add_argument_group('Attack fleet','Fleet step enables only in event maps without clear mode',gooey_options={'label_color':'#931D03'})
fleet.add_argument('--enable_fleet_reverse_in_hard',default=default('--enable_fleet_reverse_in_hard'),choices=['yes','no'],help='Use fleet 2 for mobs, fleet 1 for boss, only enabled in hard mode and event hard. If enable auto search, this option will be disabled',gooey_options={'label_color':'#4B5F83'})
f1=fleet.add_argument_group('Mob Fleet','Players can choose a formation before battle. Though it has no effect appearance-wise, the formations applies buffs to certain stats.\nLine Ahead: Increases Firepower and Torpedo by 15%, but reduces Evasion by 10% (Applies only to Vanguard fleet)\nDouble Line: Increases Evasion by 30%, but decreases Firepower and Torpedo by 5% (Applies only to Vanguard fleet)\nDiamond: Increases Anti-Air by 20% (no penalties, applies to entire fleet).\nIf enable auto search, this is fleet 1',gooey_options={'label_color':'#4B5F83'})
f1.add_argument('--fleet_step_1',default=default('--fleet_step_1'),choices=['1','2','3','4','5','6'],help='In event map, fleet has limit on moving, so fleet_step is how far can a fleet goes in one operation, if map cleared, it will be ignored',gooey_options={'label_color':'#4B5F83'})
f2.add_argument('--fleet_step_2',default=default('--fleet_step_2'),choices=['1','2','3','4','5','6'],help='In event map, fleet has limit on moving, so fleet_step is how far can a fleet goes in one operation, if map cleared, it will be ignored',gooey_options={'label_color':'#4B5F83'})
emotion.add_argument('--enable_emotion_reduce',default=default('--enable_emotion_reduce'),help='Set No to disable MOOD control by ALAS',choices=['yes','no'],gooey_options={'label_color':'#4B5F83'})
hp_balance.add_argument('--scout_hp_difference_threshold',default=default('--scout_hp_difference_threshold'),help='When the difference in HP volume is greater than the threshold, transpose',gooey_options={'label_color':'#4B5F83'})
hp_balance.add_argument('--scout_hp_weights',default=default('--scout_hp_weights'),help='Should be repaired when there is a difference in Vanguard, format 1000,1000,1000',gooey_options={'label_color':'#4B5F83'})
hp_add.add_argument('--emergency_repair_single_threshold',default=default('--emergency_repair_single_threshold'),help='Used when single shipgirl is below the threshold',gooey_options={'label_color':'#4B5F83'})
hp_add.add_argument('--emergency_repair_hole_threshold',default=default('--emergency_repair_hole_threshold'),help='Used when all front rows or all back rows are below the threshold',gooey_options={'label_color':'#4B5F83'})
hp_withdraw=hp.add_argument_group('Low HP volume withdrawal','',gooey_options={'label_color':'#4B5F83'})
hp_withdraw.add_argument('--low_hp_withdraw_threshold',default=default('--low_hp_withdraw_threshold'),help='When HP is below the threshold, retreat',gooey_options={'label_color':'#4B5F83'})
retire.add_argument('--retire_method',default=default('--retire_method'),choices=['enhance','one_click_retire','old_retire'],help='If choosing enhance, when not having enough enhance material, will use one click retire',gooey_options={'label_color':'#4B5F83'})
help='Use example format "cv > bb > ..." may omit a ship type category altogether to skip otherwise insert at least one white space character to not apply an index filter. Using \'?\' will have ALAS select a category at random, may use multiple in same string',
help='How many ships at maximum are viewed before moving onto the next category, ships that are \'in battle\' do not count towards this number and are skipped to the next available ship for enhancement',
rarity=retire.add_argument_group('Retirement rarity','The ship type selection is not supported yet. Ignore the following options when using one-key retirement',gooey_options={'label_color':'#4B5F83'})
drop=setting_parser.add_argument_group('Drop record','Save screenshots of dropped items, which will slow down the click speed when settlement is enabled',gooey_options={'label_color':'#931D03'})
# clear = setting_parser.add_argument_group('Wasteland mode', 'Unopened maps will stop after completion. Opened maps will ignore options, and its done if you do not open up')
# clear.add_argument('--map_star_clear_all', default=default('--map_star_clear_all'), choices=['index_1', 'index_2', 'index_3', 'do_not_use'], help='The first few stars are to destroy all enemy ships')
reward_condition=reward_parser.add_argument_group('Triggering conditions','Need to Press start to save your settings, after running it will enter the on-hook vegetable collection mode',gooey_options={'label_color':'#931D03'})
reward_general.add_argument('--enable_data_key_collect',default=default('--enable_data_key_collect'),help='Enable collection of data key in war archives.',choices=['yes','no'],gooey_options={'label_color':'#4B5F83'})
reward_dorm.add_argument('--enable_dorm_reward',default=default('--enable_dorm_reward'),choices=['yes','no'],help='Dorm collect coins and loves',gooey_options={'label_color':'#4B5F83'})
help='How many minutes to replace feed. Recommend to set a time range, such as "10, 40"\nIf 6 ships in dorm, to use 6 kind of food, interval needs to greater than (14, 28, 42, 70, 139, 278)',gooey_options={'label_color':'#4B5F83'})
reward_dorm.add_argument('--dorm_feed_filter',default=default('--dorm_feed_filter'),help='Like research filter string',gooey_options={'label_color':'#4B5F83'})
priority2.add_argument('--daily_comm',default=default('--daily_comm'),help='Daily resource development, high-level tactical research and development',gooey_options={'label_color':'#4B5F83'})
priority4.add_argument('--urgent_drill',default=default('--urgent_drill'),help='Defend the transport troops, annihilate the enemy elite troops',gooey_options={'label_color':'#4B5F83'})
priority4.add_argument('--urgent_part',default=default('--urgent_part'),help='Support Vila Vela Island, support terror Banner',gooey_options={'label_color':'#4B5F83'})
priority4.add_argument('--urgent_book',default=default('--urgent_book'),help='Support Tuhaoer Island, support Moe Island',gooey_options={'label_color':'#4B5F83'})
reward_tactical=reward_parser.add_argument_group('Classroom','Only support continuation of skill books, not new skills',gooey_options={'label_color':'#931D03'})
choices=['yes','no'],help='Choose Yes, give priority to the 150% bonus \nSelect No, give priority to the skills book with the same rarity',gooey_options={'label_color':'#4B5F83'})
choices=['3','2','1'],help='Wich skill book will use first\nT3 is a gold book, T2 is a purple book, T1 is a blue book\ntier_max should greater than or equal to tier_min',gooey_options={'label_color':'#4B5F83'})
reward_meowfficer.add_argument('--buy_meowfficer',default=default('--buy_meowfficer'),help='From 0 to 15. If no need, fill 0.',gooey_options={'label_color':'#4B5F83'})
reward_guild=reward_parser.add_argument_group('Guild','Check Guild Logistics and Operations. Running for every reward loop.',gooey_options={'label_color':'#931D03'})
reward_guild.add_argument('--enable_guild_logistics',default=default('--enable_guild_logistics'),help='Enable logistics actions if applicable.',choices=['yes','no'],gooey_options={'label_color':'#4B5F83'})
reward_guild.add_argument('--enable_guild_operations',default=default('--enable_guild_operations'),help='Enable operations actions if applicable.',choices=['yes','no'],gooey_options={'label_color':'#4B5F83'})
reward_guild_logistics_items=reward_guild.add_argument_group('Logistics item input','Available items: t1, t2, t3, oxycola, coolant, coins, oil, and merit. Omitting an item will skip it. Less error-prone with many specified',gooey_options={'label_color':'#4B5F83'})
reward_guild_logistics_plates=reward_guild.add_argument_group('Logistics plate input','Available plates: torpedo, antiair, plane, gun, and general. Omitting a plate will skip it. Less error-prone with many specified',gooey_options={'label_color':'#4B5F83'})
'Enter between 0 and 1\nEx) \'0.5\' join if current progress roughly less than half or \'1\' join regardless of progress',gooey_options={'label_color':'#4B5F83'})
help='Enable auto-battle of guild raid boss. If fleet composition with or without guild support is incomplete, does not attempt. Enable boss recommend to bypass',
help='Enable auto-recommend a fleet composition for guild raid boss, all guild support is removed if any',choices=['yes','no'],gooey_options={'label_color':'#4B5F83'})
emulator=emulator_parser.add_argument_group('Emulator','Need to Press start to save your settings, it will check whether the game is started \nIf the game has not started, it will be started',gooey_options={'label_color':'#931D03'})
choices=['high_level','medium_level','low_level','index_1','index_2','index_3'],help='Needs to unlock daily skip, if not unlocked, skip',gooey_options={'label_color':'#4B5F83'})
help='If use one fleet, fill in the index of the fleet, such as 5\nIf use different fleets in different daily, separate index with commas, order: Escort Mission, Advance Mission, Fierce Assault, Tactical Training, such as 5, 5, 5, 6',gooey_options={'label_color':'#4B5F83'})
help='Change equipment before playing, unload equipment after playing, do not need to fill in 0 \ncomma, such as 3, 1, 0, 1, 1, 0',gooey_options={'label_color':'#4B5F83'})
help='Change equipment before playing, unload equipment after playing, do not need to fill in 0 \ncomma, such as 3, 1, 0, 1, 1, 0',gooey_options={'label_color':'#4B5F83'})
exercise.add_argument('--exercise_try',default=default('--exercise_try'),help='The number of attempts by each opponent',gooey_options={'label_color':'#4B5F83'})
help='After HP is below the threshold, it will retreat after a certain period of time \nRecommended 1.0 ~ 3.0',gooey_options={'label_color':'#4B5F83'})
help='Change equipment before playing, unload equipment after playing, do not need to fill in 0 \ncomma, such as 3, 1, 0, 1, 1, 0',gooey_options={'label_color':'#4B5F83'})
# event_daily_ab
event_bonus=daily_parser.add_argument_group('Event Daily Bonus','bonus for first clear each day',gooey_options={'label_color':'#931D03'})
raid_bonus.add_argument('--os_ash_assist_tier',default=default('--os_ash_assist_tier'),help='Find beacons with tier greater or equal than this',gooey_options={'label_color':'#4B5F83'})
event.add_argument('--event_stage',default=default('--event_stage'),help='Type stage name, not case sensitive, E.g D3, SP3, HT6',gooey_options={'label_color':'#4B5F83'})
event.add_argument('--event_name',default=event_latest,choices=event_folder,help='There a dropdown menu with many options',gooey_options={'label_color':'#4B5F83'})
'sos settings','Set fleets for SOS maps, order: fleet_1, fleet_2, submarine_fleet\nsuch as "4, 6", "4, 0", "4, 6, 1"\nFill 0 to skip a map',gooey_options={'label_color':'#931D03'})
'war archives settings','Type a stage and select a corresponding event for that stage',gooey_options={'label_color':'#931D03'})
war_archives.add_argument('--war_archives_stage',default=default('--war_archives_stage'),help='Type stage name, not case sensitive, E.g D3, SP3, HT6',gooey_options={'label_color':'#4B5F83'})
war_archives.add_argument('--war_archives_name',default=default('--war_archives_name'),choices=archives_folder,help='There a dropdown menu with many options',gooey_options={'label_color':'#4B5F83'})
semi=semi_parser.add_argument_group('Semi-automatic mode','Manual selection of enemies, automatic settlement, used to attack unsuited pictures',gooey_options={'label_color':'#931D03'})
semi.add_argument('--enable_semi_story_skip',default=default('--enable_semi_story_skip'),help='Note that this will automatically confirm all the prompt boxes, including the red face attack',
c_1_1=c_1_1_parser.add_argument_group('c1-1_affinity_farming','Will auto turn off clearing mode\nWith MVP, 8 battle to 1 affnity. Without MVP, 16 battle to 1 affnity.',
c_12_4=c_12_4_parser.add_argument_group('12-4 Search enemy settings','Need to ensure that the team has a certain strength',gooey_options={'label_color':'#931D03'})
os_semi=os_semi_parser.add_argument_group('os_semi_auto','Start and finish combat automatically\nOnly recommended to use in normal zones and safe zones',gooey_options={'label_color':'#931D03'})
os_semi.add_argument('--enable_os_semi_story_skip',default=default('--enable_os_semi_story_skip'),choices=['yes','no'],help='Note that this will automatically choose the options in map events',gooey_options={'label_color':'#4B5F83'})
# os_semi = os_semi_parser.add_argument_group('os_clear_map', 'Only recommended to use in save zones. To use in normal zones, execute air search manually first.\nUsage: Enter map manually and run\nRecommend to re-check map manually after run', gooey_options={'label_color': '#931D03'})
# os_semi.add_argument('--enable_os_ash_attack', default=default('--enable_os_ash_attack'), choices=['yes', 'no'], help='Attack ash if beacon data is full', gooey_options={'label_color': '#4B5F83'})
os=os_parser.add_argument_group('OS fully auto','Run sequence: Accept dailies and buy supplies > do dailies > do obscure zone > meowfficer farming\nPort shop is a limited pool of items. Ports have the same items, but appear randomly. Buy all if you want good items\nShop priority format: ActionPoint > PurpleCoins > TuringSample > RepairPack',gooey_options={'label_color':'#931D03'})
os.add_argument('--do_os_in_daily',default=default('--do_os_in_daily'),choices=['yes','no'],help='Do OS as a part of daily',gooey_options={'label_color':'#4B5F83'})
os_daily.add_argument('--enable_os_mission_accept',default=default('--enable_os_mission_accept'),choices=['yes','no'],help='Accept all missions in port',gooey_options={'label_color':'#4B5F83'})
os_daily.add_argument('--enable_os_mission_finish',default=default('--enable_os_mission_finish'),choices=['yes','no'],help='Goto the zone of daily and clear',gooey_options={'label_color':'#4B5F83'})
os_daily.add_argument('--enable_os_supply_buy',default=default('--enable_os_supply_buy'),choices=['yes','no'],help='Buy all daily supplies',gooey_options={'label_color':'#4B5F83'})
os_daily.add_argument('--enable_os_ash_attack',default=default('--enable_os_ash_attack'),choices=['yes','no'],help='Attack ash if beacon data is full',gooey_options={'label_color':'#4B5F83'})
os_farm.add_argument('--enable_os_obscure_finish',default=default('--enable_os_obscure_finish'),choices=['yes','no'],help='[Developing]Clear all obscured zones',gooey_options={'label_color':'#4B5F83'})
os_farm.add_argument('--enable_os_meowfficer_farming',default=default('--enable_os_meowfficer_farming'),choices=['yes','no'],help='Do meowfficer searching point farming',gooey_options={'label_color':'#4B5F83'})
os_farm.add_argument('--os_meowfficer_farming_level',default=default('--os_meowfficer_farming_level'),choices=['1','2','3','4','5','6'],help='Corruption 3 and 5 have higher meowfficer point per action point. Corruption 5 is recommended',gooey_options={'label_color':'#4B5F83'})
os_setting.add_argument('--enable_os_action_point_buy',default=default('--enable_os_action_point_buy'),choices=['yes','no'],help='Use oil to buy action points, buy first then use AP boxes',gooey_options={'label_color':'#4B5F83'})
os_setting.add_argument('--os_action_point_preserve',default=default('--os_action_point_preserve'),help='Include AP boxes, stop if lower than this',gooey_options={'label_color':'#4B5F83'})