Showing posts with label The Sims. Show all posts
Showing posts with label The Sims. Show all posts

2015-05-25

Create a folder junction link for The Sims 4

To create a folder junction link for The Sims 4, you'll use the mklink /j command in Command Prompt. This allows you to effectively move the game's "Mods" folder to a new location while maintaining a link to the original path within the game's files.

Here's how to do it: 

1. Open Command Prompt:
  1. Search for "Command Prompt" and open it as an administrator.
  2. 2. Determine Paths:
    You need two paths:
    • Target Path: The location where you want the "Mods" folder to physically reside (e.g., D:\Mods2\Mods).
    • Source Path: The original location of the "Mods" folder within The Sims 4 (e.g., C:\Users\USERNAME\Documents\Electronic Arts\The Sims 4\Mods).
  3. 3. Delete Existing Mods Folder:
    Before creating the junction, delete the existing "Mods" folder in your Sims 4 folder. This ensures the game will recognize the new junction.
  4. 4. Run the Command:
    Use the following syntax in Command Prompt, replacing the placeholder paths with your actual paths:
    mklink /j "C:\Users\USERNAME\Documents\Electronic Arts\The Sims 4\Mods" "D:\Mods2\Mods"
This command tells the system to create a junction link named "Mods" at the original path (C:\Users\USERNAME\Documents\Electronic Arts\The Sims 4\Mods), which points to the new location (D:\Mods2\Mods). 

Test: Launch The Sims 4 to verify that the game is now reading your mods from the new location.
Important Notes:
  • Administrator Privileges:
    The mklink command requires administrator privileges, so make sure you're running Command Prompt as an administrator.
  • Correct Syntax:
    The syntax is crucial. The first path is the junction link location, and the second path is the folder you're linking to.
  • Deleting Existing Folder:
    Deleting the existing "Mods" folder is necessary for the junction to be recognized by the game.
  • Link Shell Extension:
    While mklink is the primary tool, Link Shell Extension can also be used for creating symbolic links, but they might not be fully recognized by the game. 

2011-08-02

Using Link Shell Extension to create NTFS Junction

Trước giờ mọi người nghe nhiều về NTFS, sử dụng Windows không biết bao nhiêu năm và cũng không ai xa lạ gì với create shortcut. Nhưng chắc chắn rất ít người biết rõ về link của NTFS: thế nào là symbolic link hay junction. Những ai tiếp xúc với Linux thì sẽ quen với khái niệm link còn người dùng Wins thì phần lớn chỉ biết shortcut.

Tuy nhiên shortcut không phải khi nào cũng dùng được, nó có nhiều hạn chế hơn những dạng khác mà những dạng này ít người biết mà Wins cũng không hỗ trợ trực tiếp. Mình sẽ không nói gì về lý thuyết cả, chỉ giới thiệu một cách dùng Junction của NTFS trong thực tế như thế nào. Sẵn tiện cài xong game mình viết một vài dòng luôn. Vì sao lại dùng Junction thì có thể tham khảo link http://comptb.cects.com/2268-overview-to-understanding-hard-links-junction-points-and-symbolic-links-in-windows
Mình trích 1 đoạn như sau:


Junction Point (Directory Hard Link):
  • A file that acts like a representation of a target directorypartition or volume on the same system
  • Has the same size as the target without duplicating it (doesn’t use any space)
  • Interpreted at the operating system level – transparent to SW programs and users
  • Deleting the Junction Point does not remove the target*
  • If the target is moved, renamed or deleted, the Junction Point still exists, but points to a non-existing directory
  • Changing the contents through the Junction Point changes the target contents
  • Can reside on partitions or volumes separate from the target on the same system
  • Compatible with Win2k and above in Windows
