[Userscript] OC 2.0 overview (PDA compatible) - Page 2 | Tools…

[Userscript] OC 2.0 overview (PDA compatible)

    • Lewri [1762864]
    • Role: Civilian
    • Level: 98
    • Posts: 1,137
    • Karma: 456
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 17:56:33 - 20/01/25 (3 months ago)
    Post link copied to clipboard Copy post link

    Dsla [2807954]

    Doesn't work for faction leaders- or at least for me anymore. Says I don't have OC perms.

    are you sure you're even using the right script? This one doesn't throw an error for wrong key.

    cpomyHC.png

    • Dsla [2807954]
    • Role: Civilian
    • Level: 15
    • Posts: 1,867
    • Karma: 3,663
    • Last Action: 20 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 18:02:13 - 20/01/25 (3 months ago)
    Post link copied to clipboard Copy post link

    Dsla [2807954]

    Doesn't work for faction leaders- or at least for me anymore. Says I don't have OC perms.

    Lewri [1762864]

    are you sure you're even using the right script? This one doesn't throw an error for wrong key.

    924ac78d-d360-4a1c-9c26-255d5268f77f-2807954.png

     

    It was working right, but i deleted all my API keys and remade them (due to the TornPal sketchy thing). Where the list of names of players who are not in an OC were before it just say I didn't have OC perms.

     

    When I fly back I'll get you a picture.

    Last edited by Dsla on 18:02:30 - 20/01/25 (3 months ago)

    27ecacc7-4a02-4222-8293-25148e96882a-2807954.png

    • Lewri [1762864]
    • Role: Civilian
    • Level: 98
    • Posts: 1,137
    • Karma: 456
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 18:06:07 - 20/01/25 (3 months ago)
    Post link copied to clipboard Copy post link

    Dsla [2807954]

    Doesn't work for faction leaders- or at least for me anymore. Says I don't have OC perms.

    Lewri [1762864]

    are you sure you're even using the right script? This one doesn't throw an error for wrong key.

    Dsla [2807954]

    924ac78d-d360-4a1c-9c26-255d5268f77f-2807954.png

     

    It was working right, but i deleted all my API keys and remade them (due to the TornPal sketchy thing). Where the list of names of players who are not in an OC were before it just say I didn't have OC perms.

     

    When I fly back I'll get you a picture.

    Try right clicking on it to open the script in tampermonkey, then go to the storage tab and check the API key stored in there. If its not your new one, update it in there.

    cpomyHC.png

    • Dsla [2807954]
    • Role: Civilian
    • Level: 15
    • Posts: 1,867
    • Karma: 3,663
    • Last Action: 20 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 19:46:55 - 20/01/25 (3 months ago)
    Post link copied to clipboard Copy post link

    Dsla [2807954]

    Doesn't work for faction leaders- or at least for me anymore. Says I don't have OC perms.

    Lewri [1762864]

    are you sure you're even using the right script? This one doesn't throw an error for wrong key.

    Dsla [2807954]

    924ac78d-d360-4a1c-9c26-255d5268f77f-2807954.png

     

    It was working right, but i deleted all my API keys and remade them (due to the TornPal sketchy thing). Where the list of names of players who are not in an OC were before it just say I didn't have OC perms.

     

    When I fly back I'll get you a picture.

    Lewri [1762864]

    Try right clicking on it to open the script in tampermonkey, then go to the storage tab and check the API key stored in there. If its not your new one, update it in there.

    Yeah for some reason it doesn't save the new one I'm putting in, just keeps defaulting back to the old api key.

    27ecacc7-4a02-4222-8293-25148e96882a-2807954.png

    • callmericky [3299880]
    • Role: Civilian
    • Level: 58
    • Posts: 13
    • Karma: 98
    • Last Action: 1 minute
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 13:07:08 - 21/01/25 (3 months ago)
    Post link copied to clipboard Copy post link

    Update v5

     

    • Added extra indicators in the member list (shoutout to Lewri [1762864] for helping with the logic behind this!)
      • Indicator for members that have been inactive for X amount of time
      • Indicator for members that have not participated in an OC for X amount of time
      • Indicator for members that have not participated in ANY recent OCs
      • Time since last OC should account for OCs that were stalled, by using the executed_at data from crimes where available
    • Added the ability to sort members by time since last OC or time since last activity.
    • Added a settings page where you can set your preferences for the above amount of time, as well as default sort
      • Settings page can be accessed by the dropdown menu OR a cog icon on the OC 2.0 overview section
      • The settings page may take a second or two to load. If you see the 404 page pop up please don't immediately panic! If the page doesn't load for over a minute, feel free to panic and post about how useless I am.
    • Added the ability to add members to an ignore list so that they do not show up in the list of slacking members. 
      • You will need to manually add and remove members from this list in the settings page.
      • Hitting 'reset to default' will remove all members in your ignore list.
    • Changed the logic of the API key saving so that you can actually change your API key now. API key changing is also moved to the settings page
      • Added the ability to test an API key before saving it to make sure it works
      • Added the ability to delete the API key that was previously saved
      • The 'reset to default' button does NOT delete your saved API key. You must press the 'Delete API Key" button in the API Key section. 
      • TornPDA users: Since this userscript uses the API key given to TornPDA, you will be unable to modify or delete the saved API key from the settings screen. Please let me know if you have concerns about this!
    • The OC 2.0 overview section now shows up even if the API key returns an error, and will tell you to set an API key (please note that it will still only show up at the factions#crimes page when in torn, and on the faction page when traveling. 
    • Slightly changed the sidebar OC 2.0 text - your position and success rate is now shown on mouseover (still unsure how to best deal with this)
    • Fixed a tornPDA bug where the table is sometimes rendered multiple times. At least I hope I did...
    • There is a known bug where swapping between tabs in the faction page too quickly may sometimes cause a duplicate of all crimes to appear. A refresh fixes it. Still trying to figure out how to stop it from happening. 
    • API v2 calls now use pass the API key in as an Authorization header instead of the query parameter. Auth headers don't seem to work for v1 calls so they are still passed in the old way. 

     

    Screenshots

    (sorry its all dark mode screenshots this time, but rest assured that I did test it for light mode compatibility)

    62193042-82d5-4fdc-bf75-e2ce4f60d75f-3299880.png

    bf4abfb6-ba6a-464d-9fa6-d95668ff804a-3299880.png

    121b0616-fb29-41d0-a373-7648be0c044f-3299880.png

     

    Re: other requests

    So I was looking around for something that might display my personal OC CSR on occupied OC roles. (Potentially next to or near the role occupants OC CSR, not replacing it)

     

    I would like to document my CSR and monitor changes and growth without waiting for OCs to spawn with open roles so I can document the % in my notes before someone steps into the spot and thus replacing my CSR with theirs, would this potentially help with my spreadsheet and OC 2 research paper? Or might it be something you would consider adding to your script? 

    Unfortunately this is outside the original scope of the original intent of my script. I can look into this further and see if I can make something different for you, but not promises at this point in time. 

     

    Would love to see an icon showing when you are in an OC but i can understand the limitation with this script being on a single page only, and the need for API calls - wouldn't want an API call on every page to insert the image.
    Hopefully torn add this themselves soon

    This... may be doable, but I feel it will be redundant quickly once Torn adds this themselves. I remember seeing a staff member mention that it's on their to-do list. However I don't recall where that reply was. 

     

    Closing Remarks

    As usual, please feel free to reach out in any way you'd like if you have any questions/suggestions/concerns. I promise I do read them although I may not reply straight away. 

    Sometimes a direct message in Torn might be better since I keep forgetting to check the forums. 

     

    Thanks again to everyone for giving this script a try! 

    It was a large update this time around and although I did give it a good shot at testing all the features, there is a very good chance that I missed a few bugs. Please let me know if you encounter them and I will try my best to fix them ASAP!

    • masheen [2625139]
    • Role: Civilian
    • Level: 100
    • Posts: 5,470
    • Karma: 7,158
    • Last Action: Now
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 14:01:08 - 21/01/25 (3 months ago)
    Post link copied to clipboard Copy post link

    You spoil us. Going to test this and give you feedback.

     

    This... may be doable, but I feel it will be redundant quickly once Torn adds this themselves. I remember seeing a staff member mention that it's on their to-do list. However I don't recall where that reply was. 

     

    They want to add this before the full release for every faction in February in the OC2 thread.

    Last edited by masheen on 14:05:10 - 21/01/25 (3 months ago)

    ◉_◉

    • BREADHEADBOY [3137712]
    • Role: Civilian
    • Level: 45
    • Posts: 46
    • Karma: 9
    • Last Action: 13 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 14:49:12 - 21/01/25 (3 months ago)
    Post link copied to clipboard Copy post link

    Incredible work! Only thing I've found so far is dosent seem to work while flying since version 5, not sure if that was a happy coincidence that it worked before not the end of the world if not still an Incredible script. 

     

    The Bar appears for both the show/hide crimes and members but when you expand nothing seems to happen, the settings bar is also there and works as expected 

     

    Edit: This is on PDA haven't tested on browser

    Last edited by BREADHEADBOY on 15:46:13 - 21/01/25 (3 months ago)
    • RenegadeRuss [1295794]
    • Role: Civilian
    • Level: 100
    • Posts: 2,757
    • Karma: 1,873
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 14:56:04 - 21/01/25 (3 months ago)
    Post link copied to clipboard Copy post link

    The gits who don't join ocs better watch out now 

    • Allenone [2033011]
    • Role: Civilian
    • Level: 89
    • Posts: 275
    • Karma: 547
    • Last Action: 24 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 16:12:59 - 21/01/25 (3 months ago)
    Post link copied to clipboard Copy post link

    callmericky [3299880]

    Update v5

     

    • Added extra indicators in the member list (shoutout to Lewri [1762864] for helping with the logic behind this!)
      • Indicator for members that have been inactive for X amount of time
      • Indicator for members that have not participated in an OC for X amount of time
      • Indicator for members that have not participated in ANY recent OCs
      • Time since last OC should account for OCs that were stalled, by using the executed_at data from crimes where available
    • Added the ability to sort members by time since last OC or time since last activity.
    • Added a settings page where you can set your preferences for the above amount of time, as well as default sort
      • Settings page can be accessed by the dropdown menu OR a cog icon on the OC 2.0 overview section
      • The settings page may take a second or two to load. If you see the 404 page pop up please don't immediately panic! If the page doesn't load for over a minute, feel free to panic and post about how useless I am.
    • Added the ability to add members to an ignore list so that they do not show up in the list of slacking members. 
      • You will need to manually add and remove members from this list in the settings page.
      • Hitting 'reset to default' will remove all members in your ignore list.
    • Changed the logic of the API key saving so that you can actually change your API key now. API key changing is also moved to the settings page
      • Added the ability to test an API key before saving it to make sure it works
      • Added the ability to delete the API key that was previously saved
      • The 'reset to default' button does NOT delete your saved API key. You must press the 'Delete API Key" button in the API Key section. 
      • TornPDA users: Since this userscript uses the API key given to TornPDA, you will be unable to modify or delete the saved API key from the settings screen. Please let me know if you have concerns about this!
    • The OC 2.0 overview section now shows up even if the API key returns an error, and will tell you to set an API key (please note that it will still only show up at the factions#crimes page when in torn, and on the faction page when traveling. 
    • Slightly changed the sidebar OC 2.0 text - your position and success rate is now shown on mouseover (still unsure how to best deal with this)
    • Fixed a tornPDA bug where the table is sometimes rendered multiple times. At least I hope I did...
    • There is a known bug where swapping between tabs in the faction page too quickly may sometimes cause a duplicate of all crimes to appear. A refresh fixes it. Still trying to figure out how to stop it from happening. 
    • API v2 calls now use pass the API key in as an Authorization header instead of the query parameter. Auth headers don't seem to work for v1 calls so they are still passed in the old way. 

     

    Screenshots

    (sorry its all dark mode screenshots this time, but rest assured that I did test it for light mode compatibility)

    62193042-82d5-4fdc-bf75-e2ce4f60d75f-3299880.png

    bf4abfb6-ba6a-464d-9fa6-d95668ff804a-3299880.png

    121b0616-fb29-41d0-a373-7648be0c044f-3299880.png

     

    Re: other requests

    So I was looking around for something that might display my personal OC CSR on occupied OC roles. (Potentially next to or near the role occupants OC CSR, not replacing it)

     

    I would like to document my CSR and monitor changes and growth without waiting for OCs to spawn with open roles so I can document the % in my notes before someone steps into the spot and thus replacing my CSR with theirs, would this potentially help with my spreadsheet and OC 2 research paper? Or might it be something you would consider adding to your script? 

    Unfortunately this is outside the original scope of the original intent of my script. I can look into this further and see if I can make something different for you, but not promises at this point in time. 

     

    Would love to see an icon showing when you are in an OC but i can understand the limitation with this script being on a single page only, and the need for API calls - wouldn't want an API call on every page to insert the image.
    Hopefully torn add this themselves soon

    This... may be doable, but I feel it will be redundant quickly once Torn adds this themselves. I remember seeing a staff member mention that it's on their to-do list. However I don't recall where that reply was. 

     

    Closing Remarks

    As usual, please feel free to reach out in any way you'd like if you have any questions/suggestions/concerns. I promise I do read them although I may not reply straight away. 

    Sometimes a direct message in Torn might be better since I keep forgetting to check the forums. 

     

    Thanks again to everyone for giving this script a try! 

    It was a large update this time around and although I did give it a good shot at testing all the features, there is a very good chance that I missed a few bugs. Please let me know if you encounter them and I will try my best to fix them ASAP!

    Great update. Nice work!

    • callmericky [3299880]
    • Role: Civilian
    • Level: 58
    • Posts: 13
    • Karma: 98
    • Last Action: 1 minute
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 20:12:49 - 21/01/25 (3 months ago)
    Post link copied to clipboard Copy post link

    BREADHEADBOY [3137712]

    Incredible work! Only thing I've found so far is dosent seem to work while flying since version 5, not sure if that was a happy coincidence that it worked before not the end of the world if not still an Incredible script. 

     

    The Bar appears for both the show/hide crimes and members but when you expand nothing seems to happen, the settings bar is also there and works as expected 

     

    Edit: This is on PDA haven't tested on browser

    Thanks for letting me know! 

     

    I seem to have messed up the page loading logic for this case when rearranging the script before releasing it. Will work on a fix when i get back from work later today :) 

    • callmericky [3299880]
    • Role: Civilian
    • Level: 58
    • Posts: 13
    • Karma: 98
    • Last Action: 1 minute
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 07:52:29 - 22/01/25 (3 months ago)
    Post link copied to clipboard Copy post link

    Update v 5.0.1 - fixed the faulty logic that stopped the OC 2.0 overview window from properly populating with data during travel. 

     

    Link: https://greasyfork.org/en/scripts/522974-torn-oc-2-0-helper

    Last edited by callmericky on 07:54:52 - 22/01/25 (3 months ago)
    • Celador [3188239]
    • Role: Civilian
    • Level: 60
    • Posts: 74
    • Karma: 189
    • Last Action: 2 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 17:52:56 - 27/01/25 (2 months ago)
    Post link copied to clipboard Copy post link

    Don't suppose you could do a standalone script for the OC countdown on the sidebar? I like the default crimes screen but having the countdown just adds a little QoL. 

     

    Thanks :)

     

     

    Edit: Thought it changed the crimes page. Makes sense now after installing. My bad! It's a really nice overview :)

    Last edited by Celador on 19:37:28 - 30/01/25 (2 months ago)

    Celador-V2

    • Dyno [1043377]
    • Role: Civilian
    • Level: 100
    • Posts: 8,461
    • Karma: 1,630
    • Last Action: 1 minute
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 13:11:45 - 29/01/25 (2 months ago)
    Post link copied to clipboard Copy post link

    Hello, the script says I have 10 members available for OCs, but I have 9, I do have 1 recruit, maybe it is including recruits, if so, could that be altered to not include recruits?

    Last edited by Dyno on 22:49:25 - 29/01/25 (2 months ago)

    1c750f7c-2e88-4bc4-b387-4e4a0e339521-1043377.png?v=1940629196397

    • callmericky [3299880]
    • Role: Civilian
    • Level: 58
    • Posts: 13
    • Karma: 98
    • Last Action: 1 minute
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 01:04:14 - 04/02/25 (2 months ago)
    Post link copied to clipboard Copy post link

    Apologies for the late response, lunar new year has been a busy period!

     

    Update v 5.1.0 

     

    • Fixed a bug that counted recruits in the number of available members. A list of recruits (if you have any) now show up if you hover over the "x/y members available" text. 
    • Changed the hover text for members not in crimes - now shows last OC joined and last activity in one single hover instead of in separate hovers.
    • Improved the UX for screen readers (particularly for those that navigate using keyboard)
      • Please reach out if anyone using a screen reader still has issues with using the script!

     

     


     

     Don't suppose you could do a standalone script for the OC countdown on the sidebar? I like the default crimes screen but having the countdown just adds a little QoL. 

     

     Thanks :)

     

     Edit: Thought it changed the crimes page. Makes sense now after installing. My bad! It's a really nice overview :)

     

    Thank you very much! 

    I will be releasing a small script for people without OC permissions to be able to view their OC status on the sidebar. It will quickly become obsolete once the status icon is released though...

     

     

    Hello, the script says I have 10 members available for OCs, but I have 9, I do have 1 recruit, maybe it is including recruits, if so, could that be altered to not include recruits?

     

    This has been fixed in the latest update v5.1.0! Recruits now don't show up when calculating the number of available members. If you hover over the number of members available, a list of recruits (if any) that are unavailable for OCs will now show up. 

    Last edited by callmericky on 01:08:21 - 04/02/25 (2 months ago)
    • Jabajaba [2499335]
    • Role: Civilian
    • Level: 100
    • Posts: 1,543
    • Karma: 723
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 21:31:56 - 04/02/25 (2 months ago)
    Post link copied to clipboard Copy post link

    This is excellent thank you

    • Sky [380980]
    • Role: Committee
    • Level: 100
    • Posts: 4,397
    • Karma: 13,969
    • Last Action: 47 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 17:53:18 - 05/02/25 (2 months ago)
    Post link copied to clipboard Copy post link

    Thank you for this. Definitely helps me message people who are not in an OC.

     

    Is there a way that the main list can be sorted based on like criminal offenses or age?

    • Lewri [1762864]
    • Role: Civilian
    • Level: 98
    • Posts: 1,137
    • Karma: 456
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 19:40:38 - 05/02/25 (2 months ago)
    Post link copied to clipboard Copy post link

    Sky [380980]

    Thank you for this. Definitely helps me message people who are not in an OC.

     

    Is there a way that the main list can be sorted based on like criminal offenses or age?

    Neither of those things are included in the faction members selection call so there wouldn't be an easy way of including those

     

    https://www.torn.com/swagger.php#/Faction/get_faction_members

    cpomyHC.png

    • callmericky [3299880]
    • Role: Civilian
    • Level: 58
    • Posts: 13
    • Karma: 98
    • Last Action: 1 minute
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 22:28:48 - 05/02/25 (2 months ago)
    Post link copied to clipboard Copy post link

    Sky [380980]

    Thank you for this. Definitely helps me message people who are not in an OC.

     

    Is there a way that the main list can be sorted based on like criminal offenses or age?

    Lewri is correct, unfortunately this will end up bloating the number of API calls due to needing to get the personalstats of each member for this information. 

     

    It's doable but expensive for this script. Maybe some sort of spreadsheet where you can see members' stats might be more suitable? 

    • Lewri [1762864]
    • Role: Civilian
    • Level: 98
    • Posts: 1,137
    • Karma: 456
    • Last Action: 1 hour
      • 1
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 18:07:51 - 06/02/25 (2 months ago)
    Post link copied to clipboard Copy post link

    Sky [380980]

    Thank you for this. Definitely helps me message people who are not in an OC.

     

    Is there a way that the main list can be sorted based on like criminal offenses or age?

    callmericky [3299880]

    Lewri is correct, unfortunately this will end up bloating the number of API calls due to needing to get the personalstats of each member for this information. 

     

    It's doable but expensive for this script. Maybe some sort of spreadsheet where you can see members' stats might be more suitable? 

    Upon further thought, an option to sort by ID would be equivalent to sorting by age, so really it would only doing the criminal offenses that would be overly complicated. Even still though, probably more effort than its worth to add the sort by ID option in my opinion.

    cpomyHC.png

    • Dyno [1043377]
    • Role: Civilian
    • Level: 100
    • Posts: 8,461
    • Karma: 1,630
    • Last Action: 1 minute
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 14:22:02 - 07/02/25 (2 months ago)
    Post link copied to clipboard Copy post link

    Hello, please could there be an option to toggle the sidebar thing that says what OC you're in, on/off now TornTools has fixed it for OCs 2.0?

    1c750f7c-2e88-4bc4-b387-4e4a0e339521-1043377.png?v=1940629196397

Reply
Thread Title: