initial release

This commit is contained in:
Draqoken
2025-07-01 23:39:29 +03:00
commit 230f1dd469
18 changed files with 824 additions and 0 deletions

38
git installer.bat Normal file
View File

@@ -0,0 +1,38 @@
@echo off
setlocal
:: Define variables
set "GIT_URL=https://github.com/git-for-windows/git/releases/latest/download/PortableGit-2.49.0-64-bit.7z.exe"
set "GIT_ARCHIVE=PortableGit.7z.exe"
set "SCRIPT_DIR=%~dp0"
set "EXTRACT_DIR=%SCRIPT_DIR%gitportable"
:: Check if Git is available in the PATH
where git >nul 2>nul
if %errorlevel%==0 (
echo Git is already installed and available in PATH.
goto :EOF
)
:: Check if gitportable folder already exists
if exist "%EXTRACT_DIR%\" (
echo 'gitportable' folder already exists. Skipping download.
goto :EOF
)
:: Download Portable Git
echo Downloading Portable Git...
powershell -Command "Invoke-WebRequest -Uri '%GIT_URL%' -OutFile '%SCRIPT_DIR%%GIT_ARCHIVE%'"
:: Create extraction directory
mkdir "%EXTRACT_DIR%"
:: Extract Portable Git
echo Extracting Portable Git...
"%SCRIPT_DIR%%GIT_ARCHIVE%" -o"%EXTRACT_DIR%" -y
:: Cleanup
del "%SCRIPT_DIR%%GIT_ARCHIVE%"
echo Done. Portable Git is ready in: %EXTRACT_DIR%
pause

149
installer.bat Normal file
View File

@@ -0,0 +1,149 @@
@echo off
setlocal
:: --------- Setup Log ---------
set "LOG_FILE=cosmic_setup.log"
echo [%DATE% %TIME%] Starting script... > "%LOG_FILE%"
:: --------- Define Paths ---------
set "CURRENT_DIR=%~dp0"
if "%CURRENT_DIR:~-1%"=="\" set "CURRENT_DIR=%CURRENT_DIR:~0,-1%"
:: Try to read the Filespec value
for /f "tokens=2,*" %%i in ('reg query "HKCU\Software\VB and VBA Program Settings\VIPMUD\DefaultFolder" /v Filespec 2^>nul') do set "TARGET_DIR=%%j\cosmic rage"
:: Fallback if not found
if not defined TARGET_DIR set "TARGET_DIR=%USERPROFILE%\Documents\VIP Mud\Cosmic Rage"
echo Target directory: %TARGET_DIR%
set "SET_FILE=%TARGET_DIR%\cosmic rage.set"
set "LOADER_FILE=%TARGET_DIR%\loader.set"
set "SOUNDS_DIR=%CURRENT_DIR%\sounds"
set "REPO_URL=https://gitea.nathantech.net//CosmicRage/CosmicRageSounds"
set "REPO_SUBFOLDER=wav"
set "GIT_PORTABLE=%CURRENT_DIR%\gitportable\bin\git.exe"
echo [%DATE% %TIME%] Script location: %CURRENT_DIR% >> "%LOG_FILE%"
echo [%DATE% %TIME%] Target directory: %TARGET_DIR% >> "%LOG_FILE%"
echo [%DATE% %TIME%] Sounds directory: %SOUNDS_DIR% >> "%LOG_FILE%"
:: --------- Determine which Git to use ---------
set "GIT_CMD="
where git >nul 2>nul
if %errorlevel%==0 (
set "GIT_CMD=git"
echo [%DATE% %TIME%] Git found in PATH. >> "%LOG_FILE%"
) else if exist "%GIT_PORTABLE%" (
set "GIT_CMD=%GIT_PORTABLE%"
echo [%DATE% %TIME%] Git not found in PATH, using GitPortable. >> "%LOG_FILE%"
) else (
echo [%DATE% %TIME%] ERROR: Git not found in PATH or at %GIT_PORTABLE% >> "%LOG_FILE%"
echo ERROR: Git not found in PATH or at %GIT_PORTABLE%
pause
exit /b
)
:: --------- Handle Existing Cosmic Rage Folder ---------
if exist "%TARGET_DIR%" (
echo The target folder already exists: "%TARGET_DIR%"
echo Would you like to delete and recreate it? Warning: this may delete existing scripts or set gags. This cannot be undone! Please backup the folder. (Y/N)
set "userchoice="
set /p userchoice=Your choice:
if /i "%userchoice%"=="Y" (
echo [%DATE% %TIME%] Deleting existing folder... >> "%LOG_FILE%"
rd /s /q "%TARGET_DIR%"
if exist "%TARGET_DIR%" (
echo [%DATE% %TIME%] ERROR: Could not delete folder. >> "%LOG_FILE%"
echo ERROR: Could not delete folder. Files might be in use.
pause
exit /b
)
echo Creating fresh folder...
mkdir "%TARGET_DIR%"
) else (
echo [%DATE% %TIME%] Keeping existing folder. >> "%LOG_FILE%"
echo Continuing with existing folder...
)
) else (
echo [%DATE% %TIME%] Folder does not exist. Creating new one. >> "%LOG_FILE%"
mkdir "%TARGET_DIR%"
)
if not exist "%TARGET_DIR%" (
echo [%DATE% %TIME%] ERROR: Failed to create folder. >> "%LOG_FILE%"
echo ERROR: Could not create folder. Check permissions or path.
pause
exit /b
)
echo [%DATE% %TIME%] Folder is ready. >> "%LOG_FILE%"
:: --------- Download sounds using sparse checkout ---------
echo [%DATE% %TIME%] Downloading sound files using Git sparse clone... >> "%LOG_FILE%"
rd /s /q "%SOUNDS_DIR%" >nul 2>&1
"%GIT_CMD%" clone --depth=1 --filter=blob:none --sparse "%REPO_URL%" "%SOUNDS_DIR%"
if errorlevel 1 (
echo [%DATE% %TIME%] ERROR: Git clone failed. >> "%LOG_FILE%"
echo ERROR: Failed to clone repo. Check network or Git version.
pause
exit /b
)
pushd "%SOUNDS_DIR%"
"%GIT_CMD%" sparse-checkout set "%REPO_SUBFOLDER%"
if not exist "%SOUNDS_DIR%\%REPO_SUBFOLDER%" (
echo [%DATE% %TIME%] ERROR: Failed to checkout sparse folder. >> "%LOG_FILE%"
echo ERROR: Could not pull sparse folder. Check folder name or repo.
popd
pause
exit /b
)
popd
echo [%DATE% %TIME%] Sounds successfully cloned. >> "%LOG_FILE%"
:: --------- Create cosmic rage.set ---------
if not exist "%SET_FILE%" (
echo [%DATE% %TIME%] Creating cosmic rage.set >> "%LOG_FILE%"
(
echo #Load ^{%%CharInfo^(MudName^)/loader.set^}
echo #If ^{%%Defined^(scpath^)=1 and %%Defined^(sppath^)=1^} ^{ #Load @scpath/Main.set^} ^{ #Say ^{WARNING! The scripts path and/or the sounds path are not defined. Unable to load the soundpack!^}^}
) > "%SET_FILE%"
echo Created: cosmic rage.set
) else (
echo cosmic rage.set already exists.
)
:: --------- Create loader.set ---------
echo [%DATE% %TIME%] Creating loader.set >> "%LOG_FILE%"
(
echo #Var scpath ^{%CURRENT_DIR%^/scripts}
echo #Var sppath ^{%CURRENT_DIR%^/sounds/%REPO_SUBFOLDER%}
) > "%LOADER_FILE%"
echo Created: loader.set
:: --------- Copy settings.set ---------
if exist "%CURRENT_DIR%\scripts\settings.set" (
echo [%DATE% %TIME%] Copying settings.set >> "%LOG_FILE%"
copy "%CURRENT_DIR%\scripts\settings.set" "%TARGET_DIR%\" >nul
echo settings.set copied to target directory.
) else (
echo [%DATE% %TIME%] WARNING: scripts\settings.set not found. >> "%LOG_FILE%"
echo WARNING: scripts\settings.set not found.
)
:: --------- Copy gags folder ---------
if exist "%CURRENT_DIR%\scripts\gags" (
echo [%DATE% %TIME%] Copying gags folder >> "%LOG_FILE%"
xcopy /E /I /Y "%CURRENT_DIR%\scripts\gags" "%TARGET_DIR%\gags" >nul
echo gags folder copied to target directory.
) else (
echo [%DATE% %TIME%] WARNING: scripts\gags folder not found. >> "%LOG_FILE%"
echo WARNING: scripts\gags folder not found.
)
:: --------- Finish ---------
echo [%DATE% %TIME%] Script completed successfully. >> "%LOG_FILE%"
echo Setup complete. Files are in "%TARGET_DIR%".
pause
exit /b

