;title='Mod Alchemist'
;creator=ppkantorski
;version=0.4.4
;about='This package was designed for managing, converting, and installing mods.'
;color=#8e43f7

[@Actions]

[Manage Mods]

[*exeFS Patches?1]
[*Toggle?1]
;mode=toggle
;grouping=split3
filter /atmosphere/exefs_patches/am/
filter /atmosphere/exefs_patches/es_patches/
filter /atmosphere/exefs_patches/nfim_ctest/
filter /atmosphere/exefs_patches/vi_patches/
filter /atmosphere/exefs_patches/NxThemesInstaller/
on:
    filter /atmosphere/exefs_patches/.offload/
    file_source /atmosphere/exefs_patches/*/
    mkdir /atmosphere/exefs_patches/.offload/
    move {file_source} /atmosphere/exefs_patches/.offload/{file_name}/
off:
    file_source /atmosphere/exefs_patches/.offload/*/
    move {file_source} /atmosphere/exefs_patches/{file_name}/


[*Delete?1]
;grouping=split3
filter /atmosphere/exefs_patches/am/
filter /atmosphere/exefs_patches/es_patches/
filter /atmosphere/exefs_patches/nfim_ctest/
filter /atmosphere/exefs_patches/vi_patches/
filter /atmosphere/exefs_patches/NxThemesInstaller/
file_source /atmosphere/exefs_patches/.offload/*/
filter /atmosphere/exefs_patches/.offload/
file_source /atmosphere/exefs_patches/*/
delete {file_source}

[gap]
;mode=table
;background=false
;gap=20

[exefs info]
;mode=table
;background=false
;alignment=left
;offset=20
;spacing=10
''='Your installed IPS mods will show up here.'

[Manage Mods]

[*Contents Mods?1]
[*Toggle?2]
;mode=toggle
;grouping=split3
on:
    file_source './contents/.onload/*/'
    mirror_delete {file_source} /atmosphere/contents/
    move {file_source} './contents/{file_name}/'
off:
    filter './contents/.onload/'
    file_source './contents/*/'
    mirror_copy {file_source} /atmosphere/contents/
    move {file_source} './contents/.onload/{file_name}/'


[*Delete?2]
;grouping=split3
file_source './contents/.onload/*/'
file_source './contents/*/'
mirror_delete {file_source} /atmosphere/contents/
delete {file_source}

[gap]
;mode=table
;background=false
;gap=20

[contents info]
;mode=table
;background=false
;alignment=left
;offset=6
;spacing=10

'For managing content mods installed in'=''
''='"/switch/.packages/Mod Alchemist/contents/"'


[Manage Mods]

[*Mod Groups]
[*Search Pattern]
;mode=option
list_file_source './search_patterns.txt'
set-footer '{list_file_source(*)}'

[Enable All]
ini_file './config.ini'
move '/atmosphere/exefs_patches/.offload/*{ini_file("*Search Pattern",footer)}*/' /atmosphere/exefs_patches/
mirror_copy './contents/*{ini_file("*Search Pattern",footer)}*/' /atmosphere/contents/
move './contents/*{ini_file("*Search Pattern",footer)}*/' ./contents/.onload/

[Disable All]
ini_file './config.ini'
move '/atmosphere/exefs_patches/*{ini_file("*Search Pattern",footer)}*/' /atmosphere/exefs_patches/.offload/
mirror_delete './contents/.onload/*{ini_file("*Search Pattern",footer)}*/' /atmosphere/contents/
move './contents/.onload/*{ini_file("*Search Pattern",footer)}*/' ./contents/


[gap]
;mode=table
;background=false
;gap=20

[group info]
;mode=table
;background=false
;alignment=left
;offset=7
;spacing=10
''='Patterns can be added to "search_patterns.txt"'


[Convert Mods]

[*pchtxt -> ips]
;grouping=split2
file_source './pchtxts/*/*.pchtxt'
mkdir "/atmosphere/exefs_patches/{folder_name}/"
pchtxt2ips "{file_source}" "/atmosphere/exefs_patches/{folder_name}/"

[*pchtxt -> cheat]
;grouping=split2
file_source './pchtxts/*/*.pchtxt'
pchtxt2cheat "{file_source}"

[*Delete pchtxt]
;grouping=split2
file_source './pchtxts/*/*.pchtxt'
delete "{file_source}"


#[gap]
#;mode=table
#;background=false
#;gap=20
#
#[pchtxt info]
#;mode=table
#;background=false
#;alignment=left
#;offset=9
#;spacing=10
#
#'"/{GAME} - {MOD}/{VERSION}.pchtxt" go in'=''
#''='"/switch/.packages/Mod Alchemist/pchtxts/"'


[@More]

[Mod Repos]

[*Install pchtxt's]
[*Fl4sh9174's Mods]
;grouping=split2
file_source './repos/Fl4sh9174/*/*.pchtxt'
cp "{file_source}" './pchtxts/{folder_name}/'

[*StevensND's Mods]
;grouping=split2
file_source './repos/StevensND/*/*.pchtxt'
cp "{file_source}" './pchtxts/{folder_name}/'

[*KeatonTheBot's Mods]
;grouping=split2
file_source './repos/KeatonTheBot/*/*.pchtxt'
cp "{file_source}" './pchtxts/{folder_name}/'


[*Extract Mods]
[Fl4sh9174's Mods]
unzip './repos/Fl4sh9174.zip' './repos/Fl4sh9174/'

[StevensND's Mods]
unzip './repos/StevensND.zip' './repos/StevensND/'

[KeatonTheBot's Mods]
unzip './repos/KeatonTheBot.zip' './repos/KeatonTheBot/'


[Software Update]

[Update Mod Alchemist]
null

[Package Info]
