Jump to content

RAMDISK for SWTOR (increased performance)


Ocmer_

Recommended Posts

Ramdisk certain gamefile to increase performance

 

If you had positive outcome using this method, please rate this post!

This thread is also available in French found here.

 

This thread is a continuation of a thread that was started by Lemon_King. He made the initial thread how to setup SWTOR with a ramdisk manually. Over time this evolved to written bachscripts and currently we have a complete program written in C# with a simple userinferface.

 

If you are interested in why we place certain gamefiles on the ramdisk or see a basic speedtest on a ramdisk look in this post where it is tried to explain the reason behind the increased performance. This includes less hitching, faster texture loading and even on some systems FPS increase depending on added files.

 

Does this violate the rules or can I get a ban? - no

 

 

An email regarding a ticket we opened;

Thank you for contacting us regarding your complaint (ticket number 5232735).

 

We have now completed our investigation into your inquiry. Please be reminded that we cannot discuss actioned against other player's accounts. However, we can confirm that the provided software is not against our Terms of Service.

 

Thank you for your diligence in bringing this matter to our attention. As a valued customer, your feedback is very important to us.

 

Yours sincerely,

 

Nicole

Star Wars: The Old Republic Terms of Service

A quote from the French CS (on the French version thread);

Message jaune :

 

SWTOR Unleashed ne constitue pas une infraction à nos Conditions d'utilisation où la CALUF, son usage est donc par conséquent autorisé.

 

Cependant, s'agissant là d'une procédure technique de modification de la configuration du jeu, nous ne saurions la recommander, yadda yadda utilisateurs expérimentés yadda yadda vos propres risques.

 

Voilà. :)

 

 

Requirements

This solution is made for those that are running Windows Visa/7 64bit and have at least 6 GB ram available. Also the disk(s) where Windows and SWTOR are installed on need to have NTFS as filesystem.

 

Also the program we use to create a ramdisk is Imdisk. Imdisk is a small and lightweight ramdrisk program that can be accessed by both commandline or an API. As we have manual, batch or program methods this was a good choice.

 

Note; the at least 6GB ram requirement is good enough to use for adding the DiskCacheArena and local cache files on the ramdisk (adding fx asset file with it is also quite possible). Adding more asset files, will require more internal ram.

 

Available methods

 

Note; for a more in depth explanation of what the program or batch does to the SWTOR game file,

read the manual setup method as it will describe the basic thing.

 

What to place on the ramdisk

  • This biggest effect will be by placing the cache files on the ramdisk;
    • DiskCacheArena
    • Local cache

 

  • Start with the asset file that contains effects (most used asset);
    • swtor_main_art_fx.tor

 

 

  • Improvements on fleet, raid and pvp (character looks);
    • swtor_main_art_dynamic_cape_1
    • swtor_main_art_dynamic_chest_1
    • swtor_main_art_dynamic_chest_tight_1
    • swtor_main_art_dynamic_hand_1
    • swtor_main_art_dynamic_head_1
    • swtor_main_art_dynamic_lower_1
    • swtor_main_art_dynamic_mags_1
    • swtor_main_art_weapon_1.tor

 

  • Improvements on pvp (caracter animations);
    • swtor_main_anim_humanoid_bfab_1.tor
    • swtor_main_anim_humanoid_bfns_1.tor
    • swtor_main_anim_humanoid_bmaf_1.tor
    • swtor_main_anim_humanoid_bmns_1.tor

 

  • [*]Improvements on pvp (lightly accessed);
    • swtor_main_area_misc_1.tor
    • swtor_main_art_area_all_item_1.tor
    • swtor_main_area_hutta_1.tor
    • swtor_main_gfx_1.tor

 

  • Warzones (most used, loading);
    • swtor_main_area_alderaan_1.tor (alderaan civil war)
    • swtor_main_area_nar_shaddaa_1.tor (huttball)
    • swtor_main_area_hoth_1.tor (Ilum, seems strange but hoth/ilum shares)

 

Note; for those we add more, keep in mind that your Windows and SWTOR still need it's basic amount of memory,

so that you do not cap your internal ram with asset files. I would say keep about 4 to 4,5GB free for programs.

 

Additional improvements

 

Common errors

 

  • The following error apprears after you login (maybe a quick black/loading screen);

This program encountered an internal error and will exit.
Error code: 6

Unable to create temporary workspace files. Do you have at least 2GB of disk space free?

This appears when DiskCacheArena is linked, and that the ramdisk is not mounted or formatted so the game cannot create the file on the ramdisk.

  • Long loading screen followed by an error sound, Bioware intro shows but stable backscreen afterwards.

This error appears when local cache is linked and that the game cannot make the local cache on the ramdrive. This can be due that the ramdisk is not mounted, formatted or that the path "SWTOR\swtor\" was not created on the ramdisk.

  • Game returning any kind of error saying it misses asset files.

These errors appears when any (but not all) asset file is linked to the ramdrive, but the game cannot find it. This can happed due that the ramdisk is not mounted or formatted. Another possibility is that the asset files is not copied over or still has the _ORIG tag in the name (while on the ramdisk).

  • Settings are lost when you start the game and play.

This happens only when local cache is added to the ramdisk, but for some reason the linkback to "%localappdata%\SWTOR_Original\swtor\settings" is not made from the ramdrive. Meaning the game recreates the settings on the ramdrive, and with a reboot the settings are lost (those on the ramdrive).

 

Manual recovery

 

The three different methods are made in such a way that there should be no need for a reinstallation of SWTOR if something goes wrong during the execution or loss of settings file. There is quite an easy way to revert it.

 

Note; when I talk about 'link' I mean a symbolic link that can be recognized as a shortcut.

This means that the fileicon will have a small arrow attached to it.

 

  • If you did add DiskCacheArena to the ramdisk;
    1. Navigate to the root folder of the game.
  • Open the folder named "swtor".
  • Inside should be a link called "DiskCacheArena", delete it.

  • If you did add local cache to the ramdisk;
  1. Navigate to you local appdata folder.
  • %localappdata%
  • <systemdrive>\Users\<username>\AppData\Local\ (AppData is hidden if enabled)

[*]A folder called "SWTOR" should be a link, delete it.[*]A folder named "SWTOR_Original" should exist, rename it to "SWTOR".

  • If you add any asset file to the ramdisk (do this for each file);
    1. Navigate to the root folder of the game.
  • Open the folder named "Assets".
  • Look for a linked asset file (will have 0kB as size), delete it.
  • Right under it should be the asset file containing "_ORIG" on the end, remove the "_ORIG" tag from the name.

 

 

Edited by Ocmer_
Link to comment
Share on other sites

  • Replies 483
  • Created
  • Last Reply

Top Posters In This Topic

SWTOR Unleashed

 

A program to automate the setup and removal process to use this game (SWTOR) with an ramdisk. This includes creating a ramdrive, copying file and creating the needed links. You as user can select what files you want to have on the ramdrive, depending on your needs and maximal available ram.

 

Administrator rights

