{"action":"created","issue":{"url":"https://api.github.com/repos/DFHack/scripts/issues/76","repository_url":"https://api.github.com/repos/DFHack/scripts","labels_url":"https://api.github.com/repos/DFHack/scripts/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/DFHack/scripts/issues/76/comments","events_url":"https://api.github.com/repos/DFHack/scripts/issues/76/events","html_url":"https://github.com/DFHack/scripts/pull/76","id":348123220,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2NTQ4NzI3","number":76,"title":"Dwarf buffing script","user":{"login":"cppcooper","id":7276349,"node_id":"MDQ6VXNlcjcyNzYzNDk=","avatar_url":"https://avatars1.githubusercontent.com/u/7276349?v=4","gravatar_id":"","url":"https://api.github.com/users/cppcooper","html_url":"https://github.com/cppcooper","followers_url":"https://api.github.com/users/cppcooper/followers","following_url":"https://api.github.com/users/cppcooper/following{/other_user}","gists_url":"https://api.github.com/users/cppcooper/gists{/gist_id}","starred_url":"https://api.github.com/users/cppcooper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cppcooper/subscriptions","organizations_url":"https://api.github.com/users/cppcooper/orgs","repos_url":"https://api.github.com/users/cppcooper/repos","events_url":"https://api.github.com/users/cppcooper/events{/privacy}","received_events_url":"https://api.github.com/users/cppcooper/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-07T00:17:34Z","updated_at":"2018-10-11T15:14:58Z","closed_at":"2018-10-11T15:14:58Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/DFHack/scripts/pulls/76","html_url":"https://github.com/DFHack/scripts/pull/76","diff_url":"https://github.com/DFHack/scripts/pull/76.diff","patch_url":"https://github.com/DFHack/scripts/pull/76.patch"},"body":"I apologize for the laziness of this writeup, I've been meaning to make this pull request for a few months now. Decided to just push this out while its on my brain.\r\n\r\nThe script basically can be used to improve your dwarves. I supports upto ~120 dwarves. It isn't extremely detailed, it actually aims to have dwarves multi-task for certain roles. The intended use case is to reset all skills and attributes of the selected dwarves and then \"pimp them\", which means to assign labors and well generally make those dwarves better. You would run the follow command to accomplish this task:\r\n`pimp-it -select unpimped -clear -pimpem`\r\n\r\nThe dwarves will be buffed if they are assigned jobs or professions, or what I call \"dorf-types\" (eg. strong, smart, fast). The reason this script exists is because I wanted to make dwarf therapist even better by allowing very easy use of \"assign labors\" which is the purpose of resetting the dwarves before buffing them.\r\n\r\nHere are the help functions which detail the options available.\r\n\r\n```lua\r\nfunction ShowHelp()\r\n    print(\"\\nusage: pimp-it [-help|-select]\")\r\n    print(\"               -select <sel-opt> -<command> <args>\")\r\n    ShowHint()\r\n    print(\"~~~~~~~~~~~~\")\r\n    print(\" select options:\\n  (protected is the only option which will select PROTECTED dwarves)\")\r\n    print(\"    all         - selects all dwarves.\")\r\n    print(\"    highlighted - selects only the in-game highlighted dwarf (from any screen).\")\r\n    print(\"    named       - selects dwarves with user-given names.\")\r\n    print(\"    unnamed     - selects dwarves without user-given names.\")\r\n    print(\"    employed    - selects dwarves with custom professions. Excludes pimped dwarves.\")\r\n    print(\"    pimped      - selects dwarves based on session data. Dwarves who have been pimped, should be listed in this data.\")\r\n    print(\"    unpimped    - selects any dwarves that don't appear in session data.\")\r\n    print(\"    protected   - selects any dwarves which use protection signals in their name or profession. (ie. {'_', 'c', 'j', 'p'})\")\r\n    print(\"    unprotected - selects any dwarves which don't use protection signals in their name or profession.\")\r\n    print(\"    drunks      - selects any dwarves which are currently zeroed, or were originally drunks as their profession.\")\r\n    print(\"    jobs        - selects any dwarves with the listed job types. This will only match with custom professions, or pimped dwarves (for pimped dorfs see: dorf_jobs in dorf_tables.lua).\")\r\n    print(\"                - usage `-select [ jobs job1 job2 etc. ]` eg. `-select [ jobs Miner Trader ]`\")\r\n    print(\"~~~~~~~~~~~~\")\r\n    print(\"Commands will run on the selected dwarves\\n available commands:\")\r\n    print(\"    clear              - zeroes selected dwarves. No attributes, no labours. Assigns 'DRUNK' profession.\")\r\n    print(\"    reroll <inclusive> - zeroes selected dwarves, then rerolls that dwarf based on its job. Ignores dwarves with unlisted jobs.\")\r\n    print(\"                       - optional argument: inclusive. Only performs the reroll, will no zero the dwarf first. Benefit: stats can only go higher, not lower.\")\r\n    print(\"    pimpem             - performs a job search for unpimped dwarves. Each dwarf will be found a job according to the job_distribution table in dorf_tables.lua\")\r\n    print(\"    applyjobs          - applies the listed jobs to the selected dwarves. list format: `[ job1 job2 jobn ]` brackets and jobs all separated by spaces.\")\r\n    print(\"                       - see dorf_jobs table in dorf_tables.lua for available jobs.\")\r\n    print(\"    applyprofessions   - applies the listed professions to the selected dwarves. list format: `[ prof1 prof2 profn ]` brackets and professions all separated by spaces.\")\r\n    print(\"                       - see professions table in dorf_tables.lua for available professions.\")\r\n    print(\"    applytypes         - applies the listed types to the selected dwarves. list format: `[ type1 type2 typen ]` brackets and types all separated by spaces.\")\r\n    print(\"                       - see dorf_types table in dorf_tables.lua for available types.\")\r\n    print(\"~~~~~~~~~~~~\\n\\tOther Arguments:\")\r\n    print(\"\\t\\thelp - displays this help information.\")\r\n    print(\"\\t\\tdebug - enables debugging print lines\")\r\n\r\n    print(\"No dorfs were harmed in the building of this help screen.\")\r\nend\r\n\r\nfunction ShowHint()\r\n    print(\"\\n============\\npimp-it script\")\r\n    print(\"~~~~~~~~~~~~\")\r\n    print(\"To use this script, you need to select a subset of your dwarves. Then run commands on those dwarves.\")\r\n    print(\"Examples:\")\r\n    print(\"  [DFHack]# pimp-it -select [ jobs Trader Miner Leader Warden ] -applytype adaptable\")\r\n    print(\"  [DFHack]# pimp-it -select all -clear -pimpem\")\r\n    print(\"  [DFHack]# pimp-it -select pimped -reroll\")\r\n    print(\"  [DFHack]# pimp-it -select named -reroll inclusive -applyprofession RECRUIT\")\r\nend\r\n```"},"comment":{"url":"https://api.github.com/repos/DFHack/scripts/issues/comments/428994461","html_url":"https://github.com/DFHack/scripts/pull/76#issuecomment-428994461","issue_url":"https://api.github.com/repos/DFHack/scripts/issues/76","id":428994461,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODk5NDQ2MQ==","user":{"login":"cppcooper","id":7276349,"node_id":"MDQ6VXNlcjcyNzYzNDk=","avatar_url":"https://avatars1.githubusercontent.com/u/7276349?v=4","gravatar_id":"","url":"https://api.github.com/users/cppcooper","html_url":"https://github.com/cppcooper","followers_url":"https://api.github.com/users/cppcooper/followers","following_url":"https://api.github.com/users/cppcooper/following{/other_user}","gists_url":"https://api.github.com/users/cppcooper/gists{/gist_id}","starred_url":"https://api.github.com/users/cppcooper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cppcooper/subscriptions","organizations_url":"https://api.github.com/users/cppcooper/orgs","repos_url":"https://api.github.com/users/cppcooper/repos","events_url":"https://api.github.com/users/cppcooper/events{/privacy}","received_events_url":"https://api.github.com/users/cppcooper/received_events","type":"User","site_admin":false},"created_at":"2018-10-11T15:14:58Z","updated_at":"2018-10-11T15:14:58Z","author_association":"NONE","body":"Opening a new pull request with a cleaned-up branch."}}
{"actor":{"display_login":"cppcooper"}}