109
readme.md Normal file
View File

@@ -0,0 +1,109 @@
# Welcome!
## Introduction
Hey there, fellow adventurer! This soundpack was made specifically for users of [VIPMud](https://www.gmagames.com/vipmud.html), and it's here to make your gaming more immersive. With over **2,000 unique sound effects** (and growing), your daily sessions will feel like full-blown adventures. New sounds are added regularly, and older ones are polished up, so there's always something fresh to enjoy.
## Features
- **Sound Effects**: Covers most in-game activities and actions.
- **Ambiences and Music**.
- **Gag Manager**: Easily hide the lines you don't want to see or hear.
- **More to discover as you play.**
## Installation
Here's how to get the soundpack running:
1. **Connect to Cosmic Rage**
Go to the **Connect** menu in VIPMud and choose **Character Setup/Connect**. Hit enter to open the connection wizard.
- **Note**: NVDA may not read the edit boxes, but here's what you need to know:
- **Character Name**: This is your character's in-game name. Don't leave it blank, and don't use spaces or "Unnamed".
- **Character Reference**: A unique ID, usually the same as your character name. Again, no spaces or "Unnamed".
- **MUD List**: If you've made other characters, they'll show up here. Pick Cosmic Rage or tab past to fill the next fields.
- **MUD Name**: Must be "Cosmic Rage" with the space. Get this wrong and the pack won't load.
- **Host Name**: Use one of these: `cosmicrage.earth`, `cosmicrage.nathantech.net`, or `87.106.252.196`.
- **Port Number**: Use `7777` for Cosmic Rage.
- **Notes and Descriptions**: Optional notes about your character.
- **Password**: Your character's login password. This is encrypted and can't be recovered.
- **Auto Login**: Check this to log in automatically.
- **Keep Variable Values**: Keeps your variable states between sessions.
- **Simple Script Control**: Enables simple scripting support. See the VIPMud manual for more info.
2. **Download the Soundpack**
first, download the pack by clicking [this](https://gitea.nathantech.net/CosmicRage/VIPMudCosmicRageScripts/archive/main.zip) link. Once downloaded, extract this folder to a location of your choosing.
Important! Due to the limitations of Vip Mud, the folder you extract should not have any special or non-English character such as ö, ğ, ü.
Once you have the pack, launch `installer.bat` as an administrator by pressing the applications key or Shift + F10, then selecting "Run as administrator." Wait for the process to finish.
To update the soundpack, launch `updater.bat` as an administrator and wait for the process to complete.
Finally, restart VIPMud to load the soundpack.
## Hotkeys Reference
### Buffer Keys
- **Alt + Shift + Right**: Add a new buffer
- **Alt + Shift + Left**: Delete a buffer
- **Alt + Left**: Go to previous buffer
- **Alt + Right**: Go to next buffer
- **Alt + Page Up**: Scroll up 10 messages
- **Alt + Page Down**: Scroll down 10 messages
- **Alt + Up**: Go to previous message
- **Alt + Down**: Go to next message
- **Alt + #**: Jump to buffer number
- **Alt + Home**: Go to top of buffer
- **Alt + End**: Go to bottom of buffer
- **Alt + Delete**: Clear current buffer
- **Alt + Shift + Delete**: Clear all buffers
- **Control + Shift + Enter**: Toggle Buffer Sounds.
### Soundpack Volume and Behavior
- **F5**: General volume
- **F6**: Ambience volume
- **F7**: Communication volume
- **F8**: Music volume
- **Ctrl + F5**: Clocks volume
- **Ctrl + F6**: Combat music volume
- **Ctrl + F7**: IC social volume
- **Ctrl + F8**: OOC social volume
- **Alt + F5**: Ground combat volume
- **Alt + F6**: Harvesting volume
- **Alt + F7**: Salvage volume
- **Alt + F8**: Games volume
- **Shift + F5**: Ship combat volume
- **Shift + F6**: Ship volume
- **Shift + F7**: Ship movement volume
- **Shift + F8**: Vehicle volume
- **F9**: Toggle IC social sounds
- **F10**: Toggle OOC social sounds
- **Alt + F9**: Toggle sound panning
- **Alt + F10**: Toggle pitch shifting
- **Alt + F11**: Toggle ambiance
- **Alt+Shift+F9**: Toggle OOC Social Sound Interruption.
- **Ctrl + F9**: Toggle planetary music
- **Ctrl + F10**: Toggle space combat music
- **Ctrl + F11**: Toggle weather sounds
- **Alt + F12**: Restart soundpack
- **F2**: Open server-side settings
- **Ctrl + S**: Save client-side settings
- **Alt + N**: Add a new string to be gagged
- **Alt + F2**: Open the gag-related configuration manager
- **Alt + F3**: Toggle Intro Music
- ** Control + F2 and Control + F3**: Turn the client side main volume down and up respectively
- **Shift + f1**: Toggle The Soundpack
- **Alt + Shift + H**: Display a short help file related to soundpack updating.
- **Shift + F2**: Bring up the interface to change the defined paths for scripts and sounds. Use at your own risk!
- **Control+Shift+R**: Reload the soundpack.
- **Control+`**: Toggle command displaying in the output window.
## FAQ
**Q: My soundpack doesn't work. What now?**
A: Type `sp on` to enable the soundpacks channel. Then send messages with `sp <message>`. You can also open an issue in the repo for help.
**Q: I found a bug. How do I report it?**
A: Type `spbug` in-game to submit a bug report.
**Q: I have a suggestion. Where do I send it?**
A: Use the `spsuggest` command to share your idea.
**Q: Can I become a soundpack developer?**
A: Not right now. But if you make a cool sound, send it via `spsuggest` with a download link. If it's good, you'll be credited in the changelog and might even earn some donator dollars.
Happy MUDDing!

39
scripts/aliases.set Normal file
View File

@@ -0,0 +1,39 @@
#var badaliases {music|StopMusic|sc|capture}
#ForAll @badaliases {#gunalias %i}
#Alias login {#gagon all; 1; %charInfo(name); #wait (0.1); #ungagon; %charInfo(password)}
#alias ActualSave {
#File 6 {settings.set} 1;
#Var SettingsFileCounter 0;
#ForAll @settings {
#Math SettingsFileCounter {@SettingsFileCounter +1};
#Write 6 @{%i} @SettingsFileCounter};
#close 6;}
#alias {onDisconnect} {
#gvar disconnected 1;
ActualSave; #say {Settings saved!};#pc 0 stop}
#alias intromusictoggle {
#if {@intromusic = "Enabled"} {#var intromusic "Disabled"; #say {intro music disabled} VoiceOnly} {#var intromusic "Enabled"; #say {intro music enabled} VoiceOnly}}
#alias mainvoldown {
#math Vol {@Vol - 5};
#if {@Vol < 0} {@Vol = 0};
#play {@sppath/general/misc/VolumeDown.wav} @vol; #say {Main Volume @Vol percent} VoiceOnly;
#if {@introplaying=1} {#PC @introhandle Volume @vol}}
#alias mainvolup {#gagline display;
#math Vol {@Vol + 5};
#if {@introplaying=1} {#PC @introhandle Volume @vol};
#if {@Vol > 100} {@Vol = 100};
#play {@sppath/general/misc/VolumeUp.wav} @vol; #say {Main Volume @Vol percent} VoiceOnly}; #if {@vol = 100} {
#say {Volume maxed!} VoiceOnly}
#alias {smute} {
#if {@Speech = "Disabled"} {
#var Speech "Enabled";
#SetSpeech incoming off; #say {speech off.} voiceonly;} {
#var Speech "Disabled";
#SetSpeech incoming on;
#say {speech on.} VoiceOnly}}
#alias makeworse {#Configure PassThruChar {~>}; #Configure SwitchSession {~:}; #passthru {•}}
#alias makebetter {#Configure PassThruChar {~•}; #Configure SwitchSession {~•}; #passthru {%<;>{}#"'}}
#alias rawinput {#if {@rawpass = "enabled"} {#var rawpass "disabled"; makeworse; #say {Raw input mode is now disabled.};#play {@sppath/general/misc/off.wav} @vol} {#var rawpass "enabled"; makebetter; #say {Raw input mode is now enabled.};#play {@sppath/general/misc/on.wav} @vol}}

115
scripts/dev.set Normal file
View File

@@ -0,0 +1,115 @@
#alias filehandler {
#if {%pos(/,%1)=1} {
#var devpath %homefolder;
} {
#var devpath @scpath
};
#if {%1="" or %2="" or %IfWord(%2,create|delete|edit|load|unload|reload,"|")=0} {
#say {
Syntax:
filehandler <path> <action>.
If the path is proceeded by a slash it will be automaticly switched to the user data of vip mud for this particular action.
the available actions are:
Create: create an empty file (note, works only in the vip mud data location);
Delete: delete a file (Note, works only in the vip mud data location.);
edit: edit a file.
load or unload: load or unload a file respectively;
Reload: Reloads a file.
The aliases have been provided for one's convenience and they include:
devo: Open a file;
Devr: reload a file;
Devc: create a file;
Devd: Delete a file;
Devl and devu: Load and unload a file respectively;
github1: Load files from your remote repositery if you use any;
github 0: to switch back to your local copy;
github h: To display help for github;
Github r: to reload everything in case everything breaks.
Enjoy!};
#abort;
};
#if {%2="load"} {
#load {@devpath/%1.set};
devannounce %1 %2
};
#if {%2="unload"} {
#unload {@devpath/%1.set};
devannounce %1 %2
};
#if {%2="edit"} {
#edit {@devpath/%1.set};
devannounce %1 %2
};
#if {%2="reload"} {
#unload {@devpath/%1.set};
#load @devpath/%1.set;
devannounce %1 %2
};
#if {%2="delete" or %2="create"} {
#if {%pos(%homefolder,@devpath)=0} {
#say {this function can work only with the home folder of vip mud: %homefolder, and you used @devpath}
} {
#if {%2="create"} {
#file 9 {%replace(%1,/,).set};
#write 9 { } 1;
#close 9;
devannounce %1 %2;
};
#if {%2="delete"} {
devannounce %1 %2;
#var devfilename %1;
#alarm 0.20 {
#say {Are you sure that you would like to delete @devpath/@devfilename.set?} VoiceOnly
};
#pick {P:Are you sure|yes:#DelFile %1.set|*No:#abort all};
};
};
};
#unvar devpath
}
#alias devannounce {
#if {%pos(/,%1)=1} {
#say {Initiated %2 at @devpath/%replace(%1,/,).set}
} {
#say {Initiated %2 at @devpath/%1.set}
};
#play {@sppath/general/misc/loadingfile.wav} @vol;
}
#alias devo {filehandler %1 edit}
#alias devr {filehandler %1 reload}
#alias devd {filehandler %1 delete}
#alias devl {filehandler %1 load}
#alias devu {filehandler %1 unload}
#alias devc {filehandler %1 create}
#alias dev {filehandler help}
#alias github {
#if {%1=1} {#if {%defined(githubpath)=0} {#say {Couldn't find path to your github repo, please define the githubpath variable first}} {
#if {@scpath = @githubpath} {#say {You are switched to github already}} {
#say {switching to github};
#unload {@scpath/main.set};#ForAll @loadtask {#unload {@scpath/%i.set}};
#var oldscpath @scpath; #var scpath @githubpath;
#load {@scpath/main.set};
#say {Loaded script files from @scpath}}}};
#if {%1=0} {#if {%defined(oldscpath)=0} {#say {No Old Script Path Found, probably because you have not loaded yet}} {
#unload {@scpath/main.set};#ForAll @loadtask {#unload @scpath/%i.set};
#var scpath @oldscpath; #unvar oldscpath;
#load {@scpath/main.set};
#say {Loaded script files from @scpath}}};
#if {%1="h"} {#say {
Define the variable githubpath somewhere, preferebly in cosmic rage.set. Githubpath should be a list containing path to your github repo scripts folder.
Then type github 1 to switch to github, and github 0 to return to your local copy.
If things break, type github r and it will reload your session.
Have fun!}};
#if {%1="r"} {#reload}}
#var githubpath {D:\my files\repos\VIPMudCosmicRageScripts\scripts}

57
scripts/gagcreator.set Normal file
View File

@@ -0,0 +1,57 @@
#alias addnewgag {#play {@sppath/general/misc/confman.wav} @vol;
#alarm 0.100 {#say {This prompt allows one to add a string that they would like to be gagged either completely or just from the speach queue. In order to do this, please use the options below} VoiceOnly};
#pick {P:Creating a new gag|
What line are we gagging today? @newgag:setgagline|
What kind of the gagging method would you like? @gagmethod:setgagmethod|
What file is this going to be stored in? @gagfile:setgagfile|
I'm done and want to finish:pushnewgag|
I didn't mean to use this, please abort:#abort}}
#alias setgagline {
#alarm 0.100 {#say {please enter the line that you would like to be gagged, if parts of it are not static, E.G random numbers or words, replace this bit by an asterisc, *} VoiceOnly};
#prompt newgag {Enter the line here.};
addnewgag}
#alias setgagmethod {
#alarm 0.100 {#say {please choose one of the methods below:} VoiceOnly};
#pick {P:Method?|
Omit the line from my speech queue but leave it in the output window:#var gagmethod voice|
Omit the line both from the output window and from my speech queue:#var gagmethod all};
addnewgag}
#alias setgagfile {
#alarm 0.100 {#say {Due to VIPMud limitations, a file cannot exceed 32000 characters in length, this is why it is recommended to sort your gags into categories, so please choose from one of the files below:} VoiceOnly};
#pick {P:What file are we using today?|
Activity related gags:#var gagfile ActivityGags|
Ship Related Gags:#var gagfile ShipGags|
Miscellaneous gags:#var gagfile MiscGags|
Vehicle Related gags:#var gagfile VehicleGags};
addnewgag}
#alias pushnewgag {#if {%defined(gagfile)=0 or %defined(gagmethod)=0 or %defined(newgag)=0} {#alarm 1 {#say {you have not filled out all the required fields with rellivant information}; #play {@sppath/general/misc/boop.wav} @vol;#abort}} {
#file 3 {%CharInfo(MudName)/gags/@gagfile.set};
#forall {@newgag} {
#write 3 {~#trigger {%i} {~#gagline @gagmethod}}};
#close 3;
#unload {gags/@gagfile.set};
#load {gags/@gagfile.set};
#unvar gagmethod;#unvar newgag;#unvar gagfile;#alarm 1 {#say {Complete!}; #play {@sppath/general/misc/loadingfile.wav} @vol}}}
#alias miscgagtoggle {
#if {@MiscGags="disabled"} {#var MiscGags "enabled";#load {@scpath/gags/MiscGags.set}} {#var MiscGags "disabled";#unload {@scpath/gags/gags.set}}}
#alias vehiclegagtoggle {
#if {@VehicleGags="disabled"} {#var VehicleGags "enabled"; #unload {@scpath/gags/VehicleGags.set}} {#var VehicleGags "disabled";#load {@scpath/gags/VehicleGags.set}}}
#alias activitygagtoggle {
#if {@ActivityGags="disabled"} {#var ActivityGags "enabled";#load {@scpath/gags/ActivityGags.set}} {#var ActivityGags "disabled";#unload {@scpath/gags/ActivityGags.set}}}
#alias shipgagtoggle {
#if {@ShipGags="disabled"} {#var ShipGags "enabled";#load {@scpath/gags/ShipGags.set}} {#var ShipGags "disabled";#unload {@scpath/gags/ShipGags.set}}}
#alias gagconfig {#play {@sppath/general/misc/confman.wav} @vol;
#pick {P:Please select an option below|
Activity-related gags (@ActivityGags):activitygagtoggle|
Ship-related gags (@ShipGags):shipgagtoggle|
Vehicle-related gags (@VehicleGags):vehiclegagtoggle|
Misc Gags (@MiscGags):miscgagtoggle|
Open Activity gags file for editing:#edit {%CharInfo(MudName)/gags/ActivityGags.set}|
Open Vehicle gags file for editing:#edit {%CharInfo(MudName)/gags/VehicleGags.set}|
Open misc gags file for editing:#edit {%CharInfo(MudName)/gags/MiscGags.set}|
Open ship-related gags file for editing:#edit {%CharInfo(MudName)/gags/ShipGags.set}}}
#key {alt-f2} {gagconfig}

View File

View File

View File

View File

82
scripts/keys.set Normal file
View File

@@ -0,0 +1,82 @@
;unneeded keys
#var badkeys {numpad2|numpad4|numpad5|numpad8|numpad9|numpad/|numpad*|control-a|shift-pageup|shift-pagedown|control-pageup|control-pagedown}
#ForAll @badkeys {#gunkey %i}
;buffer keys
#key {Alt-shift-right} {~buffer~ add}
#key {alt-shift-left} {~buffer~ delete}
#key {alt-left} {~@buffer~ backward}
#key {alt-right} {~@buffer~ forward}
#key {alt-pageup} {~@buffer~ scrollup}
#key {alt-pagedown} {~@buffer~ scrolldown}
#key {alt-up} {~@buffer~ up}
#key {alt-down} {~@buffer~ down}
#key {alt-1} {~@buffer~ 1}
#key {alt-2} {~@buffer~ 2}
#key {alt-3} {~@buffer~ 3}
#key {alt-4} {~@buffer~ 4}
#key {alt-5} {~@buffer~ 5}
#key {alt-6} {~@buffer~ 6}
#key {alt-7} {~@buffer~ 7}
#key {alt-8} {~@buffer~ 8}
#key {alt-9} {~@buffer~ 9}
#key {alt-0} {~@buffer~ 10}
#key {alt-home} {~@buffer~ top}
#key {alt-end} {~@buffer~ bottom}
#key {alt-delete} {~@buffer~ clear}
#Key ALT-SHIFT-DELETE {~@buffer~ clearall}
#key {control-shift-enter} {~@sp-settings buffer sounds}
;soundpack volume and behavior
#key {f5} {~@sp-settings General volume}
#key {f6} {~@sp-settings ambiance volume}
#key {f7} {~@sp-settings in and out of character communications volume}
#key {f8} {~@sp-settings planetary music volume}
#key {control-f5} {~@sp-settings clocks volume}
#key {control-f6} {~@sp-settings Combat music volume}
#key {control-f7} {~@sp-settings IC social volume}
#key {control-f8} {~@sp-settings OOC social volume}
#key {alt-f5} {~@sp-settings Ground Combat volume}
#key {alt-f6} {~@sp-settings harvesting activity volume}
#key {alt-f7} {~@sp-settings Salvage activity volume}
#key {alt-f8} {~@sp-settings volume for games such as Pilot's Parody}
#key {shift-f5} {~@sp-settings starship combat volume}
#key {shift-f6} {~@sp-settings ship volume}
#key {shift-f7} {~@sp-settings ship movement volume}
#key {shift-f8} {~@sp-settings vehicle volume}
#key {f9} {~@sp-settings IC social sounds}
#key {f10} {~@sp-settings OOC social sounds}
#key {alt-f9} {~@sp-settings panning of sounds}
#key {alt-f10} {~@sp-settings pitch-shifting sounds}
#key {alt-f11} {~@sp-settings ambiance}
#key {control-f9} {~@sp-settings planetary music}
#key {control-f10} {~@sp-settings space combat music}
#key {control-f11} {~@sp-settings weather sounds}
#key {alt-f12} {~@sp-restart}
#key {Shift-alt-f9} {~@sp-settings Interrupt OOC Social sounds when the next one plays}
#key {f2} {~@sp-settings}
#key {control-s} {ActualSave;#say {Client-side Soundpack Settings have been saved successfully!} VoiceOnly}
#key {alt-n} {addnewgag}
#key {alt-shift-h} {localsphelp}
#key {Shift-f1} {~@sp-toggle}
#key {control-f2} {mainvoldown}
#key {Control-f3} {mainvolup}
#key {alt-f3} {intromusictoggle}
#key {control-shift-r} {#pc 0 stop;#reload; ~@sp-restart}
#key f11 {#pc 0 stop; #say {All currently playing sounds have been stopped.}}
#key {control-f1} {smute}
#key {alt-\} {rawinput}
#key {control-`} {#if {@commandsinoutput="enabled"} {#var commandsinoutput "disabled";#Configure DisplayCommandsInOutput False;#say {commands will no longer be displayed in the output window.}} {#var commandsinoutput "enabled";#Configure DisplayCommandsInOutput true;#say {Commands will now be displayed in the output window.}}}
#key {alt-control-v} {checkforupdates}
#key {alt-v} {%clipboard}
#key {shift-f4} {
#if {@devmode = "disabled"} {
#var devmode "enabled";
#load {@scpath/dev.set};
#say {Developer mode is now active}
} {
#var devmode "disabled";
#unload {@scpath/dev.set};
#say {Developer mode is no longer active}
}
}
#key {alt-shift-enter} {~@buffer link}

