Jump to content
LaunchBox Community Forums

Any way to reset the MOST PLAYED count on a game?


cleverest

Recommended Posts

1 hour ago, Jason Carr said:

The field is called Play Count, but unfortunately you can't modify it currently without going directly into the XML. I'll put that on my list.

Thanks! In the meantime, which XML can I edit this number to 0 on a specific game/list at? I see a lot in the LB folder but I can't see to find PLAY COUNT in any of them.

Link to comment
Share on other sites

47 minutes ago, cleverest said:

Thanks! In the meantime, which XML can I edit this number to 0 on a specific game/list at? I see a lot in the LB folder but I can't see to find PLAY COUNT in any of them.

\Launchbox\Data\Platforms\

Then edit the platform name xaml for the game you want to edit.

  • Like 1
Link to comment
Share on other sites

image.thumb.png.e01f270e477f3bcab1da8b5a5ab7fdf9.pngPretty Easy actually in Notepad++ there is probably even a way to use a variable and have it just change any value between <Playcount>#</Playcount> to 0 but I don't know how to do that but if someone could show you you could then use NP++ to open all your platforms xmls at one time and then search your text with the variable and replace the value with 0 for all entries in all open documents.

This might explain it better.

Link to comment
Share on other sites

Manually reset all PlayCounts in all Platforms to 0 (zero) using Notepad++:

In windows Explorer, go to your  "..\LaunchBox\Data\Platforms"  directory.

MAKE A BACKUP OF YOUR xml Documents FILES FIRST!

Select all files (Ctrl+A).  Right click and select "Edit with Notepad++"image.thumb.png.fc7180bd3ce4d3ea93e3cfb66d155f22.png

Click "Search"  "Replace"  (or hit Crtl+H)

In "Find what:", insert

<PlayCount>\d+</PlayCount>

In "Replace with:", insert

<PlayCount>0</PlayCount>

Under "Search Mode", select   "Regular expression"

Then click   "Replace All in All Opened Documents"image.thumb.png.50d339f8977d56f7a6381879b016233d.png

Save all and exit.

 

\d     means any digit(s).

+      means.... well.... plus.

So... look for  "<PlayCount>" followed by any number(s),   followed by   "<\PlayCount>"

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

@cleverest How about a LaucnhBox plugin that'll do that? ?

I recently watched one of @Jason Carr's videos (made 2 yrs ago) about building plugins... 

 

..and thought how cool is that!  I've worked with various programming languages (self taught, just geeking around) but never specifically C# or using Visual Studio.  After watching the video (rewind-watch, rewind-watch again) and taking notes I was able to recreate the sample plugins he was going over AND get them to work :).  

After going over the Notepad++ resolution (above) and your "user friendlier" comment I started to write an AutoHotKey script.  After a while I got to thinking I should probably try to do it the right way. Grabbed my notes for the video, started VS, a little copy/paste, some adjustments, a quick C# search or 2.  Build/test/refine a couple times and "Oh Wow!  It works!"

...short story long...... It's not 'built-in' per se , but at least plugin-able. 

 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Wow man that is AWESOME! Thanks for doing that!

Any chance you can do something about the lack of genre/publisher mass editing? Especially genre...

For example, being able to add a genre to all games in a playlist without replacing the entire field each time?

Ex: let's say I want to add "2D fighting" to various fighting games through ctrl+A selecting, edit....but without having to typing my entire genre list of Action; Fighting; 2D fighting each time...?

The reverse to, being able to remove one of those entries for multiple games (Ex some have "2D", or other genres I don't want from importing them), but don't want to clear it all, etc...

?

Edited by cleverest
Link to comment
Share on other sites

1 hour ago, JoeViking245 said:

@cleverest How about a LaucnhBox plugin that'll do that? ?

I recently watched one of @Jason Carr's videos (made 2 yrs ago) about building plugins... 

 

..and thought how cool is that!  I've worked with various programming languages (self taught, just geeking around) but never specifically C# or using Visual Studio.  After watching the video (rewind-watch, rewind-watch again) and taking notes I was able to recreate the sample plugins he was going over AND get them to work :).  

After going over the Notepad++ resolution (above) and your "user friendlier" comment I started to write an AutoHotKey script.  After a while I got to thinking I should probably try to do it the right way. Grabbed my notes for the video, started VS, a little copy/paste, some adjustments, a quick C# search or 2.  Build/test/refine a couple times and "Oh Wow!  It works!"

...short story long...... It's not 'built-in' per se , but at least plugin-able. 

 

Thank you for this @JoeViking245. I gotta say, I love success stories like this, and I love being part of them (even if only in a very small way). :)

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

I could probably make it so they all change to 0 (zero).  ?

So, do you mean something like your ctrl+A selecting, edit thing to get to the Bulk Edit Wizard.  Then select the "Field"  Genre:  and under "Value", check Action and also Fighter / 2D and click 'Next', 'Next'?

image.png.d45cbbd6d0bbdd205d6fb95346a29544.png

image.thumb.png.3579e7e1e3f6e761b1e3aa860da12d7c.pngNow I can't attest that it works for "Playlists" though.

Link to comment
Share on other sites

Yes, that would likely work way better...just anything that makes it possible to not have to REPLACE the entire line for all selected games everything I want to add or remove 1 or more genres...my genre lists are pretty details, like:  Action; Platform; 2D Platform, etc...

So I won't have to keep notepad open on the side anymore with my entire Genre strings copy/pasted there, lol

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...