*A Junction Point should never be removed in Win2k, Win2003 and WinXP with Explorer, the del or del /s commands, or with any utility that recursively walks directories since these will delete the target directory and all its subdirectories. Instead, use the rmdir command, the linkd utility, or fsutil (if using WinXP or above) or a third party tool to remove the junction point without affecting the target. In Vista/Win7, it’s safe to delete Junction Points with Explorer or with the rdir and del commands.
Symbolic Link (Soft Link):
  • A file containing text interpreted by the operating system as a path to a file or directory
  • Has a file size of zero
  • Interpreted at the operating system level – transparent to SW programs and users
  • Deleting the Symbolic Link does not remove the target
  • If the target is moved, renamed or deleted, the link still exists, but points to a non-existing file or directory
  • Points to, rather than represents, the target using relative paths
  • Can reside on partitions or volumes separate from the target or on remote SMB network paths
  • Compatible with UNIX and UNIX-like systems and with Vista and above in Windows
Shortcut:
  • A file interpreted by the Windows shell or other apps that understand them as paths to a file or directory
  • File size corresponds to the binary information it contains
  • Treated as ordinary files by the operating system and by SW programs that don’t understand them
  • Deleting the shortcut does not remove the target
  • Maintains references to target even if the target is moved or renamed, but is useless if the target is deleted
  • Points to, rather than represents, the target
  • Can reside on partitions or volumes separate from the target on the same System
  • Compatible with all Windows versions


Ví dụ 1: chơi The Sims, download objects phải để trong My Document/EA Games/The Sims 2/Downloads, nhưng việc này dẫn đến 2 vấn đề rắc rối: thứ nhất dung lượng ổ C chẳng hạn có giới hạn, thứ 2 muốn giữ lại download mỗi khi cài lại máy hay muốn để một nơi nào đó (một ổ đĩa khác ổ Data là D:).

Ví dụ 2: một trường hợp nữa là khi không muốn cài hết tất cả trong C: vì lỡ chia partition quá nhỏ mà không resize được, nhưng một số app rất khó chịu, đã chọn installation location là ổ đĩa khác vẫn install vào C: (điển hình là Visual Studio).

Lúc này mình sẽ dùng Junction như sau:

Bước 1: download  hardlink shell, một tiện ích miễn phí cho phép tạo các dạng NTFS link khác nhau, ở đây mình sẽ xài Junction
http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html
Trong trang download cũng có chỉ cách dùng, tuy nhiên để rõ ràng mình sẽ mô tả cách dùng Junction.

Bước 2: cài đặt link shell extension. Sau khi cài đặt xong, nhấp chuột phải vào một folder nào đó sẽ có một shell extension là 'Pick Link Source'. Tới đây là đã cài Link Shell Extension thành công.

Bước 3: cách dùng
Giả sử với ví dụ 1 ở trên. Chúng ta muốn link The Sims 2/Downloads sang ổ data D: chẳng hạn (có nghĩa là chúng ta cần kết quả cuối cùng trong The Sims 2 có folder Downloads nhưng thực chất nó là một folder ở D:).
- Tạo trong D:\My Games\The Sims 2\Downloads. Phần trước Downloads là gì cũng được tùy bạn quản lý nhưng phần sau chắc chắn là Downloads. Đây là folder thật 100%.
- Chọn chuột phải, hiện ra 'Pick Link Source', thực hiện Pick Link Source bằng cách click vào đó ;-). Sau bước này chúng ta đã chọn link source.
- Vào My Document/EA Games/ tức tại đây chúng ta thấy folder The Sims 2 nghĩa là folder cha của Downloads mà chúng ta sẽ tạo, nhấn chuột phải, lúc này sẽ thấy xuất hiện Cancel Link Creation tức hủy việc tạo link (nếu tạo nhầm chẳng hạn), và Drop As ..., ta chọn Drop As ... -> Chọn Junction, như vậy là đã tạo link xong. 





Folder link sẽ có biểu tượng link nhỏ bên góc biểu tượng folder, nếu nhấn chuột phải thì trong menu context sẽ có mục Delete Junction.


- Giờ test thử, new một text document (New Text Document.txt) ngoài desktop chẳng hạn, paste vào My Document/EA Games/The Sims 2/Downloads hay vào trực tiếp tạo text file trong Downloads link folder mới tạo, rồi chuyển sang D:\My Games\The Sims 2\Downloads, trong đó có file text vừa tạo. Bây giờ 2 folder ở 2 vị trí nhưng bản chất là một.