27
scripts/main.set Normal file
View File

@@ -0,0 +1,27 @@
;core variables
#var clientversion 1
#var loadtask {soundpack|keys|aliases|updator|misc|gagcreator|pathupdator}
#var settings {rawpass|miscgags|shipgags|vehiclegags|activitygags|intromusic|vol|commandsinoutput|devmode}
#var speech "disabled"
;Initialising the script files
#ForAll @loadtask {#load {@scpath/%i.set}}
;Reading and writing Settings.
#File 6 {settings.set} 1
#var num 1
#ForAll @settings {
#read 6 {%i} @num;
#math num {@num + 1}};
#close 6
#trigger {Welcome to: cosmic rage!} {
#if {@intromusic = "enabled"} {
#if {@IntroPlaying = 1} {#pc @introhandle stop;#var IntroPlaying 0};
#playloop {@sppath/music/IntroMusic/DefaultIntro.wav} @vol; #var introhandle %playhandle; #var IntroPlaying 1}} {} AnyCase
#TRIGGER {synaptic signal verified. Sleep mode disengaged. Welcome back to Cosmic Rage!} {#if {@IntroPlaying = 1} {#pc @introhandle stop; #var IntroPlaying 0}; ~@sp-register vip;~@sp-version}
#trigger {Your synaptic signal wavers for a moment, then returns with a snap!} {#if {@IntroPlaying = 1} {#pc @introhandle stop; #var IntroPlaying 0}; ~@sp-register vip;~@sp-version}
#if {@rawpass = "enabled"} {makebetter}
#if {@activitygags = "enabled"} {#load {gags/activitygags.set}}
#if {@vehiclegags = "enabled"} {#load {gags/vehiclegags.set}}
#if {@shipgags = "enabled"} {#load {gags/shipgags.set}}
#if {@miscgags = "enabled"} {#load {gags/miscgags.set}}
#if {@devmode="enabled"} {#load {@scpath/dev.set}}

