Jump to content

[PSNP+ v8.3] Improved PSNP, game lists, and more...


HusKy

Recommended Posts

Hello, it's Crazy Feature Request Friday.

 

I have a "Queue: PS5" list that's rather long and I have meticulously ordered it.

 

Anyway, I made a mock up to provide some organization inside of game lists.  The idea is that you can add dividers to game lists.  I'm hoping it's just another item in the array with { divider: true} that gets handled/rendered differently.  I'm hoping that because I think it's pretty awesome. ?

 

vj6kRv3.png

 

Some drawbacks:

- It will wreck the row striping, which I've disabled with Stlyus anyway--I suppose lists could too (or the script can manually stripe)

- One might expect dragging placeholders would drag the underlying items along with it, but that's probably a right pain for you to pull off, so not necessary

 

Link to comment
Share on other sites

On 30. 3. 2023 at 5:21 PM, MrBasia said:

@HusKy awesome job, thank you a lot for your work here

I have a question, do you have any plans for integrations with metacritic or opencritic scores for custom lists or in general?

Would love to get my backlog and sort it by opencritic score - easier to decide what to play next :)

 

No plan for now. Both of these websites don't have a open API (I think) and pairing games would be complicated as well.

 

On 31. 3. 2023 at 8:53 PM, langdon said:

Hello, it's Crazy Feature Request Friday.

 

I have a "Queue: PS5" list that's rather long and I have meticulously ordered it.

 

Anyway, I made a mock up to provide some organization inside of game lists.  The idea is that you can add dividers to game lists.  I'm hoping it's just another item in the array with { divider: true} that gets handled/rendered differently.  I'm hoping that because I think it's pretty awesome. ?

 

Some drawbacks:

- It will wreck the row striping, which I've disabled with Stlyus anyway--I suppose lists could too (or the script can manually stripe)

- One might expect dragging placeholders would drag the underlying items along with it, but that's probably a right pain for you to pull off, so not necessary

 

 

Definitely tricky to do this. It would break a lot of things. For now, I would recommend using tags or separate lists.

 

--------------------

 

In other news, I made this simple script for this forum which pulls trophy list link into game threads:

V6ksI3z.png

(the platinum icon leads to trophy list)

 

You can install the script by copying everything below, then go to Tampermonkey -> Create new script -> paste in the window and save it

 

// ==UserScript==
// @name         PSNP Game Forum - Trophy List Links
// @version      1.0
// @description  Adds trophy list link to Game Forum threads
// @author       HusKyCode
// @match        https://forum.psnprofiles.com/topic/*
// @run-at       document-idle
// @grant        none
// ==/UserScript==

(async function() {
  'use strict';

  console.log('Running', GM_info.script.name);

  const nav = document.querySelector('nav.ipsBreadcrumb > ul[itemscope]')

  const allLis = [...nav.querySelectorAll('li')];
  const isGameForum = allLis.some(li => li.textContent.trim() === 'Game Forums');

  if(!isGameForum) {
    console.log('Not a game forum, stopping');
    return;
  }

  const specificGameForumLi = allLis[allLis.length - 2];
  const specificGameForumLink = specificGameForumLi.querySelector('a').getAttribute('href');

  const htmlString = await (await fetch(specificGameForumLink)).text();
  const doc = new DOMParser().parseFromString(htmlString, 'text/html');

  const trophyListLink = doc.querySelector('a[href^="https://psnprofiles.com/trophies/"]').getAttribute('href');

  const newLink = document.createElement('a')
  newLink.setAttribute('href', trophyListLink);
  newLink.setAttribute('target', '_blank');

  const icon = document.createElement('img')
  icon.setAttribute('src', 'https://psnprofiles.com/lib/img/icons/buttons/platinum.png');
  icon.setAttribute('width', '14');
  newLink.appendChild(icon);

  specificGameForumLi.appendChild(newLink);
  specificGameForumLi.appendChild(document.createTextNode(' ❯'));
})();

 

