-
Notifications
You must be signed in to change notification settings - Fork 271
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
Use Gym to train stats (#107) update #303
Open
Arthan-the-one
wants to merge
18
commits into
alainbryden:main
Choose a base branch
from
Arthan-the-one:gym
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
f2f0d40
Implementation of #107
Bindygames 80963d4
Implement ETA
Bindygames 7811418
Merge branch 'main' into gym
Arthan-the-one 35e04b6
Merge branch 'main' into gym
Arthan-the-one fd7bfb9
Merge branch 'main' into gym
Arthan-the-one b99853d
Merge branch 'main' into gym
Arthan-the-one 4d616a9
code cleanup and including cost precalc
Arthan-the-one 85f615e
calculate cost pre-travel, fix focus handling
Arthan-the-one 4b30cd9
removed forgotten parameter
Arthan-the-one 4698d2b
Merge branch 'main' into gym
Arthan-the-one 097db51
consider backdoor in price calculation
Arthan-the-one ab93246
fixed some messages, added option to disable gym, dodge some ram usage
Arthan-the-one b3f64ed
Merge branch 'main' into gym
Arthan-the-one 939d7e2
fixed arg error
Arthan-the-one e43f3f8
fixed eta and stop
Arthan-the-one b15c473
implemented using best available server
Arthan-the-one bd13272
do not train finished stats, fix broken reference
Arthan-the-one e7f4b64
made log less spammy
Arthan-the-one File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
From the feature request: #107
It was suggested that if Gangs are unlocked (BN2), we should always prioritize "training" via crime (e.g. Karma generating actions) until we have the -52K karma required to join a gang, and only resort to gym-training after the gang.
Once we've abstracted this a bit more to have a clear upfront "decision" on whether to use crime or gym to train, we can add some logic to that decision-making process to favour crime if we're not yet in a gang. We can re-use the
options['no-crime']
check if ever someone wanted to override this and hit the gym instead.Another option is that we create a separate function in the main "work loop" that simply prioritizes doing crime for gang requirements before it starts attempting to work for factions (controllable via config options). Then this routine doesn't need any gangs-specific logic and can just focus on the requirements. That's probably the better approach.
That also helped me notice another thing that needs fixing: Everything that calls this "crimeForKillsKarmaStats" function is gated behind a
options['no-crime']
check, which will skip it - but now that this function might also be opting to use the gym, we will need to move that check from outside of the function to inside of it, and revise usages to make sure they make sense. We'll probably also want to add an equivalentoptions['no-gym']
option for anyone wanting to similarily avoid working out.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.
added option no-gym, no-crime now only selects crime.
gangs still ToDo.
only 3 places called the function: crime.js -> altered to call new commitCrime; karma-increasing criming in mainLoop -> commitCrime; earnFactionInvite -> split into crime and gym