21
scripts/misc.set Normal file
View File

@@ -0,0 +1,21 @@
#trigger {extracted link: &link} {
#gagline all;
#clipboard @link;
#say {Extracted and coppied @link}
}
#alias localsphelp {#say {
Greetings, Fellow Wanderer!
My name is The Cosmic Rage Immersion Scripts V @clientversion Sounds V @SoundsVersion.
I'm Installed at: @scpath.
My sounds are located at: @sppath.
If you want to update me, go to %replace(@scpath,@rightofpath,) and run Updator.bat.
Please keep me updated for the best experience! (Pleading Smiley).
Changelog:
14: you can now press control alt v to check updates.
You can now press alt-v to paste the contents of your clipboard directly, bypassing all aliases and vip mud filters, useful in multy lined editors.
15: You can now read your changelog by pressing alt shift h or typing localsphelp.
16. Hopefully fixed a bug with keys partially not loading.
17. Removed several unnecessary globally defined keys and aliases as they often cause more trubble than good. The volume of vip mud's sound handler will be always equal to 100 from now onwards.
18. Completely rewrote the script for soundpack developers, making it more convenient to use and its functions smarter.
You can now press alt shift enter to copy a link from your current buffer message if it has a link in its contents.
End Of Changelog.}}

44
scripts/pathupdator.set Normal file
View File

@@ -0,0 +1,44 @@
#alias loadpathchangeprompt {
#alarm 0.05 {#say {This function allows the user to alter the currently defined paths for the soundpack to load and should be used in cases when you moved your scripts and sounds folders to a different location/locations. With this in mind, would you like to continue?} VoiceOnly};
#pick {P:Are you sure?|
yes:pathconfig|
no:#abort}}
#alias pathconfig {
#alarm 0.100 {#say {Choose a path to edit, and once satisfied, press 'apply' to continue} VoiceOnly};
#pick {P:Soundpack path Configuration:|
Choose the disk where your scripts are stored, currently, (@scriptdisk):diskforscripts|
Choose the disk where your sounds are stored, currently (@sounddisk):diskforsounds|
Path for scripts (@tempscpath), press enter to edit:pathforscripts|
Path for sounds (@tempsppath), press enter to edit:pathforsounds|
Apply:finishpathchange}}
#alias diskforscripts {
#alarm 0.50 {#say {please enter the volume of the disk where your scripts are stored, it should be capitalized at all times, examples include, C, D, H, G...} VoiceOnly};
#prompt scriptdisk {Disk?};
pathconfig}
#alias diskforsounds {
#alarm 0.50 {#say {please enter the volume of the disk where your sounds are stored, it should be capitalized at all times, examples include, C, D, H, G...} VoiceOnly};
#prompt sounddisk {Disk?};
pathconfig}
#alias pathforscripts {
#alarm 0.50 {#say {Please enter a path, without disk lable, to the directory with the .set files located in} VoiceOnly};
#prompt tempscpath {Path to scripts};
pathconfig}
#alias pathforsounds {
#alarm 0.50 {#say {Please enter a path, without disk lables, to the directory with the sound folders located in} VoiceOnly};
#prompt tempsppath {Path to sounds};
pathconfig}
#alias finishpathchange {
#delfile {%CharInfo(MudName)/loader.set};
#file 1 {%CharInfo(MudName)/loader.set};
#write 1 {#var scpath {@scriptdisk:\@tempscpath}};
#write 1 {#var sppath @sounddisk:{@tempsppath}};
#close 1;
#alarm 0.50 {#say {Press enter to reload} VoiceOnly};
#pick {P:We're about to reload!|
Continue:#reload}}
#key {shift-f2} {loadpathchangeprompt}

BIN
scripts/settings.set Normal file

Binary file not shown.

15
scripts/soundpack.set Normal file
View File

@@ -0,0 +1,15 @@
#trigger {$sphook &{action}:&{soundpath}:&{volume}:&{pitch}:&{pan}:&{id}} {
#if {@action = "loop"} {#playloop {@sppath/@soundpath.wav} @volume; #var @id %playhandle};
#if {@action = "playrec"} {#play {@sppath/@soundpath.wav} @volume; #var @id %playhandle};
#if {@action = "play"} {#play {@sppath/@soundpath.wav} @volume};
#if {@pan <> "na"} {#math pan {@pan * 50}; #pc %playhandle pan @pan};
#if {@pitch <> "na"} {#pc %playhandle frequency @pitch} {#pc %playhandle frequency 44100};
#if {@action = "stop"} {#if {%defined(@id) = 1} {#pc %var(@id) stop}};
#if {@action = "adjustsound"} {#if {%defined(@id) = 1} {
#if {@volume <> "na"} {#pc %var(@id) volume @volume};
#if {@pan <> "na"} {#pc %var(@id) pan @pan};
#if {@pitch <> "na"} {#pc %var(@id) frequency @pitch}
}};
#gagline all;
#if {%playhandle=0} {#SetSpeech system stop;#say {Failed to play @soundpath.}}}
#trig {$buffer *} {#gagline all; #say %1 voiceonly}