This progam requires administrator rights to run, thus for those that have UAC enabled will receive this warning to allow the program full acces. This is needed bacause the program needs to move, rename and delete files. On top of that it also needs to create a ramdrive and symbolic links.

 

Patching the game

In the current state, this program does not check and intercept patching of the game. In normal cases it should not be a big problem unless you selected asset files to place on the ramdrive. If the launcher needs to patch one of these asset files, it stops and returns an unable to patch error and will display a repair link. Do not press repair but simply close the launcher, open this program again and press play retail. This will remove the setup and the game is able to patch correctly. After that you can of course play unleashed again.

 

Passing arguments

This program accepts three different arguments that can control the program without showing an GUI.

You can create a shortcut to the program and give one of the arguments after the quoted path with a space.

 

For example the program is placed in; C:\SWTOR Unleashed v3.x\SWTOR Unleashed.exe

Thus the shortcut target will be; "C:\SWTOR Unleashed v3.x\SWTOR Unleashed.exe" argument

 

The three possible arguments are;

  • unleashed ; this will start SWTOR with a ramdisk setup
  • retail ; this will start SWTOR without a ramdisk setup
  • remove ; this will dismount and remove an active setup

 

Download

Download SWTOR Unleashed v3.0

 

Screenshots

Main Window - Window About - Window settings

Every window can be closed when pressing escape.

 

Creators

  • Ocmer_
    • Nozomi (Hidden Beks [EN])
    • Nadeko (Hidden Beks [EN])

    [*]Exca

    • Universe (Huntmaster [FR])
    • Exca (Huntmaster [FR])

    [*]Tilz (Huntmaster [FR])

    [*]Ugleez (Huntmaster [FR])

 

Changelog

 

  • Version 3.0 ; 2012-05-01
    • [NEW] Graphical UI and logo (Tilz and Ugleez)
    • [NEW] Can close any window by pressing escape
    • [NEW] Can drag and drop the active window
    • [FIX] should now always launch the good launcher.exe file
    • [FIX] drive letter can be correctly selected again
    • [CHN] Full code cleaning and integration in MVVM

    [*]Version 2.9.5 ; 2012-04-30

    • [NEW] Setup method
    • [NEW] Removal method, independent of settings (recovery)
    • [CHN] Program Architecture in preparation for the new GUI.
    • [CHN] You can save without selecting anything in settings (for removal installpath if needed)
    • [CHN] Selected asset files will appear on top of the list

    [*]Version 2.8.1 ; 2012-04-22

    • [FIX] Improved dismount of the ramdisk

    [*]Version 2.8 ; 2012-04-19

    • [CHN] Logging is disabled now by default.
    • [FIX] Coding error that caused loss if settings and unable to save ingame settings/UI

    [*]Version 2.7 ; 2012-04-19

    • [NEW]Added logging capabilities for debug purposes at errors. (enabled by default).

    [*]Version 2.6 ; 2012-04-17

    • [NEW] Program will not start if the game is being played (Will return an error)
    • [FIX] Correct handling of driveletter in settings
    • [FIX] Fixes in the settings save code where there was a flaw.
      [/LISt]
    • Version 2.5 ; 2012-04-17
      • [CHN] Added different error feedback messages to the user at invalid settings
      • [FIX] Ramdisk size calculation when a setup was active
      • [FIX] Removes correctly the good ramdrive (if multiple were mounted)

      [*]Version 2.4 ; 2012-04-16

      [*][NEW] New program architecture and simple "unstyled" GUI

      [*][NEW] Ability to start retail SWTOR (no ramdisk)

      [*][NEW] Program accepts arguments to do an action without showing an GUI

      [*][NEW] Only one instance of the program can run at a time

      [*][CHN] Separated the settings GUI from the main GUI

      [*][CHN] Copies settings to installpath rather than renaming local SWTOR

      [*][CHN] Changed the program name to "SWTOR Unleashed"

      [*][CHN] Program setup/removes and mounts/dismounts according to the selected action

      [*][CHN] Uses ImdiskNet.dll and control Imdisk

      [*][CHN] Settings file renamed to "SwtorUnleashed.xml", added extra needed information

      [*][CHN] Default ramdiskletter is now "R:", as more consistent with the r of ramdisk

      [*][FIX] Removal of the setup will also dismount the ramdisk if present

      [*]Version 1.3.0 ; 2012-04-07

      • [CHN] "Mount" renamed to "Launch SWTOR Unleased" (mount and closes the program)
      • [CHN] "Dismount" renamed to "Dismount Ramdisk" (dismount and closes the program)
      • [CHN] User can no longer select local application data path
      • [FIX] Dismount error when setup was done with a non-captial letter
      • [REM] Removed selection box for auto launch and close
      • [REM] Removed selection of local app data

      [*]Version 1.2.0 ; 2012-04-03

      • [NEW] User can now mount and dismount ramdisk with the program itself
      • [NEW] In setup program ability to close itself after mounting or dismounting
      • [CHN] Changed name of settings file to "ProgramSettings.xml"
      • [REM] Removed the creation of batchscripts and associated button

      [*]Version 1.1.0 ; 2012-04-01

      • [NEW] Ability to select PTS asset files and prepare ramdisk for PTS
      • [NEW] Button to recreate the batchscripts, in case of lost
      • [CHN] Program icon
      • [CHN] Removing the setup will keep the settings file
      • [CHN] PTS asset files are hidden by default
      • [CHN] Internal data handling
      • [CHN] Starting ramdisk size is now 50MB for filesystem and disk vs file size differences
      • [CHN] By this Local cache size down to 266MB from 300MB, local+arena+fx is now exactly 1,5GB
      • [FIX] Overflow exception when selecting normal+pts asset files

      [*]Version 1.0.1 ; 2012-03-27

      • [REV] Code revision and cleanup by exca

      [*]Version 1.0.0 ; 2012-03-25

      • [NEW] Initial release "SwtorRamdisk", generates batchscripts to use

       

       

Edited by Ocmer_
Link to comment
Share on other sites

ALL-IN-ONE BATCH VERSION 4.0.0

 

This batscript will setup a ramdisk for the DiskCacheArena and local cache files. It is possible to add asset files but this require settings work in the script prior running it.

 

The mount script can be used to mount the ramdisk, create the necessary files and if given start the launcher, for this there is no input needed from you as user. The ALL-IN-ONE batchscript can do the same but then you have to select an menu item

 

Please be aware when using asset files on the ramdisk that the game can return an error when it wants to patch, remove the setup prior patching, and run the setup again after patching.

 

INSTRUCTIONS (PLEASE READ)

 

 

 

Creating batchscript

  1. Copy the ALL-IN-ONE batchscript.
  2. Open notepad.
  3. Paste the copied batchscript into notepad.
  4. Change user settings if wanted (see next spoiler in the post).
  5. Save as with the name; anyname.bat (.bat is important!).
  6. Press save.
  7. Batchscript created (check if the icon is not a textfile anymore).
  8. Do the same for the MOUNT batchscrip (if you wish to use it).

