rebrand to Swiped Mod Switcher and new README
This commit is contained in:
29
README.md
Normal file
29
README.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# Swiped Mod Switcher
|
||||
A simple but effective mod switcher for simple game such as Sims and Cyberpunk 2077.
|
||||
|
||||
it works by switching out a games mod folder with one of the ones made by you and placed under the profiles directory.
|
||||
|
||||
the switch is really just a symbolic link so it happens in milliseconds even on slow hard drives regardless of the amount or size of mods in the folder.
|
||||
|
||||
### Upsides:
|
||||
- it is very very fast even switching a folder with 100+GB on a slow slow hdd in a few milliseconds.
|
||||
- makes having a normal and lewd version of your mods easy to switch between.
|
||||
- makes having a different set of mods depending on who your playing with easier aswell.
|
||||
|
||||
### Downsides:
|
||||
- it does not manage mods you manage them yourself and place them in the profiles directory.
|
||||
- it does not deduplicate your mods if you have mods 'A' installed in 2 profiles it will take size of 'A' x2 room on your hdd.
|
||||
- because it switches your games mods folder it does work with existing mod managers mostly however they may get slow having to figure out what mods are installed already when they open or may even get borked if they keep an external journal of what is installed.
|
||||
|
||||
### Not Gonna Happens:
|
||||
- deduplicating mods this will never be supported as this would be a drastic change from being a mod switcher to being a mod manager and that's a pile of crazy I don't want to touch.
|
||||
|
||||
## Installation
|
||||
1. Download the latest version from the releases page.
|
||||
2. Make a folder and place it in there.
|
||||
3. Make a second folder in that folder named profiles.
|
||||
4. Open Swiped Mod Switcher and select the second folder in the Mod Profiles Directory selection.
|
||||
5. Then select your games current mod folder in the Game Mods Directory selection.
|
||||
6. Now if you already have some mods installed make a new folder in the Mod Profiles Directory name it whatever you would like to call the profile and then copy the current mods to that folder once done you can delete the games mod folder dont worry Swiped Mod Switcher will remake the folder itself when you select a profile.
|
||||
7. Click Reload Mod Profiles and it should display your profile then simply click it to switch to that profile.
|
||||
8. Play your game or create more profiles the choice at this point is yours.
|
||||
4
go.mod
4
go.mod
@@ -1,6 +1,6 @@
|
||||
module s1d3sw1ped/cpms
|
||||
module s1d3sw1ped/swipedmodswitcher
|
||||
|
||||
go 1.20
|
||||
go 1.22
|
||||
|
||||
require (
|
||||
fyne.io/fyne/v2 v2.3.5
|
||||
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
36
main.go
36
main.go
@@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"s1d3sw1ped/cpms/admin"
|
||||
"s1d3sw1ped/swipedmodswitcher/admin"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
@@ -18,8 +18,8 @@ import (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
ProfilesRoot string `yaml:"profiles_root"`
|
||||
ArchiveRoot string `yaml:"archive_root"`
|
||||
ModProfilesDirectory string `yaml:"mod_profiles_dir"`
|
||||
GameModsDirectory string `yaml:"game_mods_dir"`
|
||||
}
|
||||
|
||||
func saveConfig(cfg Config) {
|
||||
@@ -38,7 +38,7 @@ func loadConfig() *Config {
|
||||
_, err := os.Stat("config.yaml")
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
saveConfig(Config{ProfilesRoot: "", ArchiveRoot: ""})
|
||||
saveConfig(Config{ModProfilesDirectory: "", GameModsDirectory: ""})
|
||||
}
|
||||
|
||||
d, err := os.ReadFile("config.yaml")
|
||||
@@ -69,7 +69,7 @@ func main() {
|
||||
cfg = loadConfig()
|
||||
|
||||
ap := app.New()
|
||||
wp := ap.NewWindow("Cyberpunk Mod Switcher")
|
||||
wp := ap.NewWindow("Swiped Mod Switcher")
|
||||
wp.Resize(fyne.NewSize(600, 1))
|
||||
wp.CenterOnScreen()
|
||||
|
||||
@@ -81,15 +81,15 @@ func main() {
|
||||
fillGrid(grid, wp)
|
||||
|
||||
profilesrootentry := widget.NewEntry()
|
||||
profilesrootentry.SetText(cfg.ProfilesRoot)
|
||||
profilesrootentry.SetText(cfg.ModProfilesDirectory)
|
||||
profilesrootentry.Disable()
|
||||
|
||||
archiverootentry := widget.NewEntry()
|
||||
archiverootentry.SetText(cfg.ArchiveRoot)
|
||||
archiverootentry.SetText(cfg.GameModsDirectory)
|
||||
archiverootentry.Disable()
|
||||
|
||||
container := container.NewVBox(
|
||||
widget.NewForm(widget.NewFormItem("Profiles Directory", profilesrootentry)),
|
||||
widget.NewForm(widget.NewFormItem("Mod Profiles Directory", profilesrootentry)),
|
||||
widget.NewButtonWithIcon("Select", theme.FolderIcon(), func() {
|
||||
dialog.NewFolderOpen(func(lu fyne.ListableURI, err error) {
|
||||
if err != nil {
|
||||
@@ -99,12 +99,12 @@ func main() {
|
||||
return
|
||||
}
|
||||
profilesrootentry.SetText(lu.Path())
|
||||
cfg.ProfilesRoot = lu.Path()
|
||||
cfg.ModProfilesDirectory = lu.Path()
|
||||
saveConfig(*cfg)
|
||||
fillGrid(grid, wp)
|
||||
}, wp).Show()
|
||||
}),
|
||||
widget.NewForm(widget.NewFormItem("Archive Directory", archiverootentry)),
|
||||
widget.NewForm(widget.NewFormItem("Game Mod Directory", archiverootentry)),
|
||||
widget.NewButtonWithIcon("Select", theme.FolderIcon(), func() {
|
||||
dialog.NewFolderOpen(func(lu fyne.ListableURI, err error) {
|
||||
if err != nil {
|
||||
@@ -114,13 +114,13 @@ func main() {
|
||||
return
|
||||
}
|
||||
archiverootentry.SetText(lu.Path())
|
||||
cfg.ArchiveRoot = lu.Path()
|
||||
cfg.GameModsDirectory = lu.Path()
|
||||
saveConfig(*cfg)
|
||||
fillGrid(grid, wp)
|
||||
}, wp).Show()
|
||||
}),
|
||||
widget.NewSeparator(),
|
||||
widget.NewButton("Reload Profiles", func() {
|
||||
widget.NewButton("Reload Mod Profiles", func() {
|
||||
fillGrid(grid, wp)
|
||||
}),
|
||||
scroll,
|
||||
@@ -130,8 +130,8 @@ func main() {
|
||||
}
|
||||
|
||||
func fillGrid(grid *fyne.Container, parent fyne.Window) {
|
||||
profiles := scanProfiles(cfg.ProfilesRoot)
|
||||
archive := cfg.ArchiveRoot
|
||||
profiles := scanProfiles(cfg.ModProfilesDirectory)
|
||||
archive := cfg.GameModsDirectory
|
||||
grid.Hide()
|
||||
defer grid.Show()
|
||||
grid.RemoveAll()
|
||||
@@ -165,8 +165,8 @@ func scanProfiles(profilesroot string) []string {
|
||||
|
||||
func makeIFunc(profile, archive string, parent fyne.Window) func() {
|
||||
return func() {
|
||||
if cfg.ArchiveRoot == "" || cfg.ProfilesRoot == "" {
|
||||
dialog.NewInformation("Notice", "you must select a archive root and profiles root before", parent).Show()
|
||||
if cfg.GameModsDirectory == "" || cfg.ModProfilesDirectory == "" {
|
||||
dialog.NewInformation("Notice", "you must select a game mod directory and mod profiles directory before", parent).Show()
|
||||
return
|
||||
}
|
||||
|
||||
@@ -176,10 +176,10 @@ func makeIFunc(profile, archive string, parent fyne.Window) func() {
|
||||
// link the profile to the archive
|
||||
err := os.Symlink(profile, archive)
|
||||
if err != nil {
|
||||
dialog.NewInformation("Error", "this program must be ran as administrator to allow linking", parent).Show()
|
||||
dialog.NewInformation("Error", "error linking most likely issue is Swiped Mod Switcher is not running as admin", parent).Show()
|
||||
return
|
||||
}
|
||||
|
||||
dialog.NewInformation("Success", fmt.Sprintf("linked files from %s to %s", filepath.Base(profile), archive), parent).Show()
|
||||
dialog.NewInformation("Success", fmt.Sprintf("filinked files from %s to %s", filepath.Base(profile), archive), parent).Show()
|
||||
}
|
||||
}
|
||||
|
||||
18
readme.txt
18
readme.txt
@@ -1,18 +0,0 @@
|
||||
initial install:
|
||||
drag the executable to your cyberpunk game folder right click go to the compatibility tab and check 'run this program as
|
||||
an administrator' apply and close the window now cpms will have the required permission to link your profiles to the
|
||||
archive folder
|
||||
|
||||
initial startup:
|
||||
open cpms and select your archive folder and profiles folder your profiles folder should contain atleast one folder with your mods contained inside
|
||||
if your profiles don't show up after selecting the folders then click reload
|
||||
and if they still don't show up either you have no profiles in you profiles folder or have accidentally selected the wrong folder for your profiles folder double check the folders you selected to ensure no loss of data
|
||||
|
||||
initial usage:
|
||||
to switch to a profile simply click the profiles name cpms will link that profile to the same location as your archive folder
|
||||
allowing cpms to switch multiple GB folder in a matter of a few seconds even on really slow drives
|
||||
|
||||
bonus stuff:
|
||||
the way that cpms links your selected profile to the archive folder allows for additional options when it comes to where
|
||||
those profiles are stored they do not need to be located on the same drive as the game is
|
||||
so if you have hundreds of gigs worth of mods you could relocate them to a different drive that has the space
|
||||
Reference in New Issue
Block a user