19
scripts/updator.set Normal file
View File

@@ -0,0 +1,19 @@
#var rightofpath {%replace(@scpath,\,|)}
#var rightofpath %ReverseList(@rightofpath)
#var rightofpath %pop(rightofpath)
#load {@sppath/version.set};#unload {@sppath/version.set}
#trigger {$soundpack &client last version: &remoteversion} {
#gagline all;
#if {%IfWord(@client,vip,"|")} {#var remoteclientversion @remoteversion;#alarm 2 {checkclientversion}} {#var remotesoundsversion @remoteversion;#alarm 4 {checksoundsversion}}}
#alias checksoundsversion {
#math soundscondition {@remotesoundsversion - @SoundsVersion};
#if {@soundscondition>0} {#say {attention! Sound Updates found! Current version: @SoundsVersion. New Version: @remotesoundsversion};#play {@sppath/general/misc/spsave.wav} @vol};
#if {@soundscondition>0 or @clientcondition>0} {#say {Hint: To update the soundpack, navigate to %replace(@scpath,@rightofpath,) folder, run the file named updator.bat, and wait until the installation process completes. This will download and apply all available updates automatically.}}}
#alias checkclientversion {
#math clientcondition {@remoteclientversion - @clientversion};
#if {@clientcondition>0} {#say {attention! soundpack script Updates found! Current version: @clientversion. New Version: @remoteclientversion}; #play {@sppath/general/misc/spannouncement.wav} @vol}}
#alias checkforupdates {#if {@updatechecking=1} {#say {I'm Checking for updates already, Please hold on} VoiceOnly;#play {@sppath/general/misc/boop.wav} @vol} {
#say {Checking for updates, this will take a few seconds.} VoiceOnly;
#var updatechecking 1;
~@sp-version;
#alarm 5 {#if {@soundscondition<1 and @clientcondition<1} {#say {No updates found!};#play {@sppath/general/misc/logoutold.wav} @vol; #unvar updatechecking} {#unvar updatechecking}}}}

109
updator.bat Normal file
View File