Setup SWTOR for ramdisk

  1. Be able to run SWTOR without a ramdisk.
  2. Have Imdisk installed on your machine (can be changed in script now).
  3. Run the created/selected batchscript as administrator.
  4. Once in the menu press 's' on your keyboard to setup.
  5. Once you confirmed the message of a clean setup press 'y' on your keyboard.
  6. Start the game.

What to do on a reboot / dismount

  • Use the MOUNT batchscript (can be used as computer startup script):
    1. Run the MOUNT batchscript as administrator.
    2. Start the game

    [*]Use the ALL-IN-ONE batchscript (human interaction is needed):

    1. Run the ALL-IN-ONE script as administrator.
    2. Once in the menu press 'm' on your keyboard to mount the ramdrive.
    3. Start the game.

Dismount ramdrive (to free up memory)

  1. Run the ALL-IN-ONE batchscript as administrator.
  2. Once in the menu press 'd' on your keyboard to dismount the ramdrive.

Remove the ramdisk setup

  1. Run the ALL-IN-ONE batchscript as administrator (make sure settings are same when you did the setup).
  2. Once in the menu press 'r' on your keyboard to remove the ramdisk setup.
  3. Uninstall Imdisk if preferred.

Use the mount script

To use the mountscript, please use the exact same settings you used in the ALL-IN-ONE batchscript.

As this script also needs to know what you want on the ramdisk.

 

 

 

SCRIPT SETTINGS

 

 

 

Auto start the launcher after mounting;

  • Change line [15] 'set AutoLaunch=no' to 'set AutoLaunch=yes'.

Change driveletter of the ramdisk;

  • Change line [19] 'set RamDrive=T:' to 'set RamDrive=Z:' if you want it as Z:

Change ramdisk volume size;

  • Change line [26] set RamSize=1500M' to set RamSize=4000M' if you want it as 4GB.
  • Some recommended sizes;
    • Cache files only use '1500M'.
    • Cache files + Fx asset file use '1600M'.
    • Cache + Fx asset file + Dynamic asset files use '4G'.

Add asset files to the ramdisk setup;

To add asset files to the ramdisk you need to know the filenames of those files you want to add.

Once you know the filenames you add lines the following way;

  1. For asset file 1 add the line 'set AssetFile01=NAME_OF_FILE_1'.
  2. For asset file 2 add the line 'set AssetFile02=NAME_OF_FILE_2'.
  3. For asset file 3 add the line 'set AssetFile03=NAME_OF_FILE_3'.

In the script the fx and dynamic asset files already placed but are commented out with a double colon (::).

To use them, just remove the :: and make sure the number add up, 01->02->03->ect.

 

Override installationpath, for if the script can't find it;

  1. Rightclick on your SWTOR launcher shortcut, and select properties.
  2. Go to the 'shortcut' tab if it isn't showing automatically.
  3. Copy the link that is given in the 'Start in:' box (without the quotes "..").
  4. Paste the path you copied behind 'InstallPath=' (line 54) without any spaces around the =.
  5. Example: 'set InstallPath=D:\EA\SWTOR'.

Don't use Imdisk with setup/mounting;

  1. Change line [48] 'set UseImdisk=yes' to 'set UseImdisk=no'.
  2. Have another program create the ramdisk before you run the setup/mount.

Please make sure the given RamSize is sufficient enough (minimal or more), because this batchscrip does not check the amount of free space on the created ramdrive!

 

 

 

ALL-IN-ONE v4.0.0

Please read the instructions and changing settings before using.

Always run as administrator, as I cannot guarantee correct exectution without.

 

 

 

:: SCRIPT VERSION 4.0.0 @ 21-03-2012
:: SWTOR FORUM THREAD: http://www.swtor.com/community/showthread.php?t=154568
:: SCRIPT INSTRUCTION: http://www.swtor.com/community/showpost.php?p=2892331
:: Use the thread for questions, feedback or debugging.

@echo off
color f0

:: ==================================================================================
:: USER SETTINGS [ set <varname>=<value>  ; Do not add spaces around the = sign !! ]
:: ==================================================================================

:: Start SWOTR's Launcher after mounting the ramdrive
:: use 'set AutoLaunch=yes' or 'set AutoLaunch=no'
set AutoLaunch=no

:: Give the diskletter you want to use as ramdisk
:: Give a letter followed by a colon (default is T:)
set RamDrive=T:

:: Give the ramdisk size, [interger+suffix] M for MegaByte or G for GigaByte
:: - only adding cache (default):   1500M
:: - Cache + Fx asset:              1600M
:: - Cache + Fx + Dynamic:          4G
:: - Cache + Dynamic:               4G
set RamSize=1500M

:: Add asset files, make sure RamSize if of sufficient size!
:: To include asset files use 'set AssetFileXX=name_of_asset' where XX represents
:: the number of asset file that has to be included starting with '01'. (leave out .tor)
:: Example; set AssetFile01=swtor_main_art_fx_1 to include fx asset file to the ramdisk.
:: predefined asset files remove the double colon (: to uncomment it and add it


::set AssetFile01=swtor_main_art_fx_1
::set AssetFile02=swtor_main_art_dynamic_cape_1
::set AssetFile03=swtor_main_art_dynamic_chest_1
::set AssetFile04=swtor_main_art_dynamic_chest_tight_1
::set AssetFile05=swtor_main_art_dynamic_hand_1
::set AssetFile06=swtor_main_art_dynamic_head_1
::set AssetFile07=swtor_main_art_dynamic_lower_1
::set AssetFile08=swtor_main_art_dynamic_mags_1


:: Use Imdisk, if set to 'no' it will skip the creation of a ramdisk by using Imdisk.
:: So an user has to create a ramdisk before hand with the right amount of size
:: and press y during confirmation while executing this script.
set UseImdisk=yes

:: Override Installpath for use when this script cannot read the path from registery.
:: This can happen because a reinstall of Windows while SWTOR was on another disk.
:: To use, add the complete path (no quotes) behind 'set InstallPath=' for example:
:: set InstallPath=C:\Program Files (x86)\Electronic Arts\BioWare\Star Wars - The Old Republic
set InstallPath=

:: ==================================================================================
:: GET INSTALLPATH AND LOCALPATH FROM REGISTERY
:: ==================================================================================
:: Get SWTOR installation path, if manually given skip this
if defined InstallPath goto OverrideInstallPath
for /F "skip=2 tokens=3,*" %%i in ('reg query "HKEY_LOCAL_MACHINE\software\wow6432node\bioware\star wars-the old republic" /v "Install Dir" 2^>nul') do set InstallPath=%%j
if not defined InstallPath goto ErrorInstallPath

:OverrideInstallPath
:: Get local appdata path
for /F "skip=2 tokens=3,*" %%i in ('reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Local AppData" 2^>nul') do set AppLocal=%%j
if not defined AppLocal goto ErrorAppLocalPath

:: Validate found/given installation path
if not exist "%InstallPath%\launcher.exe" goto ErrorWrongInstallPath

:: ==================================================================================
:: BASIC SYSTEM VALIDATIONS (64bit test, ntfs test, imdisk test)
:: ==================================================================================
:: Check if the used system is 64bit
if not %PROCESSOR_ARCHITECTURE% == AMD64 goto ErrorNo64Bit

:: NTFS check for both local drive and SWTOR drive
if exist %AppLocal:~0,2%\swtorramdiskntfstest.temp del %AppLocal:~0,2%\swtorramdiskntfstest.temp
@echo 1 > %AppLocal:~0,2%\swtorramdiskntfstest.temp:stream
if not exist %AppLocal:~0,2%\swtorramdiskntfstest.temp goto ErrorNTFS
del %AppLocal:~0,2%\swtorramdiskntfstest.temp

if exist %InstallPath:~0,2%\swtorramdiskntfstest.temp del %InstallPath:~0,2%\temp.temp
@echo 1 > %InstallPath:~0,2%\swtorramdiskntfstest.temp:stream
if not exist %InstallPath:~0,2%\swtorramdiskntfstest.temp goto ErrorNTFS
del %InstallPath:~0,2%\swtorramdiskntfstest.temp

:: Check if Imdisk is installed (imdisk.exe in system32)
if %UseImdisk% == no goto SkipImdiskCheck
if not exist "%SYSTEMROOT%\system32\imdisk.exe" goto ErrorNoImdisk
:SkipImdiskCheck

:: ==================================================================================
:: VARIABLE
:: ==================================================================================
:: Create variable for assetfile errors
set "AssetError="

:: ==================================================================================
:: USER MENU
:: ==================================================================================
:MENU
cls
echo  ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo  º                                                                            º
echo  º          RAMDISK SETUP OR REMOVAL FOR STAR WARS THE OLD REPUBLIC           º
echo  º                               VERSION: 4.0.0                               º
echo  º                                                                            º
echo  º                Created by: Ocmer_   Forumthread: Lemon_King                º
echo  º                                                                            º
echo  ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo Script Settings:
echo     - Ramdisk driveletter:    %RamDrive%
echo     - Ramdisk size:           %RamSize%
echo     - Auto start Launcher:    %AutoLaunch%
echo.
echo Menu:
echo     [s] Setup and prepare SWTOR for a ramdisk.
echo     [R] Remove the ramdisk setup for SWTOR.
echo     [M] Mount a ramdrive for SWTOR (separate smaller script available!)
echo     [D] Dismount the ramdrive to free memory (Mount again if you want to play)
echo     [Q] Quit this script.
echo.
echo If everything is executed correctly without any errors, this script will close.
echo This script only notifies the user when an error occurred.
echo.
choice /c:srmdq /n /m "Press one of the menu items:"
if errorlevel 5 goto EOS
if errorlevel 4 goto DISMOUNT
if errorlevel 3 goto MOUNT
if errorlevel 2 goto REMOVE
if errorlevel 1 goto SETUP

:: ==================================================================================
:: SETUP RAMDISK
:: ==================================================================================
:SETUP
cls

:: Pre warning for use with ALL-IN-ONE version 4.0.0 and up
:: As asset files are not fixed anymore, extra caution has to be taken
echo Running the setup with this ALL-IN-ONE batchscript version 4.0.0 and up extra
echo caution has to be taken into account. Therefor the following question:
echo.
echo Do you run this setup without running SWTOR with a ramdisk setup?
echo.
echo If you do press y to continue the setup.
echo.
echo If you don't, please remove the setup first before making any changes to this
echo batchscript or useing the setup again. If you did make changes please put the
echo settings back how they were when you ran the setup.
echo.
choice /c:yn /m "Do you run a SWTOR without a ramdisk or you removed it first"
if errorlevel 2 goto MENU
if errorlevel 1 goto ContinueSetup1

:ContinueSetup1

:: Check if the user uses another ramdisk program
:: If not start with dismounting a current ramdrive to start fresh, then create
if %UseImdisk% == yes (
 if exist %RamDrive% imdisk -D -m %RamDrive%
 imdisk -a -s %RamSize% -m %RamDrive% -p "/v:SWTOR_RAM /fs:ntfs /q /y"
) else (
 choice /c:yn /m "Did you mount a ramdrive with sufficient size already"
 if errorlevel 2 goto MENU
 if errorlevel 1 goto ContinueSetup2
)

:ContinueSetup2

:: Create ramdisk folders, needed to link local to ramdisk
mkdir "%RamDrive%\SWTOR\swtor"

:: Check if local SWTOR is a junction already, if not create a fresh copy of it
for %%F in ("%AppLocal%\SWTOR") do set ATTRIBS=%%~aF
if %ATTRIBS:~8,1% == - (
 if exist "%AppLocal%\SWTOR_Original" rmdir "%AppLocal%\SWTOR_Original" /S /Q
 ren "%AppLocal%\SWTOR" SWTOR_Original
)

:: If for some reason SWTOR_Original does not exist on this point, recreate it
:: Tho settings will be lost now if this line has to be executed!
if not exist "%AppLocal%\SWTOR_Original" mkdir "%AppLocal%\SWTOR_Original\swtor\settings"

:: If an older junction exist of local SWTOR delete it and recreate it to ramdisk
if exist "%AppLocal%\SWTOR" rmdir "%AppLocal%\SWTOR" /S /Q
mklink /J "%AppLocal%\SWTOR" "%RamDrive%\SWTOR"

:: Create settings (from ramdisk) junction to SWTOR_Original in local
mklink /J "%RamDrive%\SWTOR\swtor\settings" "%AppLocal%\SWTOR_Original\swtor\settings"

:: Delete DiskCacheArena (regardless if original or symlink) and create a symlink to ramdrive
if exist "%InstallPath%\swtor\DiskCacheArena" del "%InstallPath%\swtor\DiskCacheArena"
mklink "%InstallPath%\swtor\DiskCacheArena" "%ramdrive%\DiskCacheArena"

:: Add asset files if user has set the vars
for /F "usebackq tokens=1* delims==" %%i in (`set AssetFile`) do (
call :CreateLink %%j
)

:: Copy asset files to the ramdisk if user has set the vars
for /F "usebackq tokens=1* delims==" %%i in (`set AssetFile`) do (
call :CopyAsset %%j
)

:: Check if there were any asset file errors during copying
if defined AssetError goto ErrorAssetMsgCopy

:: Check if the user wants to start the launcher after mounting
if %AutoLaunch% == yes goto LAUNCH

:: End Of Script
goto EOS

:: ==================================================================================
:: REMOVE RAMDISK
:: ==================================================================================
:REMOVE
cls

:: Dismount the ramdrive if the drive exists and the user is using Imdisk
if %UseImdisk% == yes (
 if exist %RamDrive% imdisk -D -m %RamDrive%
)

:: Delete DiskArenaCache, regardless if original or symlink
if exist "%InstallPath%\swtor\DiskCacheArena" del "%InstallPath%\swtor\DiskCacheArena"

:: Delete local SWTOR link
for %%F in ("%AppLocal%\SWTOR") do set ATTRIBS=%%~aF
if %ATTRIBS:~8,1% == l (
 rmdir "%AppLocal%\SWTOR" /S /Q
 if not exist "%AppLocal%\SWTOR_Original" mkdir "%AppLocal%\SWTOR\swtor\settings"
 if exist "%AppLocal%\SWTOR_Original" ren "%AppLocal%\SWTOR_Original" SWTOR
) else (
 if exist "%AppLocal%\SWTOR_Original" rmdir "%AppLocal%\SWTOR_Original" /S /Q
)

:: Restore Asset files 
for /F "usebackq tokens=1* delims==" %%i in (`set AssetFile`) do (
call :RemoveLink %%j
)

:: Check if there were any asset file errors during removing
if defined AssetError goto ErrorAssetMsgRemove

:: End Of Script
goto EOS

:: ==================================================================================
:: MOUNT RAMDISK FOR SWTOR
:: ==================================================================================
:MOUNT
cls

:: Check if the user uses another ramdisk program
:: If not start with dismounting a current ramdrive to start fresh, then create
if %UseImdisk% == yes (
 if exist %RamDrive% imdisk -D -m %RamDrive%
 imdisk -a -s %RamSize% -m %RamDrive% -p "/v:SWTOR_RAM /fs:ntfs /q /y"
)

:: Create ramdisk folders
mkdir "%RamDrive%\SWTOR\swtor"

:: Create settings junction to SWTOR_Original in local
mklink /J "%RamDrive%\SWTOR\swtor\settings" "%AppLocal%\SWTOR_Original\swtor\settings"

:: Copy asset files to the ramdisk if user has set the vars
for /F "usebackq tokens=1* delims==" %%i in (`set AssetFile`) do (
call :CopyAsset %%j
)

:: Check if there were any asset file errors during copying
if defined AssetError goto ErrorAssetMsgCopy

:: Check if the user wants to start the launcher after mounting
if %AutoLaunch% == yes goto LAUNCH

:: End Of Script
goto EOS

:: ==================================================================================
:: DISMOUNT THE RAMDRIVE TO FREE MEMORY BETWEEN GAME SESSIONS
:: ==================================================================================
:DISMOUNT
cls

imdisk -D -m %RamDrive%
goto EOS

:: ==================================================================================
:: MESSAGES
:: ==================================================================================
:ErrorNo64Bit
cls
echo  ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo  º                                                                            º
echo  º                                   ERROR                                    º
echo  º                                                                            º
echo  ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo This script is currently written only for 64bit users of Windows, and having
echo more than 6GB of internal RAM available. Reason is because the creating a
echo ramdisk in this current state does not use 'hidden memory' on 32bit systems.
echo.
echo If this error not correct, please post this error in the ramdisk thread created
echo by Lemon_King. You can find the link on the first line of this script.
pause
goto EOS

:ErrorNTFS
cls
echo  ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo  º                                                                            º
echo  º                                   ERROR                                    º
echo  º                                                                            º
echo  ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo This script has determinate that either the disk where your local appdata or
echo the disk where you installed SWTOR does not have NTFS as filesystem. Creating
echo links can only be done with a NTFS filesystem, hence the check.
echo.
echo If this error not correct, please post this error in the ramdisk thread created
echo by Lemon_King. You can find the link on the first line of this script.
echo.
pause
goto EOS

:ErrorNoImdisk
cls
echo  ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo  º                                                                            º
echo  º                                   ERROR                                    º
echo  º                                                                            º
echo  ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo Please install Imdisk prior to executing this script, as it uses Imdisk.
echo.
echo This script could not find imdisk.exe in system32 thus thinking Imdisk is not
echo yet installed on this machine, and stopped the script.
echo.
echo If this error not correct, please post this error in the ramdisk thread created
echo by Lemon_King. You can find the link on the first line of this script.
pause
goto EOS

:ErrorInstallPath
cls
echo  ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo  º                                                                            º
echo  º                                   ERROR                                    º
echo  º                                                                            º
echo  ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo Could not find the installation path of SWTOR, by reading the registery.
echo.
echo This can come if you installed SWTOR on a different disk than the OS, and by
echo reinstalling Windows afterwards, the registery entry is not made.
echo.
echo To manually add the installation path to this scrip look at the usersettings,
echo of this batchscript, how to add manually an installation path.
echo.
pause
goto EOS

:ErrorWrongInstallPath
cls
echo  ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo  º                                                                            º
echo  º                                   ERROR                                    º
echo  º                                                                            º
echo  ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo The found (by registery) or given (manual added at settings) installationpath
echo could not find launcher.exe thus the found/given installationpath is wrong.
echo.
echo If you did not add manually an installationpath in the scrip settings, please
echo add it now, as the one in the registery is wrong.
echo.
echo If you did add it manually, please recheck the given installationpath.
echo.
pause
goto EOS

:ErrorAppLocalPath
cls
echo  ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo  º                                                                            º
echo  º                                   ERROR                                    º
echo  º                                                                            º
echo  ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo Could not find the path to local application data, by reading the registery.
echo.
echo Please follow the manual steps written out by Lemon_King on the SWTOR forums,
echo you can find the link on the first line of this script.
echo.
pause
goto EOS

:ErrorAssetMsgCopy
cls
echo  ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo  º                                                                            º
echo  º                                   ERROR                                    º
echo  º                                                                            º
echo  ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo This script could not find an original renamed asset file on your computer.
echo This is needed to copy them to the ramdisk as the game will look there now.
echo.
echo Please add the missing asset files listed below with the suffix _ORIG.tor to
echo the Asset folder that can be found at the root folder of the game.
echo.
echo The missing asset file(s) are:
echo %AssetError%
echo.
pause
goto EOS

:ErrorAssetMsgRemove
cls
echo  ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo  º                                                                            º
echo  º                                   ERROR                                    º
echo  º                                                                            º
echo  ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo This script could not find an original renamed asset file on your computer.
echo This is needed to rename it back as the link is removed already.
echo.
echo Please add the missing asset files listed below with the without the suffix
echo _ORIG.tor to the Asset folder that can be found at the root folder of the game.
echo.
echo The missing asset file(s) are:
echo %AssetError%
echo.
pause
goto EOS

:: ==================================================================================
:: LAUNCH THE SWTOR LAUNCHER
:: ==================================================================================
:LAUNCH
set InstallDrive=%InstallPath:~0,2%
%InstallDrive%
cd %InstallPath%
start "" "%InstallPath%\launcher.exe" /MIN
goto EOS

:: ==================================================================================
:: FUNCTIONS TO CALL
:: ==================================================================================
:CreateLink
for %%F in ("%InstallPath%\Assets\%1.tor") do set ATTRIBS=%%~aF
if %ATTRIBS:~8,1% == l (
 del "%InstallPath%\Assets\%1"
 mklink "%InstallPath%\Assets\%1.tor" "%RamDrive%\%1.tor"
) else (
 if exist "%InstallPath%\Assets\%1_ORIG.tor" del "%InstallPath%\Assets\%1_ORIG.tor"
 ren "%InstallPath%\Assets\%1.tor" "%1_ORIG.tor"
 mklink "%InstallPath%\Assets\%1.tor" "%RamDrive%\%1.tor"
)
goto :eof
:: end of function CreateLink

:RemoveLink
for %%F in ("%InstallPath%\Assets\%1.tor") do set ATTRIBS=%%~aF
if %ATTRIBS:~8,1% == l (
 del "%InstallPath%\Assets\%1.tor"
 if not exist "%InstallPath%\Assets\%1_ORIG.tor" set "AssetError=%AssetError% %1.tor"
 ren "%InstallPath%\Assets\%1_ORIG.tor" "%1.tor"
) else (
 if exist "%InstallPath%\Assets\%1_ORIG.tor" del "%InstallPath%\Assets\%1_ORIG.tor"
)
goto :eof
:: end of function RemoveLink

:CopyAsset
if not exist "%InstallPath%\Assets\%1_ORIG.tor" set "AssetError=%AssetError% %1_ORIG.tor"
copy "%InstallPath%\Assets\%1_ORIG.tor" "%RamDrive%"
ren "%RamDrive%\%1_ORIG.tor" "%1.tor"
goto :eof
:: end of function CopyAsset

:: ==================================================================================
:: END OF SCRIPT
:: ==================================================================================
:EOS
exit

 

 

 

MOUNTSCRIPT v4.0.0

To be used for the creating the ramdrive with asset files if needed (no interaction needed).

This can also be used as startup script for Windows if preferred.

 

 

 

:: SCRIPT VERSION 4.0.0 @ 21-03-2012
:: SWTOR FORUM THREAD: http://www.swtor.com/community/showthread.php?t=154568
:: SCRIPT INSTRUCTION: http://www.swtor.com/community/showpost.php?p=2892331
:: Use the thread for questions, feedback or debugging.

@echo off
color f0

:: ==================================================================================
:: USER SETTINGS [ set <varname>=<value>  ; Do not add spaces around the = sign !! ]
:: ==================================================================================

:: Start SWOTR's Launcher after mounting the ramdrive
:: use 'set AutoLaunch=yes' or 'set AutoLaunch=no'
set AutoLaunch=no

:: Give the diskletter you want to use as ramdisk
:: Give a letter followed by a colon (default is T:)
set RamDrive=T:

:: Give the ramdisk size, [interger+suffix] M for MegaByte or G for GigaByte
:: - only adding cache (default):   1500M
:: - Cache + Fx asset:              1600M
:: - Cache + Fx + Dynamic:          4G
:: - Cache + Dynamic:               4G
set RamSize=1500M

:: Add asset files, make sure RamSize if of sufficient size!
:: To include asset files use 'set AssetFileXX=name_of_asset' where XX represents
:: the number of asset file that has to be included starting with '01'. (leave out .tor)
:: Example; set AssetFile01=swtor_main_art_fx_1 to include fx asset file to the ramdisk.
:: predefined asset files remove the double colon (: to uncomment it and add it


::set AssetFile01=swtor_main_art_fx_1
::set AssetFile02=swtor_main_art_dynamic_cape_1
::set AssetFile03=swtor_main_art_dynamic_chest_1
::set AssetFile04=swtor_main_art_dynamic_chest_tight_1
::set AssetFile05=swtor_main_art_dynamic_hand_1
::set AssetFile06=swtor_main_art_dynamic_head_1
::set AssetFile07=swtor_main_art_dynamic_lower_1
::set AssetFile08=swtor_main_art_dynamic_mags_1


:: Use Imdisk, if set to 'no' it will skip the creation of a ramdisk by using Imdisk.
:: So an user has to create a ramdisk before hand with the right amount of size
:: and press y during confirmation while executing this script.
set UseImdisk=yes

:: Override Installpath for use when this script cannot read the path from registery.
:: This can happen because a reinstall of Windows while SWTOR was on another disk.
:: To use, add the complete path (no quotes) behind 'set InstallPath=' for example:
:: set InstallPath=C:\Program Files (x86)\Electronic Arts\BioWare\Star Wars - The Old Republic
set InstallPath=

:: ==================================================================================
:: GET INSTALLPATH AND LOCALPATH FROM REGISTERY
:: ==================================================================================
:: Get SWTOR installation path, if manually given skip this
if defined InstallPath goto OverrideInstallPath
for /F "skip=2 tokens=3,*" %%i in ('reg query "HKEY_LOCAL_MACHINE\software\wow6432node\bioware\star wars-the old republic" /v "Install Dir" 2^>nul') do set InstallPath=%%j
if not defined InstallPath goto ErrorInstallPath

:OverrideInstallPath
:: Get local appdata path
for /F "skip=2 tokens=3,*" %%i in ('reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Local AppData" 2^>nul') do set AppLocal=%%j
if not defined AppLocal goto ErrorAppLocalPath

:: Validate found/given installation path
if not exist "%InstallPath%\launcher.exe" goto ErrorWrongInstallPath

:: ==================================================================================
:: MOUNT RAMDISK FOR SWTOR
:: ==================================================================================
:MOUNT
cls

:: Check if the user uses another ramdisk program
:: If not start with dismounting a current ramdrive to start fresh, then create
if %UseImdisk% == yes (
 if exist %RamDrive% imdisk -D -m %RamDrive%
 imdisk -a -s %RamSize% -m %RamDrive% -p "/v:SWTOR_RAM /fs:ntfs /q /y"
)

:: Create ramdisk folders
mkdir "%RamDrive%\SWTOR\swtor"

:: Create settings junction to SWTOR_Original in local
mklink /J "%RamDrive%\SWTOR\swtor\settings" "%AppLocal%\SWTOR_Original\swtor\settings"

:: Copy asset files to the ramdisk if user has set the vars
for /F "usebackq tokens=1* delims==" %%i in (`set AssetFile`) do (
call :CopyAsset %%j
)

:: Check if there were any asset file errors during copying
if defined AssetError goto ErrorAssetMsgCopy

:: Check if the user wants to start the launcher after mounting
if %AutoLaunch% == yes goto LAUNCH

:: End Of Script
goto EOS

:: ==================================================================================
:: MESSAGES
:: ==================================================================================
:ErrorInstallPath
cls
echo  ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo  º                                                                            º
echo  º                                   ERROR                                    º
echo  º                                                                            º
echo  ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo Could not find the installation path of SWTOR, by reading the registery.
echo.
echo This can come if you installed SWTOR on a different disk than the OS, and by
echo reinstalling Windows afterwards, the registery entry is not made.
echo.
echo To manually add the installation path to this scrip look at the usersettings,
echo of this batchscript, how to add manually an installation path.
echo.
pause
goto EOS

:ErrorWrongInstallPath
cls
echo  ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo  º                                                                            º
echo  º                                   ERROR                                    º
echo  º                                                                            º
echo  ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo The found (by registery) or given (manual added at settings) installationpath
echo could not find launcher.exe thus the found/given installationpath is wrong.
echo.
echo If you did not add manually an installationpath in the scrip settings, please
echo add it now, as the one in the registery is wrong.
echo.
echo If you did add it manually, please recheck the given installationpath.
echo.
pause
goto EOS

:ErrorAppLocalPath
cls
echo  ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo  º                                                                            º
echo  º                                   ERROR                                    º
echo  º                                                                            º
echo  ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo Could not find the path to local application data, by reading the registery.
echo.
echo Please follow the manual steps by Lemon_King on the SWTOR forums,
echo search for ramdisk, select the how-to thread.
echo.
pause
goto EOS

:ErrorAssetMsgCopy
cls
echo  ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo  º                                                                            º
echo  º                                   ERROR                                    º
echo  º                                                                            º
echo  ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo This script could not find an original renamed asset file on your computer.
echo This is needed to copy them to the ramdisk as the game will look there now.
echo.
echo Please add the missing asset files listed below with the suffix _ORIG.tor to
echo the Asset folder that can be found at the root folder of the game.
echo.
echo The missing asset file(s) are:
echo %AssetError%
echo.
pause
goto EOS

:: ==================================================================================
:: LAUNCH THE SWTOR LAUNCHER
:: ==================================================================================
:LAUNCH
set InstallDrive=%InstallPath:~0,2%
%InstallDrive%
cd %InstallPath%
start "" "%InstallPath%\launcher.exe" /MIN
goto EOS

:: ==================================================================================
:: FUNCTIONS TO CALL
:: ==================================================================================
:CopyAsset
if not exist "%InstallPath%\Assets\%1_ORIG.tor" set "AssetError=%AssetError% %1_ORIG.tor"
copy "%InstallPath%\Assets\%1_ORIG.tor" "%RamDrive%"
ren "%RamDrive%\%1_ORIG.tor" "%1.tor"
goto :eof
:: end of function CopyAsset

:: ==================================================================================
:: END OF SCRIPT
:: ==================================================================================
:EOS
exit

 

 

 

CHANGELOG

 

 

 

  • v4.0.0 // 2012-03-21;
    • Reduced code quite a bit by use of call functions (thnx 'Morsk').
    • Ability to add only the asset files you want, not fixed in code anymore (thnx 'exca').
    • Ability to autostart the launcher after mounting.
    • Ability to skip the Imdisk parts, for use with another program (thnx 'Black-Mage').

    [*]v3.1.3 // 2012-03-06;

    • Added forum and post link on top of the script.
    • Commented in some errors that these links are available.
    • Changed background- and forground-color to white/black instead of black/white.

    [*]v3.1.2 // 2012-02-29;

    • Changed tempfile name (at ntfs test) to 'swtorramdiskntfstest.temp'. (cosmetic)
    • Combined lines at nfts test. (cosmetic)

    [*]v3.1.1 // 2012-02-28;

    • Changed minimum size cache+fx to 1600M.

    [*]v3.1.0 // 2012-02-28;

    • Added check if Imdisk is installed.

    [*]v3.0.1 // 2012-02-27;

    • Fixed a little error at NTFS check

    [*]v3.0.0 // 2012-02-27;

    • Added option for dynamic asset files.
    • Added option to override installpath of SWTOR.
    • Added check for correct found/given installpath of SWTOR.
    • Added check for Windows 64-bit.
    • Added check for NTFS filesystem.
    • Added a single errormessage for missing asset files.
    • Allot of comments ( :: text ).

    [*]v2.x.x // 2012-02-xx;

    • Cache+fx all-in-one version.

    [*]v1.x.x // 2012-01-xx;

    • First all-in-one batchscript, cache only.

 

 

Edited by Ocmer_
Link to comment
Share on other sites

MANUAL

 

Ok so I write this post just for consistency and for those who are interested what the program or batchscrip now actually do. I start off right away and assume you have installed Imdisk by now, as I will use that to create the ramdisk. In this example it will be T:

 

This focuses on getting the big DiskCacheArena and the local cachefiles on the ramdisk, additional asset files are not described here but goes with the same method. The following commands may need to be filled in (will be yellow) and run them in cmd.exe run as administrator.

 

Creating a ramdisk

 

The following code will create a ramdisk T: that has a size of 1,5GB and is formatted as NTFS.

imdisk -a -s 1500M -m T: -p "/fs:ntfs /q /y"

 

 

Linking DiskCacheArena to the ramdisk

 

First you need to find the installation path of the game, once in the root folder navigate into the folder "swtor".

There should a file called "DiskCacheArena", delete that file.

 

Now run the following code the create a link (the game recreate this file hench the delete).

mklink "[color="Yellow"]<SWTOR Install Location>[/color]\swtor\DiskCacheArena" "T:\DiskCacheArena"

 

Linking local cache to the ramdisk

 

Now this is a bit difficult as the two cache files are deleted and remade by the game itself, even during gameplay, we cannot link those as it will just delete the link files. Thus we put the whole 'SWTOR' folder that resides in your local appdata on the ramdisk, but this folder contains also your settings, and on a ramdisk everthing is lost on a reboot.

 

To link this folder to the ramdisk (so the cachefiles will be build on it) we have to linkback to the settings folder, so your ingame settings are not lost.

 

First we start of creating the required folder on the ramdisk with the following code.

mkdir T:\SWTOR\swtor

 

Then navigate to '%localappdata%' or 'C:\Users\username\AppData\Local' and rename the 'SWTOR' folder you see there to 'SWTOR_Original'. We create then a link for 'SWTOR' to the ramdisk.

mklink /J "%localappdata%\SWTOR" "T:\SWTOR\"

 

Now we have a link to the ramdisk, to link back to the settings that are now in 'SWTOR_Original' use the following code.

mklink /J "T:\SWTOR\swtor\settings" "%localappdata%\SWTOR_Original\swtor\settings"

 

After a reboot

 

Due to the nature the ramdisk still being ram, it will be wiped when a reboot has occurred. Therefore after each reboot you have to recreate the ramdisk and it's content.

imdisk -a -s 1500M -m T: -p "/fs:ntfs /q /y"
mkdir T:\SWTOR\swtor
mklink /J "T:\SWTOR\swtor\settings" "%localappdata%\SWTOR_Original\swtor\settings"

 

Asset files

 

The trick we do with the asset files, as they have to be static on your harddrive and copied to the ramdisk (not moved!), is rename them, create a link and let the program copy the renamed file to the ramdisk, and rename the renamed file on the ramdisk back to the original name.

Edited by Ocmer_
Link to comment
Share on other sites

Ramdisk what and why

 

A ramdisk is actually a piece of your memory that you use as it was actually a disk. Now you probably can imagine that the read/write speed on these disk are way higher than even a SSD. The only downfall is that if you reboot, the disk is wiped.

 

The files we focus on to put on the ramdisk are;

  • DiskCacheArena
  • Local SWTOR cache
  • Asset files

 

Now I assume for this explanation that you have both Windows and SWTOR on the same disk. If the game needs data, it will pause the game untill the load it done (some call it hitching). What I have read around the forums it seems that the data loaded (read) from the asset files, streamed by the local cache files (read/write action) to the large DiskCacheArena (write). Once the data is cached in that file the game then uses it (read).

 

Now you can see if it were on the same disk, that are quite some read/write actions performed on different files! Hench we want to especially put the cache files on the ram.

 

Imdisk ramdisk speed test with CrystalDiskMark 3.0.1

-----------------------------------------------------------------------
CrystalDiskMark 3.0.1 x64 (C) 2007-2010 hiyohiyo
Crystal Dew World : http://crystalmark.info/
-----------------------------------------------------------------------
* MB/s = 1,000,000 byte/s [sATA/300 = 300,000,000 byte/s]

Sequential Read : 4090.674 MB/s
Sequential Write : 5472.913 MB/s
Random Read 512KB : 3984.519 MB/s
Random Write 512KB : 5289.138 MB/s
Random Read 4KB (QD=1) : 561.441 MB/s [137070.6 IOPS]
Random Write 4KB (QD=1) : 512.815 MB/s [125198.9 IOPS]
Random Read 4KB (QD=32) : 1343.460 MB/s [327993.2 IOPS]
Random Write 4KB (QD=32) : 1040.265 MB/s [253971.0 IOPS]

Test : 1000 MB [T: 13.0% (194.3/1500.0 MB)] (x5)
Date : 2012/02/18 19:53:42
OS : Windows 7 Ultimate Edition SP1 [6.1 Build 7601] (x64) 

Edited by Ocmer_
Link to comment
Share on other sites

If you have to do all this to play a game you probably should look for a new game.

 

Well it is your own choice to use this or not.

 

I just started this after I came across this solution by Lemon_King on his thread, and I just went along and created the batchscript and eventually now the compiled program written in C#. These two practically does everthing for you, only you need to start the game with this else the ramdisk is not created with the required files.

 

This actually started more as a personal project, as I already was interested in programming, but decided to give you guys the easy way aswell with the methods.

Link to comment
Share on other sites

If you have to do all this to play a game you probably should look for a new game.

 

Yet people with medium to high-end computers are having issues and seeing performance increases with this.

 

You don't want to use it? Don't.

Edited by Jeryko
Link to comment
Share on other sites

Ok done finalizing this new thread.

 

Completed C# program, batchscript and manual method posts aswell.

 

For those who are interested in what future plans are for the C# program drop by on that post as I dedicated a paragraph for it. For now passing argument to launch it without userinteractions is being worked on (it is working, but needs some time finalizing it).

Link to comment
Share on other sites

As a not too friendly user with actually using a ram disk the asset files show up as 18000 megabytes of ramdisk space in the ram disk size.

 

Does this mean that if it was to try and load all files at the same time it would require 18 gigabytes of ram or that the usage of the files when finished loading gets dumped keeping it at a buffered state below the recommended 6 gigabytes of ram.

Link to comment
Share on other sites

As a not too friendly user with actually using a ram disk the asset files show up as 18000 megabytes of ramdisk space in the ram disk size.

 

Does this mean that if it was to try and load all files at the same time it would require 18 gigabytes of ram or that the usage of the files when finished loading gets dumped keeping it at a buffered state below the recommended 6 gigabytes of ram.

 

Yea, loading all asset files require 18GB of ram only for the asset files (on top of what windows and SWTOR require). I stated at least 6GB with in mind for the DiskCacheArena and local caches (and option the fx asset files), I'll update that in the OP.

 

Loading all asset files onto the ram is quite overkill (also copying all asset files to ram can take some time after each reboot), I just added the option to select all to be consistent with normal selection boxes. Anyway I know few guys who actually load all asset files onto the ram.

 

I've been using the batch file successfully for a couple weeks now. Is there a good reason for me to switch the C# one? Is it just prettied up, or is there some other benefit it will provide?

There is no reason to swap IMO, it is indeed prettied up with Windows style forms, boxes and messages. Also a selectionbox for asset files you as user want to add. Later on this will also contain a direct launch option by argument much like the seperate mount script.

Link to comment
Share on other sites

I wonder how many people are going to end up breaking their PC's attempting to do this. :D

 

Actually so far people posted none broke there pc.

 

If you want to read the old thread you can see that people had some problems with the setup, but always resolved quite quickly because im trying my best to help them.

 

Also when someone encounters a problem I didn't think off, I also try to update my progam. You can see on the last few posts there, someone messed up the setup quite bad by selecting a wrong local path. With the newest version you cannot select local path anymore.

Link to comment
Share on other sites

Very well posted, although I have not taken the time to actually try this yet (and have not really suffered any sort of performance drops on my laptop), it's great to see people in the community taking an active stance in helping others out. Big kudos!
Link to comment
Share on other sites

It says this would be much faster than an SSD, I'm currently using an M4 Crucial 64 SSD for the game, with:

 

1055t Processor 6 cores, OC to 3.2 GHZ

6770 HD Radeon

8 GB Ram (2x 4 GB)

 

Would this really give me an improvement?

Link to comment
Share on other sites

It says this would be much faster than an SSD, I'm currently using an M4 Crucial 64 SSD for the game, with:

 

1055t Processor 6 cores, OC to 3.2 GHZ

6770 HD Radeon

8 GB Ram (2x 4 GB)

 

Would this really give me an improvement?

 

You can always try it, it still differs from computer to computer.

 

I have an SSD (OCZ Vertex 3) which contains both Windows and SWTOR, and even I some hitching when the game needs data. I have updated my post under ramdisk why, to give a general idea (what people found out) what the game does with certain cache files.

Link to comment
Share on other sites

Ramdisks are unnecessary.

 

SSD >

 

I quote what I wrote in the OP

 

Note; I do not want to have a discussions here if it is reliable or not as this differs from computer to computer, much like the game itself. You are of course free to try the method and post your feedback or trouble here.

 

And beside that, I run SWTOR on an SSD do you really think I won't be doing this if there is some form or improvement?

Even if it is to lower freaking write cycles.

Link to comment
Share on other sites

Ramdisks are unnecessary.

 

SSD >

I run SWTOR on a 250GB OCZ Vertex III HardDrive. I see clear improvements with this tool. You're free not to believe it. I suggest you try it though.

 

Of course, there is clearly more bonus for those running normal hard drives.

 

Anyway for those willing to know, the C# program is evolving quite fast. I won't be surprised if we have it mostly completed without a fancy GUI by tuesday.

 

The GUI might follow a little after.

 

I also had an idea for the auto launch without showing the GUI in "unleashed" mode. We'll set a checkbox to chose this. And when we start, we'll check if the user is pressing CTRL, SHIFT or ALT. If so, we'll display the GUI, else we'll start directly in Unleashed mode.

Edited by exca
Link to comment
Share on other sites


×
×
  • Create New...