Last active
January 1, 2026 19:04
-
-
Save horseslmao/f8ed40af5b03ccfec47114679e4296bc to your computer and use it in GitHub Desktop.
scripts for new vegas modding sheneghanians, some meant to run from inside mo2, some not
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| set activeprofile=Default | |
| for /f "tokens=2 delims=()" %%z IN ('inifile "%~dp0\..\MO2\ModOrganizer.ini" [General] selected_profile' ) do set activeprofile=%%z | |
| cd ..\MO2\explorer++ | |
| start "" "Explorer++.exe" "%__CD__%\..\..\..\GAME\data" "%__CD__%\..\..\..\GAME" "%__CD__%\..\..\..\MO2\overwrite" "%__CD__%\..\..\..\MO2\profiles\%activeprofile%" "%__CD__%\..\..\..\MO2\mods" "%__CD__%\..\..\..\..\SHARED" | |
| exit /b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| set activeprofile=Default | |
| for /f "tokens=2 delims=()" %%z IN ('inifile "%~dp0\..\MO2\ModOrganizer.ini" [General] selected_profile' ) do set activeprofile=%%z | |
| cd "%~dp0..\..\SHARED\xEdit" | |
| start "" "xTESEdit.exe" -FNV -i:"%USERPROFILE%\Documents\My Games\FalloutNV\Fallout.ini" -p:"%~dp0..\MO2\profiles\%activeprofile%\plugins.txt" | |
| exit /b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| set activeprofile=Default | |
| for /f "tokens=2 delims=()" %%z IN ('inifile "%~dp0\..\MO2\ModOrganizer.ini" [General] selected_profile' ) do set activeprofile=%%z | |
| cd "%~dp0..\..\SHARED\xEdit" | |
| start "" "xTESEdit.exe" -VQSC -FNV -i:"%USERPROFILE%\Documents\My Games\FalloutNV\Fallout.ini" -p:"%~dp0..\MO2\profiles\%activeprofile%\plugins.txt" | |
| exit /b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| set activeprofile=Default | |
| for /f "tokens=2 delims=()" %%z IN ('inifile "%~dp0\..\MO2\ModOrganizer.ini" [General] selected_profile' ) do set activeprofile=%%z | |
| cd "%~dp0..\..\SHARED\xLODGen" | |
| start "" "xLODGenx64.exe" -FNV -m:"%USERPROFILE%\Documents\My Games\FalloutNV\" -i:"%USERPROFILE%\Documents\My Games\FalloutNV\Fallout.ini" -p:"%~dp0..\MO2\profiles\%activeprofile%\plugins.txt" -o:"%~dp0..\MO2\mods\LODGEN %activeprofile%\" | |
| exit /b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| write-host "EXTENDER FIXES..." | |
| $basepath=$args[0] | |
| $binary = "$basepath\FalloutNV.exe" | |
| write-host " path: $basepath" | |
| if (Test-Path -Path $binary -PathType Leaf) { | |
| Write-Host " New Vegas Detected" | |
| write-host " Set-ProcessMitigation" | |
| Set-ProcessMitigation -Name "$binary" -Disable BottomUp | |
| Set-ProcessMitigation -Name "$binary" -Disable HighEntropy | |
| Set-ProcessMitigation -Name "$binary" -Disable ForceRelocateImages | |
| write-host " Unblock-File" | |
| dir "$basepath" -Recurse | Unblock-File | |
| } else { | |
| Write-Host " game not detected wrong path??" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| write-host " SHORTCUTS" | |
| $basepath=$args[0] | |
| $binary = "$basepath\MO2\ModOrganizer.exe" | |
| write-host " path: $basepath" | |
| #kinda done properly now | |
| #eventually do start menus | |
| $gameshortcuts = @( | |
| @{ | |
| Name = 'Fallout New Vegas' | |
| TargetPath = "GAME FNV 2025.bat" | |
| Description = "Fallout New Vegas" | |
| IconLocation = "$basepath\ETC\ICO\fnv.ico,0" | |
| }, | |
| @{ | |
| Name = 'Tale of Two Wastelands' | |
| TargetPath = "GAME TTW 2025.bat" | |
| Description = "Tale of Two Wastelands" | |
| IconLocation = "$basepath\ETC\ICO\Fallout Tale of Two Wastelands v2.ico,0" | |
| }, | |
| @{ | |
| Name = 'Fallout The Frontier' | |
| TargetPath = "GAME TTW FRONTIER 2025.bat" | |
| Description = "TTW and Fallout the Frontier" | |
| IconLocation = "$basepath\ETC\ICO\frontier.ico,0" | |
| }, | |
| @{ | |
| Name = 'Fallout Dust' | |
| TargetPath = "GAME DUST 2025.bat" | |
| Description = "DUST Survival Simulator" | |
| IconLocation = "$basepath\ETC\ICO\dustlogo1.ico,0" | |
| }, | |
| @{ | |
| Name = 'Fallout New California' | |
| TargetPath = "GAME FNV NC 2025.bat" | |
| Description = "Fallout New California" | |
| IconLocation = "$basepath\ETC\ICO\fnc.ico,0" | |
| } | |
| ) | |
| $toolshortcuts = @( | |
| @{ | |
| Name = 'Mod Organizer' | |
| TargetPath = "APP MO2.bat" | |
| Description = "Mod Organizer" | |
| IconLocation = "$basepath\ETC\ICO\iGECK\GECKicon_Mutie.ico,0" | |
| }, | |
| @{ | |
| Name = 'Game Folder' | |
| TargetPath = "DIR Game.bat" | |
| Description = "Game Folder" | |
| IconLocation = "$env:SystemRoot\System32\SHELL32.dll,4" | |
| }, | |
| @{ | |
| Name = 'Main Folder' | |
| TargetPath = "DIR MAIN.bat" | |
| Description = "Main Folder" | |
| IconLocation = "$env:SystemRoot\System32\SHELL32.dll,4" | |
| }, | |
| @{ | |
| Name = 'Overwrite Folder' | |
| TargetPath = "DIR overwrite.bat" | |
| Description = "Overwrite Folder" | |
| IconLocation = "$env:SystemRoot\System32\SHELL32.dll,4" | |
| }, | |
| @{ | |
| Name = 'References' | |
| TargetPath = "DIR Internet Sources.bat" | |
| Description = "References" | |
| IconLocation = "$env:SystemRoot\System32\SHELL32.dll,86" | |
| }, | |
| @{ | |
| Name = 'Updating Steps' | |
| TargetPath = "TXT STEPS.bat" | |
| Description = "Updating steps" | |
| IconLocation = "$env:SystemRoot\System32\SHELL32.dll,70" | |
| } | |
| ) | |
| if (Test-Path -Path $binary -PathType Leaf) { | |
| Write-Host " Mod Organizer Detected" | |
| $null = New-Item -Path "$env:UserProfile\Desktop\" -Name "Fallout New Vegas" -ItemType "directory" -Force | |
| $null = New-Item -Path "$env:UserProfile\Desktop\Fallout New Vegas\" -Name "Tools" -ItemType "directory" -Force | |
| Foreach($gameinfo in $gameshortcuts) { | |
| $shortcut = (New-Object -ComObject Wscript.Shell).CreateShortcut("$env:UserProfile\Desktop\Fallout New Vegas\" + $gameinfo.Name + ".lnk") | |
| $shortcut.TargetPath = "$basepath\BIN\" + $gameinfo.TargetPath | |
| $shortcut.WorkingDirectory = "$basepath\BIN" | |
| $shortcut.Arguments = "" | |
| $shortcut.Description = $gameinfo.Description | |
| $shortcut.IconLocation = $gameinfo.IconLocation | |
| $shortcut.Save() | |
| } | |
| Foreach($toolinfo in $toolshortcuts) { | |
| $shortcut = (New-Object -ComObject Wscript.Shell).CreateShortcut("$env:UserProfile\Desktop\Fallout New Vegas\Tools\" + $toolinfo.Name + ".lnk") | |
| $shortcut.TargetPath = "$basepath\BIN\" + $toolinfo.TargetPath | |
| $shortcut.WorkingDirectory = "$basepath\BIN" | |
| $shortcut.Arguments = "" | |
| $shortcut.Description = $toolinfo.Description | |
| $shortcut.IconLocation = $toolinfo.IconLocation | |
| $shortcut.Save() | |
| } | |
| } else { | |
| Write-Host " MO2 not detected wrong path??" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| rem change video resolution and card, meant for per profile settings.ini's | |
| rem arg 1 is the base path of this install, arg 2 is the adaptor if wanna do it hella fast | |
| rem sets res to 1080 | |
| rem todo maybe tesreloded settings via toml.exe | |
| set choice= | |
| set profiledir = "" | |
| rem try to figure out what we launched from | |
| if not "%1"=="" ( | |
| set profiledir=%1\MO2\profiles\ | |
| ) else ( | |
| set profiledir=%~dp0\..\MO2\profiles\ | |
| ) | |
| rem fetch and output vidcard data, vegas seems to not whip out the launcher if these are set | |
| setlocal enabledelayedexpansion | |
| set i=0 | |
| for /f "tokens=2 delims==" %%a in ('wmic PATH Win32_videocontroller GET description /value ') do ( | |
| set VGAd!i!=%%a | |
| set /a "i=i+1" | |
| ) | |
| set i=0 | |
| for /f "tokens=1,* delims==" %%A in ('set VGAd') do ( | |
| echo Adapter !i!: %%B | |
| set /a "i=i+1" | |
| ) | |
| if not "%2"=="" ( | |
| set choice=%2 | |
| ) else ( | |
| set /p choice=select vid card... | |
| ) | |
| rem dont remember why im doin this... surely its important | |
| set onelined= | |
| set multiline=!VGAd%choice%! | |
| (set LF=^ | |
| %=% | |
| ) | |
| call set onelined=%%multiline:!LF!=%% | |
| echo set adaptor as !choice! | |
| echo set card as !VGAd%choice%! | |
| rem all profiles at once | |
| for /D %%f in (%profiledir%*) do ( | |
| echo PROFILE %%~nf | |
| inifile "%profiledir%%%~nf\falloutprefs.ini" [Display] iAdapter=%choice% | |
| inifile "%profiledir%%%~nf\falloutprefs.ini" [Display] sD3DDevice="%onelined%" | |
| inifile "%profiledir%%%~nf\falloutprefs.ini" [Display] "iSize W"=1920 | |
| inifile "%profiledir%%%~nf\falloutprefs.ini" [Display] "iSize H"=1080 | |
| ) | |
| pause | |
| exit /b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| echo FALLOUT NEW VEGAS SETUP | |
| rem i keep things kinda setup in such a way as to keep everything in adjacent folders | |
| rem we assume parent dir if one isnt given | |
| cd /d %~dp0 | |
| pushd.. | |
| set INSTALLBASE=%cd% | |
| popd | |
| if not "%1"=="" ( | |
| set INSTALLBASE=%1 | |
| ) | |
| echo 1. EXTENDER FIXES | |
| Powershell.exe -executionpolicy remotesigned -File extenderfix.ps1 %INSTALLBASE%\GAME\ | |
| echo 2. REGISTRY KEYS | |
| reg import game.reg | |
| echo 3. PATHS | |
| reg add "HKLM\SOFTWARE\WOW6432Node\Bethesda Softworks\FalloutNV" /v "Installed Path" /t REG_SZ /d "%INSTALLBASE%\GAME\\" /f | |
| echo 4. SHORTCUTS | |
| Powershell.exe -executionpolicy remotesigned -File shortcuts.ps1 %INSTALLBASE% | |
| echo 5. VIDEO CONFIG | |
| zzzFNV_VIDEO.bat %INSTALLBASE% | |
| pause | |
| exit /b |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i just wanted to be able to:
completely winged it ππ
will make the shortcuts nicer, and a hotreload script
batch files beginning with an underscore meant to be edited an run with in mod organizer
batch files beginning with a z meant to be run outside of mod organizer
requires this because it just werks π
https://www.horstmuc.de/div.htm#inifile