Edited by HusKy
  • Like 2
Link to comment
Share on other sites

1 hour ago, HusKy said:

 

No plan for now. Both of these websites don't have a open API (I think) and pairing games would be complicated as well.

 

 

Definitely tricky to do this. It would break a lot of things. For now, I would recommend using tags or separate lists.

 

--------------------

 

In other news, I made this simple script for this forum which pulls trophy list link into game threads:

V6ksI3z.png

(the platinum icon leads to trophy list)

 

You can install the script by copying everything below, then go to Tampermonkey -> Create new script -> paste in the window and save it

 

  Reveal hidden contents


// ==UserScript==
// @name         PSNP Game Forum - Trophy List Links
// @version      1.0
// @description  Adds trophy list link to Game Forum threads
// @author       HusKyCode
// @match        https://forum.psnprofiles.com/topic/*
// @run-at       document-idle
// @grant        none
// ==/UserScript==

(async function() {
  'use strict';

  console.log('Running', GM_info.script.name);

  const nav = document.querySelector('nav.ipsBreadcrumb > ul[itemscope]')

  const allLis = [...nav.querySelectorAll('li')];
  const isGameForum = allLis.some(li => li.textContent.trim() === 'Game Forums');

  if(!isGameForum) {
    console.log('Not a game forum, stopping');
    return;
  }

  const specificGameForumLi = allLis[allLis.length - 2];
  const specificGameForumLink = specificGameForumLi.querySelector('a').getAttribute('href');

  const htmlString = await (await fetch(specificGameForumLink)).text();
  const doc = new DOMParser().parseFromString(htmlString, 'text/html');

  const trophyListLink = doc.querySelector('a[href^="https://psnprofiles.com/trophies/"]').getAttribute('href');

  const newLink = document.createElement('a')
  newLink.setAttribute('href', trophyListLink);
  newLink.setAttribute('target', '_blank');

  const icon = document.createElement('img')
  icon.setAttribute('src', 'https://psnprofiles.com/lib/img/icons/buttons/platinum.png');
  icon.setAttribute('width', '14');
  newLink.appendChild(icon);

  specificGameForumLi.appendChild(newLink);
  specificGameForumLi.appendChild(document.createTextNode(' ❯'));
})();

 

 

The spoiler tag doesn't open :(.

Link to comment
Share on other sites

2 hours ago, HusKy said:

 

No plan for now. Both of these websites don't have a open API (I think) and pairing games would be complicated as well.

 

 

How about making custom field to add notes to games with text / numbers?

Then I could add opencritic scores to my games on the list manualy and sort them.

For now we only can toggle PS plus tag on games, would be great to be able to add custom notes.

Link to comment
Share on other sites

18 hours ago, MrBasia said:

 

How about making custom field to add notes to games with text / numbers?

Then I could add opencritic scores to my games on the list manualy and sort them.

For now we only can toggle PS plus tag on games, would be great to be able to add custom notes.

 

Yeah, I'd like to add notes support for individual games. Added to my backlog.

  • Like 1
Link to comment
Share on other sites

50 minutes ago, Dash_373 said:

Hi, I was wondering how this feature works. I haven't been able to figure it out.

Go to one of your games lists and next to the Platform drop down box is a button with 2 intertwined arrows. Clicking this will select a random game from that list.

  • Like 1
Link to comment
Share on other sites

6 minutes ago, Maverick6146 said:

Can I ask if PSN+ support import/export of game lists? Sorry if this has been asked/answered before as I didn't follow the update that closely.

 

Yes, it's mentioned in the first post. You can export all of your data into a single file -- the export button is located in PSNP+ settings.

Link to comment
Share on other sites

Hey @HusKy or anyone that knows, how do I import a game list from the JSON that I exported from another device? I don't see a button for it (I try to keep the same list updated on my mobile and pc, so I'm trying to synch it with an export every now and then). Last time I tried I somehow broke the entire game lists page on my pc, it wouldn't open anymore so I had to reset the entire plugin.

