Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
May 23, 2013, 09:07:52 am *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2 3
  Print  
Author Topic: [Script] Games Optimization Script for Data Disk  (Read 5478 times)
Rohk
JkDefrag Hero
*****
Posts: 128


View Profile
« on: August 22, 2011, 12:10:42 pm »

This is my script pack for my data disk containing all of my games including Steam and Desura games.

Script optimizes games by placing each game file close together and close to the beginning of the disk. It allows to select favorite games that will be placed as first to the beginning of the disk by providing the fastest performance for most played games.

Features:
-Versions: Weekly, Monthly, Favorite Games Only and scheduled scripts
-Favorite Game selection
-Define Game Directories, directories that contains multiple games, e.g. "G:\Games"
-Supports also Steam, Desura and Origin + 1 additional directory and application path
-Separation of save games and space hogs (e.g. unimportant game installation redistributables)
-Comes with own Settings.MyD file for advanced configuration
-No sorting is used, instead a custom method to group files by game directory, achieved with a batch file.

Usage:
Script works straight away, but it's better to configure it first
-Set the full game directory and game applications paths to the "List - Game Directories.txt" file.
-Select Favorite Games and set them in the "List - Favorite Games.txt" file.
-Configure other options from the "Settings.Myd" file, e.g. the drive for the scheduled scripts.

I attached the dirMyD.zip batch file that I created for the automatic zone generation. You can download it and use it freely on your own scripts.
Previous versions of the script can be found from the archive.zip.
GameDirDefrag.zip is another batch file to optimize only single game directory by leaving all other files untouched on the disk. Replacement for the [TOOL] GameDir Defrag

* GamesOptimizationScripts.zip (14.07 KB - downloaded 20 times.)
* dirMyD.zip (1.91 KB - downloaded 9 times.)
* archive.7z (8.33 KB - downloaded 9 times.)
* GameDirDefrag.zip (0.91 KB - downloaded 11 times.)
« Last Edit: May 10, 2013, 10:47:26 am by Rohk » Logged
alttbm
JkDefrag Supporter
***
Posts: 15


View Profile
« Reply #1 on: August 22, 2011, 09:30:43 pm »

Do you mind if I create and post a merged version of our 2 scripts
just the data version of course
Logged

It's my enemies that drive me forward:
        " Go ahead, say something intelligent. I dare you. "
Rohk
JkDefrag Hero
*****
Posts: 128


View Profile
« Reply #2 on: August 23, 2011, 07:46:34 am »

Do you mind if I create and post a merged version of our 2 scripts
just the data version of course
No I don't mind at all, I posted them to share with you! So you can do what ever you like with them!

I'm just glad if these are any help to you  Tongue
Logged
alttbm
JkDefrag Supporter
***
Posts: 15


View Profile
« Reply #3 on: August 23, 2011, 04:23:29 pm »

http://www.mydefrag.com/forum/index.php?topic=4916.msg28086#msg28086
come check it out
its finished
Logged

It's my enemies that drive me forward:
        " Go ahead, say something intelligent. I dare you. "
Rohk
JkDefrag Hero
*****
Posts: 128


View Profile
« Reply #4 on: July 30, 2012, 02:43:45 pm »

Updated the scripts with two big updates!  Wink

I was also thinking if there would be any interest for System disk scripts. I personally don't have need for them but I could create one based on the new version.

It could be based on the standard system disk scripts or one with my own ideas which could probably get close to my express script! Grin

The one major difference between the standard system disk script would be that the big game files would be together with other game files and would not be moved to the "spacehog files" zone. It could also use the same variables script and file exclusion list for easier script configuration for your own liking.
Logged
peptobismal
JkDefrag Senior
****
Posts: 35


View Profile
« Reply #5 on: August 15, 2012, 01:57:14 am »

One thing I notice is that GameFolders are not sorted at all in the Monthly Scripts? Haha, I realized this after watching it KEEP moving Call of Duty further from the beginning...  Tongue Just so you know? Or does this only pertain to Steam? I think I will configure this a bit for Call of Duty and Resident Evil as currently that's all I have on this partition besides emulators.
Logged
Rohk
JkDefrag Hero
*****
Posts: 128