Với ví dụ 2: chúng ta làm tương tự, giả sử cài Visual Studio 2010, tạo trong D: thư mục là D:\Microsoft Visual Studio 10.0 (là default installation folder name). Chọn Pick Link Source, xong vào C:, chọn chuột phải lên folder Program Files, và chọn Drop As ... > Junction. Sau khi thực hiện xong chúng ta cài Visual 2010 bình thường, chọn thư mục cài đặt là C:\Program Files\Microsoft Visual Studio 10.0, thực chất sẽ cài lên ổ D:. Có thể mình cài trước, rồi move cái folder cài đó sang D:, xong tạo link ngược lại cũng OK.

Vậy là có thể bạn đã biết thêm 1 các dùng link trong Windows. Rất cảm ơn developer tạo ra cái shell extension này, rất tiện lợi.
Nice day,

2011-07-09

Install The Sims 2 with Windows 7 compatibility issues (all EPs and SPs)

Hôm nay ngồi cài The Sims 2 cho vợ, lần trước cũng kêu sẽ cài nhưng rồi bị lỗi không cài được vài EP nên thôi không cài nữa. Lần này mới cài lại máy, nghĩ cũng tức không cài được EP thì chơi cái gì nữa. Mình cũng có sở thích 'giết người' và 'xây nhà tập thể' (có nghĩa là sưu tập bia mộ hoặc xây sao ở nhiều người mà bọn nó ko xung đột) trong The Sims 2.

OK vấn đề là sau khi install 4 đĩa gốc từ Disk 1 đến Disk 4, có thể chơi nếu chỉnh
Compatiblity mode Windows XP SP2 + Disable visual themes, Disable desktop composition, Privilege Level Admin (optional). Tới đây thì có thể chơi game rồi nếu không patch hoặc cài thêm EP. Tất nhiên ta không dừng lại ở đây.

The game will now run but you will not be able to install the patch or add a new EP. This is because each EP checks for an update which Windows 7 co-operate with. In my experience I still wasn’t able to install the patch even run TSBin/TS2UPD.exe in compatibility mode.

Bản patch có thể download tại website của EA nhưng không cần download nếu tiếp tục cài thêm EP.

The patch can be downloaded at http://thesims2.ea.com/update/ but it's unnecessary if we continue install EPs. The updater will automatic launch the patch after EP installation completed.

+ Patch, EPs installation

Nhưng tới đây vẫn chưa thể cài EP, nói chính xác là bản EP1 University. Nó sẽ ra thông báo 'Please insert The Sims 2 CD 4 to continue' và không thể hoàn tất cài đặt.

Can't complete patch after install EP1, even both Physical DVD and Virtual DVD Drive have The Sims 4 CD). If we cancel, the installer will rollback, OMG.

Tới đây thì đuối rồi, search hoài không ra cách nào để qua bước này. Cuối cùng thì mình cũng đã làm được. Tới đây đừng đụng đậy gì đến nó, shutdown máy và vào chế độ Safe Mode, F8. Nhớ là khi vào chế độ Safe Mode ta dùng Physical CD/DVD Drive vì Virtual CD/DVD Drive không hoạt động. Chạy EP1 Install Folder/TSBin/TS2UPD.exe với compatiblity mode. OK thành công.

After installation completed and the installer launch the patch, ignore the dialog 'Please insert The Sims 2 CD 4 to continue' and shutdown the PC. Restart PC in Safe Mode (F8), alter the patch/updater to compatibility mode and complete patch with The Sims 2 CD 4 in Physical CD/DVD Drive.

Kết luận:

1. Cài đặt 4 đĩa The Sims 2, sẽ chơi được với compatiblity mode. 
Completed install 4 CDs, alter the compatibility of the game. The game is runable in compatiblity mode (it's not all we needs).

2. Cài EP và để thông báo lỗi đó, thực hiện tắt máy.
Complete EP installation, leave the updater message alone, turn off PC.

3. Khởi động với Safe Mode
Start PC in Safe Mode

4. Chạy patch với compatibility mode
Alter the compatibility of the patch (EP Install Folder/TSBin/TS2UPD.exe)

5. Cài patch thành công
Install patch

6. Restart và tiếp tục cài trong Safe Mode với các EP còn lại nếu không patch được
Repeat install in Safe Mode with the next EPs. Restart and run game