-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EV Training ready for testing #447
Conversation
modules/gui/ev_selection_window.py
Outdated
Label(window, text="HP").grid(row=0, column=1) | ||
Label(window, text="Atk").grid(row=0, column=2) | ||
Label(window, text="Def").grid(row=0, column=3) | ||
Label(window, text="SpA").grid(row=0, column=4) | ||
Label(window, text="SpD").grid(row=0, column=5) | ||
Label(window, text="Spe").grid(row=0, column=6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mapping is wrong on the UI, causing data to be mapped to the wrong stats in the code. Here's the correct UI -> Code mapping
Label(window, text="HP").grid(row=0, column=1)
Label(window, text="Atk").grid(row=0, column=2)
Label(window, text="Def").grid(row=0, column=3)
Label(window, text="Spe").grid(row=0, column=4)
Label(window, text="SpA").grid(row=0, column=5)
Label(window, text="SpD").grid(row=0, column=6)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works, but it is in non-standard EV ordering. If you choose to implement this solution, please do not implement any of my suggested changes.
modules/modes/ev_train.py
Outdated
} | ||
|
||
|
||
_list_of_stats = ("hp", "attack", "defence", "speed", "special_attack", "special_defence") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this to be in the standard EV order
_list_of_stats = ("hp", "attack", "defence", "speed", "special_attack", "special_defence") | |
_list_of_stats = ("hp", "attack", "defence", "special_attack", "special_defence", "speed") |
modules/gui/ev_selection_window.py
Outdated
Label(window, text="SpD").grid(row=0, column=5) | ||
Label(window, text="Spe").grid(row=0, column=6) | ||
|
||
for stat in ("hp", "attack", "defence", "speed", "special_attack", "special_defence"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this to be in the standard EV order for the UI input with correct mapping:
for stat in ("hp", "attack", "defence", "speed", "special_attack", "special_defence"): | |
for stat in ("hp", "attack", "defence", "special_attack", "special_defence", "speed"): |
modules/gui/ev_selection_window.py
Outdated
window.destroy() | ||
window = None | ||
|
||
def return_selection(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this to be in the standard EV order for the UI input with correct mapping:
def return_selection(): | |
def return_selection(): | |
nonlocal spinboxes, selected_ev_targets | |
selected_ev_targets = StatsValues( | |
hp=int(spinboxes[0].get()), | |
attack=int(spinboxes[1].get()), | |
defence=int(spinboxes[2].get()), | |
speed=int(spinboxes[5].get()), | |
special_attack=int(spinboxes[3].get()), | |
special_defence=int(spinboxes[4].get()), | |
) | |
window.after(50, remove_window) |
modules/gui/ev_selection_window.py
Outdated
Label(window, text="HP").grid(row=0, column=1) | ||
Label(window, text="Atk").grid(row=0, column=2) | ||
Label(window, text="Def").grid(row=0, column=3) | ||
Label(window, text="SpA").grid(row=0, column=4) | ||
Label(window, text="SpD").grid(row=0, column=5) | ||
Label(window, text="Spe").grid(row=0, column=6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works, but it is in non-standard EV ordering. If you choose to implement this solution, please do not implement any of my suggested changes.
Notes
The EV target GUI window is buggy. It does not disappear after selecting the target. Closing the window before pressing the 'EV Train' button also causes the bot to freeze.
Checklist
Haven't done these
--line-length 120
argument