View Profile
« Reply #6 on: August 15, 2012, 08:21:24 pm »

Haha, I realized this after watching it KEEP moving Call of Duty further from the beginning...  Tongue Just so you know? Or does this only pertain to Steam?

Do you mean it ended up to the last zone? I can only include steam and desura folder paths and names that I know and should be the same for all. Own directories you have to add on your own to the variables script. I also added the "regular files" zone to include files accessed past month ago (e.g. games) for people that do not configure the script. But it only works if you have the last access enabled.

So it might be that you do not have the Last access enabled or you haven't played it past month or there is a bug with the exclude list.

Quote
I think I will configure this a bit for Call of Duty and Resident Evil as currently that's all I have on this partition besides emulators.
Please do, read the variables script first and configure it for your system (folder paths and favorite games). The variables script includes also some other script configurations.
Logged
peptobismal
JkDefrag Senior
****
Posts: 35


View Profile
« Reply #7 on: August 15, 2012, 10:29:38 pm »

No, I meant there is no GamesFolder... variable used at all in your monthly script (haven't tried or glanced at any others)... I put Call of Duty in there and it kept moving it to the end... I put other folders in the favorites and those were mostly small files. So, I then added Call of Duty to the list as Favorite Game #1. That's what I mean... So, if someone were to use those 2 variables it would do nothing special with them.
Logged
peptobismal
JkDefrag Senior
****
Posts: 35


View Profile
« Reply #8 on: August 16, 2012, 04:19:53 am »

Code:
/* Call of Duty 4, Modern Warfare, Black Ops */
FileSelect
DirectoryName("!MyFavoriteGame1!")
FileSelect
FileName("*.ff")
or DirectoryName("zone")
or DirectoryName("players")
and not(DirectoryName("main")
!include "GameOptimization_FileExcludeList.txt"!)
FileActions
SortByName(Ascending)
Defragment(Fast)
FileEnd
FileSelect
FileName("*.bik")
or FileName("*.iwd")
and not(!include "GameOptimization_FileExcludeList.txt"!)
FileActions
Defragment(Fast)
FastFill(WithShuffling)
AddGap(RoundUp(ZoneEnd, Minimum(VolumeSize * 0.002, VolumeFree * 0.05)), DoNotVacate)
FileEnd

Okay, here was a really quick run through, but then I realized that I need to know if it's possible to say... use !MyFavoriteGame1! /<directory or filename> somehow? I did this in like 30 seconds... or just the time it took to type. :p So, not thinking this is even worth using at all.

Please note:
   FileSelect
         DirectoryName("!MyFavoriteGame1!")

Was the VERY last thing I inserted in this before realizing that it would ruin this if this variable was not inter-changable with files...
« Last Edit: August 16, 2012, 04:22:16 am by peptobismal » Logged
Rohk
JkDefrag Hero
*****
Posts: 128


View Profile
« Reply #9 on: August 16, 2012, 06:56:49 am »

No, I meant there is no GamesFolder... variable used at all in your monthly script (haven't tried or glanced at any others)...

There are "MyGamesFolder1" and MyGamesFolder2" variables which are defined in the variables script. These two are used in zones 9 and 10 along side steam and desura. Zone 9 includes Game files excluding "Save games, updates, new game installations and other game files modified/created recently" which are placed to the zone 10. This behaviour can be also configured as you wish.

Quote
I put Call of Duty in there and it kept moving it to the end...
End of what?  Roll Eyes Care to test it more and say on which particular zone it ended? If you set "MyGamesFolder1" to "Call of Duty" it should have been in zone 9 or zone 10. Note that zone 9 and 10 are after the fav game zones.

Quote
I put other folders in the favorites and those were mostly small files. So, I then added Call of Duty to the list as Favorite Game #1. That's what I mean... So, if someone were to use those 2 variables it would do nothing special with them.
Do you mean that only the Favorite Game zone variables are working? I re-checked the scripts to see if there would be any typos after the last update but I can't find any. Besides I'm using them for two of my other PC without problems. If you find the reason why the two Games folder variables are not working please report it so I can fix it! Smiley

Okay, here was a really quick....
The formal script grammar for each zone goes FileSelect-FileActions-FileEnd. Now you have FileSelect-FileSelect-FileActions-FileEnd. What are you trying to do with this?
Logged
peptobismal
JkDefrag Senior
****
Posts: 35


View Profile
« Reply #10 on: August 16, 2012, 08:03:31 pm »

No, I meant there is no GamesFolder... variable used at all in your monthly script (haven't tried or glanced at any others)...

There are "MyGamesFolder1" and MyGamesFolder2" variables which are defined in the variables script. These two are used in zones 9 and 10 along side steam and desura. Zone 9 includes Game files excluding "Save games, updates, new game installations and other game files modified/created recently" which are placed to the zone 10. This behaviour can be also configured as you wish.
This seems rather... dumb, moving games to the back of the drive would not increase performance?
Quote
Quote
I put Call of Duty in there and it kept moving it to the end...
End of what?  Roll Eyes Care to test it more and say on which particular zone it ended? If you set "MyGamesFolder1" to "Call of Duty" it should have been in zone 9 or zone 10. Note that zone 9 and 10 are after the fav game zones.
End of everything... and that seemed illogical as these were the biggest most prominent files, so I then instead moved them to Favorite Games.

Quote
Quote
I put other folders in the favorites and those were mostly small files. So, I then added Call of Duty to the list as Favorite Game #1. That's what I mean... So, if someone were to use those 2 variables it would do nothing special with them.
Do you mean that only the Favorite Game zone variables are working? I re-checked the scripts to see if there would be any typos after the last update but I can't find any. Besides I'm using them for two of my other PC without problems. If you find the reason why the two Games folder variables are not working please report it so I can fix it! Smiley
Well, here's the thing moving game folders to the end of the drive does not increase performance? Also, I think that it would be best to add more description as to what these folders are for. Looking at them, I was like oh okay, Game1, Game2, and THEN my favorite games... Sounds good... Game1, Game2 did not go to the beginning of the drive as a user would expect.

Quote
Okay, here was a really quick....
The formal script grammar for each zone goes FileSelect-FileActions-FileEnd. Now you have FileSelect-FileSelect-FileActions-FileEnd. What are you trying to do with this?
Oh my God, I am not going to answer this until you actually read... read, read, read. It doesn't feel like a lot of the things you have said have you actually read.... I SAID:

Quote
Please note:
   FileSelect
         DirectoryName("!MyFavoriteGame1!")

Was the VERY last thing I inserted in this before realizing that it would ruin this if this variable was not inter-changable with files...

Meaning I DID THIS REALLLY QUICK AND THAT PART WAS THE LAST THING ADDED WHEN I REALIZED OH... WAIT A MINUTE. I have done quite enough programming to understand syntax.. so, this response did not answer anything or assist in anyway as it was not a fully read response? Sorry, I just hate when people deliberately scan things then respond to the errors, rather than read a bit further to realize that the person said that they understood these errors.
Logged
Rohk
JkDefrag Hero
*****
Posts: 128


View Profile
« Reply #11 on: August 19, 2012, 07:33:17 pm »

Quote
This seems rather... dumb, moving games to the back of the drive would not increase performance?

This is the script's zone layout (simplified), see the detailed layout from the script itself:

*Beginning of the Disk*
1: Fav. games
2: Games (Steam, Desura and other user defined games directories e.g. "D:\Games")
3: Remaining files

Quote
End of everything...

I assume you mean the last zone then (zone 12) which is not sorted by name on the monthly script. I already answered why this could have happened. Please check also if all that game's files were moved to there.

Quote
so I then instead moved them to Favorite Games.

This is kind of what I wanted from the scripts. I have for example 20 games installed that only four of them I play the most. These four I want to be placed before any other games as I want to give them all the disk performance. If you don't want to use the fav game zones you can configure the script as follow:

Don't use the fav game varariables.
Modify the "FixedGapRoundUpSize" variable to get the game files (steam, desura and user defined directories) as close as possible to the beginning of the disk. Info included in the variables file.

OR for example you can set your whole games directory (e.g. "D:\Games") as fav game #1, edit the "FixedGapRoundUpSize" as you want. This way you get ALL (no files excluded by last access or creation/last modify) your Games directory files as first and after it steam and desura if installed.

OR of course create own script just the way you like it! Smiley

Quote
Also, I think that it would be best to add more description as to what these folders are for. Looking at them, I was like oh okay, Game1, Game2, and THEN my favorite games... Sounds good... Game1, Game2 did not go to the beginning of the drive as a user would expect.

Could you please tell me how to make the description better? I created the scripts for myself so I'm somewhat "blind" what info I do need to add to others. I tried to add as much description as I could, though.

Quote
Oh my God, I am not going to answer this until you actually read... read, read, read. It doesn't feel like a lot of the things you have said have you actually read.... I SAID:

Quote
Please note:
   FileSelect
         DirectoryName("!MyFavoriteGame1!")

Was the VERY last thing I inserted in this before realizing that it would ruin this if this variable was not inter-changable with files...

Meaning I DID THIS REALLLY QUICK AND THAT PART WAS THE LAST THING ADDED WHEN I REALIZED OH... WAIT A MINUTE. I have done quite enough programming to understand syntax.. so, this response did not answer anything or assist in anyway as it was not a fully read response? Sorry, I just hate when people deliberately scan things then respond to the errors, rather than read a bit further to realize that the person said that they understood these errors.

Sorry if I wasn't any help at all. I didn't have much time to respond.

I need to know if it's possible to say... use !MyFavoriteGame1! /<directory or filename> somehow?

If you meant by this how to select game directory and some other files/folders from the disk, so then yes it's possible.
For example use something like this:

Code:
  FileSelect
    DirectoryName("!MyFavoriteGame1!")
    # Include also these files from the disk:
    or FileName("*.ff")
    or DirectoryName("zone")
    or DirectoryName("players")
     and not(
!include "GameOptimization_FileExcludeList.txt"!
or DirectoryName("main")
)
...

If you need/want any further assistance just ask. I would gladly try to help you again.
« Last Edit: August 19, 2012, 08:18:21 pm by Rohk » Logged
wesmonde
Newbie
*
Posts: 2


View Profile
« Reply #12 on: January 19, 2013, 07:45:06 pm »

Hope someone can help, my situation is this...
I have Steam, Origin & Desura installed to the root of my hard drive.
G:\Steam
   \Origin
   \Desura
Then I have origin and steam game folders and any games installed from disc in the following:
G:\Games
G:\Games\Steam Games
G:\Games\Origin Games

I have created basic scripts myself ie. one .MyD file but don't think they work to the best of my needs.
I am a little overwhelmed with the amount of information in your scripts and not sure exactly what I am supposed to change within the scripts to have them optimise my drive the best.

Do you have a more extensive usage guide or could you possibly guide me?

Big thanks in advance!
Logged
Rohk
JkDefrag Hero
*****
Posts: 128


View Profile
« Reply #13 on: January 20, 2013, 10:24:15 am »

Hi wesmonde, your folder structure is at least problematic for the test version and it will not work as intended. I could fix it by creating a separate paths for program and games directories. I would also need to add support for Origin, which I don't use myself.

Also do you have desura games installed in its application folder and how did you change the steam games installation path? I thought it can only use the "steamapps" folder inside its application folder.

Edit: Updated the test version,
Added support for Origin and separated steam, desura, origin game and application directories.
Fixed some bugs in the batch file, it now creates the GameDirectoriesList.MyD when the last directory is not found.
« Last Edit: January 20, 2013, 02:47:44 pm by Rohk » Logged
wesmonde
Newbie
*
Posts: 2


View Profile
« Reply #14 on: January 27, 2013, 12:59:22 pm »

I tried to move the G:\Steam\steamapps\common folder to G:\Games\Steam\steamapps\common so the main programs (Steam, Desura & Origin) were in the root of the drive and then all game data would be located under G:\Games\ but I thought I could specify a folder path for individual games (you are correct, you cannot, without using junctions which is pointless for this purpose).

Final locations are:
Steam G:\Steam
Desura G:\Desura (Application folder unchanged)
Origin G:\Origin

Origin Games G:\Games\Origin Games
CD/DVD games G:\Games\

I downloaded the other version of your script which has excellent setup notes (I should have started with that one first I think!!!)
I will download the updated version of the scripts and have another go.

Thanks again!
Logged
Pages: [1] 2 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!