Link to comment
Share on other sites

Just now, Elbender93 said:

Hey @HusKy or anyone that knows, how do I import a game list from the JSON that I exported from another device? I don't see a button for it (I try to keep the same list updated on my mobile and pc, so I'm trying to synch it with an export every now and then). Last time I tried I somehow broke the entire game lists page on my pc, it wouldn't open anymore so I had to reset the entire plugin.

 

Either through PSNP+ settings if you exported everything:

ElL9dBs.png

 

If it's a single list, then via Import button in Game Lists section:

kGWJ7AN.png

Link to comment
Share on other sites

15 minutes ago, HusKy said:

 

Either through PSNP+ settings if you exported everything:

ElL9dBs.png

 

If it's a single list, then via Import button in Game Lists section:

kGWJ7AN.png

 

Thank you for answering! The general import seems to not transfer the Game Lists, and the other button only appears if I have another list open:
 

 

 

If I try to create an empty list and then import the JSON File, the entire page breaks and does not open anymore: (Below you see it selected but it just shows my profile)
 

Edit: My screenshots are not showing up I think lol

Edited by Elbender93
Link to comment
Share on other sites

12 minutes ago, Elbender93 said:

Thank you for answering! The general import seems to not transfer the Game Lists, and the other button only appears if I have another list open:

 

General import imports everything, including all of your lists. It should work fine unless you modify the JSON file and break the structure.

 

12 minutes ago, Elbender93 said:

If I try to create an empty list and then import the JSON File, the entire page breaks and does not open anymore: (Below you see it selected but it just shows my profile)

 

You don't need to create empty list, import will automatically create a new one.

 

For screenshots, you will need to host them somewhere, for example imgur.com works fine.

Link to comment
Share on other sites

14 minutes ago, HusKy said:

 

General import imports everything, including all of your lists. It should work fine unless you modify the JSON file and break the structure.

 

 

You don't need to create empty list, import will automatically create a new one.

 

For screenshots, you will need to host them somewhere, for example imgur.com works fine.

 

I tried general import and it didn't bring the list, or any settings actually, file is untouched and just exported from mobile (Kiwi) to PC (Firefox). I am sharing the JSON file via DIscord, could that be breaking it?
When the game Lists are empty, the import button does not show up for me:
https://imgur.com/a/IWaRD1r

 

Edit: Ok yeah it's definitely the way I share the JSON that does not work

Edited by Elbender93
Link to comment
Share on other sites

If theres an actual Help section, please let me know.

 

I use Edge (long and boring story) and I'm not sure if the extension is working properly. I've installed it as per the guide and it is definitely installed because I can refresh my page from the top left PSNP+ menu and when I click on my user name PSNP+ settings appears in the drop down. However, I cant see the details of games; how long to platinum, the difficulty but the sessions icon does show. I've checked the settings but I cant see if theres a toggle for it. 

 

Any suggestions? I might have missed something very basic.

 

 

Link to comment
Share on other sites

4 hours ago, Elbender93 said:

Ok yeah it's definitely the way I share the JSON that does not work

 

I just tested this: exported all of my data through PSNP+ settings, cleared the data completely from browser and then imported the file back.

Everything was imported correctly including lists, settings etc. So it must be something wrong with how you store the exported JSON file.

 

@Silocia I'm assuming you are talking about game complexity info shown in profiles, lists etc?

dfz74eH.png

 

This info is "collected" by PSNP+ while visiting different trophy lists. Each user essentially creates their own database.

All you need to do is visit any trophy list that has a base game guide attached to it and the script will collect the data.

 

For example, after visiting this page 2nd time, the script will show complexity in the sidebar on the right side: https://psnprofiles.com/trophies/8232-life-is-strange-2/

bFa9Tim.png

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...