@@ -0,0 +1,109 @@
@echo off
setlocal
:: --------- Define Paths (without trailing backslashes) ---------
set "BASE_DIR=%~dp0"
set "BASE_DIR=%BASE_DIR:~0,-1%"
set "LOG_FILE=%BASE_DIR%\update.log"
set "GIT_PORTABLE=%BASE_DIR%\gitportable\bin\git.exe"
set "MAIN_REPO_DIR=%BASE_DIR%"
set "SCRIPTS_TEMP_DIR=%BASE_DIR%\temp_scripts"
set "SOUNDS_DIR=%BASE_DIR%\sounds"
set "REPO_SUBFOLDER=wav"
set "SCRIPTS_REPO_URL=http://nathantech.net:3000/CosmicRage/VIPMudCosmicRageScripts.git"
set "SOUNDS_REPO_URL=https://nathantech.net:3000/CosmicRage/CosmicRageSounds.git"
:: --------- Setup Log ---------
echo [%DATE% %TIME%] Starting update process... > "%LOG_FILE%"
echo [%DATE% %TIME%] GitPortable: %GIT_PORTABLE% >> "%LOG_FILE%"
echo [%DATE% %TIME%] Main repository directory: %MAIN_REPO_DIR% >> "%LOG_FILE%"
echo [%DATE% %TIME%] Sounds directory: %SOUNDS_DIR% >> "%LOG_FILE%"
echo [%DATE% %TIME%] Temporary scripts directory: %SCRIPTS_TEMP_DIR% >> "%LOG_FILE%"
:: --------- Determine which Git to use ---------
set "GIT_CMD="
where git >nul 2>nul
if %errorlevel%==0 (
set "GIT_CMD=git"
echo [%DATE% %TIME%] Git found in PATH. >> "%LOG_FILE%"
) else if exist "%GIT_PORTABLE%" (
set "GIT_CMD=%GIT_PORTABLE%"
echo [%DATE% %TIME%] Git not found in PATH, using GitPortable. >> "%LOG_FILE%"
) else (
echo [%DATE% %TIME%] ERROR: Git not found in PATH or at %GIT_PORTABLE% >> "%LOG_FILE%"
echo ERROR: Git not found in PATH or at %GIT_PORTABLE%
pause
exit /b
)
:: --------- Attempt to Pull from Main Repo or Clone if Failed ---------
echo [%DATE% %TIME%] Attempting to pull updates from the main repo... >> "%LOG_FILE%"
%GIT_CMD% -C "%MAIN_REPO_DIR%" pull >> "%LOG_FILE%" 2>&1
if errorlevel 1 (
echo [%DATE% %TIME%] ERROR: Git pull failed. Cloning repo instead... >> "%LOG_FILE%"
goto clone_repo
) else (
echo [%DATE% %TIME%] Git pull successful or no updates found. >> "%LOG_FILE%"
goto pull_sounds
)
:clone_repo
:: --------- Clone the Main Repo into Temporary Directory ---------
if exist "%SCRIPTS_TEMP_DIR%" (
echo [%DATE% %TIME%] Deleting existing temporary scripts directory... >> "%LOG_FILE%"
rd /s /q "%SCRIPTS_TEMP_DIR%" >nul 2>&1
)
echo [%DATE% %TIME%] Cloning main repo into temporary directory... >> "%LOG_FILE%"
"%GIT_CMD%" clone "%SCRIPTS_REPO_URL%" "%SCRIPTS_TEMP_DIR%" >> "%LOG_FILE%"
if errorlevel 1 (
echo [%DATE% %TIME%] ERROR: Git clone failed for main scripts repo. >> "%LOG_FILE%"
echo ERROR: Failed to clone the main scripts repo. Check network or GitPortable version.
pause
exit /b
)
:: --------- Replace Files in the Main Directory (Safe Copy) ---------
echo [%DATE% %TIME%] Preparing to copy files... >> "%LOG_FILE%"
set "SRC_DIR=%~dp0temp_scripts"
set "DEST_DIR=%~dp0."
echo SRC_DIR: [%SRC_DIR%] >> "%LOG_FILE%"
echo DEST_DIR: [%DEST_DIR%] >> "%LOG_FILE%"
if not exist "%SRC_DIR%" (
echo [%DATE% %TIME%] ERROR: Source directory does not exist: %SRC_DIR% >> "%LOG_FILE%"
exit /b
)
if not exist "%DEST_DIR%" (
echo [%DATE% %TIME%] ERROR: Destination directory does not exist: %DEST_DIR% >> "%LOG_FILE%"
exit /b
)
robocopy "%SRC_DIR%" "%DEST_DIR%" /E /COPY:DAT /XO >> "%LOG_FILE%" 2>&1
if errorlevel 8 (
echo [%DATE% %TIME%] ERROR: Robocopy failed. Exit code: %errorlevel% >> "%LOG_FILE%"
pause
exit /b
)
:: --------- Clean Up Temporary Directory ---------
rd /s /q "%SCRIPTS_TEMP_DIR%" >nul 2>&1
:pull_sounds
:: --------- Pull Updates for Sounds Repo ---------
if exist "%SOUNDS_DIR%" (
echo [%DATE% %TIME%] Pulling updates for the sounds repository... >> "%LOG_FILE%"
"%GIT_CMD%" -C "%SOUNDS_DIR%" pull >> "%LOG_FILE%"
if errorlevel 1 (
echo [%DATE% %TIME%] ERROR: Failed to pull updates for the sounds repository. >> "%LOG_FILE%"
echo ERROR: Failed to pull updates for the sounds repository. Check the log for details.
)
) else (
echo [%DATE% %TIME%] ERROR: Sounds directory not found at %SOUNDS_DIR% >> "%LOG_FILE%"
echo ERROR: Sounds directory not found at %SOUNDS_DIR%.
)
:: --------- Final Logging ---------
echo [%DATE% %TIME%] Update process completed. >> "%LOG_FILE%"
pause
exit /b