Add installer to repo

This commit is contained in:
Rim 2024-03-11 05:03:16 -04:00
parent b13d7968bc
commit 978c7ca30e
155 changed files with 37863 additions and 0 deletions

1
installer/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -0,0 +1,191 @@
# Header, don't edit
NLF v6
# Start editing here
# Language ID
1033
# Font and size - dash (-) means default
-
-
# Codepage - dash (-) means ASCII code page
-
# RTL - anything else than RTL means LTR
-
# Translation by ..... (any credits should go here)
# ^Branding
t7x Installer - Free and Open Source Software
# ^SetupCaption
$(^Name) Setup
# ^UninstallCaption
$(^Name) Uninstall
# ^LicenseSubCaption
: License Agreement
# ^ComponentsSubCaption
: Installation Options
# ^DirSubCaption
: Installation Folder
# ^InstallingSubCaption
: Installing
# ^CompletedSubCaption
: Completed
# ^UnComponentsSubCaption
: Uninstallation Options
# ^UnDirSubCaption
: Uninstallation Folder
# ^ConfirmSubCaption
: Confirmation
# ^UninstallingSubCaption
: Uninstalling
# ^UnCompletedSubCaption
: Completed
# ^BackBtn
< &Back
# ^NextBtn
&Next >
# ^AgreeBtn
I &Agree
# ^AcceptBtn
I &accept the terms of the License Agreement
# ^DontAcceptBtn
I &do not accept the terms of the License Agreement
# ^InstallBtn
&Install
# ^UninstallBtn
&Uninstall
# ^CancelBtn
Cancel
# ^CloseBtn
&Close
# ^BrowseBtn
B&rowse...
# ^ShowDetailsBtn
Show &details
# ^ClickNext
Click Next to continue.
# ^ClickInstall
Click Install to start the installation.
# ^ClickUninstall
Click Uninstall to start the uninstallation.
# ^Name
Name
# ^Completed
Completed
# ^LicenseText
Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, click I Agree.
# ^LicenseTextCB
Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, click the check box below. $_CLICK
# ^LicenseTextRB
Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, select the first option below. $_CLICK
# ^UnLicenseText
Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, click I Agree.
# ^UnLicenseTextCB
Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, click the check box below. $_CLICK
# ^UnLicenseTextRB
Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, select the first option below. $_CLICK
# ^Custom
Custom
# ^ComponentsText
Check the components you want to install and uncheck the components you don't want to install. $_CLICK
# ^ComponentsSubText1
Select the type of install:
# ^ComponentsSubText2_NoInstTypes
Select components to install:
# ^ComponentsSubText2
Or, select the optional components you wish to install:
# ^UnComponentsText
Check the components you want to uninstall and uncheck the components you don't want to uninstall. $_CLICK
# ^UnComponentsSubText1
Select the type of uninstall:
# ^UnComponentsSubText2_NoInstTypes
Select components to uninstall:
# ^UnComponentsSubText2
Or, select the optional components you wish to uninstall:
# ^DirText
Setup will install $(^NameDA) in the following folder. Enter the path to your Call of Duty Black Ops III game folder, or click Browse and select the game folder. $_CLICK
# ^DirSubText
Destination Folder
# ^DirBrowseText
Select the folder to install $(^NameDA) in:
# ^UnDirText
Setup will uninstall $(^NameDA) from the following folder. To uninstall from a different folder, click Browse and select another folder. $_CLICK
# ^UnDirSubText
""
# ^UnDirBrowseText
Select the folder to uninstall $(^NameDA) from:
# ^SpaceAvailable
"Space available: "
# ^SpaceRequired
"Space required: "
# ^UninstallingText
$(^NameDA) will be uninstalled from the following folder. $_CLICK
# ^UninstallingSubText
Uninstalling from:
# ^FileError
Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Abort to stop the installation,\r\nRetry to try again, or\r\nIgnore to skip this file.
# ^FileError_NoIgnore
Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Retry to try again, or\r\nCancel to stop the installation.
# ^CantWrite
"Can't write: "
# ^CopyFailed
Copy failed
# ^CopyTo
"Copy to "
# ^Registering
"Registering: "
# ^Unregistering
"Unregistering: "
# ^SymbolNotFound
"Could not find symbol: "
# ^CouldNotLoad
"Could not load: "
# ^CreateFolder
"Create folder: "
# ^CreateShortcut
"Create shortcut: "
# ^CreatedUninstaller
"Created uninstaller: "
# ^Delete
"Delete file: "
# ^DeleteOnReboot
"Delete on reboot: "
# ^ErrorCreatingShortcut
"Error creating shortcut: "
# ^ErrorCreating
"Error creating: "
# ^ErrorDecompressing
Error decompressing data! Corrupted installer?
# ^ErrorRegistering
Error registering DLL
# ^ExecShell
"ExecShell: "
# ^Exec
"Execute: "
# ^Extract
"Extract: "
# ^ErrorWriting
"Extract: error writing to file "
# ^InvalidOpcode
Installer corrupted: invalid opcode
# ^NoOLE
"No OLE for: "
# ^OutputFolder
"Output folder: "
# ^RemoveFolder
"Remove folder: "
# ^RenameOnReboot
"Rename on reboot: "
# ^Rename
"Rename: "
# ^Skipped
"Skipped: "
# ^CopyDetails
Copy Details To Clipboard
# ^LogInstall
Log install process
# ^Byte
B
# ^Kilo
K
# ^Mega
M
# ^Giga
G

View File

@ -0,0 +1,129 @@
;Language: English (1033)
;By Joost Verburg
!insertmacro LANGFILE "English" "English" "English" "English" ; See \Include\LangFile.nsh for a description of these parameters
!ifdef MUI_WELCOMEPAGE
${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Welcome to the $(^NameDA) Setup"
${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Setup will guide you through the installation of the $(^NameDA) Client for Call of Duty Black Ops III.$\r$\n$\r$\nIt is recommended that you close all other applications before installing.$\r$\n$\r$\nYou will not need to restart your computer after installation.$\r$\n$\r$\n$_CLICK"
!endif
!ifdef MUI_UNWELCOMEPAGE
${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "$(^NameDA) Uninstaller"
${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Setup will guide you through the uninstallation of $(^NameDA).$\r$\n$\r$\nBefore starting the uninstallation, make sure $(^NameDA) is not running.$\r$\n$\r$\n$_CLICK"
!endif
!ifdef MUI_LICENSEPAGE
${LangFileString} MUI_TEXT_LICENSE_TITLE "License Agreement"
${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Please review the license terms before installing $(^NameDA)."
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "If you accept the terms of the agreement, click I Agree to continue. You must accept the agreement to install $(^NameDA)."
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "If you accept the terms of the agreement, click the check box below. You must accept the agreement to install $(^NameDA). $_CLICK"
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "If you accept the terms of the agreement, select the first option below. You must accept the agreement to install $(^NameDA). $_CLICK"
!endif
!ifdef MUI_UNLICENSEPAGE
${LangFileString} MUI_UNTEXT_LICENSE_TITLE "License Agreement"
${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Please review the license terms before uninstalling $(^NameDA)."
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "If you accept the terms of the agreement, click I Agree to continue. You must accept the agreement to uninstall $(^NameDA)."
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "If you accept the terms of the agreement, click the check box below. You must accept the agreement to uninstall $(^NameDA). $_CLICK"
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "If you accept the terms of the agreement, select the first option below. You must accept the agreement to uninstall $(^NameDA). $_CLICK"
!endif
!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Press Page Down to see the rest of the agreement."
!endif
!ifdef MUI_COMPONENTSPAGE
${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Choose Components"
${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Choose which features of $(^NameDA) you want to install."
!endif
!ifdef MUI_UNCOMPONENTSPAGE
${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Choose Components"
${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Choose which features of $(^NameDA) you want to uninstall."
!endif
!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Description"
!ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Position your mouse over a component to see its description."
!else
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Select a component to see its description."
!endif
!endif
!ifdef MUI_DIRECTORYPAGE
${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Choose Game Location"
${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Choose your Call of Duty Black Ops III game folder in which to install $(^NameDA)."
!endif
!ifdef MUI_UNDIRECTORYPAGE
${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Choose Uninstall Location"
${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Choose the folder from which to uninstall $(^NameDA)."
!endif
!ifdef MUI_INSTFILESPAGE
${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installing"
${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Please wait while $(^NameDA) is being installed."
${LangFileString} MUI_TEXT_FINISH_TITLE "Installation Complete"
${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Setup was completed successfully."
${LangFileString} MUI_TEXT_ABORT_TITLE "Installation Aborted"
${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Setup was not completed successfully."
!endif
!ifdef MUI_UNINSTFILESPAGE
${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Uninstalling"
${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Please wait while $(^NameDA) is being uninstalled."
${LangFileString} MUI_UNTEXT_FINISH_TITLE "Uninstallation Complete"
${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Uninstall was completed successfully."
${LangFileString} MUI_UNTEXT_ABORT_TITLE "Uninstallation Aborted"
${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Uninstall was not completed successfully."
!endif
!ifdef MUI_FINISHPAGE
${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Completing $(^NameDA) Setup"
${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) has been installed on your computer.$\r$\n$\r$\nClick Finish to close Setup."
${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Your computer must be restarted in order to complete the installation of $(^NameDA). Do you want to reboot now?"
!endif
!ifdef MUI_UNFINISHPAGE
${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Completing $(^NameDA) Uninstall"
${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) has been uninstalled from your computer.$\r$\n$\r$\nClick Finish to close Setup."
${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Your computer must be restarted in order to complete the uninstallation of $(^NameDA). Do you want to reboot now?"
!endif
!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reboot now"
${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "I want to manually reboot later"
${LangFileString} MUI_TEXT_FINISH_RUN "&Run $(^NameDA)"
${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Show Readme"
${LangFileString} MUI_BUTTONTEXT_FINISH "&Finish"
!endif
!ifdef MUI_STARTMENUPAGE
${LangFileString} MUI_TEXT_STARTMENU_TITLE "Choose Start Menu Folder"
${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Choose a Start Menu folder for the $(^NameDA) shortcuts."
${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Select the Start Menu folder in which you would like to create the program's shortcuts. You can also enter a name to create a new folder."
${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Do not create shortcuts"
!endif
!ifdef MUI_UNCONFIRMPAGE
${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Uninstall $(^NameDA)"
${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Remove $(^NameDA) from your computer."
!endif
!ifdef MUI_ABORTWARNING
${LangFileString} MUI_TEXT_ABORTWARNING "Are you sure you want to quit $(^Name) Setup?"
!endif
!ifdef MUI_UNABORTWARNING
${LangFileString} MUI_UNTEXT_ABORTWARNING "Are you sure you want to quit $(^Name) Uninstall?"
!endif
!ifdef MULTIUSER_INSTALLMODEPAGE
${LangFileString} MULTIUSER_TEXT_INSTALLMODE_TITLE "Choose Users"
${LangFileString} MULTIUSER_TEXT_INSTALLMODE_SUBTITLE "Choose for which users you want to install $(^NameDA)."
${LangFileString} MULTIUSER_INNERTEXT_INSTALLMODE_TOP "Select whether you want to install $(^NameDA) only for yourself or for all users of this computer. $(^ClickNext)"
${LangFileString} MULTIUSER_INNERTEXT_INSTALLMODE_ALLUSERS "Install for anyone using this computer"
${LangFileString} MULTIUSER_INNERTEXT_INSTALLMODE_CURRENTUSER "Install just for me"
!endif

View File

@ -0,0 +1 @@
SAMPLELICENSEAGREEMENT

23
installer/README.md Normal file
View File

@ -0,0 +1,23 @@
## Scriptable installer for Call of Duty game clients
- Please feel free to contribute
### Prerequisites
- ~~[Nullsoft Scriptable Install System](https://nsis.sourceforge.io/Download)~~ (*Tools now included*)
| Game | Official |
|---------------------------------------------|:--------:|
| Call of Duty: World at War (T4) | ❌ |
| Call of Duty: Modern Warfare 2 (IW4x) | ❌ |
| Call of Duty: Black Ops (T5) | ❌ |
| Call of Duty: Modern Warfare 3 (IW5) | ❌ |
| Call of Duty: Black Ops 2 (T6) | ❌ |
| Call of Duty: Ghosts (IW6x) | ❌ |
| Call of Duty: Advanced Warfare (S1x) | ❌ |
| Call of Duty: Modern Warfare Remastered (H1) | ❌ |
| Call of Duty: Black Ops III (T7) | ☑️ |
| Call of Duty: Infinite Warfare (IW7) | ❌ |
| Call of Duty: Black Ops 4 (T8) | ☑️ |
| Call of Duty: Modern Warfare (2019) (IW8x) | ❌ |
| Call of Duty: Cold War (T9D) | ❌ |

15
installer/Readme.txt Normal file
View File

@ -0,0 +1,15 @@
T7x will no longer receive updates
It is with deep regret that I must inform you that I have received a formal complaint from the original copyright holder of the source code. T7x is a project that utilizes source code from another defunct project called "boiii," licensed under the GPLv3.
I hold deep respect for the immense amount of work and time invested by the previous developer in reverse-engineering and enabling the game to be modded to the extent this client allows. Therefore, I am honoring the claim that I cannot use boiii's technology.
As part of the agreement, this project is to be ARCHIVED IMMEDIATELY, and it will no longer receive any updates or support.
It was also a agreed that this notice shall remain, informing the public that I am not discontinuing this client due to an action by a specific American video game corporation.
All the involved parties wish that any further attempts at creating a modded client for Black Ops 3 allocate time and effort into developing their own technology rather than utilizing boiii's source code.
No other services provided by AlterWare are subject to change.
- T7x Developer(s)

4
installer/compile.bat Normal file
View File

@ -0,0 +1,4 @@
@echo off
if not exist "build" mkdir "build"
tools\makensis.exe "t7x_Installer.nsi"

View File

@ -0,0 +1,40 @@
# T7 Server Config
Config for T7 Dedicated Servers for use with the T7x Client.
# How to use
1. Download the BO3 Unranked Dedicated Server via Steam (It's located in the "Tools" section in your steam library.)
2. Open the Unranked Server folder in windows explorer (if you own BO3 on Steam and have it installed it will be in your BO3 Game Folder)
3. Add t7x.exe to the UnrankedServer Folder
4. Download this repository and extract startup batch files as well as the t7x and zone folder to the UnrankedServer Folder
5. Edit the config(s) in /zone to your liking.
6. (Optional) Edit your game rules under boiii/gamesettings/mp.
6. Port forward UDP 27017.
7. Start the Server using BOIII_MP_Server.bat or T7x_ZM_Server.bat
# Additional Steps required for hosting Zombies Dedicated Servers
As of right now you need to take additional Steps to host Zombies Servers.
For Zombie Dedis to work they need to have the Zombies Maps and common FastFiles, these do not come with the UnrankedServer Files. This means you need to copy those over from your installed BO3 game folder.
Copy common fastfiles that is needed for zombies.
```
zone/en_zm_patch.ff
zone/en_zm_common.ff
zone/zm_patch.ff
zone/zm_common.fd
zone/zm_common.ff
zone/zm_levelcommon.ff
```
Now for the map. Shadows of Evil is zm_zod.
```
zone/en_zm_zod.ff
zone/en_zm_zod_patch.ff
zone/zm_zod.ff
zone/zm_zod_patch.ff
```
from your BO3 Game folder into the UnrankedServer's ```zone``` Folder. Do the same with the FastFiles of the Maps you want to host on the Server, you do not need to copy the .xpak files, those hold Textures and Sounds which the Server doesn't need. You can use the zm_server.cfg as a short name references if you want to grab the others.
You are now ready to start the Server using T7x_ZM_Server.bat. If the server still instantly closes while opening the T7x_ZM_Server.bat or T7x_CP_Server.bat. Check the console_mp.log from identities\dedicatedpc\ folder. Scroll down until you see "Could not find zone: xxxx".

View File

@ -0,0 +1,36 @@
@echo off
::///////////////////////////////////////////////////////////////////////
::/// T7x Dedicated Server Configuration start-up file ///
::///////////////////////////////////////////////////////////////////////
::// //
::// Your Game Server Port. //
::// Make sure you Port Forward both UDP & TCP //
::///////////////////////////////////////////////////////////////////////
set GamePort=27017
::///////////////////////////////////////////////////////////////////////
::// Below edits are optional unless you run multiable servers or mods.//
::///////////////////////////////////////////////////////////////////////
::// Load a mod on your server //
::// Example: ModfolderName=mods/bots //
::// //
::// UNLOAD a mod on your server //
::// Example: ModfolderName= //
::///////////////////////////////////////////////////////////////////////
set ModFolderName=
::///////////////////////////////////////////////////////////////////////
::// Your edited server.cfg in the "zone" folder goes here... //
::// This is were you edit your hostname, rcon, inactivity, etc //
::// (Optional) //
::///////////////////////////////////////////////////////////////////////
set ServerFilename=server_cp.cfg
::///////////////////////////////////////////////////////////////////////
:://DONE!! WARNING! Don't mess with anything below this line. SEROUSLY!//
::///////////////////////////////////////////////////////////////////////
start t7x.exe -dedicated +set fs_game "%ModFolderName%" +set net_port "%GamePort%" +set logfile 2 +exec %ServerFilename%

View File

@ -0,0 +1,36 @@
@echo off
::///////////////////////////////////////////////////////////////////////
::/// T7x Dedicated Server Configuration start-up file ///
::///////////////////////////////////////////////////////////////////////
::// //
::// Your Game Server Port. //
::// Make sure you Port Forward both UDP & TCP //
::///////////////////////////////////////////////////////////////////////
set GamePort=27017
::///////////////////////////////////////////////////////////////////////
::// Below edits are optional unless you run multiable servers or mods.//
::///////////////////////////////////////////////////////////////////////
::// Load a mod on your server //
::// Example: ModfolderName=mods/bots //
::// //
::// UNLOAD a mod on your server //
::// Example: ModfolderName= //
::///////////////////////////////////////////////////////////////////////
set ModFolderName=
::///////////////////////////////////////////////////////////////////////
::// Your edited server.cfg in the "zone" folder goes here... //
::// This is were you edit your hostname, rcon, inactivity, etc //
::// (Optional) //
::///////////////////////////////////////////////////////////////////////
set ServerFilename=server.cfg
::///////////////////////////////////////////////////////////////////////
:://DONE!! WARNING! Don't mess with anything below this line. SEROUSLY!//
::///////////////////////////////////////////////////////////////////////
start t7x.exe -dedicated +set fs_game "%ModFolderName%" +set net_port "%GamePort%" +set logfile 2 +exec %ServerFilename%

View File

@ -0,0 +1,36 @@
@echo off
::///////////////////////////////////////////////////////////////////////
::/// T7x Dedicated Server Configuration start-up file ///
::///////////////////////////////////////////////////////////////////////
::// //
::// Your Game Server Port. //
::// Make sure you Port Forward both UDP & TCP //
::///////////////////////////////////////////////////////////////////////
set GamePort=27017
::///////////////////////////////////////////////////////////////////////
::// Below edits are optional unless you run multiable servers or mods.//
::///////////////////////////////////////////////////////////////////////
::// Load a mod on your server //
::// Example: ModfolderName=mods/bots //
::// //
::// UNLOAD a mod on your server //
::// Example: ModfolderName= //
::///////////////////////////////////////////////////////////////////////
set ModFolderName=
::///////////////////////////////////////////////////////////////////////
::// Your edited server.cfg in the "zone" folder goes here... //
::// This is were you edit your hostname, rcon, inactivity, etc //
::// (Optional) //
::///////////////////////////////////////////////////////////////////////
set ServerFilename=server_zm.cfg
::///////////////////////////////////////////////////////////////////////
:://DONE!! WARNING! Don't mess with anything below this line. SEROUSLY!//
::///////////////////////////////////////////////////////////////////////
start t7x.exe -dedicated +set fs_game "%ModFolderName%" +set net_port "%GamePort%" +set logfile 2 +exec %ServerFilename%

View File

@ -0,0 +1,19 @@
Snake,BOT
Diamante,BOT
Dss0,BOT
st0rm,BOT
Louvenarde,BOT
serious,BOT
JariK,BOT
xensik,BOT
Jebus3211,BOT
FragsAreUs,BOT
Fry,BOT
X3RX35,BOT
Brent,BOT
Joel,BOT
RektInator,BOT
Doctor,BOT
Jimbo,BOT
Laupetin,BOT

View File

@ -0,0 +1,16 @@
gametype_setting scorelimit 7500
gametype_setting timelimit 10
gametype_setting prematchperiod 0
gametype_setting roundlimit 1
gametype_setting playerNumlives 0
gametype_setting playerrespawndelay 0
gametype_setting waverespawndelay 0
gametype_setting disableweapondrop 1
gametype_setting allowAnnouncer 0
gametype_setting startRound 1
gametype_setting magic 1
gametype_setting headshotsonly 0
gametype_setting allowdogs 0
gametype_setting disableClassSelection 0
gametype_setting disableCompass 1
gametype_setting characterCustomization 0

View File

@ -0,0 +1,16 @@
gametype_setting scorelimit 7500
gametype_setting timelimit 10
gametype_setting prematchperiod 0
gametype_setting roundlimit 1
gametype_setting playerNumlives 0
gametype_setting playerrespawndelay 0
gametype_setting waverespawndelay 0
gametype_setting disableweapondrop 1
gametype_setting allowAnnouncer 0
gametype_setting startRound 1
gametype_setting magic 1
gametype_setting headshotsonly 0
gametype_setting allowdogs 0
gametype_setting disableClassSelection 1
gametype_setting disableCompass 1
gametype_setting characterCustomization 0

View File

@ -0,0 +1,108 @@
gametype_setting allowAnnouncer 1
gametype_setting allowBattleChatter 1
gametype_setting allowFinalKillcam 1
gametype_setting allowHitMarkers 2
gametype_setting allowInGameTeamChange 0
gametype_setting allowKillcam 1
gametype_setting allowSpectating 0
gametype_setting autoDestroyTime 0
gametype_setting autoTeamBalance 0
gametype_setting bombTimer 0
gametype_setting bulletDamageScalar 1.0
gametype_setting captureTime 10
gametype_setting crateCaptureTime 3
gametype_setting cumulativeRoundScores 0
gametype_setting deathPointLoss 0
gametype_setting defuseTime 0
gametype_setting delayPlayer 0
gametype_setting destroyTime 0
gametype_setting disableAmbientFx 0
gametype_setting disableAttachments 0
gametype_setting disableCAC 0
gametype_setting disableContracts 0
gametype_setting disableTacInsert 0
gametype_setting disableweapondrop 1
gametype_setting disallowaimslowdown 0
gametype_setting disallowprone 0
gametype_setting enemyCarrierVisible 0
gametype_setting extraTime 0
gametype_setting flagCaptureGracePeriod 0
gametype_setting flagDecayTime 0
gametype_setting flagRespawnTime 0
gametype_setting forceRadar 0
gametype_setting friendlyfiretype 0
gametype_setting hardcoremode 0
gametype_setting hotPotato 0
gametype_setting idleFlagDecay 0
gametype_setting idleFlagResetTime 0
gametype_setting inactivityKick 0
gametype_setting kothMode 0
gametype_setting leaderBonus 0
gametype_setting loadoutKillstreaksEnabled 0
gametype_setting maxAllocation 10
gametype_setting maxObjectiveEventsPerMinute 0
gametype_setting maxPlayerDefensive 0
gametype_setting maxPlayerEventsPerMinute 0
gametype_setting maxPlayerOffensive 0
gametype_setting multiBomb 0
gametype_setting objectivePingTime 6
gametype_setting objectiveSpawnTime 0
gametype_setting onlyHeadshots 0
gametype_setting perksEnabled 0
gametype_setting plantTime 0
gametype_setting playerForceRespawn 1
gametype_setting playerHealthRegenTime 5
gametype_setting playerKillsMax 0
gametype_setting playerMaxHealth 100
gametype_setting playerNumlives 0
gametype_setting playerObjectiveHeldRespawnDelay 0
gametype_setting playerQueuedRespawn 0
gametype_setting playerRespawnDelay 0
gametype_setting playerSprintTime 4
gametype_setting pregameAlwaysShowCACEdit 1
gametype_setting pregameAlwaysShowStreakEdit 1
gametype_setting pregameCACModifyTime 0
gametype_setting pregameDraftEnabled 0
gametype_setting pregameDraftRoundTime 0
gametype_setting pregameItemMaxVotes 0
gametype_setting pregameItemVoteEnabled 0
gametype_setting pregameItemVoteRoundTime 0
gametype_setting pregamePositionShuffleMethod 0
gametype_setting pregamePositionSortType 0
gametype_setting pregamePostRoundTime 0
gametype_setting pregamePostStageTime 0
gametype_setting pregamePreStageTime 0
gametype_setting pregameScorestreakModifyTime 0
gametype_setting randomObjectiveLocations 0
gametype_setting roundlimit 1
gametype_setting roundStartExplosiveDelay 5
gametype_setting roundStartKillstreakDelay 0
gametype_setting roundswitch 1 // rounds between switching teams
gametype_setting roundwinlimit 0
gametype_setting scoreHeroPowerGainFactor 1.0
gametype_setting scoreHeroPowerTimeFactor 1.0
gametype_setting scorelimit 100
gametype_setting spectateType 1
gametype_setting teamCount 1
gametype_setting teamKillPenalty 2
gametype_setting teamKillPointLoss 0
gametype_setting teamKillPunishCount 3
gametype_setting teamKillReducedPenalty 0.25
gametype_setting teamKillScore 4
gametype_setting teamKillSpawnDelay 20
gametype_setting timelimit 10
gametype_setting totalKillsMax 0
gametype_setting vehiclesEnabled 1
gametype_setting vehiclesTimed 1
gametype_setting voipDeadChatWithDead 0
gametype_setting voipDeadChatWithTeam 1
gametype_setting voipDeadHearAllLiving 0
gametype_setting voipDeadHearKiller 0
gametype_setting voipDeadHearTeamLiving 1
gametype_setting voipEveryoneHearsEveryone 0
gametype_setting voipKillersHearVictim 1
gametype_setting waverespawndelay 0
gametype_setting zmDifficulty 1
// player movement
gametype_setting trm_maxHeight 144.0

View File

@ -0,0 +1,4 @@
gametype_setting disableClassSelection 1
gametype_setting disableCompass 1
gametype_setting characterCustomization 1
gametype_setting spectateType 0

View File

@ -0,0 +1,59 @@
//Don't touch the first 2 lines below here.
exec "gamedata/gamesettings/mp/gamesettings_default.cfg"
exec "gamedata/configs/common/default_xboxlive.cfg"
// Below this line you may uncomment the " // " commands and edit to your liking.
// If you unsure the default command. you can always " // " them back for later custom gameplay.
gts prematchrequirement "0" // (0-10) Number of players on each team or the total number of players before the pre-match countdown will start.
gts prematchrequirementtime "0" // (0-60) The amount of time before the match will start.
gts prematchperiod "15" // The amount of time before the game starts.
gts preroundperiod "5" // The amount of time before a round starts.
gts inactivityKick "120" // Kick players that's AFK
gts allowSpectating "1" // Allow players to spectate other players or CODcasting.
gts spectateType "1" // 0 disabled, 1 team only, 2 freelook, 3 team only spectate splitscreen players only
gts allowInGameTeamChange "1" // Allow players to switch teams?
gts autoTeamBalance "1" // Automatically assign players to teams
gts allowFinalKillcam "1" // Controls whether the final killcam is played.
gts timelimit "5" // Time limit of the game.
gts roundScoreLimit "10" // Round score limit reach
gts scorelimit "0" // Score limit.
gts roundlimit "2" // The number of rounds that will be played before the game ends.
gts ballCount "1" // How many balls you can handle?
gts carryScore "2"
gts throwScore "1"
gts carrierArmor "100"
gts idleFlagResetTime "15" // The time before a ball is automatically returned to base. (0-60 seconds)
//gts loadoutKillstreaksEnabled "1" // Disable Killstreaks by setting this to 0
//gts perksEnabled "1" // Disable Perks by setting this to 0
//gts disableVehicleSpawners "0" // This should disable robots from the DLC map Rupture by setting this to 1
//gts disableweapondrop "0" // No weapons on the ground.
//gts disallowprone "0" // Don't allow players to lay down.
//Hardcore Mode
//gts hardcoreMode "1" // Enable hardcore mode.
//gts friendlyfiretype "1" // Enable or Disable Friendly Fire. 1 on, 2 reflect, 3 shared.
//gts playerHealthRegenTime "0" // Time it takes you to recover damage.
//gts playerMaxHealth "30" // Percent of Health players will have on Respawn.
//gts onlyHeadshots "0" // Headshots only
//gts allowKillcam "0" // Allow Killcam.
//gts allowbattlechatter "0" // Shut the fucking player dialogues up.
//gts teamKillPointLoss "1" // Points per Kill - The number of points for each kill. (0-25)
//gts teamKillPunishCount "3" // Kick constant Team killers out of your server.
gts scoreHeroPowerGainFactor "0.684" //Score earned towards Hero Weapons and Abilities are multiplied by this factor in BALL
gts scoreHeroPowerTimeFactor "0.684"
gts enemyCarrierVisible "2" // delayed can see person with ball on map
gts captureTime "0" // Pickup Time. The amount of time it takes to pickup the ball.
gts defuseTime "0" // Return Time. How long it takes to return ball. (-1 = off. 0 = Instant. (Default) 10 = limit of seconds.)
gts spawntraptriggertime "10"
gts gameAdvertisementRuleTimeLeft "4"
gts gameAdvertisementRuleRound "3"

View File

@ -0,0 +1,29 @@
//Don't touch the first 2 lines below here.
exec "gamedata/gamesettings/mp/gamesettings_default.cfg"
exec "gamedata/configs/common/default_xboxlive.cfg"
// Below this line you may uncomment the " // " commands and edit to your liking.
// If you unsure the default command. you can always " // " them back for later custom gameplay.
gts prematchrequirement "0" // (0-10) Number of players on each team or the total number of players before the pre-match countdown will start.
gts prematchrequirementtime "0" // (0-60) The amount of time before the match will start.
gts prematchperiod "15" // The amount of time before the game starts.
gts preroundperiod "5" // The amount of time before a round starts.
gts inactivityKick "120" // Kick players that's AFK
gts allowSpectating "1" // Allow players to spectate other players or CODcasting.
gts spectateType "1" // 0 disabled, 1 team only, 2 freelook, 3 team only spectate splitscreen players only
gts allowInGameTeamChange "1" // Allow players to switch teams?
gts autoTeamBalance "1" // Automatically assign players to teams
gts allowFinalKillcam "1" // Controls whether the final killcam is played.
gts timelimit "10" // Time limit of the game.
gts scorelimit "60" // Score limit reach to end the game.
gts teamCount "2"
gts teamScorePerKill "0"
gts teamScorePerCleanDeposit "1" // Points awarded to the team when depositing a fragment.
gts cleanDepositOfflineTime "0"
gts cleanDepositOnlineTime "60" // The amount of team each fracture site is active.
gts cleanDepositRotation "1"
gts scoreHeroPowerGainFactor "0.646" // Score earned towards Hero Weapons and Abilities are multiplied by this factor
gts scoreHeroPowerTimeFactor "0.646"

View File

@ -0,0 +1,53 @@
//Don't touch the first 2 lines below here.
exec "gamedata/gamesettings/mp/gamesettings_default.cfg"
exec "gamedata/configs/common/default_xboxlive.cfg"
// Below this line you may uncomment the " // " commands and edit to your liking.
// If you unsure the default command. you can always " // " them back for later custom gameplay.
gts prematchrequirement "0" // (0-10) Number of players on each team or the total number of players before the pre-match countdown will start.
gts prematchrequirementtime "0" // (0-60) The amount of time before the match will start.
gts prematchperiod "15" // The amount of time before the game starts.
gts preroundperiod "5" // The amount of time before a round starts.
gts inactivityKick "120" // Kick players that's AFK
gts spectateType "1" // 0 disabled, 1 team only, 2 freelook, 3 team only spectate splitscreen players only
gts allowInGameTeamChange "1" // Allow players to switch teams?
gts allowFinalKillcam "1" // Controls whether the final killcam is played.
gts timelimit "10" // Time limit of the game.
gts scorelimit "100" // Score limit reach to end the game.
gts teamCount "2" // Set this higher if you want Multi-Team Deathmatch that was cut from playlist. (2-6)
//gts roundLimit "1" // The number of rounds that will be played before the game ends.
gts teamScorePerKill "0" // Points per Kill - The number of points for each kill. (0-25)
//gts teamScorePerKillConfirmed "1" // Points per Kills Confirmed. - The number of points for each kill confirmed. (0-25)
//gts teamScorePerKillDenied "0" // Points per Kill Denied - The number of points for each kill denied. (0-25)
//gts teamScorePerHeadshot "0" // Headshot Bonus Points - Extra points awarded if the kill is a headshot in addition to the points per kill. (0-25)
//gts playerNumLives "0" // Number of Lives - The number of times each player can die before they are no longer allowed to respawn. (0-25)
gts antiBoostDistance "100"
//gts loadoutKillstreaksEnabled "1" // Disable Killstreaks by setting this to 0
//gts perksEnabled "1" // Disable Perks by setting this to 0
//gts disableVehicleSpawners "0" // This should disable robots from the DLC map Rupture by setting this to 1
//gts disableweapondrop "0" // No weapons on the ground.
//gts disallowprone "0" // Don't allow players to lay down.
//gts allowHitMarkers "2" // Rather or not to show hitmakers?
//gts allowAnnouncer "1" // Annouce enemy team actions
//Hardcore Mode
//gts hardcoreMode "1" // Enable hardcore mode.
//gts friendlyfiretype "1" // Enable or Disable Friendly Fire. 1 on, 2 reflect, 3 shared.
//gts playerHealthRegenTime "0" // Time it takes you to recover damage.
//gts playerMaxHealth "30" // Percent of Health players will have on Respawn.
//gts onlyHeadshots "0" // Headshots only
//gts allowKillcam "0" // Allow Killcam.
//gts allowbattlechatter "0" // Shut the fucking player dialogues up.
//gts teamKillPointLoss "1" // Points per Kill - The number of points for each kill. (0-25)
//gts teamKillPunishCount "3" // Kick constant Team killers out of your server.
gts scoreHeroPowerGainFactor "0.646" //Score earned towards Hero Weapons and Abilities are multiplied by this factor
gts scoreHeroPowerTimeFactor "0.646"
gts gameAdvertisementRuleScorePercent "15"
gts gameAdvertisementRuleTimeLeft "2"

View File

@ -0,0 +1,50 @@
//Don't touch the first 2 lines below here.
exec "gamedata/gamesettings/mp/gamesettings_default.cfg"
exec "gamedata/configs/common/default_xboxlive.cfg"
// Below this line you may uncomment the " // " commands and edit to your liking.
// If you unsure the default command. you can always " // " them back for later custom gameplay.
gts prematchrequirement "0" // (0-10) Number of players on each team or the total number of players before the pre-match countdown will start.
gts prematchrequirementtime "0" // (0-60) The amount of time before the match will start.
gts prematchperiod "15" // The amount of time before the game starts.
gts preroundperiod "5" // The amount of time before the round start.
gts allowSpectating "1" // Allow players to spectate other players or CODcasting.
gts spectateType "1" // 0 disabled, 1 team only, 2 freelook, 3 team only spectate splitscreen players only
gts inactivityKick "120" // Kick players that's AFK
gts allowInGameTeamChange "1" // Allow players to switch teams?
gts allowFinalKillcam "1" // Controls whether the final killcam is played
gts timelimit "5" // Time limit of the game.
gts scorelimit "3" // The number of flags needed to win the round.
gts roundLimit "2" // The number of rounds that will be played before the game ends.
gts roundwinlimit "2" // Round Win Limit. The number of rounds a team needs to win before the game ends.
gts enemyCarrierVisible "2" // Enemy Carrier. How and if the enemy appears on the minimap. (0 = No. 1 = Yes. 2 = Delayed)
gts idleFlagResetTime "30" // The time before a flag is automatically returned to base. (0-60 seconds)
gts captureTime "0" // Pickup Time. The amount of time it takes to pickup the enemy flag.
gts defuseTime "0" // Return Time. How long it takes to return a flag. (-1 = off. 0 = Instant. (Default) 10 = limit of seconds.)
gts playerRespawnDelay "5" // The amount of time a player has to wait before respawning.
//gts loadoutKillstreaksEnabled "1" // Disable Killstreaks by setting this to 0
//gts perksEnabled "1" // Disable Perks by setting this to 0
//gts disableVehicleSpawners "0" // This should disable robots from the DLC map Rupture by setting this to 1
//gts disableweapondrop "0" // No weapons on the ground.
//gts disallowprone "0" // Don't allow players to lay down.
//gts allowHitMarkers "2" // Rather or not to show hitmakers?
//gts allowAnnouncer "1" // Annouce enemy team actions
//Hardcore Mode
//gts hardcoreMode "1" // Enable hardcore mode.
//gts friendlyfiretype "1" // Enable or Disable Friendly Fire. 1 on, 2 reflect, 3 shared.
//gts playerHealthRegenTime "0" // Time it takes you to recover damage.
//gts playerMaxHealth "30" // Percent of Health players will have on Respawn.
//gts onlyHeadshots "0" // Headshots only
//gts allowKillcam "0" // Allow Killcam.
//gts allowbattlechatter "0" // Shut the fucking player dialogues up.
//gts teamKillPointLoss "1" // Points per Kill - The number of points for each kill. (0-25)
//gts teamKillPunishCount "3" // Kick constant Team killers out of your server.
gts scoreHeroPowerGainFactor "0.835" //Score earned towards Hero Weapons and Abilities are multiplied by this factor in CTF
gts scoreHeroPowerTimeFactor "0.835"
gts gameAdvertisementRuleTimeLeft "4"
gts gameAdvertisementRuleRound "3"

View File

@ -0,0 +1,175 @@
gametype_setting allowAnnouncer 1
gametype_setting allowBattleChatter 1
gametype_setting allowFinalKillcam 1
gametype_setting allowHitMarkers 2
gametype_setting allowInGameTeamChange 1
gametype_setting allowKillcam 1
gametype_setting allowMapScripting 1
gametype_setting allowSpectating 1
gametype_setting antiBoostDistance 100
gametype_setting autoDestroyTime 0
gametype_setting autoTeamBalance 0
gametype_setting ballCount 1
gametype_setting bombTimer 0
gametype_setting bootTime 5
gametype_setting bulletDamageScalar 1.0
gametype_setting captureTime 10
gametype_setting carryScore 0
gametype_setting carrierArmor 100
gametype_setting crateCaptureTime 3
gametype_setting cumulativeRoundScores 1
gametype_setting deathPointLoss 0
gametype_setting defuseTime 0
gametype_setting delayPlayer 0
gametype_setting destroyTime 0
gametype_setting disableAmbientFx 0
gametype_setting disableAttachments 0
gametype_setting disableCAC 0
gametype_setting disableClassSelection 0
gametype_setting disableContracts 0
gametype_setting disableTacInsert 0
gametype_setting disableThirdPersonSpectating 0
gametype_setting disableVehicleSpawners 0
gametype_setting disableweapondrop 0
gametype_setting disallowaimslowdown 0
gametype_setting disallowprone 0
gametype_setting droppedTagRespawn 0
gametype_setting enemyCarrierVisible 2
gametype_setting extraTime 0
gametype_setting flagCanBeNeutralized 0
gametype_setting flagCaptureCondition 1
gametype_setting flagCaptureGracePeriod 0
gametype_setting flagDecayTime 0
gametype_setting flagRespawnTime 0
gametype_setting forceRadar 0
gametype_setting friendlyfiretype 0
gametype_setting gameAdvertisementRuleScorePercent 0
gametype_setting gameAdvertisementRuleTimeLeft 0
gametype_setting gameAdvertisementRuleRound 0
gametype_setting gameAdvertisementRuleRoundsWon 0
gametype_setting gunSelection 0
gametype_setting hardcoremode 0
gametype_setting hotPotato 0
gametype_setting idleFlagDecay 0
gametype_setting idleFlagResetTime 0
gametype_setting inactivityKick 0
gametype_setting incrementalSpawnDelay 0
gametype_setting infectionMode 0
gametype_setting killEventScoreMultiplier 1
gametype_setting kothMode 0
gametype_setting leaderBonus 0
gametype_setting loadoutKillstreaksEnabled 1
gametype_setting killstreaksGiveGameScore 1
gametype_setting maxAllocation 10
gametype_setting maxObjectiveEventsPerMinute 0
gametype_setting maxPlayerDefensive 0
gametype_setting maxPlayerEventsPerMinute 0
gametype_setting maxPlayerOffensive 0
gametype_setting maxSuicidesBeforeKick 0
gametype_setting movePlayers 1
gametype_setting multiBomb 0
gametype_setting objectivePingTime 4
gametype_setting objectiveSpawnTime 0
gametype_setting oldschoolMode 0
gametype_setting classicMode 0
gametype_setting onlyHeadshots 0
gametype_setting OvertimetimeLimit 2
gametype_setting perksEnabled 1
gametype_setting plantTime 0
gametype_setting playerForceRespawn 1
gametype_setting playerHealthRegenTime 5
gametype_setting playerKillsMax 0
gametype_setting playerMaxHealth 100
gametype_setting playerNumlives 0
gametype_setting playerObjectiveHeldRespawnDelay 0
gametype_setting playerQueuedRespawn 0
gametype_setting playerRespawnDelay 0
gametype_setting playerSprintTime 4
gametype_setting pointsForSurvivalBonus 0
gametype_setting pointsPerMeleeKill 0
gametype_setting pointsPerPrimaryGrenadeKill 0
gametype_setting pointsPerPrimaryKill 0
gametype_setting pointsPerSecondaryKill 0
gametype_setting pointsPerWeaponKill 0
gametype_setting pregameAlwaysShowCACEdit 1
gametype_setting pregameAlwaysShowStreakEdit 1
gametype_setting pregameCACModifyTime 90
gametype_setting pregameDraftEnabled 0
gametype_setting pregameDraftRoundTime 30
gametype_setting pregameDraftType 0
gametype_setting pregameItemMaxVotes 1
gametype_setting pregameItemVoteEnabled 0
gametype_setting pregameItemVoteRoundTime 30
gametype_setting pregamePositionShuffleMethod 0
gametype_setting pregamePositionSortType 0
gametype_setting pregamePostRoundTime 3
gametype_setting pregamePostStageTime 3
gametype_setting pregamePreStageTime 5
gametype_setting pregameScorestreakModifyTime 30
gametype_setting prematchperiod 15
gametype_setting preroundperiod 5
gametype_setting prematchrequirement 0
gametype_setting prematchrequirementtime 0
gametype_setting randomObjectiveLocations 0
gametype_setting rebootPlayers 0
gametype_setting rebootTime 15
gametype_setting robotSpeed 1
gametype_setting robotShield 0
gametype_setting roundlimit 1
gametype_setting roundScoreLimit 0
gametype_setting roundStartExplosiveDelay 10
gametype_setting roundStartKillstreakDelay 15
gametype_setting roundswitch 1 // rounds between switching teams
gametype_setting roundwinlimit 0
gametype_setting scoreHeroPowerGainFactor 1.0
gametype_setting scoreHeroPowerTimeFactor 1.0
gametype_setting scoreThiefPowerGainFactor 1.0
gametype_setting scorelimit 100
gametype_setting scorePerPlayer 0
gametype_setting scoreResetOnDeath 1
gametype_setting setbacks 0
gametype_setting shutdownDamage 2
gametype_setting silentPlant 0
gametype_setting spawnprotectiontime 3
gametype_setting spawnsuicidepenalty 0
gametype_setting spawnteamkilledpenalty 0
gametype_setting spawntraptriggertime 5
gametype_setting spectateType 1
gametype_setting cleanDepositOnlineTime 60
gametype_setting cleanDepositRotation 1
gametype_setting teamAssignment 2
gametype_setting teamCount 2
gametype_setting teamKillPenalty 2
gametype_setting teamKillPointLoss 1
gametype_setting teamKillPunishCount 0
gametype_setting teamKillReducedPenalty 1
gametype_setting teamKillScore 4
gametype_setting teamKillSpawnDelay 20
gametype_setting teamNumLives 0
gametype_setting teamScorePerCleanDeposit 1
gametype_setting teamScorePerDeath 0
gametype_setting teamScorePerHeadshot 0
gametype_setting teamScorePerKill 1
gametype_setting teamScorePerKillConfirmed 1
gametype_setting teamScorePerKillDenied 0
gametype_setting throwScore 0
gametype_setting timelimit 10
gametype_setting timelimit 10
gametype_setting timePausesWhenInZone 0
gametype_setting useEmblemInsteadOfFactionIcon 0
gametype_setting vehiclesEnabled 1
gametype_setting vehiclesTimed 1
gametype_setting voipDeadChatWithDead 0
gametype_setting voipDeadChatWithTeam 1
gametype_setting voipDeadHearAllLiving 0
gametype_setting voipDeadHearKiller 0
gametype_setting voipDeadHearTeamLiving 1
gametype_setting voipEveryoneHearsEveryone 0
gametype_setting voipKillersHearVictim 1
gametype_setting waverespawndelay 0
gametype_setting weaponCount 0
gametype_setting weaponTimer 0
// player movement
gametype_setting trm_maxHeight 95.0

View File

@ -0,0 +1,56 @@
exec "gamedata/gamesettings/mp/gamesettings_default.cfg"
exec "gamedata/configs/common/default_xboxlive.cfg"
// Below this line you may uncomment the " // " commands and edit to your liking.
// If you unsure the default command. you can always " // " them back for later custom gameplay.
gts prematchrequirement "0" // (0-10) Number of players on each team or the total number of players before the pre-match countdown will start.
gts prematchrequirementtime "0" // (0-60) The amount of time before the match will start.
gts prematchperiod "15" // The amount of time before the game starts.
gts preroundperiod "5" // The amount of time before a round starts.
gts inactivityKick "120" // Kick players that's AFK
gts allowInGameTeamChange "1" // Allow players to switch teams?
gts allowFinalKillcam "1" // Controls whether the final killcam is played
gts timelimit "2.5" // Time limit of the game.
gts scorelimit "2" // Score limit reach to end the game.
gts roundlimit "0" // The number of rounds that will be played before the game ends.
gts bombTimer "45" // Bomb Timer. The amount of time before the bomb detonates. (2.5-150 seconds)
gts plantTime "5" // Plant Time. The amount of time it takes to plant the bomb. (1-10 seconds)
gts defuseTime "5" // Defuse Time. The amount of time it takes to defuse the bomb.(1-10 seconds)
gts extraTime "2" // Extra Time. The amount of time added on to the current time when a bomb site is destroyed.
gts OvertimetimeLimit "2" // Overtime. The amount of time the Overtime round will last before it ends.
gts silentPlant "0" // Silent Plant. Players can hear the bomb being planted.
gts roundStartExplosiveDelay "2" // Delay explosive weapon use at the start of the round.
gts roundStartKillstreakDelay "15" // Delay scorestreaks start of the round.
gts maxObjectiveEventsPerMinute "5" // Used to determine whether a player is scoreboosting.
gts maxPlayerDefensive "128" // Used to determine whether a player is scoreboosting.
gts maxPlayerEventsPerMinute "2.5" // Used to determine whether a player is scoreboosting.
gts spawntraptriggertime "10"
//gts loadoutKillstreaksEnabled "1" // Disable Killstreaks by setting this to 0
//gts perksEnabled "1" // Disable Perks by setting this to 0
//gts disableVehicleSpawners "0" // This should disable robots from the DLC map Rupture by setting this to 1
//gts disableweapondrop "0" // No weapons on the ground.
//gts disallowprone "0" // Don't allow players to lay down.
//gts allowHitMarkers "2" // Rather or not to show hitmakers?
//gts allowAnnouncer "1" // Annouce enemy team actions
//Hardcore Mode
//gts hardcoreMode "1" // Enable hardcore mode.
//gts friendlyfiretype "1" // Enable or Disable Friendly Fire. 1 on, 2 reflect, 3 shared.
//gts playerHealthRegenTime "0" // Time it takes you to recover damage.
//gts playerMaxHealth "30" // Percent of Health players will have on Respawn.
//gts allowKillcam "0" // Allow Killcam.
//gts allowbattlechatter "0" // Shut the fucking player dialogues up.
//gts teamKillPointLoss "1" // Points per Kill - The number of points for each kill. (0-25)
//gts teamKillPunishCount "3" // Kick constant Team killers out of your server.
gts scoreHeroPowerGainFactor "0.679" //Score earned towards Hero Weapons and Abilities are multiplied by this factor in Demolition
gts scoreHeroPowerTimeFactor "0.679"
gts gameAdvertisementRuleRound "3"
gts gameAdvertisementRuleTimeLeft "1"

View File

@ -0,0 +1,51 @@
//Don't touch the first 2 lines below here.
exec "gamedata/gamesettings/mp/gamesettings_default.cfg"
exec "gamedata/configs/common/default_xboxlive.cfg"
// Below this line you may uncomment the " // " commands and edit to your liking.
// If you unsure the default command. you can always " // " them back for later custom gameplay.
gts prematchrequirement "0" // (0-10) Number of players on each team or the total number of players before the pre-match countdown will start.
gts prematchrequirementtime "0" // (0-60) The amount of time before the match will start.
gts prematchperiod "15" // The amount of time before the game starts.
gts preroundperiod "5" // The amount of time before a round starts.
gts inactivityKick "120" // Kick players that's AFK
gts spectateType "1" // 0 disabled, 1 team only, 2 freelook, 3 team only spectate splitscreen players only
gts allowInGameTeamChange "1" // Allow players to switch teams?
gts allowFinalKillcam "1" // Controls whether the final killcam is played.
gts timelimit "10" // Time limit of the game.
gts scorelimit "30" // Score limit reach to end the game.
gts disableTacInsert "1" // Disable Tactical Insertion. 3arc have this set 1 by default to keep players for boosting.
//gts roundLimit "1" // The number of rounds that will be played before the game ends.
//gts teamScorePerKill "1" // Points per Kill - The number of points for each kill. (0-25)
//gts teamScorePerDeath "0" // Points per Death - The number of points your team loses for each death. Points can never be lower than zero. (0-25)
//gts teamScorePerHeadshot "0" // Headshot Bonus Points - Extra points awarded if the kill is a headshot in addition to the points per kill. (0-25)
//gts playerNumLives "0" // Number of Lives - The number of times each player can die before they are no longer allowed to respawn. (0-25)
//gts roundStartExplosiveDelay "2" // Delay explosive weapon use at the start of the round.
//gts roundStartKillstreakDelay "0" // Delay killstreaks at the start of the round.
//gts loadoutKillstreaksEnabled "1" // Disable Killstreaks by setting this to 0
//gts perksEnabled "1" // Disable Perks by setting this to 0
//gts disableVehicleSpawners "0" // This should disable robots from the DLC map Rupture by setting this to 1
//gts disableweapondrop "0" // No weapons on the ground.
//gts disallowprone "0" // Don't allow players to lay down.
//Hardcore Mode
//gts hardcoreMode "1" // Enable hardcore mode.
//gts friendlyfiretype "1" // Enable or Disable Friendly Fire. 1 on, 2 reflect, 3 shared.
//gts playerHealthRegenTime "0" // Time it takes you to recover damage.
//gts playerMaxHealth "30" // Percent of Health players will have on Respawn.
//gts onlyHeadshots "0" // Headshots only
//gts allowKillcam "0" // Allow Killcam.
//gts allowbattlechatter "0" // Shut the fucking player dialogues up.
//gts teamKillPointLoss "1" // Points per Kill - The number of points for each kill. (0-25)
//gts teamKillPunishCount "3" // Kick constant Team killers out of your server.
gts useEmblemInsteadOfFactionIcon "1" // Show player's art on scoreboard
gts voipEveryoneHearsEveryone "1" // Everyone on voice chat hear you.
gts gameAdvertisementRuleScorePercent 50
gts gameAdvertisementRuleTimeLeft 2
gts teamCount 1

View File

@ -0,0 +1,55 @@
//Don't touch the first 2 lines below here.
exec "gamedata/gamesettings/mp/gamesettings_default.cfg"
exec "gamedata/configs/common/default_xboxlive.cfg"
// Below this line you may uncomment the " // " commands and edit to your liking.
// If you unsure the default command. you can always " // " them back for later custom gameplay.
gts prematchrequirement "0" // (0-10) Number of players on each team or the total number of players before the pre-match countdown will start.
gts prematchrequirementtime "0" // (0-60) The amount of time before the match will start.
gts prematchperiod "15" // The amount of time before the game starts.
gts preroundperiod "5" // The amount of time before a round starts.
gts inactivityKick "120" // Kick players that's AFK
gts allowSpectating "1" // Allow players to spectate other players or CODcasting.
gts spectateType "1" // 0 disabled, 1 team only, 2 freelook, 3 team only spectate splitscreen players only
gts allowInGameTeamChange "1" // Allow players to switch teams?
gts autoTeamBalance "1" // Automatically assign players to teams
gts allowFinalKillcam "1" // Controls whether the final killcam is played.
gts timelimit "10" // Time limit of the game.
gts scorelimit "100" // Score limit.
gts roundScoreLimit "100" // Round score limit reach
gts captureTime "10" // Capture Time. The amount of time it takes to capture an objective.
gts roundlimit "2" // The number of rounds that will be played before the game ends.
gts maxObjectiveEventsPerMinute "3"
gts maxPlayerDefensive "128"
gts maxPlayerOffensive "128"
gts maxPlayerEventsPerMinute "3"
gts flagCanBeNeutralized "0"
//gts loadoutKillstreaksEnabled "1" // Disable Killstreaks by setting this to 0
//gts perksEnabled "1" // Disable Perks by setting this to 0
//gts disableVehicleSpawners "0" // This should disable robots from the DLC map Rupture by setting this to 1
//gts disableweapondrop "0" // No weapons on the ground.
//gts disallowprone "0" // Don't allow players to lay down.
//gts allowHitMarkers "2" // Rather or not to show hitmakers?
//gts allowAnnouncer "1" // Annouce enemy team actions
gts scoreHeroPowerGainFactor "0.616" //Score earned towards Hero Weapons and Abilities are multiplied by this factor
gts scoreHeroPowerTimeFactor "0.616"
//Hardcore Mode
//gts hardcoreMode "1" // Enable hardcore mode.
//gts friendlyfiretype "1" // Enable or Disable Friendly Fire. 1 on, 2 reflect, 3 shared.
//gts playerHealthRegenTime "0" // Time it takes you to recover damage.
//gts playerMaxHealth "30" // Percent of Health players will have on Respawn.
//gts onlyHeadshots "0" // Headshots only
//gts allowKillcam "0" // Allow Killcam.
//gts allowbattlechatter "0" // Shut the fucking player dialogues up.
//gts teamKillPointLoss "1" // Points per Kill - The number of points for each kill. (0-25)
//gts teamKillPunishCount "3" // Kick constant Team killers out of your server.
gts gameAdvertisementRuleScorePercent 10
gts gameAdvertisementRuleRound 3

View File

@ -0,0 +1,64 @@
//Don't touch the first 2 lines below here.
exec "gamedata/gamesettings/mp/gamesettings_default.cfg"
exec "gamedata/configs/common/default_xboxlive.cfg"
// Below this line you may uncomment the " // " commands and edit to your liking.
// If you unsure the default command. you can always " // " them back for later custom gameplay.
gts prematchrequirement "0" // (0-10) Number of players on each team or the total number of players before the pre-match countdown will start.
gts prematchrequirementtime "0" // (0-60) The amount of time before the match will start.
gts prematchperiod "15" // The amount of time before the game starts.
gts preroundperiod "5" // The amount of time before a round starts.
gts inactivityKick "120" // Kick players that's AFK
gts allowSpectating "1" // Allow players to spectate other players or CODcasting.
gts spectateType "1" // 0 disabled, 1 team only, 2 freelook, 3 team only spectate splitscreen players only
gts allowInGameTeamChange "1" // Allow players to switch teams?
gts autoTeamBalance "1" // Automatically assign players to teams
gts allowFinalKillcam "1" // Controls whether the final killcam is played.
gts timelimit "5" // Time limit of the game.
gts scorelimit "0" // Score limit.
gts roundscorelimit "1" // Round score limit reach
gts roundwinlimit "2"
gts roundlimit "2" // The number of rounds that will be played before the game ends.
gts teamCount "2"
gts shutdownDamage "3"
gts bootTime "5"
gts rebootTime "15" // How long it takes the robot to reboot after being shut down
gts rebootPlayers "0"
gts movePlayers "1"
gts robotSpeed "1" // Movment speed of the robot
gts robotShield "0"
//gts teamScorePerDeath "0" // Points per Death - The number of points your team loses for each death. Points can never be lower than zero. (0-25)
//gts teamScorePerHeadshot "0" // Headshot Bonus Points - Extra points awarded if the kill is a headshot in addition to the points per kill. (0-25)
//gts playerNumLives "0" // Number of Lives - The number of times each player can die before they are no longer allowed to respawn. (0-25)
//gts loadoutKillstreaksEnabled "1" // Disable Killstreaks by setting this to 0
//gts perksEnabled "1" // Disable Perks by setting this to 0
gts disableVehicleSpawners "1" // This should disable robots from the DLC map Rupture by setting this to 1
//gts disableweapondrop "0" // No weapons on the ground.
//gts disallowprone "0" // Don't allow players to lay down.
//gts allowHitMarkers "2" // Rather or not to show hitmakers?
//gts allowAnnouncer "1" // Annouce enemy team actions
//Hardcore Mode
//gts hardcoreMode "1" // Enable hardcore mode.
//gts friendlyfiretype "1" // Enable or Disable Friendly Fire. 1 on, 2 reflect, 3 shared.
//gts playerHealthRegenTime "0" // Time it takes you to recover damage.
//gts playerMaxHealth "30" // Percent of Health players will have on Respawn.
//gts onlyHeadshots "0" // Headshots only
//gts allowKillcam "0" // Allow Killcam.
//gts allowbattlechatter "0" // Shut the fucking player dialogues up.
//gts teamKillPointLoss "1" // Points per Kill - The number of points for each kill. (0-25)
//gts teamKillPunishCount "3" // Kick constant Team killers out of your server.
gts scoreHeroPowerGainFactor "0.788" // Score earned towards Hero Weapons and Abilities are multiplied by this factor
gts scoreHeroPowerTimeFactor "0.788"
gts spawntraptriggertime "5"
gts gameAdvertisementRuleTimeLeft "3.5"
gts gameAdvertisementRuleRound "3"

View File

@ -0,0 +1,33 @@
//Don't touch the first 2 lines below here.
exec "gamedata/gamesettings/mp/gamesettings_default.cfg"
exec "gamedata/configs/common/default_xboxlive.cfg"
// Below this line you may uncomment the " // " commands and edit to your liking.
// If you unsure the default command. you can always " // " them back for later custom gameplay.
gts prematchrequirement "0" // (0-10) Number of players on each team or the total number of players before the pre-match countdown will start.
gts prematchrequirementtime "0" // (0-60) The amount of time before the match will start.
gts prematchperiod "0" // The amount of time before the game starts.
gts preroundperiod "10" // The amount of time before a round starts.
gts inactivityKick "120" // Kick players that's AFK
gts allowSpectating "1" // Allow players to spectate other players or CODcasting. (Could be used as screen cheating)
//gts spectateType "1" // 0 disabled, 1 team only, 2 freelook, 3 team only spectate splitscreen players only
gts allowInGameTeamChange "0" // Allow players to switch teams?
gts autoTeamBalance "1" // Automatically assign players to teams
gts allowFinalKillcam "0" // Controls whether the final killcam is played.
gts disableCAC "0"
gts disableClassSelection "1"
gts loadoutKillstreaksEnabled "0" // Disable Killstreaks by setting this to 0
//gts perksEnabled "1" // Disable Perks by setting this to 0
//gts disableVehicleSpawners "0" // This should disable robots from the DLC map Rupture by setting this to 1
//gts disableweapondrop "0" // No weapons on the ground.
//gts disallowprone "0" // Don't allow players to lay down.
gts disableTacInsert "1" // Disable Tactical Insertion.
gts timelimit "15" // Time limit of the game.
gts scorelimit "0" // Score limit reach to end the game.
gts roundswitch "0"
gts teamCount "1"

View File

@ -0,0 +1,38 @@
//Don't touch the first 3 lines below here.
exec "gamedata/gamesettings/mp/gamesettings_default.cfg"
exec "gamedata/configs/common/default_xboxlive.cfg"
gts wagermatchhud "1"
// Below this line you may uncomment the " // " commands and edit to your liking.
// If you unsure the default command. you can always " // " them back for later custom gameplay.
gts gunSelection 3 // Ladder. Determines which set of weapons the game uses (0 = Normal. 1 = Close Quarters. 2 = Marksman. 3 = Random.)
set black_market_gun_game "0" // Toggle 1 if you want Blackjack's GunGame. leave it 0 for regular. (This might conflect with gunselection set)
gts prematchrequirement "0" // (0-10) Number of players on each team or the total number of players before the pre-match countdown will start.
gts prematchrequirementtime "0" // (0-60) The amount of time before the match will start.
gts prematchperiod 20 // The amount of time before the game starts. (Give weak potato players a chance to load in and not spawn.)
gts preroundperiod "10" // The amount of time before a round starts.
gts disableClassSelection "1" // Disable CAC for GunGame.
gts allowSpectating "1" // Allow players to spectate other players or CODcasting.
gts spectateType "1" // 0 disabled, 1 team only, 2 freelook, 3 team only spectate splitscreen players only
gts timelimit "10" // Time limit of the game.
gts scorelimit "30" // Score limit reach to end the game.
gts setbacks 1 // Setbacks. How much weapon progression a player loses when knifed. (1-10)
gts forceRadar "1" // Enable UAV all the time
gts loadoutKillstreaksEnabled "0" // Disable Killstreaks for GunGame.
gts disableVehicleSpawners "1" // This should disable robots from the DLC map Rupture by setting this to 1
gts disableweapondrop "1" // No weapons on the ground for GunGame.
gts perksEnabled "0" // Disable Perks on GunGame
//gts disallowprone "0" // Don't allow players to lay down.
//gts allowHitMarkers "2" // Rather or not to show hitmakers?
gts playerNumLives "0" // Number of Lives - The number of times each player can die before they are no longer allowed to respawn. (0-25)
//gts playerMaxHealth "100" // Percent of Health players will have on Respawn.
//gts onlyHeadshots "0" // Headshots only
gts useEmblemInsteadOfFactionIcon "1" // Show player's art on scoreboard
gts voipEveryoneHearsEveryone "1" // Everyone on voice chat hear you.
teamCount 1

View File

@ -0,0 +1,32 @@
//Don't touch the first 2 lines below here.
exec "gamedata/gamesettings/mp/gamesettings_default.cfg"
exec "gamedata/configs/common/default_xboxlive.cfg"
// Below this line you may uncomment the " // " commands and edit to your liking.
// If you unsure the default command. you can always " // " them back for later custom gameplay.
gts prematchrequirement "0" // (0-10) Number of players on each team or the total number of players before the pre-match countdown will start.
gts prematchrequirementtime "0" // (0-60) The amount of time before the match will start.
gts prematchperiod "15" // The amount of time before the game starts.
gts preroundperiod "10" // The amount of time before a round starts.
gts inactivityKick "120" // Kick players that's AFK
gts allowSpectating "1" // Allow players to spectate other players or CODcasting. (Could be used as screen cheating)
gts allowInGameTeamChange "1" // Allow players to switch teams?
gts autoTeamBalance "1" // Automatically assign players to teams
gts allowFinalKillcam "1" // Controls whether the final killcam is played.
gts timelimit "2" // Time limit of the game.
gts scorelimit "0" // Score limit reach to end the game.
gts teamCount "2"
gts loadoutKillstreaksEnabled "0" // Disable Killstreaks by setting this to 0.
gts disableVehicleSpawners "1" // This should disable robots from the DLC map Rupture by setting this to 1.
//gts disallowprone "0" // Don't allow players to lay down.
//gts disableTacInsert "1" // Disable Tactical Insertion. Now that would be a dick move for the infected players.
//gts allowHitMarkers "2" // Rather or not to show hitmakers?
//gts allowAnnouncer "1" // Annouce enemy team actions
gts gameAdvertisementRuleScorePercent "15"
gts gameAdvertisementRuleTimeLeft "2"
gts gameAdvertisementRuleRound "0"
gts gameAdvertisementRuleRoundsWon "0"

View File

@ -0,0 +1,55 @@
//Don't touch the first 3 lines below here.
exec "gamedata/gamesettings/mp/gamesettings_default.cfg"
exec "gamedata/configs/common/default_xboxlive.cfg"
gts kothMode "1"
// Below this line you may uncomment the " // " commands and edit to your liking.
// If you unsure the default command. you can always " // " them back for later custom gameplay.
gts prematchrequirement "0" // (0-10) Number of players on each team or the total number of players before the pre-match countdown will start.
gts prematchrequirementtime "0" // (0-60) The amount of time before the match will start.
gts prematchperiod "15" // The amount of time before the game starts.
gts preroundperiod "5" // The amount of time before a round starts.
gts inactivityKick "120" // Kick players that's AFK
gts allowSpectating "1" // Allow players to spectate other players or CODcasting.
gts spectateType "1" // 0 disabled, 1 team only, 2 freelook, 3 team only spectate splitscreen players only
gts allowInGameTeamChange "1" // Allow players to switch teams?
gts autoTeamBalance "1" // Automatically assign players to teams
gts allowFinalKillcam "1" // Controls whether the final killcam is played.
gts timelimit "5" // Time limit of the game.
gts scorelimit "250" // Score limit reach to end the game.
gts teamCount "2"
//gts loadoutKillstreaksEnabled "1" // Disable Killstreaks by setting this to 0
//gts perksEnabled "1" // Disable Perks by setting this to 0
//gts disableVehicleSpawners "0" // This should disable robots from the DLC map Rupture by setting this to 1
//gts disableweapondrop "0" // No weapons on the ground.
//gts disallowprone "0" // Don't allow players to lay down.
gts maxPlayerEventsPerMinute "8"
gts autoDestroyTime "60" // Lifetime. The amount of time hardpoint is active.
gts captureTime "0" // Capture Time. The amount of time it takes to capture hardpoint.
gts objectiveSpawnTime "0" // Activation Delay Time. The amount of time before the next objective becomes active.
gts randomObjectiveLocations "0" // Hardpoint Locations. The order in which the hardpoint will appear. (0 = Liner 2 = Random After First)
gts scorePerPlayer "0" // Scoring. Determines if the team gets score at a constant rate or if more points are awarded when more players occupy the hardpoint.
gts timePausesWhenInZone "1" // timelimit pauses when you capture the hardpoint.
//Hardcore Mode
//gts hardcoreMode "1" // Enable hardcore mode.
//gts friendlyfiretype "1" // Enable or Disable Friendly Fire. 1 on, 2 reflect, 3 shared.
//gts playerHealthRegenTime "0" // Time it takes you to recover damage.
//gts playerMaxHealth "30" // Percent of Health players will have on Respawn.
//gts onlyHeadshots "0" // Headshots only
//gts allowKillcam "0" // Allow Killcam.
//gts allowbattlechatter "0" // Shut the fucking player dialogues up.
//gts teamKillPointLoss "1" // Points per Kill - The number of points for each kill. (0-25)
//gts teamKillPunishCount "3" // Kick constant Team killers out of your server.
gts scoreHeroPowerGainFactor "0.45" //Score earned towards Hero Weapons and Abilities are multiplied by this factor in Hardpoint
gts scoreHeroPowerTimeFactor "0.45"
gts gameAdvertisementRuleScorePercent "20"
gts gameAdvertisementRuleTimeLeft "1.5"

View File

@ -0,0 +1,47 @@
//Don't touch the first 2 lines below here.
exec "gamedata/gamesettings/mp/gamesettings_default.cfg"
exec "gamedata/configs/common/default_xboxlive.cfg"
////////////////////////////////////////////////////////////////
// Please note that only these maps support Prop Hunt //
// Make sure to change your sv_maprotation to only them! //
////////////////////////////////////////////////////////////////
// //
// Aquarium - mp_biodome //
// Combine - mp_sector //
// Evac - mp_apartments //
// Exodus - mp_chinatown //
// Fringe - mp_veiled //
// Hunted - mp_ethiopia //
// Infection - mp_infection //
// Redwood - mp_redwood //
// Spire - mp_aerospace //
// //
////////////////////////////////////////////////////////////////
// Below this line you may uncomment the " // " commands and edit to your liking.
// If you unsure the default command. you can always " // " them back for later custom gameplay.
gts prematchrequirement "0" // (0-10) Number of players on each team or the total number of players before the pre-match countdown will start.
gts prematchrequirementtime "0" // (0-60) The amount of time before the match will start.
gts prematchperiod "15" // The amount of time before the game starts.
gts preroundperiod "10" // The amount of time before a round starts.
gts inactivityKick "120" // Kick players that's AFK
gts allowFinalKillcam "1" // Controls whether the final killcam is played.
gts spectateType "3" // 0 disabled, 1 team only, 2 freelook, 3 team only spectate splitscreen players only
gts disableClassSelection "1" // Disable CAC for prop hunt.
gts allowInGameTeamChange "0" // Keep it 0
gts timelimit "4" // Time limit of the game.
gts scorelimit "0" // Score limit reach to end the game.
gts teamCount "2"
gts roundLimit "4" // The number of rounds that will be played before the game ends.
gts roundwinlimit "3"
gts roundSwitch "1"
gts playerNumLives "1" // Number of Lives - Keep it 1!
gts disableVehicleSpawners "1" // This should disable robots from the DLC map Rupture by setting this to 1 - keep it 1!
gts voipDeadChatWithDead "1"
gts voipDeadChatWithTeam "0"
gts voipDeadHearTeamLiving "0"

View File

@ -0,0 +1,48 @@
//Don't touch the first 3 lines below here.
exec "gamedata/gamesettings/mp/gamesettings_default.cfg"
exec "gamedata/configs/common/default_xboxlive.cfg"
gts wagermatchhud "1"
// Below this line you may uncomment the " // " commands and edit to your liking.
// If you unsure the default command. you can always " // " them back for later custom gameplay.
gts gunSelection "1" // Setback Weapon. The weapon that will set players back in points. (0 = None 1 = Combat Axe 2 = Crossbow 3 = Ballistic Knife)
gts prematchrequirement "0" // (0-10) Number of players on each team or the total number of players before the pre-match countdown will start.
gts prematchrequirementtime "0" // (0-60) The amount of time before the match will start.
gts prematchperiod 20 // The amount of time before the game starts. (Give weak potato players a chance to load in and not spawn.)
gts preroundperiod "10" // The amount of time before a round starts.
gts inactivityKick "120" // Kick players that's AFK
gts allowInGameTeamChange "0" // Allow team change..not sure why this is on SAS
gts disableClassSelection "1" // Disable CAC for GunGame.
gts allowSpectating "1" // Allow players to spectate other players or CODcasting.
gts spectateType "1" // 0 disabled, 1 team only, 2 freelook, 3 team only spectate splitscreen players only
gts timelimit "5" // Time limit of the game.
gts scorelimit "0" // Score limit reach to end the game.
gts roundlimit "1"
gts forceRadar "1" // Enable UAV all the time
gts timecount "1"
gts loadoutKillstreaksEnabled "0" // Disable Killstreaks for SAS.
gts disableVehicleSpawners "1" // This should disable robots from the DLC map Rupture by setting this to 1
gts disableweapondrop "1" // No weapons on the ground for SAS.
gts perksEnabled "0" // Disable Perks on SAS
//gts disallowprone "0" // Don't allow players to lay down.
gts playerNumLives "0" // Number of Lives - The number of times each player can die before they are no longer allowed to respawn. (0-25)
//gts playerMaxHealth "100" // Percent of Health players will have on Respawn.
//gts onlyHeadshots "0" // Headshots only
gts useEmblemInsteadOfFactionIcon "1" // Show player's art on scoreboard
gts voipEveryoneHearsEveryone "1" // Everyone on voice chat hear you.
gts pointsPerPrimaryKill "10"
gts pointsPerSecondaryKill "10"
gts pointsPerPrimaryGrenadeKill "5"
gts pointsPerMeleeKill "5"
gts roundStartExplosiveDelay "0"
gts gameAdvertisementRuleScorePercent "35"
gts gameAdvertisementRuleTimeLeft "1.5"
teamCount 1

View File

@ -0,0 +1,62 @@
//Don't touch the first 2 lines below here.
exec "gamedata/gamesettings/mp/gamesettings_default.cfg"
exec "gamedata/configs/common/default_xboxlive.cfg"
// Below this line you may uncomment the " // " commands and edit to your liking.
// If you unsure the default command. you can always " // " them back for later custom gameplay.
gts prematchrequirement "0" // (0-10) Number of players on each team or the total number of players before the pre-match countdown will start.
gts prematchrequirementtime "0" // (0-60) The amount of time before the match will start.
gts prematchperiod "15" // The amount of time before the game starts.
gts preroundperiod "3" // The amount of time before a round starts.
gts inactivityKick "120" // Kick players that's AFK
gts allowSpectating "1" // Allow players to spectate other players or CODcasting. (Could be used as screen cheating)
gts allowInGameTeamChange "1" // Allow players to switch teams?
gts autoTeamBalance "1" // Automatically assign players to teams
gts allowFinalKillcam "1" // Controls whether the final killcam is played.
gts spectateType "3" // 0 disabled, 1 team only, 2 freelook, 3 team only spectate splitscreen players only
gts timelimit "2 // Time limit of the game.
gts scorelimit "4" // Score limit reach to end the game.
gts bombTimer 45 // Bomb Timer. The amount of time before the bomb detonates.
gts plantTime 5 // Plant Time. The amount of time it takes to plant the bomb.
gts defuseTime 5 // Defuse Time. The amount of time it takes to defuse the bomb.
gts multiBomb 0 // Multi Bomb. Every attacking player gets a bomb.
gts roundswitch 1 // The number of rounds to play before teams switch sides.
gts roundlimit 0
//gts silentPlant 0 // Players can hear the bomb being planted.
//gts loadoutKillstreaksEnabled "1" // Disable Killstreaks by setting this to 0
//gts perksEnabled "1" // Disable Perks by setting this to 0
gts disableVehicleSpawners "1" // This should disable robots from the DLC map Rupture by setting this to 1
//gts disableweapondrop "0" // No weapons on the ground.
//gts disallowprone "0" // Don't allow players to lay down.
//gts allowHitMarkers "2" // Rather or not to show hitmakers?
//gts allowAnnouncer "1" // Annouce enemy team actions
gts playerLives "1"
gts playerNumLives "1" // Correct gts to configure amount of respawns
gts playerKillsMax "6"
gts totalKillsMax "11"
gts teamKillScore "4"
gts voipDeadChatWithDead "1"
gts voipDeadChatWithTeam "0"
gts voipDeadHearTeamLiving "0"
gts scoreHeroPowerGainFactor "0.8"
gts scoreHeroPowerTimeFactor "0.3"
//Hardcore Mode
//gts hardcoreMode "1" // Enable hardcore mode.
//gts friendlyfiretype "1" // Enable or Disable Friendly Fire. 1 on, 2 reflect, 3 shared.
//gts playerHealthRegenTime "0" // Time it takes you to recover damage.
//gts playerMaxHealth "30" // Percent of Health players will have on Respawn.
//gts onlyHeadshots "0" // Headshots only
//gts allowKillcam "0" // Allow Killcam.
//gts allowbattlechatter "0" // Shut the fucking player dialogues up.
//gts teamKillPointLoss "1" // Points per Kill - The number of points for each kill. (0-25)
//gts teamKillPunishCount "3" // Kick constant Team killers out of your server.
gts gameAdvertisementRuleRoundsWon 3

View File

@ -0,0 +1,229 @@
//Don't touch the first 2 lines below here.
exec "gamedata/gamesettings/mp/gamesettings_default.cfg"
exec "gamedata/configs/common/default_xboxlive.cfg"
// Below this line you may uncomment the " // " commands and edit to your liking.
// If you unsure the default command. you can always " // " them back for later custom gameplay
gts prematchrequirement "0" // (0-10) Number of players on each team or the total number of players before the pre-match countdown will start.
gts prematchrequirementtime "0" // (0-60) The amount of time before the match will start.
gts prematchperiod "15" // The amount of time before the game starts.
gts preroundperiod "5" // The amount of time before a round starts.
gts inactivityKick "120" // Kick players that's AFK
gts allowSpectating "1" // Allow players to spectate other players or CODcasting
gts spectateType "1" // 0 disabled, 1 team only, 2 freelook, 3 team only spectate splitscreen players only
gts allowInGameTeamChange "1" // Allow players to switch teams?
gts autoTeamBalance "1" // Automatically assign players to teams
gts allowFinalKillcam "1" // Controls whether the final killcam is played.
gts timelimit "10" // Time limit of the game.
gts scorelimit "75" // Score limit reach to end the game.
gts teamCount "2"
//gts teamScorePerDeath "0" // Points per Death - The number of points your team loses for each death. Points can never be lower than zero. (0-25)
//gts teamScorePerHeadshot "0" // Headshot Bonus Points - Extra points awarded if the kill is a headshot in addition to the points per kill. (0-25)
gts playerNumLives "0" // Number of Lives - The number of times each player can die before they are no longer allowed to respawn. (0-25)
gts loadoutKillstreaksEnabled "0" // Disable Killstreaks by setting this to 0
//gts perksEnabled "1" // Disable Perks by setting this to 0
gts disableVehicleSpawners "1" // This should disable robots from the DLC map Rupture by setting this to 1
//gts disableweapondrop "0" // No weapons on the ground.
//gts disallowprone "0" // Don't allow players to lay down.
//gts allowHitMarkers "2" // Rather or not to show hitmakers?
//gts allowAnnouncer "1" // Annouce enemy team actions
//Hardcore Mode
//gts hardcoreMode "1" // Enable hardcore mode.
//gts friendlyfiretype "1" // Enable or Disable Friendly Fire. 1 on, 2 reflect, 3 shared.
//gts playerHealthRegenTime "0" // Time it takes you to recover damage.
//gts playerMaxHealth "30" // Percent of Health players will have on Respawn.
//gts onlyHeadshots "0" // Headshots only
//gts allowKillcam "0" // Allow Killcam.
//gts allowbattlechatter "0" // Shut the fucking player dialogues up.
//gts teamKillPointLoss "1" // Points per Kill - The number of points for each kill. (0-25)
//gts teamKillPunishCount "3" // Kick constant Team killers out of your server.
gts gameAdvertisementRuleScorePercent "15"
gts gameAdvertisementRuleTimeLeft "2"
gts gameAdvertisementRuleRound "0"
gts gameAdvertisementRuleRoundsWon "0"
//Unsure about this. Maybe someone figure out what restricted items of each weapon is..Would be useful for other game modes..
//Please PR on Github if you have a list!
// SNIPER ONLY
// Unknown items restrictions
gts restrictedItems 0 1
gts restrictedItems 4 1
gts restrictedItems 5 1
gts restrictedItems 6 1
gts restrictedItems 9 1
gts restrictedItems 49 1
gts restrictedItems 55 1
gts restrictedItems 60 1
gts restrictedItems 69 1
gts restrictedItems 73 1
gts restrictedItems 79 1
gts restrictedItems 93 1
gts restrictedItems 100 1
gts restrictedItems 101 1
gts restrictedItems 102 1
gts restrictedItems 104 1
gts restrictedItems 106 1
gts restrictedItems 107 1
gts restrictedItems 131 1
gts restrictedItems 132 1
gts restrictedItems 133 1
gts restrictedItems 134 1
gts restrictedItems 135 1
gts restrictedItems 136 1
gts restrictedItems 137 1
gts restrictedItems 138 1
gts restrictedItems 139 1
gts restrictedItems 140 1
gts restrictedItems 141 1
gts restrictedItems 142 1
gts restrictedItems 143 1
gts restrictedItems 144 1
gts restrictedItems 145 1
gts restrictedItems 146 1
// Submachine guns restrictions
gts restrictedItems 10 1 // kuda
gts restrictedItems 11 1 // pharo
gts restrictedItems 12 1 // vesper
gts restrictedItems 13 1 // razorback
gts restrictedItems 14 1 // vmp
gts restrictedItems 15 1 // weevil
gts restrictedItems 16 1 // AK-74u
gts restrictedItems 17 1 // HG40
gts restrictedItems 18 1 // HLX4
gts restrictedItems 19 1 // nail gun
gts restrictedItems 34 1 // xmc
gts restrictedItems 38 1 // ppsh
gts restrictedItems 110 1 // sten
// Assault rifles restrictions
gts restrictedItems 7 1 // Peacekeeper MK2
gts restrictedItems 20 1 // kn-44
gts restrictedItems 21 1 // icr-1
gts restrictedItems 22 1 // hvk-30
gts restrictedItems 23 1 // man-o-war
gts restrictedItems 24 1 // xr-2
gts restrictedItems 25 1 // M8A7
gts restrictedItems 26 1 // sheiva
gts restrictedItems 27 1 // kvk99m
gts restrictedItems 28 1 // MX Garand
gts restrictedItems 29 1 // FFAR
gts restrictedItems 37 1 // M16
gts restrictedItems 36 1 // LV8 Basilisk
gts restrictedItems 126 1 // Galil
gts restrictedItems 129 1 // M14
// Machine guns restrictions
gts restrictedItems 30 1 // Dingo
gts restrictedItems 31 1 // Dredge
gts restrictedItems 32 1 // BRM
gts restrictedItems 33 1 // Gorgon
gts restrictedItems 35 1 // R70-Ajax
gts restrictedItems 128 1 // RPK
// Shotguns restrictions
gts restrictedItems 44 1 // Olympia
gts restrictedItems 50 1 // Haymaker
gts restrictedItems 51 1 // Argus
gts restrictedItems 52 1 // KRM-262
gts restrictedItems 53 1 // Brecci
gts restrictedItems 56 1 // Banshii
// Melee weapons restrictions
gts restrictedItems 67 1 // fury's song
gts restrictedItems 68 1 // Skull splitter
gts restrictedItems 77 1 // Baseball bat
gts restrictedItems 83 1 // Carver
gts restrictedItems 84 1 // Malice
gts restrictedItems 85 1 // Iron jim
gts restrictedItems 94 1 // Slash N' Burn
gts restrictedItems 95 1 // Brass knuckles
gts restrictedItems 96 1 // Butterfly knife
gts restrictedItems 97 1 // Wrench
gts restrictedItems 99 1 // Combat nife
gts restrictedItems 103 1 // Nightbreaker
gts restrictedItems 105 1 // Buzzcut
gts restrictedItems 108 1 // Enforcer
gts restrictedItems 109 1 // Nunchucks
gts restrictedItems 120 1 // Prizefighters
gts restrictedItems 121 1 // Katana
gts restrictedItems 122 1 // Ace of spades
gts restrictedItems 124 1 // L3FT.E
gts restrictedItems 125 1 // Bushwhacker
gts restrictedItems 147 1 // Raven's eye
// Special weapons restrictions
gts restrictedItems 54 1 // NX-Shadowclaw
gts restrictedItems 127 1 // Ballistic knife
gts restrictedItems 123 1 // D13-Sector
// Launchers restrictions
gts restrictedItems 39 1 // Max-GL
gts restrictedItems 57 1 // L4-Siege
gts restrictedItems 58 1 // XM53
gts restrictedItems 59 1 // Blackcell
// Pistols restrictions
gts restrictedItems 1 1 // MR6
gts restrictedItems 2 1 // RK5
gts restrictedItems 3 1 // L-CAR 9
gts restrictedItems 8 1 // Marshall 16
gts restrictedItems 47 1 // Rift-E9
gts restrictedItems 48 1 // 1911
// Lethal specialists restrictions
gts restrictedItems 111 1 // Scythe
gts restrictedItems 112 1 // Tempest
gts restrictedItems 113 1 // Gravity spikes
gts restrictedItems 114 1 // Ripper
gts restrictedItems 115 1 // Annihilator
gts restrictedItems 116 1 // War machine
gts restrictedItems 117 1 // Sparrow
gts restrictedItems 118 1 // HIVE
gts restrictedItems 119 1 // Purifier
// Lethal grenades restrictions
gts restrictedItems 61 1 // frag
gts restrictedItems 62 1 // combat axe
gts restrictedItems 63 1 // semtex
gts restrictedItems 64 1 // c4
gts restrictedItems 65 1 // trip mine
gts restrictedItems 66 1 // thermite
// Tactical grenades restrictions
gts restrictedItems 70 1 // smoke screen
gts restrictedItems 71 1 // concussion
gts restrictedItems 72 1 // emp
gts restrictedItems 74 1 // flash bang
gts restrictedItems 75 1 // shock charge
gts restrictedItems 76 1 // black hat
gts restrictedItems 78 1 // trophy system
// Sniper scope restrictions
gts restrictedattachments 32 weaponindex 40 1 // Locus
gts restrictedattachments 32 weaponindex 41 1 // Drakon
gts restrictedattachments 32 weaponindex 42 1 // SVG-100
gts restrictedattachments 32 weaponindex 43 1 // P0-6
gts restrictedattachments 32 weaponindex 45 1 // Interdiction-RSA
gts restrictedattachments 22 weaponindex 46 1 // DBSR -> 22 unknown scope id
gts restrictedattachments 32 weaponindex 46 1 // DBSR no elo sight
gts restrictedattachments 33 weaponindex 46 1 // DBSR -> 33 unknown scope id
gts restrictedattachments 32 weaponindex 98 1 // XPR-50
gts restrictedattachments 32 weaponindex 130 1 // Dragoon

View File

@ -0,0 +1,50 @@
//Don't touch the first 2 lines below here.
exec "gamedata/gamesettings/mp/gamesettings_default.cfg"
exec "gamedata/configs/common/default_xboxlive.cfg"
// Below this line you may uncomment the " // " commands and edit to your liking.
// If you unsure the default command. you can always " // " them back for later custom gameplay.
gts prematchrequirement "0" // (0-10) Number of players on each team or the total number of players before the pre-match countdown will start.
gts prematchrequirementtime "0" // (0-60) The amount of time before the match will start.
gts prematchperiod "15" // The amount of time before the game starts.
gts preroundperiod "5" // The amount of time before a round starts.
gts inactivityKick "120" // Kick players that's AFK
gts allowSpectating "1" // Allow players to spectate other players or CODcasting.
gts spectateType "1" // 0 disabled, 1 team only, 2 freelook, 3 team only spectate splitscreen players only
gts allowInGameTeamChange "1" // Allow players to switch teams?
gts autoTeamBalance "1" // Automatically assign players to teams
gts allowFinalKillcam "1" // Controls whether the final killcam is played.
gts timelimit "10" // Time limit of the game.
gts scorelimit "100" // Score limit reach to end the game.
gts teamCount "2"
gts roundLimit "1" // The number of rounds that will be played before the game ends.
//gts teamScorePerDeath "0" // Points per Death - The number of points your team loses for each death. Points can never be lower than zero. (0-25)
//gts teamScorePerHeadshot "0" // Headshot Bonus Points - Extra points awarded if the kill is a headshot in addition to the points per kill. (0-25)
//gts playerNumLives "0" // Number of Lives - The number of times each player can die before they are no longer allowed to respawn. (0-25)
//gts loadoutKillstreaksEnabled "1" // Disable Killstreaks by setting this to 0
//gts perksEnabled "1" // Disable Perks by setting this to 0
//gts disableVehicleSpawners "0" // This should disable robots from the DLC map Rupture by setting this to 1
//gts disableweapondrop "0" // No weapons on the ground.
//gts disallowprone "0" // Don't allow players to lay down.
//gts allowHitMarkers "2" // Rather or not to show hitmakers?
//gts allowAnnouncer "1" // Annouce enemy team actions
//Hardcore Mode
//gts hardcoreMode "1" // Enable hardcore mode.
//gts friendlyfiretype "1" // Enable or Disable Friendly Fire. 1 on, 2 reflect, 3 shared.
//gts playerHealthRegenTime "0" // Time it takes you to recover damage.
//gts playerMaxHealth "30" // Percent of Health players will have on Respawn.
//gts onlyHeadshots "0" // Headshots only
//gts allowKillcam "0" // Allow Killcam.
//gts allowbattlechatter "0" // Shut the fucking player dialogues up.
//gts teamKillPointLoss "1" // Points per Kill - The number of points for each kill. (0-25)
//gts teamKillPunishCount "3" // Kick constant Team killers out of your server.
gts gameAdvertisementRuleScorePercent "15"
gts gameAdvertisementRuleTimeLeft "2"
gts gameAdvertisementRuleRound "0"
gts gameAdvertisementRuleRoundsWon "0"

View File

@ -0,0 +1,104 @@
gametype_setting allowAnnouncer 1
gametype_setting allowBattleChatter 1
gametype_setting allowFinalKillcam 1
gametype_setting allowHitMarkers 2
gametype_setting allowInGameTeamChange 0
gametype_setting allowKillcam 1
gametype_setting allowSpectating 0
gametype_setting autoDestroyTime 0
gametype_setting autoTeamBalance 0
gametype_setting bombTimer 0
gametype_setting bulletDamageScalar 1.0
gametype_setting captureTime 10
gametype_setting crateCaptureTime 3
gametype_setting cumulativeRoundScores 0
gametype_setting deathPointLoss 0
gametype_setting defuseTime 0
gametype_setting delayPlayer 0
gametype_setting destroyTime 0
gametype_setting disableAmbientFx 0
gametype_setting disableAttachments 0
gametype_setting disableCAC 1
gametype_setting disableContracts 0
gametype_setting disableTacInsert 0
gametype_setting disableweapondrop 1
gametype_setting disallowaimslowdown 0
gametype_setting disallowprone 0
gametype_setting enemyCarrierVisible 0
gametype_setting extraTime 0
gametype_setting flagCaptureGracePeriod 0
gametype_setting flagDecayTime 0
gametype_setting flagRespawnTime 0
gametype_setting forceRadar 0
gametype_setting friendlyfiretype 0
gametype_setting hardcoremode 0
gametype_setting hotPotato 0
gametype_setting idleFlagDecay 0
gametype_setting idleFlagResetTime 0
gametype_setting inactivityKick 0
gametype_setting kothMode 0
gametype_setting leaderBonus 0
gametype_setting loadoutKillstreaksEnabled 1
gametype_setting maxObjectiveEventsPerMinute 0
gametype_setting maxPlayerDefensive 0
gametype_setting maxPlayerEventsPerMinute 0
gametype_setting maxPlayerOffensive 0
gametype_setting multiBomb 0
gametype_setting objectiveSpawnTime 0
gametype_setting onlyHeadshots 0
gametype_setting perksEnabled 0
gametype_setting plantTime 0
gametype_setting playerForceRespawn 1
gametype_setting playerHealthRegenTime 5
gametype_setting playerKillsMax 0
gametype_setting playerMaxHealth 100
gametype_setting playerNumlives 0
gametype_setting playerObjectiveHeldRespawnDelay 0
gametype_setting playerQueuedRespawn 0
gametype_setting playerRespawnDelay 0
gametype_setting playerSprintTime 4
gametype_setting pregameAlwaysShowCACEdit 1
gametype_setting pregameAlwaysShowStreakEdit 1
gametype_setting pregameCACModifyTime 0
gametype_setting pregameDraftEnabled 0
gametype_setting pregameDraftRoundTime 0
gametype_setting pregameItemMaxVotes 0
gametype_setting pregameItemVoteEnabled 0
gametype_setting pregameItemVoteRoundTime 0
gametype_setting pregamePositionShuffleMethod 0
gametype_setting pregamePositionSortType 0
gametype_setting pregamePostRoundTime 0
gametype_setting pregamePostStageTime 0
gametype_setting pregamePreStageTime 0
gametype_setting pregameScorestreakModifyTime 0
gametype_setting randomObjectiveLocations 0
gametype_setting roundlimit 1
gametype_setting roundStartExplosiveDelay 5
gametype_setting roundStartKillstreakDelay 0
gametype_setting roundswitch 1 // rounds between switching teams
gametype_setting roundwinlimit 0
gametype_setting scoreHeroPowerGainFactor 1.0
gametype_setting scoreHeroPowerTimeFactor 1.0
gametype_setting scorelimit 100
gametype_setting spectateType 1
gametype_setting teamCount 1
gametype_setting teamKillPenalty 2
gametype_setting teamKillPointLoss 0
gametype_setting teamKillPunishCount 3
gametype_setting teamKillReducedPenalty 0.25
gametype_setting teamKillScore 4
gametype_setting teamKillSpawnDelay 20
gametype_setting timelimit 10
gametype_setting totalKillsMax 0
gametype_setting vehiclesEnabled 1
gametype_setting vehiclesTimed 1
gametype_setting voipDeadChatWithDead 0
gametype_setting voipDeadChatWithTeam 1
gametype_setting voipDeadHearAllLiving 0
gametype_setting voipDeadHearKiller 0
gametype_setting voipDeadHearTeamLiving 1
gametype_setting voipEveryoneHearsEveryone 0
gametype_setting voipKillersHearVictim 1
gametype_setting waverespawndelay 0
gametype_setting zmDifficulty 1

View File

@ -0,0 +1,12 @@
gametype_setting scorelimit 7500
gametype_setting timelimit 10
gametype_setting roundlimit 1
gametype_setting playerNumlives 0
gametype_setting playerrespawndelay 0
gametype_setting waverespawndelay 0
gametype_setting disableweapondrop 1
gametype_setting allowAnnouncer 0
gametype_setting startRound 1
gametype_setting magic 1
gametype_setting headshotsonly 0
gametype_setting allowdogs 1

View File

@ -0,0 +1,71 @@
Lobby.Process.CreateDedicatedModsLobby = function (controller, toTarget)
local lobby_mode = Engine.DvarString( nil, "sv_lobby_mode" )
if lobby_mode ~= "" then
if lobby_mode == "zm" then
toTarget = LobbyData.UITargets.UI_ZMLOBBYONLINECUSTOMGAME
elseif lobby_mode == "cp" then
toTarget = LobbyData.UITargets.UI_CPLOBBYONLINECUSTOMGAME
elseif lobby_mode == "cpzm" then
toTarget = LobbyData.UITargets.UI_CP2LOBBYONLINECUSTOMGAME
elseif lobby_mode == "fr" then
toTarget = LobbyData.UITargets.UI_FRLOBBYONLINEGAME
toTarget.maxClients = Engine.DvarInt( nil, "com_maxclients" )
elseif lobby_mode == "doa" then
toTarget = LobbyData.UITargets.UI_DOALOBBYONLINE
elseif lobby_mode == "mp" then
toTarget = LobbyData.UITargets.UI_MPLOBBYONLINEMODGAME
elseif lobby_mode == "arena" then
toTarget = LobbyData.UITargets.UI_MPLOBBYONLINEARENAGAME
end
end
local playlistID = Dvar.sv_playlist
Engine.SetPlaylistID(playlistID:get())
local lobbyInit = Lobby.Actions.ExecuteScript(function ()
Lobby.ProcessNavigate.SetupLobbyMapAndGameType(controller, toTarget)
end)
local setNetworkMode = Lobby.Actions.SetNetworkMode(controller, Enum.LobbyNetworkMode.LOBBY_NETWORKMODE_LIVE)
local lobbySettings = Lobby.Actions.LobbySettings(controller, toTarget)
local updateUI = Lobby.Actions.UpdateUI(controller, toTarget)
local createGameHost = Lobby.Actions.LobbyHostStart(controller, toTarget.mainMode, toTarget.lobbyType, toTarget.lobbyMode, toTarget.maxClients)
local lobbyAdvertise = Lobby.Actions.AdvertiseLobby(true)
local hostingEvent = Lobby.Actions.ExecuteScript(function ()
Engine.QoSProbeListenerEnable(toTarget.lobbyType, true)
Engine.SetDvar("live_dedicatedReady", 1)
Engine.RunPlaylistRules(controller)
Engine.RunPlaylistSettings(controller)
Lobby.Timer.HostingLobby({controller = controller, lobbyType = toTarget.lobbyType, mainMode = toTarget.mainMode, lobbyTimerType = toTarget.lobbyTimerType})
if Engine.DvarInt( nil, "sv_skip_lobby" ) == 1 then
-- Engine.ComError( Enum.errorCode.ERROR_SCRIPT, "Using sv_skip_lobby" )
local map_rotation_string = Engine.DvarString( nil, "sv_maprotation" )
if map_rotation_string ~= "" then
local map_rotation_tokens = split_string( map_rotation_string, " " )
if map_rotation_tokens[ 1 ] == "gametype" then
Engine.Exec(0, "lobby_setgametype " .. map_rotation_tokens[ 2 ] )
-- Engine.ComError( Enum.errorCode.ERROR_SCRIPT, "Set gametype to " .. map_rotation_tokens[ 2 ] .. " based on map rotation" )
if map_rotation_tokens[ 3 ] == "map" then
Engine.Exec(0, "lobby_setmap " .. map_rotation_tokens[ 4 ] )
-- Engine.ComError( Enum.errorCode.ERROR_SCRIPT, "Set map to " .. map_rotation_tokens[ 4 ] .. " based on map rotation" )
end
end
end
Engine.Exec(0, "launchgame")
end
end)
Lobby.Process.AddActions(setNetworkMode, lobbySettings)
Lobby.Process.AddActions(lobbySettings, lobbyInit)
Lobby.Process.AddActions(lobbyInit, updateUI)
Lobby.Process.AddActions(updateUI, createGameHost)
Lobby.Process.AddActions(createGameHost, lobbyAdvertise)
Lobby.Process.AddActions(lobbyAdvertise, hostingEvent)
Lobby.Process.AddActions(hostingEvent, nil)
return {head = setNetworkMode, interrupt = Lobby.Interrupt.NONE, force = true, cancellable = true}
end
function split_string(str, delimiter)
local tokens = {}
local pattern = string.format("([^%s]+)", delimiter)
for token in string.gmatch(str, pattern) do
table.insert(tokens, token)
end
return tokens
end

View File

@ -0,0 +1 @@
{"playerName":"Unknown Soldier"}

View File

@ -0,0 +1,141 @@
//////////////////////////////////////////////////
/// T7x Server Configuration //
//////////////////////////////////////////////////
//////////////////////////////////////////////////
// SERVER NAME & COLORS TIPS //
//////////////////////////////////////////////////
// //
// ^1 Red //
// ^2 Green //
// ^3 Yellow //
// ^4 Blue //
// ^5 Cyan //
// ^6 Pink //
// ^7 White //
// ^8 Depends on the team colors playing. //
// ^9 Orange //
// ^0 Black //
// //
//////////////////////////////////////////////////
set live_steam_server_name "Default T7x Server" // Sets the server hostname.
set live_steam_server_description "My longest YEA T7x ever" // Sets a server description visible on the serverlist
//////////////////////////////////////////////////
// NON-GAMEPLAY CONFIGURATION //
//////////////////////////////////////////////////
set com_maxclients "18" // Max players in your server.
set rcon_password "" // Access to your server to change stuff remotely or ingame. (Empty = disabled)
set g_password "" // Password Protected Server. Leave blank if you want players to join or set password if you want to keep public out.
set sv_privateClients "0" // Maximum number of private clients allowed on the server (range 0-18 (clamped to sv_maxclients) )
set sv_timeout "30" // Timeout time period. You will timeout after (30) seconds when attempting to connect or if you are getting connection interruptions
set sv_reconnectlimit "3" // How many times you can try to reconnect
set sv_pure "0" // verifying cilent files
set sv_floodProtect "1" // Chat Spam Protection
set g_log "t7x/games_mp.log" // Gamelog filename. If you edit this, Make sure you change B3.xml if you have bigbrotherbot.
set sv_lobby_mode "mp" // Sets the lobby type to multiplayer.
set sv_skip_lobby "1" // Makes the server load the map immediately instead of waiting at the lobby. Turn this off if you want to use playlists instead(currently required for custom maps).
set sv_lanonly "0" // Keep your server from bordcasting to the public list and Local LAN only.
//////////////////////////////////////////////////
// BOT CONFIGURATION //
//////////////////////////////////////////////////
set bot_maxallies "0" // Amount of Bots on the Friendly Team
set bot_maxAxis "0" // Amount of Bots on the Enemy Team
set bot_maxFree "0" // Bots free-for-all based modes? Untested.
set bot_difficulty "1" // Bot Skill. (0 - Easy, 1 - Normal, 2 - Hard, 3 - Veteran)
//////////////////////////////////////////////////
// BASE GAME CONFIGURATION //
//////////////////////////////////////////////////
// //
// dm - Free-for-all //
// tdm - Team Deathmatch //
// ball - Uplink //
// sd - Search and Destroy //
// sr - Search and Rescue //
// dom - Domination //
// dem - Demolition //
// conf - Kill Confirmed //
// ctf - Capture the Flag //
// shrp - Sharpshooter //
// gun - GunGame //
// sas - Sticks and Stones //
// koth - Hardpoint //
// escort - Safeguard //
// clean - Fracture //
// prop - Prop Hunt //
// infect - Infected //
// sniperonly - Snipers Only //
// //
//////////////////////////////////////////////////
exec "gamedata/gamesettings/mp/gamesettings_tdm.cfg" // Change this to the gametype config of the mode you want to run (e.g. ../gamesettings_conf.cfg, ../gamesettings_escort.cfg)
//set gametype "tdm" // Set the gametype in the map rotation for now
set scr_teambalance "1" // Enable or Disable auto balance.
set cg_thirdPerson "0" // third-person mode
set g_deadChat "0" // Dead Players' Chat Messages can be seen by everyone
/////////////////////////////////////////////////////
// MAP SHORT NAMES ROTATION LIST //
/////////////////////////////////////////////////////
// //
// * - Maps that support Prop Hunt //
// //
///////////Base Maps/////////////////////////////////
// //
// Aquarium* - mp_biodome //
// Breach - mp_spire //
// Combine* - mp_sector //
// Evac* - mp_apartments //
// Exodus* - mp_chinatown //
// Fringe* - mp_veiled //
// Havoc - mp_havoc //
// Hunted* - mp_ethiopia //
// Infection* - mp_infection //
// Metro - mp_metro //
// Redwood* - mp_redwood //
// Stronghold - mp_stronghold //
// Nuk3town* - mp_nuketown_x //
// //
///////////Awakening DLC/////////////////////////////
// //
// Gauntlet - mp_crucible //
// Rise - mp_rise //
// Skyjacked - mp_skyjacked //
// Splash - mp_waterpark //
// //
///////////Eclipse DLC///////////////////////////////
// //
// Knockout - mp_kung_fu //
// Rift - mp_conduit //
// Spire* - mp_aerospace //
// Verge - mp_banzai //
// //
///////////Descent DLC///////////////////////////////
// //
// Berserk - mp_shrine //
// Cryogen - mp_cryogen //
// Empire - mp_rome //
// Rumble - mp_arena //
// //
///////////Salvation DLC/////////////////////////////
// //
// Citadel - mp_ruins //
// Micro - mp_miniature //
// Outlaw - mp_western //
// Rupture - mp_city //
// //
///////////Bonus Maps////////////////////////////////
// //
// Fringe Night - mp_veiled_heyday //
// Redwood Snow - mp_redwood_ice //
// //
/////////////////////////////////////////////////////
set sv_maprotation "gametype tdm map mp_biodome map mp_spire map mp_sector map mp_apartments map mp_chinatown map mp_veiled map mp_havoc map mp_ethiopia map mp_infection map mp_metro map mp_redwood map mp_stronghold map mp_nuketown_x map mp_shrine map mp_ruins map mp_cryogen map mp_rome map mp_crucible map mp_kung_fu map mp_miniature map mp_western map mp_conduit map mp_rise map mp_arena map mp_city map mp_skyjacked map mp_aerospace map mp_waterpark map mp_banzai map mp_veiled_heyday map mp_redwood_ice"

View File

@ -0,0 +1,80 @@
//////////////////////////////////////////////////
/// T7x Server Configuration //
//////////////////////////////////////////////////
//////////////////////////////////////////////////
// SERVER NAME & COLORS TIPS //
//////////////////////////////////////////////////
// //
// ^1 Red //
// ^2 Green //
// ^3 Yellow //
// ^4 Blue //
// ^5 Cyan //
// ^6 Pink //
// ^7 White //
// ^8 Depends on the team colors playing. //
// ^9 Orange //
// ^0 Black //
// //
//////////////////////////////////////////////////
set live_steam_server_name "Default T7x Campaign Server" // Sets the server hostname.
set live_steam_server_description "My longest YEA T7x CAMPAIGN ever" // Sets a server description visible on the serverlist
//////////////////////////////////////////////////
// NON-GAMEPLAY CONFIGURATION //
//////////////////////////////////////////////////
set com_maxclients "4" // Max players in your server.
set lobby_min_players "1" // Minimum amount of players for the Match to start.
set rcon_password "" // Access to your server to change stuff remotely or ingame. (Empty = disabled)
set g_password "" // Password Protected Server. Leave blank if you want players to join or set password if you want to keep public out.
set sv_privateClients "0" // Maximum number of private clients allowed on the server (range 0-18 (clamped to sv_maxclients) )
set sv_timeout "30" // Timeout time period. You will timeout after (30) seconds when attempting to connect or if you are getting connection interruptions
set sv_reconnectlimit "3" // How many times you can try to reconnect
set sv_pure "0" // verifying cilent files
set sv_floodProtect "1" // Chat Spam Protection
set g_log "t7x/games_cp.log" // Gamelog filename. If you edit this, Make sure you change B3.xml if you have bigbrotherbot.
set sv_lobby_mode "cp" // Sets the lobby type to camapaign
set sv_skip_lobby "1" // Makes the server load the map immediately instead of waiting at the lobby. Turn this off if you want to use playlists instead(currently required for custom maps).
set sv_lanonly "0" // Keep your server from bordcasting to the public list and Local LAN only.
//////////////////////////////////////////////////
// BASE GAME CONFIGURATION //
//////////////////////////////////////////////////
exec "gamedata/gamesettings/cp/gamesettings_default.cfg" // Leave this as is
exec "gamedata/configs/common/default_xboxlive.cfg" // Leave this as is
exec "gamedata/gamesettings/cp/gamesettings_coop.cfg" // Leave this as is
set cg_thirdPerson "0" // third-person mode
set g_deadChat "0" // Dead Players' Chat Messages can be seen by everyone
//////////////////////////////////////////////////////////////
// MAP SHORT NAMES ROTATION LIST //
//////////////////////////////////////////////////////////////
// //
///////Safehouses/////////////////////////////////////////////
// //
// Mobile - cp_sh_mobile //
// Singapore - cp_sh_singapore //
// Cairo - cp_sh_cairo //
// //
///////Missions///////////////////////////////////////////////
// //
// Black Ops - cp_mi_eth_prologue //
// New World - cp_mi_zurich_newworld //
// In Darkness - cp_mi_sing_blackstation //
// Provocation - cp_mi_sing_biodomes //
// Hypocenter - cp_mi_sing_sgen //
// Vengeance - cp_mi_sing_vengeance //
// Rise & Fall - cp_mi_cairo_ramses //
// Demon Within - cp_mi_cairo_infection //
// Sand Castle - cp_mi_cairo_aquifer //
// Lotus Towers - cp_mi_cairo_lotus //
// Life - cp_mi_zurich_coalescence //
// //
//////////////////////////////////////////////////////////////
set sv_maprotation "gametype coop map cp_mi_eth_prologue"

View File

@ -0,0 +1,93 @@
//////////////////////////////////////////////////
/// T7x Server Configuration //
//////////////////////////////////////////////////
//////////////////////////////////////////////////
// SERVER NAME & COLORS TIPS //
//////////////////////////////////////////////////
// //
// ^1 Red //
// ^2 Green //
// ^3 Yellow //
// ^4 Blue //
// ^5 Cyan //
// ^6 Pink //
// ^7 White //
// ^8 Depends on the team colors playing. //
// ^9 Orange //
// ^0 Black //
// //
//////////////////////////////////////////////////
set live_steam_server_name "Default T7x Zombies Server" // Sets the server hostname.
set live_steam_server_description "My longest YEA T7x ZOMBIES ever" // Sets a server description visible on the serverlist
//////////////////////////////////////////////////
// NON-GAMEPLAY CONFIGURATION //
//////////////////////////////////////////////////
set com_maxclients "4" // Max players in your server.
set lobby_min_players "1" // Minimum amount of players for the Match to start.
set rcon_password "" // Access to your server to change stuff remotely or ingame. (Empty = disabled)
set g_password "" // Password Protected Server. Leave blank if you want players to join or set password if you want to keep public out.
set sv_privateClients "0" // Maximum number of private clients allowed on the server (range 0-18 (clamped to sv_maxclients) )
set sv_timeout "30" // Timeout time period. You will timeout after (30) seconds when attempting to connect or if you are getting connection interruptions
set sv_reconnectlimit "3" // How many times you can try to reconnect
set sv_pure "0" // verifying cilent files
set sv_floodProtect "1" // Chat Spam Protection
set g_log "t7x/games_zm.log" // Gamelog filename. If you edit this, Make sure you change B3.xml if you have bigbrotherbot.
set sv_lobby_mode "zm" // Sets the lobby type to zombies
set sv_skip_lobby "1" // Makes the server load the map immediately instead of waiting at the lobby. Turn this off if you want to use playlists instead(currently required for custom maps).
set sv_lanonly "0" // Keep your server from bordcasting to the public list and Local LAN only.
//////////////////////////////////////////////////
// BASE GAME CONFIGURATION //
//////////////////////////////////////////////////
exec "gamedata/gamesettings/zm/gamesettings_default.cfg" // Leave this as is
exec "gamedata/configs/common/default_xboxlive.cfg" // Leave this as is
exec "gamedata/gamesettings/zm/gamesettings_zclassic.cfg" // Leave this as is
set cg_thirdPerson "0" // third-person mode
set g_deadChat "0" // Dead Players' Chat Messages can be seen by everyone
set scr_firstGumFree "1" // Price of first Gobblegum (1 = free, 0 = 500)
///////////////////////////////////////////////////
// MAP SHORT NAMES ROTATION LIST //
///////////////////////////////////////////////////
// //
/////////Base Maps/////////////////////////////////
// //
// Shadows of Evil - zm_zod //
// //
/////////Awakening DLC/////////////////////////////
// //
// Der Eisendrache - zm_castle //
// //
/////////Eclipse DLC///////////////////////////////
// //
// Zetsubou No Shima - zm_island //
// //
/////////Descent DLC///////////////////////////////
// //
// Gorod Krovi - zm_stalingrad //
// //
/////////Salvation DLC/////////////////////////////
// //
// Revelations - zm_genesis //
// //
/////////Zombies Chronicles DLC////////////////////
// //
// Ascension - zm_cosmodrome //
// Kino der Toten - zm_theater //
// Moon - zm_moon //
// Nacht der Untoten - zm_prototype //
// Origins - zm_tomb //
// Shangri-La - zm_temple //
// Shi No Numa - zm_sumpf //
// The Giant - zm_factory //
// Verrückt - zm_asylum //
// //
///////////////////////////////////////////////////
set sv_maprotation "gametype zclassic map zm_tomb"

View File

@ -0,0 +1,26 @@
gametype_setting timelimit 5
gametype_setting scorelimit 0
gametype_setting roundscorelimit 1
gametype_setting roundwinlimit 2
gametype_setting roundlimit 2
gametype_setting preroundperiod 10
gametype_setting teamCount 2
gametype_setting shutdownDamage 3
gametype_setting bootTime 5
gametype_setting rebootTime 15
gametype_setting rebootPlayers 0
gametype_setting movePlayers 1
gametype_setting robotSpeed 1
gametype_setting robotShield 0
gametype_setting scoreHeroPowerGainFactor 0.788 //Score earned towards Hero Weapons and Abilities are multiplied by this factor
gametype_setting scoreHeroPowerTimeFactor 0.788
gametype_setting spawntraptriggertime 5
gametype_setting disableVehicleSpawners 1
gametype_setting gameAdvertisementRuleTimeLeft 3.5
gametype_setting gameAdvertisementRuleRound 3

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -0,0 +1,144 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>T7x</title>
<style>
* {
user-select: none;
-ms-user-select: none;
cursor: default;
box-sizing: border-box;
}
html,
body {
-ms-overflow-style: none;
margin: 0;
padding: 0;
font-family: "Segoe UI Light", "Segoe UI", "Lucida Sans", Arial,
sans-serif;
font-style: normal;
font-weight: lighter;
display: flex;
min-height: 100vh;
flex-direction: column;
background: black;
}
body {
background: transparent;
}
.background-container {
inset: 0;
position: fixed;
z-index: -1;
}
.background-container:before {
background: #000;
background: url(./bigboiii.jpg);
background-position: 50%;
background-repeat: no-repeat;
background-size: cover;
content: "";
height: 100%;
opacity: 0.25;
position: fixed;
top: 0;
width: 100%;
}
.background-container:after {
background-image: url(./noise.jpg);
background-repeat: repeat;
content: "";
height: 100%;
mix-blend-mode: overlay;
opacity: 0.025;
position: fixed;
top: 0;
width: 100%;
}
body {
height: 100%;
width: 100%;
}
.content {
width: 100%;
text-align: center;
padding-top: 30px;
}
div.button {
margin: 5px 10px;
display: inline-block;
border: 1px solid #44413f;
color: rgba(244, 240, 235, 0.776);
cursor: pointer;
background-color: rgb(42, 40, 39);
width: 120px;
text-align: center;
padding: 0.5rem;
border-radius: 0.5rem;
transition: all 0.1s linear;
font-size: 1rem;
font-weight: normal;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
}
div.button:hover {
background-color: rgb(48, 45, 44);
border: 1px solid #4a4745;
}
h1,
h1 * {
font-size: 3rem;
font-weight: bold;
color: white;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
}
</style>
</head>
<body>
<div class="background-container"></div>
<div class="content">
<h1>
<span style="color: #f97316">T</span
><span style="color: #ec511c">7</span
><span style="color: #e53f21">x</span>
</h1>
<div class="button" onclick="window.external.runGame()">Play</div>
<div class="button" onclick="window.external.openUrl('https://bo3.eu')">
About
</div>
</div>
<script>
window.onload = function () {};
document.onkeydown = fkey;
document.onkeypress = fkey;
document.onkeyup = fkey;
function fkey(e) {
e = e || window.event;
location.reload();
}
</script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,854 @@
#using scripts\shared\array_shared;
#using scripts\shared\rank_shared;
#insert scripts\shared\shared.gsh;
#insert scripts\shared\statstable_shared.gsh;
#using scripts\mp\killstreaks\_killstreaks;
#using scripts\mp\bots\_bot;
#define BOT_ALLOCATION_MAX 100
#define BOT_ALLOCATION_UNLOCK_MAX 3
#define BOT_RANK_ALL_OPTIONS_AVAILABLE 20
#define BOT_RANK_OPTIONS_MULTIPLIER 4
#namespace bot_loadout;
// Item Whitelist
//========================================
function in_whitelist( itemName )
{
if ( !isdefined( itemName ) )
return false;
switch( itemName )
{
// Secondaries
case "WEAPON_KNIFE_LOADOUT":
case "WEAPON_PISTOL_STANDARD":
case "WEAPON_PISTOL_BURST":
case "WEAPON_PISTOL_FULLAUTO":
case "WEAPON_LAUNCHER_STANDARD":
case "WEAPON_LAUNCHER_LOCKONLY":
// Primaries
case "WEAPON_SMG_STANDARD":
case "WEAPON_SMG_BURST":
case "WEAPON_SMG_FASTFIRE":
case "WEAPON_SMG_LONGRANGE":
case "WEAPON_SMG_VERSATILE":
case "WEAPON_SMG_CAPACITY":
case "WEAPON_AR_STANDARD":
case "WEAPON_AR_ACCURATE":
case "WEAPON_AR_CQB":
case "WEAPON_AR_DAMAGE":
case "WEAPON_AR_FASTBURST":
case "WEAPON_AR_LONGBURST":
case "WEAPON_AR_MARKSMAN":
case "WEAPON_LMG_CQB":
case "WEAPON_LMG_HEAVY":
case "WEAPON_LMG_LIGHT":
case "WEAPON_LMG_SLOWFIRE":
case "WEAPON_SNIPER_FASTBOLT":
case "WEAPON_SNIPER_FASTSEMI":
case "WEAPON_SNIPER_POWERBOLT":
case "WEAPON_SNIPER_CHARGESHOT":
case "WEAPON_SHOTGUN_FULLAUTO":
case "WEAPON_SHOTGUN_PRECISION":
case "WEAPON_SHOTGUN_PUMP":
case "WEAPON_SHOTGUN_SEMIAUTO":
// Lethals
case "WEAPON_FRAGGRENADE":
case "WEAPON_HATCHET":
case "WEAPON_STICKY_GRENADE":
case "WEAPON_SATCHEL_CHARGE":
case "WEAPON_BOUNCINGBETTY":
case "WEAPON_INCENDIARY_GRENADE":
// Tacticals
case "WEAPON_WILLY_PETE":
case "WEAPON_STUN_GRENADE":
case "WEAPON_EMPGRENADE":
case "WEAPON_FLASHBANG":
case "WEAPON_PROXIMITY_GRENADE":
case "WEAPON_PDA_HACK":
case "WEAPON_TROPHY_SYSTEM":
// Killstreaks
//case "KILLSTREAK_RCBOMB":
case "KILLSTREAK_RECON":
case "KILLSTREAK_COUNTER_UAV":
//case "KILLSTREAK_SUPPLY_DROP":
//case "KILLSTREAK_MICROWAVE_TURRET":
case "KILLSTREAK_REMOTE_MISSILE":
//case "KILLSTREAK_PLANEMORTAR":
//case "KILLSTREAK_AUTO_TURRET":
case "KILLSTREAK_AI_TANK_DROP":
//case "KILLSTREAK_HELICOPTER_COMLINK":
case "KILLSTREAK_SATELLITE":
//case "KILLSTREAK_EMP":
//case "KILLSTREAK_HELICOPTER_GUNNER":
case "KILLSTREAK_RAPS":
//case "KILLSTREAK_DRONE_STRIKE":
//case "KILLSTREAK_DART":
case "KILLSTREAK_SENTINEL":
// TU Something Weapons
case "WEAPON_MELEE_KNUCKLES":
case "WEAPON_MELEE_BUTTERFLY":
case "WEAPON_MELEE_WRENCH":
// TU 6 Weapons
case "WEAPON_PISTOL_SHOTGUN":
case "WEAPON_AR_GARAND":
case "WEAPON_SPECIAL_CROSSBOW":
case "WEAPON_MELEE_CROWBAR":
case "WEAPON_MELEE_SWORD":
case "WEAPON_MELEE_BOXING":
case "WEAPON_SMG_AK74U":
case "WEAPON_SMG_MP40":
case "WEAPON_SMG_RECHAMBER":
case "WEAPON_SMG_NAILGUN":
case "WEAPON_AR_AN94":
case "WEAPON_AR_FAMAS":
case "WEAPON_SMG_MSMC":
case "WEAPON_LMG_INFINITE":
case "WEAPON_AR_PULSE":
case "WEAPON_AR_M16":
case "WEAPON_SMG_PPSH":
case "WEAPON_LAUNCHER_EX41":
case "WEAPON_SHOTGUN_OLYMPIA":
case "WEAPON_SNIPER_QUICKSCOPE":
case "WEAPON_SNIPER_DOUBLE":
case "WEAPON_SMG_STEN":
case "WEAPON_AR_GALIL":
case "WEAPON_LMG_RPK":
case "WEAPON_AR_M14":
case "WEAPON_SHOTGUN_ENERGY":
case "WEAPON_SPECIAL_CROSSBOW_DW":
case "WEAPON_AR_PEACEKEEPER":
case "WEAPON_MELEE_CHAINSAW":
case "WEAPON_SPECIAL_KNIFE_BALLISTIC":
case "WEAPON_MELEE_CRESCENT":
case "WEAPON_SPECIAL_DISCGUN":
return true;
}
return false;
}
// Classes
//========================================
function build_classes()
{
primaryWeapons = self get_available_items( undefined, "primary" );
secondaryWeapons = self get_available_items( undefined, "secondary" );
lethals = self get_available_items( undefined, "primarygadget" );
tacticals = self get_available_items( undefined, "secondarygadget" );
if ( IS_TRUE( level.perksEnabled ) )
{
specialties1 = self get_available_items( undefined, "specialty1" );
specialties2 = self get_available_items( undefined, "specialty2" );
specialties3 = self get_available_items( undefined, "specialty3" );
}
foreach( className, classValue in level.classMap )
{
if ( !isSubstr( className, "custom" ) )
{
continue;
}
classIndex = int( className[className.size-1] );
pickedItems = [];
pick_item( pickedItems, primaryWeapons );
if ( RandomInt( 100 ) < 95 ) // 5% chance to be a boxer for Scronce
{
pick_item( pickedItems, secondaryWeapons );
}
// Shuffle these selections around a bit so the classes don't all look the same when the allocation is low
otherItems = Array ( lethals, tacticals, specialties1, specialties2, specialties3 );
otherItems = array::randomize( otherItems );
for ( i = 0; i < otherItems.size; i ++ )
{
pick_item( pickedItems, otherItems[i] );
}
// Add items up to the max allocation
for ( i = 0; i < pickedItems.size && i < level.maxAllocation; i++ )
{
self BotClassAddItem( classIndex, pickedItems[i] );
}
// TODO: Pick primary/secondary attachments, extra perks, extra lethal, extra tactical, overkill
/*
primaryWeapon = self GetLoadoutWeapon( classIndex, "primary" );
if ( primaryWeapon != level.weaponNone && primaryWeapon.supportedAttachments.size )
{
attachment = array::random( primaryWeapon.supportedAttachments );
self BotClassAddAttachment( classIndex, primaryWeapon, attachment, "primary" );
}
secondaryWeapon = self GetLoadoutWeapon( classIndex, "secondary" );
if ( secondaryWeapon != level.weaponNone && secondaryWeapon.supportedAttachments.size )
{
attachment = array::random( secondaryWeapon.supportedAttachments );
self BotClassAddAttachment( classIndex, secondaryWeapon, attachment, "secondary" );
}
*/
}
}
function pick_item( &pickedItems, items )
{
if ( !isdefined( items ) || items.size <= 0 )
{
return;
}
pickedItems[pickedItems.size] = array::random( items );
}
function pick_classes()
{
self.loadoutClasses = [];
self.launcherClassCount = 0;
foreach( className, classValue in level.classMap )
{
if ( isSubstr( className, "custom" ) )
{
if ( level.disableCAC )
{
continue;
}
classIndex = int( className[className.size-1] );
}
else
{
// Things bots could use better in the default classes:
// C4, Trophy System, Lock on only launcher
classIndex = level.classToClassNum[ classValue ];
}
primary = self GetLoadoutWeapon( classIndex, "primary" );
secondary = self GetLoadoutWeapon( classIndex, "secondary" );
botClass = SpawnStruct();
botClass.name = className;
botClass.index = classIndex;
botClass.value = classValue;
botClass.primary = primary;
botClass.secondary = secondary;
if ( botClass.secondary.isRocketLauncher )
{
self.launcherClassCount++;
}
self.loadoutClasses[ self.loadoutClasses.size ] = botClass;
}
}
function get_current_class()
{
currValue = self.pers["class"];
if ( !isdefined( currValue ) )
{
return undefined;
}
foreach( botClass in self.loadoutClasses )
{
if ( botClass.value == currValue )
{
return botClass;
}
}
return undefined;
}
// Specialists
//========================================
function pick_hero_gadget()
{
if ( RandomInt( 2 ) < 1 || !self pick_hero_ability() )
{
self pick_hero_weapon();
}
}
function pick_hero_weapon()
{
heroWeaponRef = self GetHeroWeaponName();
if ( IsItemRestricted( heroWeaponRef ) )
{
return false;
}
heroWeaponName = self get_item_name( heroWeaponRef );
self BotClassAddItem( 0, heroWeaponName );
return true;
}
function pick_hero_ability()
{
heroAbilityRef = self GetHeroAbilityName();
if ( IsItemRestricted( heroAbilityRef ) )
{
return false;
}
heroAbilityName = self get_item_name( heroAbilityRef );
self BotClassAddItem( 0, heroAbilityName );
return true;
}
// Killstreaks
//========================================
function pick_killstreaks()
{
killstreaks = array::randomize( self get_available_items( "killstreak" ) );
for( i = 0; i < 3 && i < killstreaks.size; i++ )
{
self BotClassAddItem( 0, killstreaks[i] );
}
}
// Get Items
//========================================
function get_available_items( filterGroup, filterSlot )
{
// Get unlocked and unrestricted items
items = [];
for( i = 0; i < STATS_TABLE_MAX_ITEMS; i++ )
{
row = tableLookupRowNum( level.statsTableID, STATS_TABLE_COL_NUMBERING, i );
if ( row < 0 )
{
continue;
}
name = tableLookupColumnForRow( level.statsTableID, row, STATS_TABLE_COL_NAME );
if ( name == "" || !in_whitelist( name ) )
{
continue;
}
allocation = Int( tableLookupColumnForRow( level.statsTableID, row, STATS_TABLE_COL_ALLOCATION ) );
if ( allocation < 0 )
{
continue;
}
ref = tableLookupColumnForRow( level.statsTableId, row, STATS_TABLE_COL_REFERENCE );
if ( IsItemRestricted( ref ) )
{
continue;
}
number = Int( tableLookupColumnForRow( level.statsTableID, row, STATS_TABLE_COL_NUMBERING ) );
/*
if ( SessionModeIsPrivate() && self IsItemLocked( number ) )
{
continue;
}
*/
if ( isdefined( filterGroup ) )
{
group = tableLookupColumnForRow( level.statsTableID, row, STATS_TABLE_COL_GROUP );
if ( group != filterGroup )
{
continue;
}
}
if ( isdefined( filterSlot ) )
{
slot = tableLookupColumnForRow( level.statsTableID, row, STATS_TABLE_COL_SLOT );
if ( slot != filterSlot )
{
continue;
}
}
items[items.size] = name;
}
return items;
}
function get_item_name( itemReference )
{
for( i = 0; i < STATS_TABLE_MAX_ITEMS; i++ )
{
row = tableLookupRowNum( level.statsTableID, STATS_TABLE_COL_NUMBERING, i );
if ( row < 0 )
{
continue;
}
reference = tableLookupColumnForRow( level.statsTableID, row, STATS_TABLE_COL_REFERENCE );
if ( reference != itemReference )
{
continue;
}
name = tableLookupColumnForRow( level.statsTableID, row, STATS_TABLE_COL_NAME );
return name;
}
return undefined;
}
// Not in use
function init()
{
level endon( "game_ended" );
level.bot_banned_killstreaks = Array ( "KILLSTREAK_RCBOMB",
"KILLSTREAK_QRDRONE",
/* "KILLSTREAK_REMOTE_MISSILE",*/
"KILLSTREAK_REMOTE_MORTAR",
"KILLSTREAK_HELICOPTER_GUNNER" );
for ( ;; )
{
level waittill( "connected", player );
if ( !player IsTestClient() )
{
continue;
}
player thread on_bot_connect();
}
}
function on_bot_connect()
{
self endon( "disconnect" );
if ( isdefined( self.pers[ "bot_loadout" ] ) )
{
return;
}
wait( 0.10 );
if ( self GetEntityNumber() % 2 == 0 )
{
WAIT_SERVER_FRAME;
}
self bot::set_rank();
self BotSetRandomCharacterCustomization();
max_allocation = BOT_ALLOCATION_MAX;
/*
if ( SessionModeIsPrivate() )
{
for ( i = 1; i <= BOT_ALLOCATION_UNLOCK_MAX; i++ )
{
if ( self IsItemLocked( rank::GetItemIndex( "feature_allocation_slot_" + i ) ) )
{
max_allocation--;
}
}
}
*/
self construct_loadout( max_allocation );
self.pers[ "bot_loadout" ] = true;
}
function construct_loadout( allocation_max )
{
/* if ( SessionModeIsPrivate() && self IsItemLocked( rank::GetItemIndex( "feature_cac" ) ) )
{
// cac still locked
return;
}
*/
pixbeginevent( "bot_construct_loadout" );
item_list = build_item_list();
// item_list["primary"] = [];
// item_list["primary"][0] = "WEAPON_RIOTSHIELD";
construct_class( 0, item_list, allocation_max );
construct_class( 1, item_list, allocation_max );
construct_class( 2, item_list, allocation_max );
construct_class( 3, item_list, allocation_max );
construct_class( 4, item_list, allocation_max );
killstreaks = item_list["killstreak1"];
if ( isdefined( item_list["killstreak2"] ) )
{
killstreaks = ArrayCombine( killstreaks, item_list["killstreak2"], true, false );
}
if ( isdefined( item_list["killstreak3"] ) )
{
killstreaks = ArrayCombine( killstreaks, item_list["killstreak3"], true, false );
}
if ( isdefined( killstreaks ) && killstreaks.size )
{
choose_weapon( 0, killstreaks );
choose_weapon( 0, killstreaks );
choose_weapon( 0, killstreaks );
}
self.claimed_items = undefined;
pixendevent();
}
function construct_class( constructclass, items, allocation_max )
{
allocation = 0;
claimed_count = build_claimed_list( items );
self.claimed_items = [];
// primary
weapon = choose_weapon( constructclass, items["primary"] );
claimed_count["primary"]++;
allocation++;
// secondary
weapon = choose_weapon( constructclass, items["secondary"] );
choose_weapon_option( constructclass, "camo", 1 );
}
function make_choice( chance, claimed, max_claim )
{
return ( claimed < max_claim && RandomInt( 100 ) < chance );
}
function chose_action( action1, chance1, action2, chance2, action3, chance3, action4, chance4 )
{
chance1 = Int( chance1 / 10 );
chance2 = Int( chance2 / 10 );
chance3 = Int( chance3 / 10 );
chance4 = Int( chance4 / 10 );
actions = [];
for( i = 0; i < chance1; i++ )
{
actions[ actions.size ] = action1;
}
for( i = 0; i < chance2; i++ )
{
actions[ actions.size ] = action2;
}
for( i = 0; i < chance3; i++ )
{
actions[ actions.size ] = action3;
}
for( i = 0; i < chance4; i++ )
{
actions[ actions.size ] = action4;
}
return array::random( actions );
}
function item_is_claimed( item )
{
foreach( claim in self.claimed_items )
{
if ( claim == item )
{
return true;
}
}
return false;
}
function choose_weapon( weaponclass, items )
{
if ( !isdefined( items ) || !items.size )
{
return undefined;
}
start = RandomInt( items.size );
for( i = 0; i < items.size; i++ )
{
weapon = items[ start ];
if ( !item_is_claimed( weapon ) )
{
break;
}
start = ( start + 1 ) % items.size;
}
self.claimed_items[ self.claimed_items.size ] = weapon;
self BotClassAddItem( weaponclass, weapon );
return weapon;
}
function build_weapon_options_list( optionType )
{
level.botWeaponOptionsId[optionType] = [];
level.botWeaponOptionsProb[optionType] = [];
csv_filename = "gamedata/weapons/common/attachmentTable.csv";
prob = 0;
for ( row = 0 ; row < 255 ; row++ )
{
if ( tableLookupColumnForRow( csv_filename, row, ATTACHMENT_TABLE_COL_TYPE ) == optionType )
{
index = level.botWeaponOptionsId[optionType].size;
level.botWeaponOptionsId[optionType][index] = Int( tableLookupColumnForRow( csv_filename, row, ATTACHMENT_TABLE_COL_NUMBERING ) );
prob += Int( tableLookupColumnForRow( csv_filename, row, ATTACHMENT_TABLE_COL_BOT_PROB ) );
level.botWeaponOptionsProb[optionType][index] = prob;
}
}
}
function choose_weapon_option( weaponclass, optionType, primary )
{
if ( !isdefined( level.botWeaponOptionsId ) )
{
level.botWeaponOptionsId = [];
level.botWeaponOptionsProb = [];
build_weapon_options_list( "camo" );
build_weapon_options_list( "reticle" );
}
// weapon options cannot be set in local matches
if ( !level.onlineGame && !level.systemLink )
return;
// Increase the range of the probability to reduce the chances of picking the option when the bot's level is less than BOT_RANK_ALL_OPTIONS_AVAILABLE
// (in system link all options are available)
numOptions = level.botWeaponOptionsProb[optionType].size;
maxProb = level.botWeaponOptionsProb[optionType][numOptions-1];
if ( !level.systemLink && self.pers[ "rank" ] < BOT_RANK_ALL_OPTIONS_AVAILABLE )
maxProb += BOT_RANK_OPTIONS_MULTIPLIER * maxProb * ( ( BOT_RANK_ALL_OPTIONS_AVAILABLE - self.pers[ "rank" ] ) / BOT_RANK_ALL_OPTIONS_AVAILABLE );
rnd = RandomInt( Int( maxProb ) );
for (i=0 ; i<numOptions ; i++)
{
if ( level.botWeaponOptionsProb[optionType][i] > rnd )
{
self BotClassSetWeaponOption( weaponclass, primary, optionType, level.botWeaponOptionsId[optionType][i] );
break;
}
}
}
function choose_primary_attachments( weaponclass, weapon, allocation, allocation_max )
{
attachments = weapon.supportedAttachments;
remaining = allocation_max - allocation;
if ( !attachments.size || !remaining )
{
return 0;
}
attachment_action = chose_action( "3_attachments", 25, "2_attachments", 65, "1_attachments", 10, "none", 5 );
if ( remaining >= 4 && attachment_action == "3_attachments" )
{
a1 = array::random( attachments );
self BotClassAddAttachment( weaponclass, weapon, a1, "primaryattachment1" );
count = 1;
attachments = GetWeaponAttachments( weapon, a1 );
if ( attachments.size )
{
a2 = array::random( attachments );
self BotClassAddAttachment( weaponclass, weapon, a2, "primaryattachment2" );
count++;
attachments = GetWeaponAttachments( weapon, a1, a2 );
if ( attachments.size )
{
a3 = array::random( attachments );
self BotClassAddItem( weaponclass, "BONUSCARD_PRIMARY_GUNFIGHTER" );
self BotClassAddAttachment( weaponclass, weapon, a3, "primaryattachment3" );
return 4;
}
}
return count;
}
else if ( remaining >= 2 && attachment_action == "2_attachments" )
{
a1 = array::random( attachments );
self BotClassAddAttachment( weaponclass, weapon, a1, "primaryattachment1" );
attachments = GetWeaponAttachments( weapon, a1 );
if ( attachments.size )
{
a2 = array::random( attachments );
self BotClassAddAttachment( weaponclass, weapon, a2, "primaryattachment2" );
return 2;
}
return 1;
}
else if ( remaining >= 1 && attachment_action == "1_attachments" )
{
a = array::random( attachments );
self BotClassAddAttachment( weaponclass, weapon, a, "primaryattachment1" );
return 1;
}
return 0;
}
function choose_secondary_attachments( weaponclass, weapon, allocation, allocation_max )
{
attachments = weapon.supportedAttachments ;
remaining = allocation_max - allocation;
if ( !attachments.size || !remaining )
{
return 0;
}
attachment_action = chose_action( "2_attachments", 10, "1_attachments", 40, "none", 50, "none", 0 );
if ( remaining >= 3 && attachment_action == "2_attachments" )
{
a1 = array::random( attachments );
self BotClassAddAttachment( weaponclass, weapon, a1, "secondaryattachment1" );
attachments = GetWeaponAttachments( weapon, a1 );
if ( attachments.size )
{
a2 = array::random( attachments );
self BotClassAddItem( weaponclass, "BONUSCARD_SECONDARY_GUNFIGHTER" );
self BotClassAddAttachment( weaponclass, weapon, a2, "secondaryattachment2" );
return 3;
}
return 1;
}
else if ( remaining >= 1 && attachment_action == "1_attachments" )
{
a = array::random( attachments );
self BotClassAddAttachment( weaponclass, weapon, a, "secondaryattachment1" );
return 1;
}
return 0;
}
function build_item_list()
{
items = [];
for( i = 0; i < STATS_TABLE_MAX_ITEMS; i++ )
{
row = tableLookupRowNum( level.statsTableID, STATS_TABLE_COL_NUMBERING, i );
if ( row > -1 )
{
slot = tableLookupColumnForRow( level.statsTableID, row, STATS_TABLE_COL_SLOT );
if ( slot == "" )
{
continue;
}
number = Int( tableLookupColumnForRow( level.statsTableID, row, STATS_TABLE_COL_NUMBERING ) );
/*
if ( SessionModeIsPrivate() && self IsItemLocked( number ) )
{
continue;
}
*/
allocation = Int( tableLookupColumnForRow( level.statsTableID, row, STATS_TABLE_COL_ALLOCATION ) );
if ( allocation < 0 )
{
continue;
}
name = tableLookupColumnForRow( level.statsTableID, row, STATS_TABLE_COL_NAME );
/*
if ( item_is_banned( slot, name ) )
{
continue;
}
*/
if ( !isdefined( items[slot] ) )
{
items[slot] = [];
}
items[ slot ][ items[slot].size ] = name;
}
}
return items;
}
function build_claimed_list( items )
{
claimed = [];
keys = GetArrayKeys( items );
foreach( key in keys )
{
claimed[ key ] = 0;
}
return claimed;
}

View File

@ -0,0 +1,209 @@
#using scripts\codescripts\struct;
#using scripts\shared\callbacks_shared;
#using scripts\shared\system_shared;
#namespace serversettings;
function autoexec __init__sytem__() { system::register("serversettings",&__init__,undefined,undefined); }
function __init__()
{
callback::on_start_gametype( &init );
}
function init()
{
level.hostname = GetDvarString( "sv_hostname");
if(level.hostname == "")
level.hostname = "CoDHost";
SetDvar("sv_hostname", level.hostname);
SetDvar("ui_hostname", level.hostname);
//makeDvarServerInfo("ui_hostname", "CoDHost");
level.motd = GetDvarString( "scr_motd" );
if(level.motd == "")
level.motd = "";
SetDvar("scr_motd", level.motd);
SetDvar("ui_motd", level.motd);
//makeDvarServerInfo("ui_motd", "");
level.allowvote = GetDvarString( "g_allowvote" );
if(level.allowvote == "")
level.allowvote = "1";
SetDvar("g_allowvote", level.allowvote);
SetDvar("ui_allowvote", level.allowvote);
//makeDvarServerInfo("ui_allowvote", "1");
level.allow_teamchange = "1";
SetDvar("ui_allow_teamchange", level.allow_teamchange);
level.friendlyfire = GetGametypeSetting( "friendlyfiretype" );
SetDvar("ui_friendlyfire", level.friendlyfire);
//makeDvarServerInfo("ui_friendlyfire", "0");
if(GetDvarString( "scr_mapsize") == "")
SetDvar("scr_mapsize", "64");
else if(GetDvarfloat( "scr_mapsize") >= 64)
SetDvar("scr_mapsize", "64");
else if(GetDvarfloat( "scr_mapsize") >= 32)
SetDvar("scr_mapsize", "32");
else if(GetDvarfloat( "scr_mapsize") >= 16)
SetDvar("scr_mapsize", "16");
else
SetDvar("scr_mapsize", "8");
level.mapsize = GetDvarfloat( "scr_mapsize");
constrain_gametype(GetDvarString( "g_gametype"));
constrain_map_size(level.mapsize);
thread setup_callbacks();
for(;;)
{
update();
wait 5;
}
}
function update()
{
sv_hostname = GetDvarString( "sv_hostname");
if(level.hostname != sv_hostname)
{
level.hostname = sv_hostname;
SetDvar("ui_hostname", level.hostname);
}
scr_motd = GetDvarString( "scr_motd");
if(level.motd != scr_motd)
{
level.motd = scr_motd;
SetDvar("ui_motd", level.motd);
}
g_allowvote = GetDvarString( "g_allowvote" );
if(level.allowvote != g_allowvote)
{
level.allowvote = g_allowvote;
SetDvar("ui_allowvote", level.allowvote);
}
scr_friendlyfire = GetGametypeSetting( "friendlyfiretype" );
if(level.friendlyfire != scr_friendlyfire)
{
level.friendlyfire = scr_friendlyfire;
SetDvar("ui_friendlyfire", level.friendlyfire);
}
}
function constrain_gametype(gametype)
{
entities = getentarray();
for(i = 0; i < entities.size; i++)
{
entity = entities[i];
if(gametype == "dm")
{
if(isdefined(entity.script_gametype_dm) && entity.script_gametype_dm != "1")
{
//iprintln("DELETED(GameType): ", entity.classname);
entity delete();
}
}
else if(gametype == "tdm")
{
if(isdefined(entity.script_gametype_tdm) && entity.script_gametype_tdm != "1")
{
//iprintln("DELETED(GameType): ", entity.classname);
entity delete();
}
}
else if(gametype == "ctf")
{
if(isdefined(entity.script_gametype_ctf) && entity.script_gametype_ctf != "1")
{
//iprintln("DELETED(GameType): ", entity.classname);
entity delete();
}
}
else if(gametype == "hq")
{
if(isdefined(entity.script_gametype_hq) && entity.script_gametype_hq != "1")
{
//iprintln("DELETED(GameType): ", entity.classname);
entity delete();
}
}
else if(gametype == "sd")
{
if(isdefined(entity.script_gametype_sd) && entity.script_gametype_sd != "1")
{
//iprintln("DELETED(GameType): ", entity.classname);
entity delete();
}
}
else if(gametype == "koth")
{
if(isdefined(entity.script_gametype_koth) && entity.script_gametype_koth != "1")
{
//iprintln("DELETED(GameType): ", entity.classname);
entity delete();
}
}
}
}
function constrain_map_size(mapsize)
{
entities = getentarray();
for(i = 0; i < entities.size; i++)
{
entity = entities[i];
if(int(mapsize) == 8)
{
if(isdefined(entity.script_mapsize_08) && entity.script_mapsize_08 != "1")
{
//iprintln("DELETED(MapSize): ", entity.classname);
entity delete();
}
}
else if(int(mapsize) == 16)
{
if(isdefined(entity.script_mapsize_16) && entity.script_mapsize_16 != "1")
{
//iprintln("DELETED(MapSize): ", entity.classname);
entity delete();
}
}
else if(int(mapsize) == 32)
{
if(isdefined(entity.script_mapsize_32) && entity.script_mapsize_32 != "1")
{
//iprintln("DELETED(MapSize): ", entity.classname);
entity delete();
}
}
else if(int(mapsize) == 64)
{
if(isdefined(entity.script_mapsize_64) && entity.script_mapsize_64 != "1")
{
//iprintln("DELETED(MapSize): ", entity.classname);
entity delete();
}
}
}
}
function setup_callbacks()
{
level.onForfeit = &default_onForfeit;
}
function default_onForfeit()
{
level.gameForfeited = false;
}

View File

@ -0,0 +1,670 @@
#using scripts\codescripts\struct;
#using scripts\shared\callbacks_shared;
#using scripts\shared\persistence_shared;
#using scripts\shared\system_shared;
#using scripts\shared\util_shared;
#insert scripts\shared\shared.gsh;
#using scripts\mp\gametypes\_globallogic_ui;
#using scripts\mp\gametypes\_spectating;
#using scripts\mp\_util;
#precache( "material", "mpflag_spectator" );
#precache( "string", "MP_AUTOBALANCE_NOW" );
#namespace teams;
REGISTER_SYSTEM( "teams", &__init__, undefined )
function __init__()
{
callback::on_start_gametype( &init );
level.getEnemyTeam = &getEnemyTeam;
level.use_team_based_logic_for_locking_on = true;
}
function init()
{
game["strings"]["autobalance"] = &"MP_AUTOBALANCE_NOW";
if(GetDvarString( "scr_teambalance") == "")
SetDvar("scr_teambalance", "0");
level.teambalance = GetDvarint( "scr_teambalance");
level.teambalancetimer = 0;
if(GetDvarString( "scr_timeplayedcap") == "")
SetDvar("scr_timeplayedcap", "1800");
level.timeplayedcap = int(GetDvarint( "scr_timeplayedcap"));
level.freeplayers = [];
if( level.teamBased )
{
level.alliesplayers = [];
level.axisplayers = [];
callback::on_connect( &on_player_connect );
callback::on_joined_team( &on_joined_team );
callback::on_joined_spectate( &on_joined_spectators );
level thread update_team_balance();
wait .15;
level thread update_player_times();
}
else
{
callback::on_connect( &on_free_player_connect );
wait .15;
level thread update_player_times();
}
}
function on_player_connect()
{
self thread track_played_time();
}
function on_free_player_connect()
{
self thread track_free_played_time();
}
function on_joined_team()
{
/#println( "joined team: " + self.pers["team"] );#/
self update_time();
}
function on_joined_spectators()
{
self.pers["teamTime"] = undefined;
}
function track_played_time()
{
self endon( "disconnect" );
if ( !isdefined( self.pers["totalTimePlayed"] ) )
{
self.pers["totalTimePlayed"] = 0;
}
foreach ( team in level.teams )
{
self.timePlayed[team] = 0;
}
self.timePlayed["free"] = 0;
self.timePlayed["other"] = 0;
self.timePlayed["alive"] = 0;
// dont reset time played in War when going into final fight, this is used for calculating match bonus
if ( !isdefined( self.timePlayed["total"] ) || !( (level.gameType == "twar") && (0 < game["roundsplayed"]) && (0 < self.timeplayed["total"]) ) )
self.timePlayed["total"] = 0;
while ( level.inPrematchPeriod )
WAIT_SERVER_FRAME;
for ( ;; )
{
if ( game["state"] == "playing" )
{
if ( isdefined( level.teams[self.sessionteam] ) )
{
self.timePlayed[self.sessionteam]++;
self.timePlayed["total"]++;
if ( level.mpCustomMatch )
{
self.pers["sbtimeplayed"] = self.timeplayed["total"];
self.sbtimeplayed = self.pers["sbtimeplayed"];
}
if ( IsAlive( self ) )
self.timePlayed["alive"]++;
}
else if ( self.sessionteam == "spectator" )
{
self.timePlayed["other"]++;
}
}
wait ( 1.0 );
}
}
function update_player_times()
{
const minWait = 10.0;
const step = 1.0;
varWait = minWait;
nextToUpdate = 0;
for ( ;; )
{
varWait = varWait - step;
nextToUpdate++;
if ( nextToUpdate >= level.players.size )
{
nextToUpdate = 0;
if ( varWait > 0 )
{
wait ( varWait );
}
varWait = minWait;
}
if ( isdefined( level.players[nextToUpdate] ) )
{
level.players[nextToUpdate] update_played_time();
level.players[nextToUpdate] persistence::check_contract_expirations();
}
wait ( step );
}
}
function update_played_time()
{
pixbeginevent("updatePlayedTime");
if ( level.rankedMatch || level.leagueMatch )
{
foreach( team in level.teams )
{
if ( self.timePlayed[team] )
{
if ( level.teambased )
{
self AddPlayerStat( "time_played_"+team, int( min( self.timePlayed[team], level.timeplayedcap ) ) );
}
self AddPlayerStatWithGameType( "time_played_total", int( min( self.timePlayed[team], level.timeplayedcap ) ) );
}
}
if ( self.timePlayed["other"] )
{
self AddPlayerStat( "time_played_other", int( min( self.timePlayed["other"], level.timeplayedcap ) ) );
self AddPlayerStatWithGameType( "time_played_total", int( min( self.timePlayed["other"], level.timeplayedcap ) ) );
}
if ( self.timePlayed["alive"] )
{
timeAlive = int( min( self.timePlayed["alive"], level.timeplayedcap ) );
self persistence::increment_contract_times( timeAlive );
self AddPlayerStat( "time_played_alive", timeAlive );
}
}
if ( level.onlineGame )
{
timeAlive = int( min( self.timePlayed["alive"], level.timeplayedcap ) );
self.pers["time_played_alive"] += timeAlive;
}
pixendevent();
if ( game["state"] == "postgame" )
return;
foreach( team in level.teams )
{
self.timePlayed[team] = 0;
}
self.timePlayed["other"] = 0;
self.timePlayed["alive"] = 0;
}
function update_time()
{
if ( game["state"] != "playing" )
return;
self.pers["teamTime"] = getTime();
}
function update_balance_dvar()
{
for(;;)
{
teambalance = GetDvarint( "scr_teambalance");
if(level.teambalance != teambalance)
level.teambalance = GetDvarint( "scr_teambalance");
timeplayedcap = GetDvarint( "scr_timeplayedcap");
if(level.timeplayedcap != timeplayedcap)
level.timeplayedcap = int(GetDvarint( "scr_timeplayedcap"));
wait 1;
}
}
function update_team_balance()
{
level thread update_balance_dvar();
wait .15;
if ( level.teamBalance && util::isRoundBased() && level.numlives )
{
if ( isDefined( game["BalanceTeamsNextRound"] ) )
iPrintLnbold( &"MP_AUTOBALANCE_NEXT_ROUND" );
level waittill( "game_ended" );
wait 1;
if ( isDefined( game["BalanceTeamsNextRound"] ) )
{
level balance_teams();
game["BalanceTeamsNextRound"] = undefined;
}
else if ( !get_team_balance() )
{
game["BalanceTeamsNextRound"] = true;
}
}
else
{
level endon ( "game_ended" );
for ( ;; )
{
if ( level.teamBalance )
{
if ( !get_team_balance() )
{
iPrintLnBold( &"MP_AUTOBALANCE_SECONDS", 15 );
wait 15.0;
if ( !get_team_balance() )
level balance_teams();
}
wait 59.0;
}
wait 1.0;
}
}
}
function get_team_balance()
{
level.team["allies"] = 0;
level.team["axis"] = 0;
players = level.players;
for ( i = 0; i < players.size; i++ )
{
if ( ( isdefined( players[i].pers["team"] ) ) && ( players[i].pers["team"] == "allies" ) )
level.team["allies"]++;
else if ( ( isdefined( players[i].pers["team"] ) ) && ( players[i].pers["team"] == "axis" ) )
level.team["axis"]++;
}
if ( ( level.team["allies"] > ( level.team["axis"] + level.teamBalance ) ) || ( level.team["axis"] > ( level.team["allies"] + level.teamBalance ) ) )
return false;
else
return true;
}
function balance_teams()
{
iPrintLnBold( game["strings"]["autobalance"] );
//Create/Clear the team arrays
AlliedPlayers = [];
AxisPlayers = [];
// Populate the team arrays
players = level.players;
for ( i = 0; i < players.size; i++ )
{
if ( !isdefined( players[i].pers["teamTime"] ) )
continue;
if ( ( isdefined( players[i].pers["team"] ) ) && ( players[i].pers["team"] == "allies" ) )
AlliedPlayers[AlliedPlayers.size] = players[i];
else if ( ( isdefined( players[i].pers["team"] ) ) && ( players[i].pers["team"] == "axis" ) )
AxisPlayers[AxisPlayers.size] = players[i];
}
MostRecent = undefined;
while ( ( AlliedPlayers.size > ( AxisPlayers.size + 1 ) ) || ( AxisPlayers.size > ( AlliedPlayers.size + 1 ) ) )
{
if ( AlliedPlayers.size > ( AxisPlayers.size + 1 ) )
{
// Move the player that's been on the team the shortest ammount of time (highest teamTime value)
// Ignore players capturing or carrying objects
for ( j = 0; j < AlliedPlayers.size; j++ )
{
if ( !isdefined( MostRecent ) )
MostRecent = AlliedPlayers[j];
else if ( AlliedPlayers[j].pers["teamTime"] > MostRecent.pers["teamTime"] )
MostRecent = AlliedPlayers[j];
}
if ( isdefined( MostRecent ) )
MostRecent change( "axis" );
else
{
// Move the player that's been on the team the shortest ammount of time
for ( j = 0; j < AlliedPlayers.size; j++ )
{
if ( !isdefined( MostRecent ) )
MostRecent = AlliedPlayers[j];
else if ( AlliedPlayers[j].pers["teamTime"] > MostRecent.pers["teamTime"] )
MostRecent = AlliedPlayers[j];
}
MostRecent change( "axis" );
}
}
else if ( AxisPlayers.size > ( AlliedPlayers.size + 1 ) )
{
// Move the player that's been on the team the shortest ammount of time (highest teamTime value)
// Ignore players capturing or carrying objects
for ( j = 0; j < AxisPlayers.size; j++ )
{
if ( !isdefined( MostRecent ) )
MostRecent = AxisPlayers[j];
else if ( AxisPlayers[j].pers["teamTime"] > MostRecent.pers["teamTime"] )
MostRecent = AxisPlayers[j];
}
if ( isdefined( MostRecent ) )
MostRecent change( "allies" );
else
{
// Move the player that's been on the team the shortest ammount of time
for ( j = 0; j < AxisPlayers.size; j++ )
{
if ( !isdefined( MostRecent ) )
MostRecent = AxisPlayers[j];
else if ( AxisPlayers[j].pers["teamTime"] > MostRecent.pers["teamTime"] )
MostRecent = AxisPlayers[j];
}
MostRecent change( "allies" );
}
}
MostRecent = undefined;
AlliedPlayers = [];
AxisPlayers = [];
players = level.players;
for ( i = 0; i < players.size; i++ )
{
if ( ( isdefined( players[i].pers["team"] ) ) && ( players[i].pers["team"] == "allies" ) )
AlliedPlayers[AlliedPlayers.size] = players[i];
else if ( ( isdefined( players[i].pers["team"] ) ) && ( players[i].pers["team"] == "axis" ) )
AxisPlayers[AxisPlayers.size] = players[i];
}
}
}
function change( team )
{
if (self.sessionstate != "dead")
{
// Set a flag on the player to they aren't robbed points for dying - the callback will remove the flag
self.switching_teams = true;
self.switchedTeamsResetGadgets = true;
self.joining_team = team;
self.leaving_team = self.pers["team"];
// Suicide the player so they can't hit escape and fail the team balance
self suicide();
}
self.pers["team"] = team;
self.team = team;
self.pers["weapon"] = undefined;
self.pers["spawnweapon"] = undefined;
self.pers["savedmodel"] = undefined;
self.pers["teamTime"] = undefined;
self.sessionteam = self.pers["team"];
self globallogic_ui::updateObjectiveText();
// update spectator permissions immediately on change of team
self spectating::set_permissions();
self SetClientScriptMainMenu( game[ "menu_start_menu" ] );
self openMenu(game[ "menu_start_menu" ]);
self notify("end_respawn");
}
function count_players()
{
players = level.players;
playerCounts = [];
foreach( team in level.teams )
{
playerCounts[team] = 0;
}
foreach( player in level.players )
{
if( player == self )
continue;
team = player.pers["team"];
if( isdefined(team) && isdefined( level.teams[team] ) )
playerCounts[team]++;
}
return playerCounts;
}
function track_free_played_time()
{
self endon( "disconnect" );
foreach( team in level.teams )
{
self.timePlayed[team] = 0;
}
self.timePlayed["other"] = 0;
self.timePlayed["total"] = 0;
self.timePlayed["alive"] = 0;
for ( ;; )
{
if ( game["state"] == "playing" )
{
team = self.pers["team"];
if ( isdefined( team ) && isdefined( level.teams[team] ) && self.sessionteam != "spectator" )
{
self.timePlayed[team]++;
self.timePlayed["total"]++;
if ( IsAlive( self ) )
self.timePlayed["alive"]++;
}
else
{
self.timePlayed["other"]++;
}
}
wait ( 1.0 );
}
}
function set_player_model( team, weapon )
{
self DetachAll();
self SetMoveSpeedScale( 1 );
self SetSprintDuration( 4 );
self SetSprintCooldown( 0 );
}
function get_flag_model( teamRef )
{
assert(isdefined(game["flagmodels"]));
assert(isdefined(game["flagmodels"][teamRef]));
return ( game["flagmodels"][teamRef] );
}
function get_flag_carry_model( teamRef )
{
assert(isdefined(game["carry_flagmodels"]));
assert(isdefined(game["carry_flagmodels"][teamRef]));
return ( game["carry_flagmodels"][teamRef] );
}
function getTeamIndex( team )
{
if( !isdefined( team ) )
{
return TEAM_FREE;
}
if( team == "free" )
{
return TEAM_FREE;
}
if( team == "allies" )
{
return TEAM_ALLIES;
}
if( team == "axis" )
{
return TEAM_AXIS;
}
return TEAM_FREE;
}
function getEnemyTeam( player_team )
{
foreach( team in level.teams )
{
if ( team == player_team )
continue;
if ( team == "spectator" )
continue;
return team;
}
return util::getOtherTeam( player_team );
}
function GetEnemyPlayers()
{
enemies = [];
foreach( player in level.players )
{
if( player.team == "spectator" )
{
continue;
}
if( ( level.teamBased && player.team != self.team ) || ( !level.teamBased && player != self ) )
{
ARRAY_ADD( enemies, player );
}
}
return enemies;
}
function GetFriendlyPlayers()
{
friendlies = [];
foreach( player in level.players )
{
if( ( player.team == self.team ) && ( player != self ) )
{
ARRAY_ADD( friendlies, player );
}
}
return friendlies;
}
function WaitUntilTeamChange( player, callback, arg, end_condition1, end_condition2, end_condition3 )
{
if( isdefined( end_condition1 ) )
self endon( end_condition1 );
if( isdefined( end_condition2 ) )
self endon( end_condition2 );
if( isdefined( end_condition3 ) )
self endon( end_condition3 );
event = player util::waittill_any( "joined_team", "disconnect", "joined_spectators" );
if( isdefined( callback ) )
{
self [[ callback ]]( arg, event );
}
}
function WaitUntilTeamChangeSingleTon( player, singletonString, callback, arg, end_condition1, end_condition2, end_condition3 )
{
self notify( singletonString );
self endon( singletonString );
if( isdefined( end_condition1 ) )
self endon( end_condition1 );
if( isdefined( end_condition2 ) )
self endon( end_condition2 );
if( isdefined( end_condition3 ) )
self endon( end_condition3 );
event = player util::waittill_any( "joined_team", "disconnect", "joined_spectators" );
if( isdefined( callback ) )
{
self thread [[ callback ]]( arg, event );
}
}
function HideToSameTeam()
{
if( level.teambased )
{
self SetVisibleToAllExceptTeam( self.team );
}
else
{
self SetVisibleToAll();
self SetInvisibleToPlayer( self.owner );
}
}

View File

@ -0,0 +1,118 @@
if Engine.GetCurrentMap() ~= "core_frontend" then
return
end
require( "ui.uieditor.widgets.PC.ServerBrowser.ServerBrowserRowInternal" )
require( "ui.uieditor.widgets.Lobby.Common.FE_FocusBarContainer" )
CoD.ServerBrowserRow = InheritFrom( LUI.UIElement )
CoD.ServerBrowserRow.new = function ( menu, controller )
local self = LUI.UIElement.new()
if PreLoadFunc then
PreLoadFunc( self, controller )
end
self:setUseStencil( false )
self:setClass( CoD.ServerBrowserRow )
self.id = "ServerBrowserRow"
self.soundSet = "default"
self:setLeftRight( true, false, 0, 700 )
self:setTopBottom( true, false, 0, 22 )
self:makeFocusable()
self:setHandleMouse( true )
if CoD.isPC then
self:registerEventHandler( "leftmousedown", function ()
if self:isInFocus() then
ServerBrowserCancelRequest( self )
JoinServerBrowser( self, self, controller, menu )
end
end )
end
self.anyChildUsesUpdateState = true
local background = LUI.UIImage.new()
background:setLeftRight( true, true, 0, 0 )
background:setTopBottom( true, true, 0, 0 )
background:setRGB( 0.2, 0.2, 0.2 )
background:setAlpha( 0.8 )
self:addElement( background )
self.background = background
local rowItems = CoD.ServerBrowserRowInternal.new( menu, controller )
rowItems:setLeftRight( true, false, 0, 700 )
rowItems:setTopBottom( true, false, 0, 22 )
rowItems:linkToElementModel( self, nil, false, function ( model )
rowItems:setModel( model, controller )
end )
self:addElement( rowItems )
self.rowItems = rowItems
local FocusBarB = CoD.FE_FocusBarContainer.new( menu, controller )
FocusBarB:setLeftRight( true, true, -2, 2 )
FocusBarB:setTopBottom( false, true, -1, 3 )
FocusBarB:setAlpha( 0 )
FocusBarB:setZoom( 1 )
self:addElement( FocusBarB )
self.FocusBarB = FocusBarB
local FocusBarT = CoD.FE_FocusBarContainer.new( menu, controller )
FocusBarT:setLeftRight( true, true, -2, 2 )
FocusBarT:setTopBottom( true, false, -2, 2 )
FocusBarT:setAlpha( 0 )
FocusBarT:setZoom( 1 )
self:addElement( FocusBarT )
self.FocusBarT = FocusBarT
self.clipsPerState = {
DefaultState = {
DefaultClip = function ()
self:setupElementClipCounter( 3 )
background:completeAnimation()
self.background:setRGB( 0.2, 0.2, 0.2 )
self.clipFinished( background, {} )
FocusBarB:completeAnimation()
self.FocusBarB:setAlpha( 0 )
self.clipFinished( FocusBarB, {} )
FocusBarT:completeAnimation()
self.FocusBarT:setAlpha( 0 )
self.clipFinished( FocusBarT, {} )
end,
Focus = function ()
self:setupElementClipCounter( 3 )
background:completeAnimation()
self.background:setRGB( 0.2, 0.2, 0.2 )
self.clipFinished( background, {} )
FocusBarB:completeAnimation()
self.FocusBarB:setAlpha( 1 )
self.clipFinished( FocusBarB, {} )
FocusBarT:completeAnimation()
self.FocusBarT:setAlpha( 1 )
self.clipFinished( FocusBarT, {} )
end,
Over = function ()
self:setupElementClipCounter( 3 )
background:completeAnimation()
self.background:setRGB( 0.39, 0.39, 0.39 )
self.clipFinished( background, {} )
FocusBarB:completeAnimation()
self.FocusBarB:setAlpha( 0 )
self.clipFinished( FocusBarB, {} )
FocusBarT:completeAnimation()
self.FocusBarT:setAlpha( 0 )
self.clipFinished( FocusBarT, {} )
end
}
}
LUI.OverrideFunction_CallOriginalSecond( self, "close", function ( element )
element.rowItems:close()
element.FocusBarB:close()
element.FocusBarT:close()
element.m_leftMouseDown = nil
end )
if PostLoadFunc then
PostLoadFunc( self, controller, menu )
end
return self
end

View File

@ -0,0 +1,156 @@
if Engine.GetCurrentMap() ~= "core_frontend" then
return
end
local enableLobbyMapVote = true -- toggle map vote in public lobby
local enableLargeServerBrowserButton = true -- toggle large server browser button
local utils = require("utils")
require("datasources_start_menu_tabs")
require("datasources_change_map_categories")
require("datasources_gamesettingsflyout_buttons")
CoD.LobbyButtons.MP_PUBLIC_MATCH = {
stringRef = "MENU_PLAY_CAPS",
action = NavigateToLobby_SelectionList,
param = "MPLobbyOnline",
customId = "btnPublicMatch",
}
CoD.LobbyButtons.MP_FIND_MATCH = {
stringRef = "MPUI_BASICTRAINING_CAPS",
action = OpenFindMatch,
customId = "btnFindMatch",
}
CoD.LobbyButtons.STATS = {
stringRef = "STATS",
action = function(self, element, controller, param, menu)
SetPerControllerTableProperty(controller, "disableGameSettingsOptions", true)
OpenPopup(menu, "T7xStatsMenu", controller)
end,
customId = "btnMPStats"
}
CoD.LobbyButtons.MP_START_GAME = {
stringRef = "MENU_START_GAME_CAPS",
action = function(self, element, controller, param, menu)
Engine.SetDvar("party_minplayers", 1)
Engine.Exec(nil, "launchgame")
end,
customId = "btnStartGame"
}
CoD.LobbyButtons.SETTING_UP_BOTS = {
stringRef = "MENU_SETUP_BOTS_CAPS",
action = function(self, element, controller, param, menu)
SetPerControllerTableProperty(controller, "disableGameSettingsOptions", true)
OpenPopup(menu, "GameSettings_Bots", controller)
end,
customId = "btnSettingUpBots"
}
CoD.LobbyButtons.GameSettingsFlyoutArenas = {
stringRef = "MPUI_SETUP_GAME_CAPS",
action = function(self, element, controller, param, menu)
SetPerControllerTableProperty(controller, "disableGameSettingsOptions", true)
OpenPopup(menu, "GameSettingsFlyoutMP", controller)
end,
customId = "btnGameSettingsFlyoutMP"
}
CoD.LobbyButtons.GameSettingsFlyoutMP = {
stringRef = "MPUI_SETUP_GAME_CAPS",
action = function(self, element, controller, param, menu)
SetPerControllerTableProperty(controller, "disableGameSettingsOptions", true)
OpenPopup(menu, "GameSettingsFlyoutMPCustom", controller)
end,
customId = "btnGameSettingsFlyoutMPCustom"
}
CoD.LobbyButtons.SERVER_BROWSER = {
stringRef = "MENU_SERVER_BROWSER_CAPS",
action = function(self, element, controller, param, menu)
SetPerControllerTableProperty(controller, "disableGameSettingsOptions", true)
OpenPopup(menu, "LobbyServerBrowserOnline", controller)
end,
customId = "btnDedicated"
}
local shouldShowMapVote = enableLobbyMapVote
local lobbyMapVote = function(lobbyMapVoteIsEnabled)
if lobbyMapVoteIsEnabled == true then
Engine.Exec(nil, "LobbyStopDemo")
end
end
local addCustomButtons = function(controller, menuId, buttonTable, isLeader)
if menuId == LobbyData.UITargets.UI_MPLOBBYMAIN.id then
utils.RemoveSpaces(buttonTable)
local theaterIndex = utils.GetButtonIndex(buttonTable, CoD.LobbyButtons.THEATER_MP)
if theaterIndex ~= nil then
utils.AddSpacer(buttonTable, theaterIndex - 1)
end
end
if menuId == LobbyData.UITargets.UI_MPLOBBYONLINE.id or menuId == LobbyData.UITargets.UI_ZMLOBBYONLINE.id then
utils.AddSmallButton(controller, buttonTable, CoD.LobbyButtons.STATS)
end
if menuId == LobbyData.UITargets.UI_MPLOBBYONLINE.id or menuId == LobbyData.UITargets.UI_ZMLOBBYONLINE.id or menuId == LobbyData.UITargets.UI_MPLOBBYMAIN.id or menuId == LobbyData.UITargets.UI_MPLOBBYLANGAME.id then
Engine.Mods_Lists_UpdateUsermaps()
end
if menuId == LobbyData.UITargets.UI_MPLOBBYONLINE.id then
shouldShowMapVote = enableLobbyMapVote
if enableLargeServerBrowserButton then
utils.AddLargeButton(controller, buttonTable, CoD.LobbyButtons.SERVER_BROWSER, 1)
end
elseif menuId == LobbyData.UITargets.UI_MPLOBBYONLINEPUBLICGAME.id then
utils.RemoveButton(buttonTable, CoD.LobbyButtons.MP_PUBLIC_LOBBY_LEADERBOARD)
utils.AddLargeButton(controller, buttonTable, CoD.LobbyButtons.MP_START_GAME, 1)
utils.AddSmallButton(controller, buttonTable, CoD.LobbyButtons.GameSettingsFlyoutMP, 2)
utils.AddSpacer(buttonTable, utils.GetButtonIndex(buttonTable, CoD.LobbyButtons.GameSettingsFlyoutMP))
lobbyMapVote(shouldShowMapVote)
shouldShowMapVote = false
elseif menuId == LobbyData.UITargets.UI_MPLOBBYONLINEARENAGAME.id then
utils.AddLargeButton(controller, buttonTable, CoD.LobbyButtons.MP_START_GAME, 1)
utils.AddSmallButton(controller, buttonTable, CoD.LobbyButtons.GameSettingsFlyoutArenas, 2)
utils.AddSpacer(buttonTable, utils.GetButtonIndex(buttonTable, CoD.LobbyButtons.GameSettingsFlyoutArenas))
end
if menuId == LobbyData.UITargets.UI_ZMLOBBYONLINE.id then
utils.RemoveButton(buttonTable, CoD.LobbyButtons.THEATER_ZM)
utils.AddLargeButton(controller, buttonTable, CoD.LobbyButtons.THEATER_ZM)
utils.RemoveSpaces(buttonTable)
utils.AddSpacer(buttonTable, utils.GetButtonIndex(buttonTable, CoD.LobbyButtons.SERVER_BROWSER))
local bgbIndex = utils.GetButtonIndex(buttonTable, CoD.LobbyButtons.ZM_BUBBLEGUM_BUFFS)
if bgbIndex ~= nil then
utils.AddSpacer(buttonTable, bgbIndex - 1)
end
utils.AddSpacer(buttonTable, utils.GetButtonIndex(buttonTable, CoD.LobbyButtons.STATS))
end
end
local oldAddButtonsForTarget = CoD.LobbyMenus.AddButtonsForTarget
CoD.LobbyMenus.AddButtonsForTarget = function(controller, id)
local model = nil
if Engine.IsLobbyActive(Enum.LobbyType.LOBBY_TYPE_GAME) then
model = Engine.GetModel(DataSources.LobbyRoot.getModel(controller), "gameClient.isHost")
else
model = Engine.GetModel(DataSources.LobbyRoot.getModel(controller), "privateClient.isHost")
end
local isLeader = nil
if model ~= nil then
isLeader = Engine.GetModelValue(model)
else
isLeader = 1
end
local result = oldAddButtonsForTarget(controller, id)
addCustomButtons(controller, id, result, isLeader)
return result
end

View File

@ -0,0 +1,96 @@
local f0_local0 = function(f1_arg0, f1_arg1)
if not CoD.useMouse then
return
else
LUI.OverrideFunction_CallOriginalFirst(f1_arg0, "setState", function(element, controller)
if IsSelfInState(f1_arg0, "SelectingMap") then
f1_arg0.mapList:setMouseDisabled(false)
f1_arg0.mapCategoriesList:setMouseDisabled(true)
f1_arg0.m_categorySet = false
else
f1_arg0.mapList:setMouseDisabled(true)
f1_arg0.mapCategoriesList:setMouseDisabled(false)
end
end)
f1_arg0.mapList:setMouseDisabled(true)
f1_arg0.mapList:registerEventHandler("leftclick_outside", function(element, event)
if IsSelfInState(f1_arg0, "SelectingMap") and f1_arg0.m_categorySet then
CoD.PCUtil.SimulateButtonPress(f1_arg1, Enum.LUIButton.LUI_KEY_XBB_PSCIRCLE)
end
f1_arg0.m_categorySet = true
return true
end)
end
end
local PostLoadFunc = function(f4_arg0, f4_arg1)
f0_local0(f4_arg0, f4_arg1)
end
local f0_local2 = 10000
local f0_local3 = 10001
local f0_local4 = function(f5_arg0)
local f5_local0 = CoD.mapsTable[f5_arg0]
if CoD.CONTENT_DLC6_INDEX <= f5_local0.dlc_pack or f5_arg0 == "mp_redwood_ice" or f5_arg0 == "mp_veiled_heyday" then
return f0_local3
elseif f5_local0.dlc_pack > 0 then
return f0_local2
else
return f5_local0.dlc_pack
end
end
DataSources.ChangeMapCategories = DataSourceHelpers.ListSetup("ChangeMapCategories", function(f6_arg0)
local f6_local0 = {}
local f6_local1 = CoD.GetMapValue(Engine.DvarString(nil, "ui_mapname"), "dlc_pack", CoD.CONTENT_ORIGINAL_MAP_INDEX)
local f6_local2 = function(f7_arg0, f7_arg1)
return {
models = {
text = Engine.Localize("MPUI_MAP_CATEGORY_" .. f7_arg0 .. "_CAPS"),
buttonText = Engine.Localize("MPUI_MAP_CATEGORY_" .. f7_arg0 .. "_CAPS"),
image = "playlist_map",
description = Engine.Localize("MPUI_MAP_CATEGORY_" .. f7_arg0 .. "_DESC")
},
properties = {
category = f7_arg1,
selectIndex = f6_local1 == f7_arg1
}
}
end
CoD.mapsTable = Engine.GetGDTMapsTable()
local f6_local3 = function(f8_arg0)
for f8_local3, f8_local4 in pairs(CoD.mapsTable) do
if f8_local4.session_mode == CoD.gameModeEnum and f0_local4(f8_local3) == f8_arg0 and (ShowPurchasableMap(f6_arg0, f8_local3) or Engine.IsMapValid(f8_local3)) then
return true
end
end
return false
end
if CoD.isCampaign == true then
table.insert(f6_local0, f6_local2("missions", CoD.CONTENT_ORIGINAL_MAP_INDEX))
table.insert(f6_local0, f6_local2("dev", CoD.CONTENT_DEV_MAP_INDEX))
else
table.insert(f6_local0, f6_local2("standard", CoD.CONTENT_ORIGINAL_MAP_INDEX))
if not Dvar.ui_execdemo:get() and f6_local3(f0_local2) then
table.insert(f6_local0, f6_local2("dlc", f0_local2))
end
if not Dvar.ui_execdemo:get() and f6_local3(f0_local3) then
table.insert(f6_local0, f6_local2("dlc_bonus", f0_local3))
end
if Mods_Enabled() then --and Engine.Mods_Lists_GetInfoEntries( LuaEnums.USERMAP_BASE_PATH, 0, Engine.Mods_Lists_GetInfoEntriesCount( LuaEnums.USERMAP_BASE_PATH ) ) ~= nil then
local f9_local11 = Engine.Mods_Lists_GetInfoEntries(LuaEnums.USERMAP_BASE_PATH, 0,
Engine.Mods_Lists_GetInfoEntriesCount(LuaEnums.USERMAP_BASE_PATH))
if f9_local11 then
for f9_local12 = 0, #f9_local11, 1 do
local f9_local17 = f9_local11[f9_local12]
if LUI.startswith(f9_local17.internalName, "mp_") then
table.insert(f6_local0, f6_local2("mods", CoD.CONTENT_MODS_INDEX))
end
end
end
end
end
return f6_local0
end, true)

View File

@ -0,0 +1,260 @@
local f0_local0 = function(f1_arg0, f1_arg1)
if not CoD.useMouse then
return
else
f1_arg0.Options:setHandleMouse(true)
f1_arg0.Options:registerEventHandler("leftclick_outside", function(element, event)
CoD.PCUtil.SimulateButtonPress(event.controller, Enum.LUIButton.LUI_KEY_XBB_PSCIRCLE)
return true
end)
end
end
local PostLoadFunc = function(f3_arg0, f3_arg1)
f0_local0(f3_arg0, f3_arg1)
f3_arg0.disableBlur = true
f3_arg0.disablePopupOpenCloseAnim = true
Engine.SetModelValue(Engine.CreateModel(Engine.GetGlobalModel(), "GameSettingsFlyoutOpen"), true)
LUI.OverrideFunction_CallOriginalSecond(f3_arg0, "close", function(element)
Engine.SetModelValue(Engine.CreateModel(Engine.GetGlobalModel(), "GameSettingsFlyoutOpen"), false)
end)
f3_arg0:registerEventHandler("occlusion_change", function(element, event)
local f5_local0 = element:getParent()
if f5_local0 then
local f5_local1 = f5_local0:getFirstChild()
while f5_local1 ~= nil do
if f5_local1.menuName == "Lobby" then
break
end
f5_local1 = f5_local1:getNextSibling()
end
if f5_local1 then
if event.occluded == true then
f5_local1:setAlpha(0)
end
f5_local1:setAlpha(1)
end
end
element:OcclusionChange(event)
end)
f3_arg0:subscribeToModel(Engine.CreateModel(Engine.GetGlobalModel(), "lobbyRoot.lobbyNav", true), function(model)
local f6_local0 = f3_arg0.occludedBy
while f6_local0 do
if f6_local0.occludedBy ~= nil then
f6_local0 = f6_local0.occludedBy
end
while f6_local0 and f6_local0.menuName ~= "Lobby" do
f6_local0 = GoBack(f6_local0, f3_arg1)
end
Engine.SendClientScriptNotify(f3_arg1, "menu_change" .. Engine.GetLocalClientNum(f3_arg1), "Main",
"closeToMenu")
return
end
GoBack(f3_arg0, f3_arg1)
end, false)
end
DataSources.GameSettingsFlyoutButtonsCustom = DataSourceHelpers.ListSetup("GameSettingsFlyoutButtonsCustom",
function(f7_arg0)
local f7_local0 = {
{
optionDisplay = "MPUI_CHANGE_MAP_CAPS",
customId = "btnChangeMap",
action = OpenChangeMap
},
-- {
-- optionDisplay = "MPUI_CHANGE_GAME_MODE_CAPS",
-- customId = "btnChangeGameMode",
-- action = OpenChangeGameMode
-- },
{
optionDisplay = "MENU_SETUP_BOTS_CAPS",
customId = "btnSetupBots",
action = OpenBotSettings
},
{
optionDisplay = "MPUI_EDIT_GAME_RULES_CAPS",
customId = "btnEditGameRules",
action = OpenEditGameRules
}
}
-- if CoD.isPC and IsServerBrowserEnabled() then
-- table.insert( f7_local0, {
-- optionDisplay = "PLATFORM_SERVER_SETTINGS_CAPS",
-- customID = "btnServerSettings",
-- action = OpenServerSettings
-- } )
-- end
local f7_local1 = {}
for f7_local5, f7_local6 in ipairs(f7_local0) do
table.insert(f7_local1, {
models = {
displayText = Engine.Localize(f7_local6.optionDisplay),
customId = f7_local6.customId,
disabled = f7_local6.disabled
},
properties = {
title = f7_local6.optionDisplay,
desc = f7_local6.desc,
action = f7_local6.action,
actionParam = f7_local6.actionParam
}
})
end
return f7_local1
end, nil, nil, nil)
LUI.createMenu.GameSettingsFlyoutMPCustom = function(controller)
local self = CoD.Menu.NewForUIEditor("GameSettingsFlyoutMPCustom")
if PreLoadFunc then
PreLoadFunc(self, controller)
end
self.soundSet = "default"
self:setOwner(controller)
self:setLeftRight(true, true, 0, 0)
self:setTopBottom(true, true, 0, 0)
self:playSound("menu_open", controller)
self.buttonModel = Engine.CreateModel(Engine.GetModelForController(controller), "GameSettingsFlyoutMP.buttonPrompts")
self.anyChildUsesUpdateState = true
local Options = LUI.UIList.new(self, controller, -2, 0, nil, false, false, 0, 0, false, false)
Options:makeFocusable()
Options:setLeftRight(true, false, 243.43, 523.43)
Options:setTopBottom(true, false, 177.56, 329.56)
Options:setYRot(25)
Options:setWidgetType(CoD.FE_List1ButtonLarge_PH)
Options:setVerticalCount(3)
Options:setSpacing(-2)
Options:setDataSource("GameSettingsFlyoutButtonsCustom")
Options:registerEventHandler("gain_focus", function(element, event)
local f9_local0 = nil
if element.gainFocus then
f9_local0 = element:gainFocus(event)
elseif element.super.gainFocus then
f9_local0 = element.super:gainFocus(event)
end
CoD.Menu.UpdateButtonShownState(element, self, controller, Enum.LUIButton.LUI_KEY_XBA_PSCROSS)
return f9_local0
end)
Options:registerEventHandler("lose_focus", function(element, event)
local f10_local0 = nil
if element.loseFocus then
f10_local0 = element:loseFocus(event)
elseif element.super.loseFocus then
f10_local0 = element.super:loseFocus(event)
end
return f10_local0
end)
self:AddButtonCallbackFunction(Options, controller, Enum.LUIButton.LUI_KEY_XBA_PSCROSS, "ENTER",
function(element, menu, controller, model)
ProcessListAction(self, element, controller)
return true
end, function(element, menu, controller)
CoD.Menu.SetButtonLabel(menu, Enum.LUIButton.LUI_KEY_XBA_PSCROSS, "MENU_SELECT")
return true
end, false)
self:addElement(Options)
self.Options = Options
self:mergeStateConditions({
{
stateName = "Local",
condition = function(menu, element, event)
return IsLobbyNetworkModeLAN()
end
}
})
self:subscribeToModel(Engine.GetModel(Engine.GetGlobalModel(), "lobbyRoot.lobbyNetworkMode"), function(model)
local f14_local0 = self
local f14_local1 = {
controller = controller,
name = "model_validation",
modelValue = Engine.GetModelValue(model),
modelName = "lobbyRoot.lobbyNetworkMode"
}
CoD.Menu.UpdateButtonShownState(f14_local0, self, controller, Enum.LUIButton.LUI_KEY_XBY_PSTRIANGLE)
end)
self:subscribeToModel(Engine.GetModel(Engine.GetGlobalModel(), "lobbyRoot.lobbyNav"), function(model)
local f15_local0 = self
local f15_local1 = {
controller = controller,
name = "model_validation",
modelValue = Engine.GetModelValue(model),
modelName = "lobbyRoot.lobbyNav"
}
CoD.Menu.UpdateButtonShownState(f15_local0, self, controller, Enum.LUIButton.LUI_KEY_XBY_PSTRIANGLE)
end)
self:AddButtonCallbackFunction(self, controller, Enum.LUIButton.LUI_KEY_XBB_PSCIRCLE, nil,
function(element, menu, controller, model)
GoBack(self, controller)
ClearMenuSavedState(menu)
return true
end, function(element, menu, controller)
CoD.Menu.SetButtonLabel(menu, Enum.LUIButton.LUI_KEY_XBB_PSCIRCLE, "")
return false
end, false)
self:AddButtonCallbackFunction(self, controller, Enum.LUIButton.LUI_KEY_START, "M",
function(element, menu, controller, model)
GoBackAndOpenOverlayOnParent(self, "StartMenu_Main", controller)
return true
end, function(element, menu, controller)
CoD.Menu.SetButtonLabel(menu, Enum.LUIButton.LUI_KEY_START, "MENU_MENU")
return true
end, false)
self:AddButtonCallbackFunction(self, controller, Enum.LUIButton.LUI_KEY_XBY_PSTRIANGLE, "S",
function(element, menu, controller, model)
if not IsLAN() and not IsPlayerAGuest(controller) and IsPlayerAllowedToPlayOnline(controller) then
GoBackAndOpenOverlayOnParent(self, "Social_Main", controller)
return true
else
end
end, function(element, menu, controller)
if not IsLAN() and not IsPlayerAGuest(controller) and IsPlayerAllowedToPlayOnline(controller) then
CoD.Menu.SetButtonLabel(menu, Enum.LUIButton.LUI_KEY_XBY_PSTRIANGLE, "")
return false
else
return false
end
end, false)
self:AddButtonCallbackFunction(self, controller, Enum.LUIButton.LUI_KEY_LB, nil,
function(element, menu, controller, model)
SendButtonPressToOccludedMenu(menu, controller, model, Enum.LUIButton.LUI_KEY_LB)
return true
end, function(element, menu, controller)
CoD.Menu.SetButtonLabel(menu, Enum.LUIButton.LUI_KEY_LB, "")
return false
end, false)
self:AddButtonCallbackFunction(self, controller, Enum.LUIButton.LUI_KEY_RB, nil,
function(element, menu, controller, model)
SendButtonPressToOccludedMenu(menu, controller, model, Enum.LUIButton.LUI_KEY_RB)
return true
end, function(element, menu, controller)
CoD.Menu.SetButtonLabel(menu, Enum.LUIButton.LUI_KEY_RB, "")
return false
end, false)
Options.id = "Options"
self:processEvent({
name = "menu_loaded",
controller = controller
})
self:processEvent({
name = "update_state",
menu = self
})
if not self:restoreState() then
self.Options:processEvent({
name = "gain_focus",
controller = controller
})
end
LUI.OverrideFunction_CallOriginalSecond(self, "close", function(element)
element.Options:close()
Engine.UnsubscribeAndFreeModel(Engine.GetModel(Engine.GetModelForController(controller),
"GameSettingsFlyoutMP.buttonPrompts"))
end)
if PostLoadFunc then
PostLoadFunc(self, controller)
end
return self
end

View File

@ -0,0 +1,217 @@
DataSources.StartMenuTabs = ListHelper_SetupDataSource("StartMenuTabs", function(f44_arg0)
local f44_local0 = {}
table.insert(f44_local0, {
models = {
tabIcon = CoD.buttonStrings.shoulderl
},
properties = {
m_mouseDisabled = true
}
})
if Engine.IsDemoPlaying() then
local f44_local1 = "CoD.StartMenu_GameOptions"
if Engine.IsZombiesGame() then
f44_local1 = "CoD.StartMenu_GameOptions_ZM"
end
table.insert(f44_local0, {
models = {
tabName = Engine.Localize("MENU_THEATER_CAPS"),
tabWidget = f44_local1,
tabIcon = ""
},
properties = {
tabId = "gameOptions"
}
})
elseif Engine.IsInGame() then
if IsGameTypeDOA() and not InSafehouse() then
table.insert(f44_local0, {
models = {
tabName = "DOA",
tabWidget = "CoD.StartMenu_GameOptions_DOA",
tabIcon = ""
},
properties = {
tabId = "gameOptions"
}
})
elseif CoD.isCampaign then
table.insert(f44_local0, {
models = {
tabName = SessionModeToUnlocalizedSessionModeCaps(Engine.CurrentSessionMode()),
tabWidget = "CoD.StartMenu_GameOptions_CP",
tabIcon = ""
},
properties = {
tabId = "gameOptions"
}
})
if not Engine.IsCampaignModeZombies() then
if CoD.isSafehouse and CoD.isOnlineGame() and not IsInTrainingSim(f44_arg0) and Dvar.ui_safehousebarracks:get() and not IsPlayerAGuest(f44_arg0) then
table.insert(f44_local0, {
models = {
tabName = "CPUI_BARRACKS_CAPS",
tabWidget = "CoD.CombatRecordCP_Contents",
tabIcon = ""
},
properties = {
tabId = "combatRecord"
}
})
end
if HighestMapReachedGreaterThan(f44_arg0, 1) or LUI.DEV ~= nil then
table.insert(f44_local0, {
models = {
tabName = "CPUI_TACTICAL_MODE_CAPS",
tabWidget = "CoD.StartMenu_TacticalMode",
tabIcon = ""
},
properties = {
tabId = "tacticalMode"
}
})
end
if not CoD.isSafehouse and not IsPlayerAGuest(f44_arg0) then
table.insert(f44_local0, {
models = {
tabName = "CPUI_ACCOLADES",
tabWidget = "CoD.MissionRecordVault_Challenges",
tabIcon = ""
},
properties = {
tabId = "accolades"
}
})
end
end
elseif Engine.IsZombiesGame() then
table.insert(f44_local0, {
models = {
tabName = SessionModeToUnlocalizedSessionModeCaps(Engine.CurrentSessionMode()),
tabWidget = "CoD.StartMenu_GameOptions_ZM",
tabIcon = ""
},
properties = {
tabId = "gameOptions"
}
})
else
table.insert(f44_local0, {
models = {
tabName = SessionModeToUnlocalizedSessionModeCaps(Engine.CurrentSessionMode()),
tabWidget = "CoD.StartMenu_GameOptions",
tabIcon = ""
},
properties = {
tabId = "gameOptions"
}
})
end
else
if not IsPlayerAGuest(f44_arg0) then
table.insert(f44_local0, {
models = {
tabName = "MENU_TAB_IDENTITY_CAPS",
tabWidget = "CoD.StartMenu_Identity",
tabIcon = ""
},
properties = {
tabId = "identity",
disabled = Dvar.ui_execdemo_gamescom:get()
}
})
end
if not IsLobbyNetworkModeLAN() and not Dvar.ui_execdemo:get() and not Engine.IsCampaignModeZombies() and not IsPlayerAGuest(f44_arg0) then
table.insert(f44_local0, {
models = {
tabName = "MENU_TAB_CHALLENGES_CAPS",
tabWidget = "CoD.StartMenu_Challenges",
tabIcon = ""
},
properties = {
tabId = "challenges"
}
})
local f44_local1 = CoD.isPC
if f44_local1 then
f44_local1 = false --Mods_IsUsingMods()
end
table.insert(f44_local0, {
models = {
tabName = "MENU_TAB_BARRACKS_CAPS",
tabWidget = "CoD.StartMenu_Barracks",
tabIcon = "",
disabled = f44_local1
},
properties = {
tabId = "barracks"
}
})
if CommunityOptionsEnabled() then
local f44_local2 = CoD.perController[f44_arg0].openMediaTabAfterClosingGroups
CoD.perController[f44_arg0].openMediaTabAfterClosingGroups = false
table.insert(f44_local0, {
models = {
tabName = "MENU_TAB_MEDIA_CAPS",
tabWidget = "CoD.StartMenu_Media",
tabIcon = ""
},
properties = {
tabId = "media",
selectIndex = f44_local2
}
})
end
end
end
if IsGameTypeDOA() and Engine.IsInGame() and not InSafehouse() then
local f44_local1 = table.insert
local f44_local2 = f44_local0
local f44_local3 = {
models = {
tabName = "MENU_TAB_OPTIONS_CAPS",
tabWidget = "CoD.StartMenu_Options_DOA",
tabIcon = ""
}
}
local f44_local4 = {
tabId = "options"
}
local f44_local5 = Dvar.ui_execdemo:get()
if f44_local5 then
f44_local5 = not Engine.IsInGame()
end
f44_local4.selectIndex = f44_local5
f44_local3.properties = f44_local4
f44_local1(f44_local2, f44_local3)
else
local f44_local1 = table.insert
local f44_local2 = f44_local0
local f44_local3 = {
models = {
tabName = "MENU_TAB_OPTIONS_CAPS",
tabWidget = "CoD.StartMenu_Options",
tabIcon = ""
}
}
local f44_local4 = {
tabId = "options"
}
local f44_local5 = Dvar.ui_execdemo_gamescom:get()
if f44_local5 then
f44_local5 = not Engine.IsInGame()
end
f44_local4.selectIndex = f44_local5
f44_local3.properties = f44_local4
f44_local1(f44_local2, f44_local3)
end
table.insert(f44_local0, {
models = {
tabIcon = CoD.buttonStrings.shoulderr
},
properties = {
m_mouseDisabled = true
}
})
return f44_local0
end, true)

View File

@ -0,0 +1,160 @@
local IsGamescomDemo = function()
return Dvar.ui_execdemo_gamescom:get()
end
local IsBetaDemo = function()
return Dvar.ui_execdemo_beta:get()
end
local SetButtonState = function(button, state)
if state == nil then
return
elseif state == CoD.LobbyButtons.DISABLED then
button.disabled = true
elseif state == CoD.LobbyButtons.HIDDEN then
button.hidden = true
end
end
local RemoveButton = function(buttonTable, button)
if not button then
return
end
for id, v in pairs(buttonTable) do
if buttonTable[id].optionDisplay == button.stringRef then
table.remove(buttonTable, id)
end
end
end
local RemoveSpaces = function(buttonTable)
for id, v in pairs(buttonTable) do
buttonTable[id].isLastButtonInGroup = false
end
end
local GetButtonIndex = function(buttonTable, button)
if not button then
return nil
end
for id, v in pairs(buttonTable) do
if buttonTable[id].optionDisplay == button.stringRef then
return id
end
end
end
local AddButton = function(controller, options, button, isLargeButton, index)
if button == nil then
return
end
button.disabled = false
button.hidden = false
button.selected = false
button.warning = false
if button.defaultState ~= nil then
if button.defaultState == CoD.LobbyButtons.DISABLED then
button.disabled = true
elseif button.defaultState == CoD.LobbyButtons.HIDDEN then
button.hidden = true
end
end
if button.disabledFunc ~= nil then
button.disabled = button.disabledFunc(controller)
end
if button.visibleFunc ~= nil then
button.hidden = not button.visibleFunc(controller)
end
if IsBetaDemo() then
SetButtonState(button, button.demo_beta)
elseif IsGamescomDemo() then
SetButtonState(button, button.demo_gamescom)
end
if button.hidden then
return
end
local lobbyNav = LobbyData.GetLobbyNav()
if button.selectedFunc ~= nil then
button.selected = button.selectedFunc(button.selectedParam)
elseif CoD.LobbyMenus.History[lobbyNav] ~= nil then
button.selected = CoD.LobbyMenus.History[lobbyNav] == button.customId
end
if button.newBreadcrumbFunc then
local f8_local1 = button.newBreadcrumbFunc
if type(f8_local1) == "string" then
f8_local1 = LUI.getTableFromPath(f8_local1)
end
if f8_local1 then
button.isBreadcrumbNew = f8_local1(controller)
end
end
if button.warningFunc ~= nil then
button.warning = button.warningFunc(controller)
end
if button.starterPack == CoD.LobbyButtons.STARTERPACK_UPGRADE then
button.starterPackUpgrade = true
if IsStarterPack() then
button.disabled = false
end
end
if index ~= nil then
table.insert(options, index, {
optionDisplay = button.stringRef,
action = button.action,
param = button.param,
customId = button.customId,
isLargeButton = isLargeButton,
isLastButtonInGroup = false,
disabled = button.disabled,
selected = button.selected,
isBreadcrumbNew = button.isBreadcrumbNew,
warning = button.warning,
requiredChunk = button.selectedParam,
starterPackUpgrade = button.starterPackUpgrade,
unloadMod = button.unloadMod
})
else
table.insert(options, {
optionDisplay = button.stringRef,
action = button.action,
param = button.param,
customId = button.customId,
isLargeButton = isLargeButton,
isLastButtonInGroup = false,
disabled = button.disabled,
selected = button.selected,
isBreadcrumbNew = button.isBreadcrumbNew,
warning = button.warning,
requiredChunk = button.selectedParam,
starterPackUpgrade = button.starterPackUpgrade,
unloadMod = button.unloadMod
})
end
end
local AddLargeButton = function(controller, options, button, index)
AddButton(controller, options, button, true, index)
end
local AddSmallButton = function(controller, options, button, index)
AddButton(controller, options, button, false, index)
end
local AddSpacer = function(options, index)
if index ~= nil then
options[index].isLastButtonInGroup = true
elseif 0 < #options then
options[#options].isLastButtonInGroup = true
end
end
return {
AddButton = AddButton,
AddLargeButton = AddLargeButton,
AddSmallButton = AddSmallButton,
AddSpacer = AddSpacer,
RemoveButton = RemoveButton,
RemoveSpaces = RemoveSpaces,
GetButtonIndex = GetButtonIndex
}

View File

@ -0,0 +1,148 @@
DataSources.OptionGraphicsVideo = DataSourceHelpers.ListSetup( "PC.OptionGraphicsVideo", function ( controller )
local videoSettings = {}
table.insert( videoSettings, {
models = {
label = "PLATFORM_DISPLAY_MODE",
description = "PLATFORM_DISPLAY_MODE_DESC",
profileVarName = "r_fullscreen",
datasource = "OptionPCGraphicsDisplayMode",
widgetType = "dropdown"
},
properties = CoD.PCUtil.DependantDropdownProperties
} )
table.insert( videoSettings, {
models = {
label = "PLATFORM_MONITOR",
description = "PLATFORM_MONITOR_DESC",
profileVarName = "r_monitor",
datasource = "OptionPCGraphicsMonitor",
widgetType = "dropdown",
disabledFunction = function ()
return Engine.GetHardwareProfileValueAsString( "r_fullscreen" ) == "0"
end
},
properties = CoD.PCUtil.DependantDropdownProperties
} )
table.insert( videoSettings, {
models = {
label = "PLATFORM_SCREEN_RESOLUTION",
description = "PLATFORM_SCREEN_RESOLUTION_DESC",
profileVarName = "r_mode",
datasource = "OptionPCGraphicsScreenResolution",
widgetType = "dropdown",
disabledFunction = function ()
return Engine.GetHardwareProfileValueAsString( "r_fullscreen" ) == "2"
end
},
properties = CoD.PCUtil.DependantDropdownProperties
} )
table.insert( videoSettings, {
models = {
label = "PLATFORM_REFRESH_RATE",
description = "PLATFORM_REFRESH_RATE_DESC",
profileVarName = "r_refreshRate",
datasource = "OptionPCGraphicsRefreshRate",
widgetType = "dropdown",
disabledFunction = function ()
return Engine.GetHardwareProfileValueAsString( "r_fullscreen" ) ~= "1"
end
},
properties = CoD.PCUtil.OptionsGenericDropdownProperties
} )
table.insert( videoSettings, {
models = {
label = "PLATFORM_SCENE_RESOLUTION_RATIO",
description = "PLATFORM_SCENE_RESOLUTION_RATIO_DESC",
profileVarName = "r_sceneResolutionMultiplier",
datasource = "OptionPCGraphicsSceneResolution",
widgetType = "dropdown"
},
properties = CoD.PCUtil.DependantDropdownProperties
} )
table.insert( videoSettings, {
models = {
label = "PLATFORM_DISPLAY_GAMMA",
description = "PLATFORM_DISPLAY_GAMMA_DESC",
profileVarName = "r_videoMode",
datasource = "OptionPCGraphicsDisplayGamma",
widgetType = "dropdown"
},
properties = CoD.PCUtil.OptionsGenericDropdownProperties
} )
table.insert( videoSettings, {
models = {
label = "PLATFORM_BRIGHTNESS",
description = "PLATFORM_BRIGHTNESS_DESC",
profileVarName = "r_sceneBrightness",
profileType = "user",
lowValue = -1,
highValue = 1,
widgetType = "slider"
},
properties = CoD.PCUtil.OptionsGenericSliderProperties
} )
table.insert( videoSettings, {
models = {
label = "PLATFORM_FOV",
description = "PLATFORM_FOV_DESC",
profileVarName = "cg_fov_default",
lowValue = 65,
highValue = 120,
useIntegerDisplay = 1,
widgetType = "slider"
},
properties = CoD.PCUtil.OptionsGenericSliderProperties
} )
table.insert( videoSettings, {
models = {
widgetType = "spacer",
height = 32
}
} )
table.insert( videoSettings, {
models = {
label = "PLATFORM_MAX_FPS",
description = "PLATFORM_MAX_FPS_DESC",
profileVarName = "com_maxfps",
lowValue = 24,
highValue = 500,
useIntegerDisplay = 1,
widgetType = "slider"
},
properties = CoD.PCUtil.OptionsGenericSliderProperties
} )
table.insert( videoSettings, {
models = {
label = "PLATFORM_SYNC_EVERY_FRAME",
description = "PLATFORM_VSYNC_DESC",
profileVarName = "r_vsync",
widgetType = "checkbox"
},
properties = CoD.PCUtil.OptionsGenericCheckboxProperties
} )
table.insert( videoSettings, {
models = {
label = "PLATFORM_DRAW_FPS",
description = "PLATFORM_DRAW_FPS_DESC",
profileVarName = "com_drawFPS_PC",
widgetType = "checkbox"
},
properties = CoD.PCUtil.OptionsGenericCheckboxProperties
} )
return videoSettings
end, true )
DataSources.OptionGraphicsVideo.getWidgetTypeForItem = function ( list, dataItemModel, row )
if dataItemModel then
local widgetType = Engine.GetModelValue( Engine.GetModel( dataItemModel, "widgetType" ) )
if widgetType == "dropdown" then
return CoD.OptionDropdown
elseif widgetType == "checkbox" then
return CoD.StartMenu_Options_CheckBoxOption
elseif widgetType == "slider" then
return CoD.StartMenu_Options_SliderBar
elseif widgetType == "spacer" then
return CoD.VerticalListSpacer
end
end
return nil
end

View File

@ -0,0 +1,4 @@
-- Fix LUI_NULL_FUNCTION messages
function Engine.PIXBeginEvent() end
function Engine.PIXEndEvent() end

View File

@ -0,0 +1,30 @@
local modeInfo = LobbyData:UITargetFromId(Engine.GetLobbyUIScreen())
local maxClients = modeInfo.maxClients
-- Disable setting party privacy in menu. Auto set to open + max.
Engine.SetDvar("partyprivacyenabled", 0)
Engine.SetDvar("tu4_partyprivacyuseglobal", 0)
Engine.SetDvar("tu4_partyprivacyluacheck", 0)
-- Fix for invisible bots in custom games
if maxClients >= 1 then
Engine.SetDvar("party_maxplayers", maxClients)
end
if not Engine.IsInGame() then
return
end
-- Removed check for public matches to allow team change in ranked matches
CoD.IsTeamChangeAllowed = function()
if Engine.GetGametypeSetting("allowInGameTeamChange") == 1 then
return true
else
return false
end
end
-- Set com_maxclients InGame so players can join via direct connect (default from lobbydata)
Engine.SetDvar("com_maxclients", maxClients)
require("datasources_start_menu_game_options")

View File

@ -0,0 +1,75 @@
DataSources.StartMenuGameOptions = ListHelper_SetupDataSource("StartMenuGameOptions", function (controller)
local options = {}
if Engine.IsDemoPlaying() then
if not IsDemoRestrictedBasicMode() then
table.insert(options, {models = {displayText = Engine.ToUpper(Engine.Localize("MENU_UPLOAD_CLIP", Engine.GetDemoSegmentCount())), action = StartMenuUploadClip, disabledFunction = IsUploadClipButtonDisabled}, properties = {hideHelpItemLabel = true}})
end
if Engine.IsDemoHighlightReelMode() then
table.insert(options, {models = {displayText = Engine.ToUpper(Engine.Localize("MENU_DEMO_CUSTOMIZE_HIGHLIGHT_REEL")), action = StartMenuOpenCustomizeHighlightReel, disabledFunction = IsCustomizeHighlightReelButtonDisabled}})
end
table.insert(options, {models = {displayText = Engine.ToUpper(Engine.ToUpper(Engine.Localize("MENU_JUMP_TO_START"))), action = StartMenuJumpToStart, disabledFunction = IsJumpToStartButtonDisabled}, properties = {hideHelpItemLabel = true}})
local endDemoButtonText = nil
if Engine.IsDemoClipPlaying() then
endDemoButtonText = Engine.ToUpper(Engine.Localize("MENU_END_CLIP"))
else
endDemoButtonText = Engine.ToUpper(Engine.Localize("MENU_END_FILM"))
end
table.insert(options, {models = {displayText = Engine.ToUpper(endDemoButtonText), action = StartMenuEndDemo}})
elseif CoD.isCampaign then
table.insert(options, {models = {displayText = "MENU_RESUMEGAME_CAPS", action = StartMenuGoBack_ListElement}})
local inTrainingSim = CoD.SafeGetModelValue(Engine.GetModelForController(controller), "safehouse.inTrainingSim")
if not inTrainingSim then
inTrainingSim = 0
end
if Engine.IsLobbyHost(Enum.LobbyType.LOBBY_TYPE_GAME) then
if not CoD.isSafehouse and controller == Engine.GetPrimaryController() then
table.insert(options, {models = {displayText = "MENU_RESTART_MISSION_CAPS", action = RestartMission}})
if LUI.DEV ~= nil then
table.insert(options, {models = {displayText = "MENU_RESTART_CHECKPOINT_CAPS", action = RestartFromCheckpoint}})
end
end
if controller == Engine.GetPrimaryController() then
table.insert(options, {models = {displayText = "MENU_CHANGE_DIFFICULTY_CAPS", action = OpenDifficultySelect}})
end
if CoD.isSafehouse and inTrainingSim == 1 then
table.insert(options, {models = {displayText = "MENU_END_TRAINING_SIM", action = EndTrainingSim}})
elseif controller == Engine.GetPrimaryController() then
if Engine.DvarBool(0, "ui_blocksaves") then
table.insert(options, {models = {displayText = "MENU_EXIT_CAPS", action = SaveAndQuitGame}})
else
table.insert(options, {models = {displayText = "MENU_SAVE_AND_QUIT_CAPS", action = SaveAndQuitGame}})
end
end
elseif CoD.isSafehouse and inTrainingSim == 1 then
table.insert(options, {models = {displayText = "MENU_END_TRAINING_SIM", action = EndTrainingSim}})
else
table.insert(options, {models = {displayText = "MENU_LEAVE_PARTY_AND_EXIT_CAPS", action = QuitGame}})
end
elseif CoD.isMultiplayer then
if Engine.Team(controller, "name") ~= "TEAM_SPECTATOR" and Engine.GetGametypeSetting("disableClassSelection") ~= 1 then
table.insert(options, {models = {displayText = "MPUI_CHOOSE_CLASS_BUTTON_CAPS", action = ChooseClass}})
end
if not Engine.IsVisibilityBitSet(controller, Enum.UIVisibilityBit.BIT_ROUND_END_KILLCAM) and not Engine.IsVisibilityBitSet(controller, Enum.UIVisibilityBit.BIT_FINAL_KILLCAM) and CoD.IsTeamChangeAllowed() then
table.insert(options, {models = {displayText = "MPUI_CHANGE_TEAM_BUTTON_CAPS", action = ChooseTeam}})
end
if controller == 0 then
local endGameText = "MENU_QUIT_GAME_CAPS"
if Engine.IsLobbyHost(Enum.LobbyType.LOBBY_TYPE_GAME) and not CoD.isOnlineGame() then
endGameText = "MENU_END_GAME_CAPS"
end
table.insert(options, {models = {displayText = endGameText, action = QuitGame_MP}})
end
elseif CoD.isZombie then
table.insert(options, {models = {displayText = "MENU_RESUMEGAME_CAPS", action = StartMenuGoBack_ListElement}})
if Engine.IsLobbyHost(Enum.LobbyType.LOBBY_TYPE_GAME) and (not Engine.SessionModeIsMode(CoD.SESSIONMODE_SYSTEMLINK) or Engine.SessionModeIsMode(CoD.SESSIONMODE_OFFLINE)) then
table.insert(options, {models = {displayText = "MENU_RESTART_LEVEL_CAPS", action = RestartGame}})
end
if Engine.IsLobbyHost(Enum.LobbyType.LOBBY_TYPE_GAME) == true then
table.insert(options, {models = {displayText = "MENU_END_GAME_CAPS", action = QuitGame_MP}})
else
table.insert(options, {models = {displayText = "MENU_QUIT_GAME_CAPS", action = QuitGame_MP}})
end
end
table.insert(options, {models = {displayText = "QUIT TO DESKTOP", action = OpenPCQuit}})
return options
end, true)

View File

@ -0,0 +1,34 @@
if Engine.GetCurrentMap() ~= "core_frontend" then
return
end
if CoD.LobbyMember then
local oldLobbyMember = CoD.LobbyMember.new
function CoD.LobbyMember.new(menu, controller)
local self = oldLobbyMember(menu, controller)
-- Hide the playlist count text
if self.SearchingForPlayer then
self.SearchingForPlayer:setAlpha(0)
end
if self.FEMemberBlurPanelContainer0 then
self.FEMemberBlurPanelContainer0:setAlpha(0)
end
return self
end
end
function IsLobbyStatusVisible()
return false
end
Engine.SetDvar("lobbyMigrate_Enabled", 0)
Engine.SetDvar("lobbyTimerStatusVotingInterval", 11000)
Engine.SetDvar("lobbyTimerStatusBeginInterval", 10)
Engine.SetDvar("lobbyTimerStatusStartInterval", 10)
Engine.SetDvar("lobbyTimerStatusPostGameInterval", 10)
Engine.SetDvar("lobbyTimerStatusVotingInterval_Arena", 11000)
require("widget_playlist_match_settings_info")
require("widget_playlist_category_match_settings_info")

View File

@ -0,0 +1,15 @@
if not CoD.playlistCategoryMatchSettingsInfo then
return
end
local oldPlaylistCategoryMatchSettingsInfo = CoD.playlistCategoryMatchSettingsInfo.new
function CoD.playlistCategoryMatchSettingsInfo.new(menu, controller)
local self = oldPlaylistCategoryMatchSettingsInfo(menu, controller)
-- Hide the playlist count text
if self.playlistCount then
self.playlistCount:setAlpha(0)
end
return self
end

View File

@ -0,0 +1,15 @@
if not CoD.playlistMatchSettingsInfo then
return
end
local oldPlaylistMatchSettingsInfo = CoD.playlistMatchSettingsInfo.new
function CoD.playlistMatchSettingsInfo.new(menu, controller)
local self = oldPlaylistMatchSettingsInfo(menu, controller)
-- Hide the playlist count text
if self.playlistCount then
self.playlistCount:setAlpha(0)
end
return self
end

View File

@ -0,0 +1 @@
require("online_mods_loaded")

View File

@ -0,0 +1,23 @@
if Engine.GetCurrentMap() ~= "core_frontend" then
return
end
function ShouldUnloadMod(arg0)
return false
end
-- Load usermaps mod if custom map selected
local mustLoadUsermaps = function(element, controller)
if CoD.perController[controller].mapCategory == CoD.CONTENT_MODS_INDEX then
if not Engine.IsUsingMods() then
LuaUtils.Mods_LoadMod("usermaps") -- LuaUtils.Mods_LoadMod(element.loadModName)
CoD.OverlayUtility.ShowToast("DefaultState", Engine.Localize("MENU_MODS_CAPS"), Engine.Localize("PLATFORM_MODS_LOADED") .. " " .. element.mapName)
end
end
end
function MapSelected(element, controller)
SetMap(controller, element.mapName, false)
mustLoadUsermaps(element, controller)
end

View File

@ -0,0 +1,378 @@
if Engine.GetCurrentMap() ~= "core_frontend" then
return
end
function IsServerBrowserEnabled()
return true
end
DataSources.LobbyServer = {
prepare = function(controller, list, filter)
list.numElementsInList = list.vCount
list.controller = controller
list.serverBrowserRootModel = Engine.CreateModel(Engine.GetGlobalModel(), "serverBrowser")
local serverListCountModel = Engine.GetModel(list.serverBrowserRootModel, "serverListCount")
if serverListCountModel then
list.serverCount = Engine.GetModelValue(serverListCountModel)
else
list.serverCount = 0
end
list.servers = {}
local serversModel = Engine.CreateModel(list.serverBrowserRootModel, "servers")
for i = 1, list.numElementsInList, 1 do
list.servers[i] = {}
list.servers[i].root = Engine.CreateModel(serversModel, "server_" .. i)
list.servers[i].model = Engine.CreateModel(list.servers[i].root, "model")
end
list.updateModels = function(controller, list, offset)
local serverInfo = Engine.SteamServerBrowser_GetServerInfo(offset)
if serverInfo then
local SetModelValue = function(model, key, value)
local model = Engine.CreateModel(model, key)
if model then
Engine.SetModelValue(model, value)
end
end
local elementIndex = offset % list.numElementsInList + 1
local serverModel = list.servers[elementIndex].model
SetModelValue(serverModel, "serverIndex", serverInfo.serverIndex)
SetModelValue(serverModel, "connectAddr", serverInfo.connectAddr)
SetModelValue(serverModel, "ping", serverInfo.ping)
SetModelValue(serverModel, "modName", serverInfo.modName)
SetModelValue(serverModel, "mapName", serverInfo.map)
SetModelValue(serverModel, "desc", serverInfo.desc)
-- Change the client count to be the actual player count
local clientCount = serverInfo.playerCount - serverInfo.botCount
SetModelValue(serverModel, "clientCount", clientCount)
SetModelValue(serverModel, "maxClients", serverInfo.maxPlayers)
SetModelValue(serverModel, "passwordProtected", serverInfo.password)
SetModelValue(serverModel, "secure", serverInfo.secure)
SetModelValue(serverModel, "name", serverInfo.name)
SetModelValue(serverModel, "gameType", serverInfo.gametype)
SetModelValue(serverModel, "dedicated", serverInfo.dedicated)
SetModelValue(serverModel, "ranked", serverInfo.ranked)
SetModelValue(serverModel, "hardcore", serverInfo.hardcore)
SetModelValue(serverModel, "zombies", serverInfo.zombies)
-- Add the bot count
SetModelValue(serverModel, "botCount", serverInfo.botCount)
return serverModel
else
return nil
end
end
if list.serverListUpdateSubscription then
list:removeSubscription(list.serverListUpdateSubscription)
end
local serverListUpdateModel = Engine.CreateModel(list.serverBrowserRootModel, "serverListCount")
list.serverListUpdateSubscription = list:subscribeToModel(serverListUpdateModel, function(model)
list:updateDataSource(false, false)
end, false)
if list.serverListSortTypeSubscription then
list:removeSubscription(list.serverListSortTypeSubscription)
end
local serverListSortTypeModel = Engine.CreateModel(list.serverBrowserRootModel, "serverListSortType")
list.serverListSortTypeSubscription = list:subscribeToModel(serverListSortTypeModel, function(model)
list:updateDataSource(false, false)
end, false)
end,
getCount = function(list)
return list.serverCount
end,
getItem = function(controller, list, index)
local offset = index - 1
return list.updateModels(controller, list, offset)
end,
cleanup = function(list)
if list.serverBrowserRootModel then
Engine.UnsubscribeAndFreeModel(list.serverBrowserRootModel)
list.serverBrowserRootModel = nil
end
end
}
CoD.ServerBrowserRowInternal.new = function(menu, controller)
local self = LUI.UIHorizontalList.new({
left = 0,
top = 0,
right = 0,
bottom = 0,
leftAnchor = true,
topAnchor = true,
rightAnchor = true,
bottomAnchor = true,
spacing = 2
})
self:setAlignment(LUI.Alignment.Left)
if PreLoadFunc then
PreLoadFunc(self, controller)
end
self:setUseStencil(false)
self:setClass(CoD.ServerBrowserRowInternal)
self.id = "ServerBrowserRowInternal"
self.soundSet = "default"
self:setLeftRight(true, false, 0, 700)
self:setTopBottom(true, false, 0, 22)
self:makeFocusable()
self.onlyChildrenFocusable = true
self.anyChildUsesUpdateState = true
local passwordFlag = CoD.ServerBrowserFlag.new(menu, controller)
passwordFlag:setLeftRight(true, false, 0, 28)
passwordFlag:setTopBottom(true, true, 0, 0)
passwordFlag.icon:setImage(RegisterImage("uie_t7_icon_serverbrowser_protected"))
passwordFlag:linkToElementModel(self, nil, false, function(model)
passwordFlag:setModel(model, controller)
end)
passwordFlag:mergeStateConditions({
{
stateName = "FlagOn",
condition = function(menu, element, event)
return IsSelfModelValueTrue(element, controller, "passwordProtected")
end
}
})
passwordFlag:linkToElementModel(passwordFlag, "passwordProtected", true, function(model)
menu:updateElementState(passwordFlag, {
name = "model_validation",
menu = menu,
modelValue = Engine.GetModelValue(model),
modelName = "passwordProtected"
})
end)
self:addElement(passwordFlag)
self.passwordFlag = passwordFlag
local dedicatedFlag = CoD.ServerBrowserFlag.new(menu, controller)
dedicatedFlag:setLeftRight(true, false, 30, 58)
dedicatedFlag:setTopBottom(true, true, 0, 0)
dedicatedFlag.icon:setImage(RegisterImage("uie_t7_icon_serverbrowser_dedicated"))
dedicatedFlag:linkToElementModel(self, nil, false, function(model)
dedicatedFlag:setModel(model, controller)
end)
dedicatedFlag:mergeStateConditions({
{
stateName = "FlagOn",
condition = function(menu, element, event)
return IsSelfModelValueTrue(element, controller, "dedicated")
end
}
})
dedicatedFlag:linkToElementModel(dedicatedFlag, "dedicated", true, function(model)
menu:updateElementState(dedicatedFlag, {
name = "model_validation",
menu = menu,
modelValue = Engine.GetModelValue(model),
modelName = "dedicated"
})
end)
self:addElement(dedicatedFlag)
self.dedicatedFlag = dedicatedFlag
local rankedFlag = CoD.ServerBrowserFlag.new(menu, controller)
rankedFlag:setLeftRight(true, false, 60, 88)
rankedFlag:setTopBottom(true, true, 0, 0)
rankedFlag.icon:setImage(RegisterImage("uie_t7_icon_serverbrowser_ranked"))
rankedFlag:linkToElementModel(self, nil, false, function(model)
rankedFlag:setModel(model, controller)
end)
rankedFlag:mergeStateConditions({
{
stateName = "FlagOn",
condition = function(menu, element, event)
return IsSelfModelValueTrue(element, controller, "ranked")
end
}
})
rankedFlag:linkToElementModel(rankedFlag, "ranked", true, function(model)
menu:updateElementState(rankedFlag, {
name = "model_validation",
menu = menu,
modelValue = Engine.GetModelValue(model),
modelName = "ranked"
})
end)
self:addElement(rankedFlag)
self.rankedFlag = rankedFlag
local name = CoD.horizontalScrollingTextBox_18pt.new(menu, controller)
name:setLeftRight(true, false, 90, 330)
name:setTopBottom(true, false, 2, 20)
name.textBox:setTTF("fonts/default.ttf")
name.textBox:setAlignment(Enum.LUIAlignment.LUI_ALIGNMENT_LEFT)
name:linkToElementModel(self, "name", true, function(model)
local _name = Engine.GetModelValue(model)
if _name then
name.textBox:setText(Engine.Localize(_name))
end
end)
self:addElement(name)
self.name = name
local spacer = LUI.UIFrame.new(menu, controller, 0, 0, false)
spacer:setLeftRight(true, false, 332, 339)
spacer:setTopBottom(true, false, 0, 22)
spacer:setAlpha(0)
self:addElement(spacer)
self.spacer = spacer
local map = CoD.horizontalScrollingTextBox_18pt.new(menu, controller)
map:setLeftRight(true, false, 341, 446)
map:setTopBottom(true, false, 2, 20)
map.textBox:setTTF("fonts/default.ttf")
map.textBox:setAlignment(Enum.LUIAlignment.LUI_ALIGNMENT_LEFT)
map:linkToElementModel(self, "mapName", true, function(model)
local mapName = Engine.GetModelValue(model)
if mapName then
map.textBox:setText(MapNameToLocalizedMapName(mapName))
end
end)
self:addElement(map)
self.map = map
local hardcoreFlag = CoD.ServerBrowserFlag.new(menu, controller)
hardcoreFlag:setLeftRight(true, false, 448, 470)
hardcoreFlag:setTopBottom(true, true, 0, 0)
hardcoreFlag.icon:setImage(RegisterImage("uie_t7_icon_serverbrowser_skull"))
hardcoreFlag:linkToElementModel(self, nil, false, function(model)
hardcoreFlag:setModel(model, controller)
end)
hardcoreFlag:mergeStateConditions({
{
stateName = "FlagOn",
condition = function(menu, element, event)
return IsSelfModelValueTrue(element, controller, "hardcore")
end
}
})
hardcoreFlag:linkToElementModel(hardcoreFlag, "hardcore", true, function(model)
menu:updateElementState(hardcoreFlag, {
name = "model_validation",
menu = menu,
modelValue = Engine.GetModelValue(model),
modelName = "hardcore"
})
end)
self:addElement(hardcoreFlag)
self.hardcoreFlag = hardcoreFlag
local gametype = LUI.UIText.new()
gametype:setLeftRight(true, false, 472, 576)
gametype:setTopBottom(true, false, 2, 20)
gametype:setTTF("fonts/RefrigeratorDeluxe-Regular.ttf")
gametype:setAlignment(Enum.LUIAlignment.LUI_ALIGNMENT_LEFT)
gametype:setAlignment(Enum.LUIAlignment.LUI_ALIGNMENT_TOP)
gametype:linkToElementModel(self, "gameType", true, function(model)
local gameType = Engine.GetModelValue(model)
if gameType then
gametype:setText(Engine.Localize(GetGameTypeDisplayString(gameType)))
end
end)
self:addElement(gametype)
self.gametype = gametype
local playerCount = LUI.UIText.new()
playerCount:setLeftRight(true, false, 593, 613)
playerCount:setTopBottom(true, false, 2, 20)
playerCount:setTTF("fonts/RefrigeratorDeluxe-Regular.ttf")
playerCount:setAlignment(Enum.LUIAlignment.LUI_ALIGNMENT_RIGHT)
playerCount:setAlignment(Enum.LUIAlignment.LUI_ALIGNMENT_TOP)
playerCount:linkToElementModel(self, "clientCount", true, function(model)
local clientCount = Engine.GetModelValue(model)
if clientCount then
playerCount:setText(Engine.Localize(clientCount))
end
end)
self:addElement(playerCount)
self.playerCount = playerCount
local slash = LUI.UIText.new()
slash:setLeftRight(true, false, 615, 624)
slash:setTopBottom(true, false, 2, 20)
slash:setText(Engine.Localize("/"))
slash:setTTF("fonts/RefrigeratorDeluxe-Regular.ttf")
slash:setAlignment(Enum.LUIAlignment.LUI_ALIGNMENT_LEFT)
slash:setAlignment(Enum.LUIAlignment.LUI_ALIGNMENT_TOP)
self:addElement(slash)
self.slash = slash
local maxPlayers = LUI.UIText.new()
maxPlayers:setLeftRight(true, false, 626, 645)
maxPlayers:setTopBottom(true, false, 2, 20)
maxPlayers:setTTF("fonts/RefrigeratorDeluxe-Regular.ttf")
maxPlayers:setAlignment(Enum.LUIAlignment.LUI_ALIGNMENT_LEFT)
maxPlayers:setAlignment(Enum.LUIAlignment.LUI_ALIGNMENT_TOP)
maxPlayers:linkToElementModel(self, "maxClients", true, function(model)
local maxClients = Engine.GetModelValue(model)
if maxClients then
maxPlayers:setText(Engine.Localize(maxClients))
end
end)
self:addElement(maxPlayers)
self.maxPlayers = maxPlayers
local botCount = LUI.UIText.new()
botCount:setLeftRight(true, false, 637, 659)
botCount:setTopBottom(true, false, 2, 20)
botCount:setTTF("fonts/RefrigeratorDeluxe-Regular.ttf")
botCount:setAlignment(Enum.LUIAlignment.LUI_ALIGNMENT_LEFT)
botCount:setAlignment(Enum.LUIAlignment.LUI_ALIGNMENT_TOP)
botCount:linkToElementModel(self, "botCount", true, function(model)
local _botCount = Engine.GetModelValue(model)
if _botCount then
botCount:setText("[" .. Engine.Localize(_botCount) .. "]")
end
end)
botCount:linkToElementModel(self, "zombies", true, function(model)
local zombies = Engine.GetModelValue(model)
if zombies ~= nil then
botCount:setAlpha(zombies and 0 or 1)
end
end)
self:addElement(botCount)
self.botCount = botCount
local ping = LUI.UIText.new()
ping:setLeftRight(true, false, 661, 699.37)
ping:setTopBottom(true, false, 2, 20)
ping:setTTF("fonts/RefrigeratorDeluxe-Regular.ttf")
ping:setAlignment(Enum.LUIAlignment.LUI_ALIGNMENT_CENTER)
ping:setAlignment(Enum.LUIAlignment.LUI_ALIGNMENT_TOP)
ping:linkToElementModel(self, "ping", true, function(model)
local _ping = Engine.GetModelValue(model)
if _ping then
ping:setText(Engine.Localize(_ping))
end
end)
self:addElement(ping)
self.ping = ping
spacer.id = "spacer"
self:registerEventHandler("gain_focus", function(self, event)
if self.m_focusable and self.spacer:processEvent(event) then
return true
else
return LUI.UIElement.gainFocus(self, event)
end
end)
LUI.OverrideFunction_CallOriginalSecond(self, "close", function(element)
element.passwordFlag:close()
element.dedicatedFlag:close()
element.rankedFlag:close()
element.name:close()
element.map:close()
element.hardcoreFlag:close()
element.gametype:close()
element.playerCount:close()
element.maxPlayers:close()
element.botCount:close()
element.ping:close()
end)
if PostLoadFunc then
PostLoadFunc(self, controller, menu)
end
return self
end

View File

@ -0,0 +1,421 @@
if Engine.GetCurrentMap() ~= "core_frontend" then
return
end
DataSources.MPStatsSettings = DataSourceHelpers.ListSetup("MPStatsSettings", function(controller)
local optionsTable = {}
local updateDvar = function(f1_arg0, f1_arg1, f1_arg2, dvarName, f1_arg4)
local oldValue = Engine.DvarInt(nil, dvarName)
local newValue = f1_arg1.value
UpdateInfoModels(f1_arg1)
if oldValue == newValue then
return
end
Engine.SetDvar(dvarName, f1_arg1.value)
if dvarName == "cg_unlockall_loot" then
Engine.SetDvar("ui_enableAllHeroes", f1_arg1.value)
end
if dvarName == "all_ee_completed" then
Engine.ExecNow(f1_arg0, "statsetbyname darkops_zod_ee " .. f1_arg1.value)
Engine.ExecNow(f1_arg0, "statsetbyname darkops_zod_super_ee " .. f1_arg1.value)
Engine.ExecNow(f1_arg0, "statsetbyname darkops_factory_ee " .. f1_arg1.value)
Engine.ExecNow(f1_arg0, "statsetbyname darkops_factory_super_ee " .. f1_arg1.value)
Engine.ExecNow(f1_arg0, "statsetbyname darkops_castle_ee " .. f1_arg1.value)
Engine.ExecNow(f1_arg0, "statsetbyname darkops_castle_super_ee " .. f1_arg1.value)
Engine.ExecNow(f1_arg0, "statsetbyname darkops_island_ee " .. f1_arg1.value)
Engine.ExecNow(f1_arg0, "statsetbyname darkops_island_super_ee " .. f1_arg1.value)
Engine.ExecNow(f1_arg0, "statsetbyname darkops_stalingrad_ee " .. f1_arg1.value)
Engine.ExecNow(f1_arg0, "statsetbyname darkops_stalingrad_super_ee " .. f1_arg1.value)
Engine.ExecNow(f1_arg0, "statsetbyname darkops_genesis_ee " .. f1_arg1.value)
Engine.ExecNow(f1_arg0, "statsetbyname DARKOPS_GENESIS_SUPER_EE " .. f1_arg1.value)
end
end
table.insert(optionsTable,
CoD.OptionsUtility.CreateDvarSettings(controller, "Unlock All Loot",
"Unlocks all Black Market loot.", "MPStatsSettings_unlock_loot",
"cg_unlockall_loot", {
{
option = "MENU_DISABLED",
value = 0,
default = true
},
{
option = "MENU_ENABLED",
value = 1
},
}, nil, updateDvar))
if Engine.CurrentSessionMode() == Enum.eModes.MODE_MULTIPLAYER then
table.insert(optionsTable,
CoD.OptionsUtility.CreateDvarSettings(controller, "Unlock All Purchases",
"All items that need to be purchased with unlock tokens are unlocked.", "MPStatsSettings_purchase_all",
"cg_unlockall_purchases", {
{
option = "MENU_DISABLED",
value = 0,
default = true
},
{
option = "MENU_ENABLED",
value = 1
},
}, nil, updateDvar))
table.insert(optionsTable,
CoD.OptionsUtility.CreateDvarSettings(controller, "Unlock All Class Slots",
"Unlocks all create-a-class slots and sets.", "MPStatsSettings_unlockall_cac_slots",
"cg_unlockall_cac_slots", {
{
option = "MENU_DISABLED",
value = 0,
default = true
},
{
option = "MENU_ENABLED",
value = 1
},
}, nil, updateDvar))
end
table.insert(optionsTable,
CoD.OptionsUtility.CreateDvarSettings(controller, "Unlock All Attachments",
"All attachments on weapons are unlocked.",
"MPStatsSettings_unlockall_attachments", "cg_unlockall_attachments", {
{
option = "MENU_DISABLED",
value = 0,
default = true
},
{
option = "MENU_ENABLED",
value = 1
},
}, nil, updateDvar))
table.insert(optionsTable,
CoD.OptionsUtility.CreateDvarSettings(controller, "Unlock all Camos and Reticles",
"All camos and reticles on weapons are unlocked.", "MPStatsSettings_unlockall_camos_and_reticles",
"cg_unlockall_camos_and_reticles", {
{
option = "MENU_DISABLED",
value = 0,
default = true
},
{
option = "MENU_ENABLED",
value = 1
},
}, nil, updateDvar))
table.insert(optionsTable,
CoD.OptionsUtility.CreateDvarSettings(controller, "Unlock all Calling Cards", "All calling cards are unlocked.",
"MPStatsSettings_unlockall_calling_cards", "cg_unlockall_calling_cards", {
{
option = "MENU_DISABLED",
value = 0,
default = true
},
{
option = "MENU_ENABLED",
value = 1
},
}, nil, updateDvar))
if Engine.CurrentSessionMode() == Enum.eModes.MODE_MULTIPLAYER then
table.insert(optionsTable,
CoD.OptionsUtility.CreateDvarSettings(controller, "Unlock all Specialists Outfits",
"All specialists outfits are unlocked.", "MPStatsSettings_unlockall_specialists_outfits",
"cg_unlockall_specialists_outfits", {
{
option = "MENU_DISABLED",
value = 0,
default = true
},
{
option = "MENU_ENABLED",
value = 1
},
}, nil, updateDvar))
end
if Engine.CurrentSessionMode() == Enum.eModes.MODE_ZOMBIES then
table.insert(optionsTable,
CoD.OptionsUtility.CreateDvarSettings(controller, "Unlock Easter Eggs",
"Complete all Easter Egg Achievements.", "MPStatsSettings_complete_ee",
"all_ee_completed", {
{
option = "MENU_DISABLED",
value = 0,
default = true
},
{
option = "MENU_ENABLED",
value = 1
},
}, nil, updateDvar))
end
local rankLevels = {}
local rankObjs = {}
local hasDefault = true
local currentPrestige = CoD.PrestigeUtility.GetCurrentPLevel(controller, Engine.CurrentSessionMode())
local currentRank = CoD.BlackMarketUtility.GetCurrentRank(controller) + 1
local isMasterPrestige = currentPrestige == 11
if Engine.CurrentSessionMode() == Enum.eModes.MODE_MULTIPLAYER then
if not isMasterPrestige then
rankLevels = { 1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55 }
else
rankLevels = { 56, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000 }
end
elseif Engine.CurrentSessionMode() == Enum.eModes.MODE_ZOMBIES then
if not isMasterPrestige then
rankLevels = { 1, 5, 10, 15, 20, 25, 30, 35 }
else
rankLevels = { 36, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000 }
end
end
local maxlevel = math.max(table.unpack(rankLevels))
local minlevel = math.min(table.unpack(rankLevels))
for index, value in ipairs(rankLevels) do
table.insert(rankObjs, {
name = value <= minlevel and "Min" or value >= maxlevel and "Max" or value,
value = value - 1,
default = value == currentRank,
title = "Rank Level",
desc = value ~= currentRank and "" or "Current Rank"
})
end
if hasDefault and currentRank ~= minlevel and currentRank < maxlevel and not isMasterPrestige then
table.insert(rankObjs, {
name = "Current: " ..
tostring(currentRank <= minlevel and "Min" or currentRank >= maxlevel and "Max" or currentRank),
value = currentRank - 1,
default = true,
title = "Rank Level",
desc = "Do not adjust rank"
})
end
local prestigeTable = {}
for i = 0, 11 do
table.insert(prestigeTable, {
name = i == 0 and "None" or i == 11 and "Master" or i,
value = i,
default = i == currentPrestige,
title = "Prestige",
desc = ""
})
end
local createSettingsDatasource = function(controller, datasourceName, optionsTable, currentValue, loopEdges, action)
if currentValue == nil then
currentValue = 0
end
DataSources[datasourceName] = DataSourceHelpers.ListSetup(datasourceName, function(f47_arg0)
local f47_local0 = {}
for f47_local4, f47_local5 in ipairs(optionsTable) do
table.insert(f47_local0, {
models = {
text = optionsTable[f47_local4].name
},
properties = {
title = optionsTable[f47_local4].title,
desc = optionsTable[f47_local4].desc,
image = optionsTable[f47_local4].image,
value = optionsTable[f47_local4].value,
default = optionsTable[f47_local4].default,
action = action,
selectIndex = optionsTable[f47_local4].value == currentValue,
loopEdges = loopEdges,
showChangeIndicator = function(f48_arg0, f48_arg1, f48_arg2)
return f48_arg0.default ~= true
end
}
})
end
f47_local0[1].properties.first = true
f47_local0[#optionsTable].properties.last = true
return f47_local0
end, nil, nil, nil)
return datasourceName
end
table.insert(optionsTable, {
models = {
name = "Prestige",
desc = "",
image = nil,
optionsDatasource = createSettingsDatasource(controller, "MPStatsSettings_rank_prestige", prestigeTable,
CoD.PrestigeUtility.GetCurrentPLevel(controller, Engine.CurrentSessionMode()), false,
function(f1_arg0, f1_arg1, f1_arg2, dvarName, f1_arg4)
UpdateInfoModels(f1_arg1)
local newPrestige = f1_arg1.value
if newPrestige == 11 then
Engine.Exec(f1_arg0, "PrestigeStatsMaster " .. tostring(Engine.CurrentSessionMode()))
end
Engine.ExecNow(f1_arg0, "statsetbyname plevel " .. newPrestige)
Engine.ExecNow(f1_arg0, "statsetbyname hasprestiged " .. (newPrestige > 0 and 1 or 0))
Engine.Exec(f1_arg0, "uploadstats " .. tostring(Engine.CurrentSessionMode()))
end)
},
properties = {
revert = function(f50_arg0)
end
}
})
table.insert(optionsTable, {
models = {
name = "Rank Level",
desc = "",
image = nil,
optionsDatasource = createSettingsDatasource(controller, "MPStatsSettings_rank_level", rankObjs,
CoD.BlackMarketUtility.GetCurrentRank(controller), false,
function(f1_arg0, f1_arg1, f1_arg2, dvarName, f1_arg4)
UpdateInfoModels(f1_arg1)
local rankTable = nil
local rank = f1_arg1.value + 1
if currentPrestige <= 10 then
if Engine.CurrentSessionMode() == Enum.eModes.MODE_MULTIPLAYER then
rankTable = "gamedata/tables/mp/mp_ranktable.csv"
elseif Engine.CurrentSessionMode() == Enum.eModes.MODE_ZOMBIES then
rankTable = "gamedata/tables/zm/zm_ranktable.csv"
end
local skipLines = Engine.CurrentSessionMode() == Enum.eModes.MODE_MULTIPLAYER and 3 or 2
local maxXp = tonumber(Engine.TableLookupGetColumnValueForRow(rankTable, rank - 2 + skipLines, 7))
if Engine.CurrentSessionMode() == Enum.eModes.MODE_MULTIPLAYER then
if maxXp ~= nil and rank == maxlevel then
maxXp = maxXp + 55600
end
end
if Engine.CurrentSessionMode() == Enum.eModes.MODE_ZOMBIES then
if maxXp ~= nil and rank == maxlevel then
maxXp = maxXp + 54244
end
end
if maxXp == nil then
maxXp = 0
end
Engine.ExecNow(f1_arg0, "statsetbyname rank " .. rank - 1)
Engine.ExecNow(f1_arg0, "statsetbyname rankxp " .. maxXp)
Engine.ExecNow(f1_arg0, "statsetbyname paragon_rankxp " .. 0)
else
if Engine.CurrentSessionMode() == Enum.eModes.MODE_MULTIPLAYER then
rankTable = "gamedata/tables/mp/mp_paragonranktable.csv"
elseif Engine.CurrentSessionMode() == Enum.eModes.MODE_ZOMBIES then
rankTable = "gamedata/tables/zm/zm_paragonranktable.csv"
end
local skipLines = 2
local maxXp = 0
if Engine.CurrentSessionMode() == Enum.eModes.MODE_MULTIPLAYER then
maxXp = tonumber(Engine.TableLookupGetColumnValueForRow(rankTable, rank - 57 + skipLines, 7))
if maxXp ~= nil and rank == maxlevel then
maxXp = maxXp + 55600
end
rank = rank - 55
end
if Engine.CurrentSessionMode() == Enum.eModes.MODE_ZOMBIES then
maxXp = tonumber(Engine.TableLookupGetColumnValueForRow(rankTable, rank - 37 + skipLines, 7))
if maxXp ~= nil and rank == maxlevel then
maxXp = maxXp + 54244
end
rank = rank - 35
end
if maxXp == nil then
maxXp = 0
end
Engine.ExecNow(f1_arg0, "statsetbyname paragon_rank " .. rank - 1)
Engine.ExecNow(f1_arg0, "statsetbyname paragon_rankxp " .. maxXp)
end
Engine.Exec(f1_arg0, "uploadstats " .. tostring(Engine.CurrentSessionMode()))
currentRank = rank
end)
},
properties = {
revert = function(f50_arg0)
end
}
})
return optionsTable
end)
if Dvar.cg_unlockall_loot:get() == true then
Engine.SetDvar("ui_enableAllHeroes", 1)
end
LUI.createMenu.T7xStatsMenu = function(controller)
local self = CoD.Menu.NewForUIEditor("T7xStatsMenu")
if PreLoadFunc then
PreLoadFunc(self, controller)
end
self.soundSet = "ChooseDecal"
self:setOwner(controller)
self:setLeftRight(true, true, 0, 0)
self:setTopBottom(true, true, 0, 0)
self:playSound("menu_open", controller)
self.buttonModel = Engine.CreateModel(Engine.GetModelForController(controller), "T7xStatsMenu.buttonPrompts")
self.anyChildUsesUpdateState = true
local GameSettingsBackground = CoD.GameSettings_Background.new(self, controller)
GameSettingsBackground:setLeftRight(true, true, 0, 0)
GameSettingsBackground:setTopBottom(true, true, 0, 0)
GameSettingsBackground.MenuFrame.titleLabel:setText(Engine.Localize("STATS SETTINGS"))
GameSettingsBackground.MenuFrame.cac3dTitleIntermediary0.FE3dTitleContainer0.MenuTitle.TextBox1.Label0:setText(
Engine.Localize("STATS SETTINGS"))
GameSettingsBackground.GameSettingsSelectedItemInfo.GameModeInfo:setAlpha(0)
GameSettingsBackground.GameSettingsSelectedItemInfo.GameModeName:setAlpha(0)
self:addElement(GameSettingsBackground)
self.GameSettingsBackground = GameSettingsBackground
local Options = CoD.Competitive_SettingsList.new(self, controller)
Options:setLeftRight(true, false, 26, 741)
Options:setTopBottom(true, false, 135, 720)
Options.Title.DescTitle:setText(Engine.Localize("Stats"))
Options.ButtonList:setVerticalCount(15)
Options.ButtonList:setDataSource("MPStatsSettings")
self:addElement(Options)
self.Options = Options
self:AddButtonCallbackFunction(self, controller, Enum.LUIButton.LUI_KEY_XBB_PSCIRCLE, nil,
function(element, menu, controller, model)
GoBack(self, controller)
SetPerControllerTableProperty(controller, "disableGameSettingsOptions", nil)
return true
end, function(element, menu, controller)
CoD.Menu.SetButtonLabel(menu, Enum.LUIButton.LUI_KEY_XBB_PSCIRCLE, "MENU_BACK")
return true
end, false)
GameSettingsBackground.MenuFrame:setModel(self.buttonModel, controller)
Options.id = "Options"
self:processEvent({
name = "menu_loaded",
controller = controller
})
self:processEvent({
name = "update_state",
menu = self
})
if not self:restoreState() then
self.Options:processEvent({
name = "gain_focus",
controller = controller
})
end
LUI.OverrideFunction_CallOriginalSecond(self, "close", function(element)
element.GameSettingsBackground:close()
element.Options:close()
Engine.UnsubscribeAndFreeModel(Engine.GetModel(Engine.GetModelForController(controller),
"T7xStatsMenu.buttonPrompts"))
end)
if PostLoadFunc then
PostLoadFunc(self, controller)
end
return self
end

Binary file not shown.

View File

View File

BIN
installer/game/t7x.exe Normal file

Binary file not shown.

132
installer/t7x_Installer.nsi Normal file
View File

@ -0,0 +1,132 @@
!include "MUI2.nsh"
!include "WinVer.nsh"
!include "nsDialogs.nsh"
; Constants
!define PRODUCT_NAME "t7x"
!define PRODUCT_DESCRIPTION "Call of Duty Black Ops III Client"
!define COPYRIGHT "Created by Ahrimdon - Free and Open Source"
!define PRODUCT_VERSION "1.0.0.0"
!define SETUP_VERSION "1.0.0.0"
; Attributes
Name "${PRODUCT_NAME}"
OutFile "build\t7xInstaller.exe"
InstallDir "$EXEDIR"
RequestExecutionLevel user ; Request user-level execution, not admin
; Version Info
VIProductVersion "${PRODUCT_VERSION}"
VIAddVersionKey "ProductName" "${PRODUCT_NAME}"
VIAddVersionKey "ProductVersion" "${PRODUCT_VERSION}"
VIAddVersionKey "FileDescription" "${PRODUCT_DESCRIPTION}"
VIAddVersionKey "LegalCopyright" "${COPYRIGHT}"
VIAddVersionKey "FileVersion" "${SETUP_VERSION}"
; Modern UI Appearance
!define MUI_ICON "Contrib\Graphics\Icons\icon.ico"
!define MUI_UNICON "Contrib\Graphics\Icons\icon.ico"
!define MUI_HEADERIMAGE
!define MUI_FINISHPAGE_NOAUTOCLOSE
; !define MUI_FINISHPAGE_RUN "$INSTDIR\t7x.exe"
!define MUI_FINISHPAGE_TEXT "Setup has finished installing ${PRODUCT_NAME} on your computer.$\nClick Finish to close this wizard.$\n$\nRun the t7x.exe application from within your Call of Duty Black Ops 3 game folder or use the Desktop shortcut."
; Modern UI Settings
!define MUI_ABORTWARNING
!define MUI_UNABORTWARNING
!define MUI_FINISHPAGE_SHOWREADME ""
!define MUI_FINISHPAGE_SHOWREADME_CHECKED
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Create Desktop Shortcut"
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION finishpageaction
; Show details by default
ShowInstDetails show
ShowUninstDetails show
; Installer Images
!define MUI_WELCOMEFINISHPAGE_BITMAP "Contrib\Graphics\Assets\logo-cropped.bmp"
!define MUI_HEADERIMAGE_BITMAP "Contrib\Graphics\Assets\banner-t7x-title.bmp" ; For installer header
; Uninstaller Images
!define MUI_UNHEADERIMAGE_BITMAP "Contrib\Graphics\Assets\banner-t7x-title.bmp" ; For uninstaller header
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "Contrib\Graphics\Assets\logo-cropped.bmp" ; For uninstaller finish page
; Pages
!insertmacro MUI_PAGE_WELCOME
; !insertmacro MUI_PAGE_LICENSE "Readme.txt"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
; Languages
!insertmacro MUI_LANGUAGE "English"
Function .onInit
MessageBox MB_OKCANCEL|MB_ICONINFORMATION "Place the installer in your Call of Duty Black Ops III game folder. Click OK to continue or Cancel to exit." IDOK done
Abort
done:
FunctionEnd
; Sections
Section "Main Application" SecMain
SetOutPath $INSTDIR
File "game\t7x.exe"
File "game\base_game_dir\README.md"
File "game\base_game_dir\T7x_CP_Server.bat"
File "game\base_game_dir\T7x_MP_Server.bat"
File "game\base_game_dir\T7x_ZM_Server.bat"
WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd
Section "Game Directory t7x Files" SecT7xData
SetOutPath $INSTDIR\t7x
File /r "game\base_game_dir\t7x\*.*"
SectionEnd
Section "Game Directory zone Files" SecZoneData
SetOutPath $INSTDIR\zone
File /r "game\base_game_dir\zone\*.*"
SectionEnd
Section "LocalAppData Files" SecData
SetOutPath $LOCALAPPDATA\t7x
File /r "game\localappdata\t7x\*.*"
SectionEnd
Section "LocalAppData Cache Files" SecCache
SetOutPath $LOCALAPPDATA\cache
File "game\localappdata\cache\cache.bin"
File "game\localappdata\cache\data.bin"
SectionEnd
Function finishpageaction
SetOutPath $INSTDIR
CreateShortcut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\t7x.exe" "" "$INSTDIR\t7x.exe"
FunctionEnd
; Uninstaller Sections
Section "Uninstall"
Delete $INSTDIR\t7x.exe
Delete "$DESKTOP\${PRODUCT_NAME}.lnk"
Delete "$INSTDIR\README.md"
Delete "$INSTDIR\T7x_CP_Server.bat"
Delete "$INSTDIR\T7x_MP_Server.bat"
Delete "$INSTDIR\T7x_ZM_Server.bat"
Delete "$INSTDIR\zone\server.cfg"
Delete "$INSTDIR\zone\server_cp.cfg"
Delete "$INSTDIR\zone\server_zm.cfg"
Delete $LOCALAPPDATA\cache\cache.bin
Delete $LOCALAPPDATA\cache\data.bin
RMDir /r $INSTDIR\t7x
RMDir /r $LOCALAPPDATA\t7x
Delete "$INSTDIR\Uninstall.exe"
RMDir $INSTDIR
SectionEnd
; Create the desktop shortcut based on the checkbox state
; Function .onInstSuccess
; FunctionEnd

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,191 @@
# Header, don't edit
NLF v6
# Start editing here
# Language ID
1033
# Font and size - dash (-) means default
-
-
# Codepage - dash (-) means ASCII code page
-
# RTL - anything else than RTL means LTR
-
# Translation by ..... (any credits should go here)
# ^Branding
t7x Installer - Free and Open Source Software
# ^SetupCaption
$(^Name) Setup
# ^UninstallCaption
$(^Name) Uninstall
# ^LicenseSubCaption
: License Agreement
# ^ComponentsSubCaption
: Installation Options
# ^DirSubCaption
: Installation Folder
# ^InstallingSubCaption
: Installing
# ^CompletedSubCaption
: Completed
# ^UnComponentsSubCaption
: Uninstallation Options
# ^UnDirSubCaption
: Uninstallation Folder
# ^ConfirmSubCaption
: Confirmation
# ^UninstallingSubCaption
: Uninstalling
# ^UnCompletedSubCaption
: Completed
# ^BackBtn
< &Back
# ^NextBtn
&Next >
# ^AgreeBtn
I &Agree
# ^AcceptBtn
I &accept the terms of the License Agreement
# ^DontAcceptBtn
I &do not accept the terms of the License Agreement
# ^InstallBtn
&Install
# ^UninstallBtn
&Uninstall
# ^CancelBtn
Cancel
# ^CloseBtn
&Close
# ^BrowseBtn
B&rowse...
# ^ShowDetailsBtn
Show &details
# ^ClickNext
Click Next to continue.
# ^ClickInstall
Click Install to start the installation.
# ^ClickUninstall
Click Uninstall to start the uninstallation.
# ^Name
Name
# ^Completed
Completed
# ^LicenseText
Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, click I Agree.
# ^LicenseTextCB
Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, click the check box below. $_CLICK
# ^LicenseTextRB
Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, select the first option below. $_CLICK
# ^UnLicenseText
Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, click I Agree.
# ^UnLicenseTextCB
Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, click the check box below. $_CLICK
# ^UnLicenseTextRB
Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, select the first option below. $_CLICK
# ^Custom
Custom
# ^ComponentsText
Check the components you want to install and uncheck the components you don't want to install. $_CLICK
# ^ComponentsSubText1
Select the type of install:
# ^ComponentsSubText2_NoInstTypes
Select components to install:
# ^ComponentsSubText2
Or, select the optional components you wish to install:
# ^UnComponentsText
Check the components you want to uninstall and uncheck the components you don't want to uninstall. $_CLICK
# ^UnComponentsSubText1
Select the type of uninstall:
# ^UnComponentsSubText2_NoInstTypes
Select components to uninstall:
# ^UnComponentsSubText2
Or, select the optional components you wish to uninstall:
# ^DirText
Setup will install $(^NameDA) in the following folder. Enter the path to your Call of Duty Black Ops III game folder, or click Browse and select the game folder. $_CLICK
# ^DirSubText
Destination Folder
# ^DirBrowseText
Select the folder to install $(^NameDA) in:
# ^UnDirText
Setup will uninstall $(^NameDA) from the following folder. To uninstall from a different folder, click Browse and select another folder. $_CLICK
# ^UnDirSubText
""
# ^UnDirBrowseText
Select the folder to uninstall $(^NameDA) from:
# ^SpaceAvailable
"Space available: "
# ^SpaceRequired
"Space required: "
# ^UninstallingText
$(^NameDA) will be uninstalled from the following folder. $_CLICK
# ^UninstallingSubText
Uninstalling from:
# ^FileError
Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Abort to stop the installation,\r\nRetry to try again, or\r\nIgnore to skip this file.
# ^FileError_NoIgnore
Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Retry to try again, or\r\nCancel to stop the installation.
# ^CantWrite
"Can't write: "
# ^CopyFailed
Copy failed
# ^CopyTo
"Copy to "
# ^Registering
"Registering: "
# ^Unregistering
"Unregistering: "
# ^SymbolNotFound
"Could not find symbol: "
# ^CouldNotLoad
"Could not load: "
# ^CreateFolder
"Create folder: "
# ^CreateShortcut
"Create shortcut: "
# ^CreatedUninstaller
"Created uninstaller: "
# ^Delete
"Delete file: "
# ^DeleteOnReboot
"Delete on reboot: "
# ^ErrorCreatingShortcut
"Error creating shortcut: "
# ^ErrorCreating
"Error creating: "
# ^ErrorDecompressing
Error decompressing data! Corrupted installer?
# ^ErrorRegistering
Error registering DLL
# ^ExecShell
"ExecShell: "
# ^Exec
"Execute: "
# ^Extract
"Extract: "
# ^ErrorWriting
"Extract: error writing to file "
# ^InvalidOpcode
Installer corrupted: invalid opcode
# ^NoOLE
"No OLE for: "
# ^OutputFolder
"Output folder: "
# ^RemoveFolder
"Remove folder: "
# ^RenameOnReboot
"Rename on reboot: "
# ^Rename
"Rename: "
# ^Skipped
"Skipped: "
# ^CopyDetails
Copy Details To Clipboard
# ^LogInstall
Log install process
# ^Byte
B
# ^Kilo
K
# ^Mega
M
# ^Giga
G

View File

@ -0,0 +1,129 @@
;Language: English (1033)
;By Joost Verburg
!insertmacro LANGFILE "English" "English" "English" "English" ; See \Include\LangFile.nsh for a description of these parameters
!ifdef MUI_WELCOMEPAGE
${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Welcome to the $(^NameDA) Setup"
${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Setup will guide you through the installation of the $(^NameDA) Client for Call of Duty Black Ops III.$\r$\n$\r$\nIt is recommended that you close all other applications before installing.$\r$\n$\r$\nYou will not need to restart your computer after installation.$\r$\n$\r$\n$_CLICK"
!endif
!ifdef MUI_UNWELCOMEPAGE
${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "$(^NameDA) Uninstaller"
${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Setup will guide you through the uninstallation of $(^NameDA).$\r$\n$\r$\nBefore starting the uninstallation, make sure $(^NameDA) is not running.$\r$\n$\r$\n$_CLICK"
!endif
!ifdef MUI_LICENSEPAGE
${LangFileString} MUI_TEXT_LICENSE_TITLE "License Agreement"
${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Please review the license terms before installing $(^NameDA)."
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "If you accept the terms of the agreement, click I Agree to continue. You must accept the agreement to install $(^NameDA)."
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "If you accept the terms of the agreement, click the check box below. You must accept the agreement to install $(^NameDA). $_CLICK"
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "If you accept the terms of the agreement, select the first option below. You must accept the agreement to install $(^NameDA). $_CLICK"
!endif
!ifdef MUI_UNLICENSEPAGE
${LangFileString} MUI_UNTEXT_LICENSE_TITLE "License Agreement"
${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Please review the license terms before uninstalling $(^NameDA)."
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "If you accept the terms of the agreement, click I Agree to continue. You must accept the agreement to uninstall $(^NameDA)."
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "If you accept the terms of the agreement, click the check box below. You must accept the agreement to uninstall $(^NameDA). $_CLICK"
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "If you accept the terms of the agreement, select the first option below. You must accept the agreement to uninstall $(^NameDA). $_CLICK"
!endif
!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Press Page Down to see the rest of the agreement."
!endif
!ifdef MUI_COMPONENTSPAGE
${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Choose Components"
${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Choose which features of $(^NameDA) you want to install."
!endif
!ifdef MUI_UNCOMPONENTSPAGE
${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Choose Components"
${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Choose which features of $(^NameDA) you want to uninstall."
!endif
!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Description"
!ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Position your mouse over a component to see its description."
!else
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Select a component to see its description."
!endif
!endif
!ifdef MUI_DIRECTORYPAGE
${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Choose Game Location"
${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Choose your Call of Duty Black Ops III game folder in which to install $(^NameDA)."
!endif
!ifdef MUI_UNDIRECTORYPAGE
${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Choose Uninstall Location"
${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Choose the folder from which to uninstall $(^NameDA)."
!endif
!ifdef MUI_INSTFILESPAGE
${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installing"
${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Please wait while $(^NameDA) is being installed."
${LangFileString} MUI_TEXT_FINISH_TITLE "Installation Complete"
${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Setup was completed successfully."
${LangFileString} MUI_TEXT_ABORT_TITLE "Installation Aborted"
${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Setup was not completed successfully."
!endif
!ifdef MUI_UNINSTFILESPAGE
${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Uninstalling"
${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Please wait while $(^NameDA) is being uninstalled."
${LangFileString} MUI_UNTEXT_FINISH_TITLE "Uninstallation Complete"
${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Uninstall was completed successfully."
${LangFileString} MUI_UNTEXT_ABORT_TITLE "Uninstallation Aborted"
${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Uninstall was not completed successfully."
!endif
!ifdef MUI_FINISHPAGE
${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Completing $(^NameDA) Setup"
${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) has been installed on your computer.$\r$\n$\r$\nClick Finish to close Setup."
${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Your computer must be restarted in order to complete the installation of $(^NameDA). Do you want to reboot now?"
!endif
!ifdef MUI_UNFINISHPAGE
${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Completing $(^NameDA) Uninstall"
${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) has been uninstalled from your computer.$\r$\n$\r$\nClick Finish to close Setup."
${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Your computer must be restarted in order to complete the uninstallation of $(^NameDA). Do you want to reboot now?"
!endif
!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reboot now"
${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "I want to manually reboot later"
${LangFileString} MUI_TEXT_FINISH_RUN "&Run $(^NameDA)"
${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Show Readme"
${LangFileString} MUI_BUTTONTEXT_FINISH "&Finish"
!endif
!ifdef MUI_STARTMENUPAGE
${LangFileString} MUI_TEXT_STARTMENU_TITLE "Choose Start Menu Folder"
${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Choose a Start Menu folder for the $(^NameDA) shortcuts."
${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Select the Start Menu folder in which you would like to create the program's shortcuts. You can also enter a name to create a new folder."
${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Do not create shortcuts"
!endif
!ifdef MUI_UNCONFIRMPAGE
${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Uninstall $(^NameDA)"
${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Remove $(^NameDA) from your computer."
!endif
!ifdef MUI_ABORTWARNING
${LangFileString} MUI_TEXT_ABORTWARNING "Are you sure you want to quit $(^Name) Setup?"
!endif
!ifdef MUI_UNABORTWARNING
${LangFileString} MUI_UNTEXT_ABORTWARNING "Are you sure you want to quit $(^Name) Uninstall?"
!endif
!ifdef MULTIUSER_INSTALLMODEPAGE
${LangFileString} MULTIUSER_TEXT_INSTALLMODE_TITLE "Choose Users"
${LangFileString} MULTIUSER_TEXT_INSTALLMODE_SUBTITLE "Choose for which users you want to install $(^NameDA)."
${LangFileString} MULTIUSER_INNERTEXT_INSTALLMODE_TOP "Select whether you want to install $(^NameDA) only for yourself or for all users of this computer. $(^ClickNext)"
${LangFileString} MULTIUSER_INNERTEXT_INSTALLMODE_ALLUSERS "Install for anyone using this computer"
${LangFileString} MULTIUSER_INNERTEXT_INSTALLMODE_CURRENTUSER "Install just for me"
!endif

View File

@ -0,0 +1,86 @@
/*
NSIS Modern User Interface
Deprecated code - display warnings
*/
!macro MUI_LEGACY_MAP_NOSTRETCH NAME R
!if "${R}" != ""
!ifdef ${NAME}NOSTRETCH
!define /IfNDef ${NAME}STRETCH NoStretchNoCropNoAlign
!endif
!else
!insertmacro ${__MACRO__} ${NAME}BITMAP_ 1
!insertmacro ${__MACRO__} ${NAME}BITMAP_RTL_ 1
!insertmacro ${__MACRO__} ${NAME}UNBITMAP_ 1
!insertmacro ${__MACRO__} ${NAME}UNBITMAP_RTL_ 1
!endif
!macroend
;--------------------------------
;InstallOptions
!define INSTALLOPTIONS_ERROR "MUI_INSTALLOPTIONS_* macros are no longer a part of MUI2. Include InstallOptions.nsh and use INSTALLOPTIONS_* macros instead. It is also recommended to upgrade to nsDialogs."
!macro MUI_INSTALLOPTIONS_EXTRACT FILE
!error "${INSTALLOPTIONS_ERROR}"
!macroend
!macro MUI_INSTALLOPTIONS_EXTRACT_AS FILE FILENAME
!error "${INSTALLOPTIONS_ERROR}"
!macroend
!macro MUI_INSTALLOPTIONS_DISPLAY FILE
!error "${INSTALLOPTIONS_ERROR}"
!macroend
!macro MUI_INSTALLOPTIONS_DISPLAY_RETURN FILE
!error "${INSTALLOPTIONS_ERROR}"
!macroend
!macro MUI_INSTALLOPTIONS_INITDIALOG FILE
!error "${INSTALLOPTIONS_ERROR}"
!macroend
!macro MUI_INSTALLOPTIONS_SHOW
!error "${INSTALLOPTIONS_ERROR}"
!macroend
!macro MUI_INSTALLOPTIONS_SHOW_RETURN
!error "${INSTALLOPTIONS_ERROR}"
!macroend
!macro MUI_INSTALLOPTIONS_READ VAR FILE SECTION KEY
!error "${INSTALLOPTIONS_ERROR}"
!macroend
!macro MUI_INSTALLOPTIONS_WRITE FILE SECTION KEY VALUE
!error "${INSTALLOPTIONS_ERROR}"
!macroend
!macro MUI_RESERVEFILE_INSTALLOPTIONS
!error `MUI_RESERVEFILE_INSTALLOPTIONS is no longer supported as InstallOptions is no longer used by MUI2. Instead, use "ReserveFile /plugin InstallOptions.dll". It is also recommended to upgrade to nsDialogs.`
!macroend

View File

@ -0,0 +1,363 @@
/*
NSIS Modern User Interface
Interface code for all pages
*/
;--------------------------------
;Variables
Var mui.Header.Text
Var mui.Header.Text.Font
Var mui.Header.SubText
Var mui.Header.Background
Var mui.Header.Image
Var mui.Branding.Text
Var mui.Branding.Background
Var mui.Line.Standard
Var mui.Line.FullWindow
Var mui.Button.Next
Var mui.Button.Cancel
Var mui.Button.Back
;--------------------------------
;General interface settings
!macro MUI_INTERFACE
!ifndef MUI_INTERFACE
!define MUI_INTERFACE
;These values are set after the interface settings in the script,
;so the script itself can override all values.
;Default interface settings in nsisconf.nsh
!ifdef MUI_INSERT_NSISCONF
!insertmacro MUI_NSISCONF
!endif
;Default interface settings
!insertmacro MUI_DEFAULT MUI_UI "${NSISDIR}\Contrib\UIs\modern.exe"
!insertmacro MUI_DEFAULT MUI_UI_HEADERIMAGE "${NSISDIR}\Contrib\UIs\modern_headerbmp.exe"
!insertmacro MUI_DEFAULT MUI_UI_HEADERIMAGE_RIGHT "${NSISDIR}\Contrib\UIs\modern_headerbmpr.exe"
!insertmacro MUI_DEFAULT MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
!insertmacro MUI_DEFAULT MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
!insertmacro MUI_DEFAULT MUI_BGCOLOR "FFFFFF"
!insertmacro MUI_DEFAULT MUI_TEXTCOLOR "000000"
;Map *_NOSTRETCH legacy define to the correct *_STRETCH value
!verbose push 2
!insertmacro MUI_LEGACY_MAP_NOSTRETCH MUI_HEADERIMAGE_ ""
!insertmacro MUI_LEGACY_MAP_NOSTRETCH MUI_WELCOMEFINISHPAGE_ ""
!insertmacro MUI_LEGACY_MAP_NOSTRETCH MUI_UNWELCOMEFINISHPAGE_ ""
!verbose pop
;Default header images
!ifdef MUI_HEADERIMAGE
!insertmacro MUI_DEFAULT MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\nsis.bmp"
!insertmacro MUI_DEFAULT MUI_HEADERIMAGE_BITMAP_STRETCH "FitControl"
!insertmacro MUI_DEFAULT MUI_HEADERIMAGE_BITMAP_RTL_STRETCH ${MUI_HEADERIMAGE_BITMAP_STRETCH}
!ifndef MUI_HEADERIMAGE_UNBITMAP
!define MUI_HEADERIMAGE_UNBITMAP "${MUI_HEADERIMAGE_BITMAP}"
!insertmacro MUI_SET MUI_HEADERIMAGE_UNBITMAP_STRETCH ${MUI_HEADERIMAGE_BITMAP_STRETCH}
!endif
!if "${MUI_HEADERIMAGE_BITMAP}" == ""
!error "Invalid MUI_HEADERIMAGE_BITMAP"
!endif
!if "${MUI_HEADERIMAGE_UNBITMAP}" == ""
!error "Invalid MUI_HEADERIMAGE_UNBITMAP"
!endif
!ifdef MUI_HEADERIMAGE_BITMAP_RTL
!ifndef MUI_HEADERIMAGE_UNBITMAP_RTL
!define MUI_HEADERIMAGE_UNBITMAP_RTL "${MUI_HEADERIMAGE_BITMAP_RTL}"
!insertmacro MUI_SET MUI_HEADERIMAGE_UNBITMAP_RTL_STRETCH ${MUI_HEADERIMAGE_BITMAP_RTL_STRETCH}
!endif
!if "${MUI_HEADERIMAGE_BITMAP_RTL}" == ""
!error "Invalid MUI_HEADERIMAGE_BITMAP_RTL"
!endif
!if "${MUI_HEADERIMAGE_UNBITMAP_RTL}" == ""
!error "Invalid MUI_HEADERIMAGE_UNBITMAP_RTL"
!endif
!endif
!insertmacro MUI_DEFAULT MUI_HEADERIMAGE_UNBITMAP_STRETCH ${MUI_HEADERIMAGE_BITMAP_STRETCH}
!insertmacro MUI_DEFAULT MUI_HEADERIMAGE_UNBITMAP_RTL_STRETCH ${MUI_HEADERIMAGE_BITMAP_RTL_STRETCH}
!endif
;Default texts
!insertmacro MUI_DEFAULT MUI_ABORTWARNING_TEXT "$(MUI_TEXT_ABORTWARNING)"
!insertmacro MUI_DEFAULT MUI_UNABORTWARNING_TEXT "$(MUI_UNTEXT_ABORTWARNING)"
;Apply settings
XPStyle On ;XP style setting in manifest resource
;Dialog resources
ChangeUI all "${MUI_UI}"
!ifdef MUI_HEADERIMAGE
!ifndef MUI_HEADERIMAGE_RIGHT
ChangeUI IDD_INST "${MUI_UI_HEADERIMAGE}"
!else
ChangeUI IDD_INST "${MUI_UI_HEADERIMAGE_RIGHT}"
!endif
!endif
;Icons
Icon "${MUI_ICON}"
UninstallIcon "${MUI_UNICON}"
!endif
!macroend
;--------------------------------
;Abort warning message box
!macro MUI_ABORTWARNING
!ifdef MUI_ABORTWARNING_CANCEL_DEFAULT
MessageBox MB_YESNO|MB_ICONEXCLAMATION|MB_DEFBUTTON2 "${MUI_ABORTWARNING_TEXT}" IDYES mui.Quit
!else
MessageBox MB_YESNO|MB_ICONEXCLAMATION "${MUI_ABORTWARNING_TEXT}" IDYES mui.Quit
!endif
Abort
mui.Quit:
!macroend
!macro MUI_UNABORTWARNING
!ifdef MUI_UNABORTWARNING_CANCEL_DEFAULT
MessageBox MB_YESNO|MB_ICONEXCLAMATION|MB_DEFBUTTON2 "${MUI_UNABORTWARNING_TEXT}" IDYES mui.Quit
!else
MessageBox MB_YESNO|MB_ICONEXCLAMATION "${MUI_UNABORTWARNING_TEXT}" IDYES mui.Quit
!endif
Abort
mui.Quit:
!macroend
;--------------------------------
;Initialization of GUI
!macro MUI_HEADERIMAGE_INITHELPER_LOADIMAGEWITHMACRO MACRO
!ifdef MUI_HEADERIMAGE_RIGHT
!ifndef MUI_OPTIMIZE_ALWAYSLTR ; Undocumented
${if} $(^RTL) == 1
!insertmacro ${MACRO} $mui.Header.Image "${PATH}" Left Leak
${Else}
!insertmacro ${MACRO} $mui.Header.Image "${PATH}" Right Leak
${EndIf}
!else
!insertmacro ${MACRO} $mui.Header.Image "${PATH}" Right Leak
!endif
!else
!insertmacro ${MACRO} $mui.Header.Image "${PATH}" Auto Leak
!endif
!macroend
!macro MUI_HEADERIMAGE_INITHELPER_LOADIMAGE UN RTL IMGRESID PATH
GetDlgItem $mui.Header.Image $HWNDPARENT ${IMGRESID} ; This variable is not used by every mode but we have to reference it to avoid a compiler warning.
!if "${MUI_HEADERIMAGE_${UN}BITMAP${RTL}_STRETCH}" == "NoStretchNoCropNoAlign"
SetBrandingImage /IMGID=${IMGRESID} "${PATH}"
!else if "${MUI_HEADERIMAGE_${UN}BITMAP${RTL}_STRETCH}" == "NoStretchNoCrop"
!insertmacro MUI_HEADERIMAGE_INITHELPER_LOADIMAGEWITHMACRO \
MUI_LOADANDXALIGNIMAGE
!else if "${MUI_HEADERIMAGE_${UN}BITMAP${RTL}_STRETCH}" == "AspectFitHeight"
!insertmacro MUI_HEADERIMAGE_INITHELPER_LOADIMAGEWITHMACRO \
MUI_LOADANDASPECTSTRETCHIMAGETOCONTROLHEIGHT
!else
!if "${MUI_HEADERIMAGE_${UN}BITMAP${RTL}_STRETCH}" != "FitControl"
!warning 'MUI_HEADERIMAGE_${UN}BITMAP${RTL}_STRETCH set to unknown value, defaulting to FitControl'
!endif
SetBrandingImage /IMGID=${IMGRESID} /RESIZETOFIT "${PATH}"
!endif
!macroend
!macro MUI_HEADERIMAGE_INIT UN IMGRESID
;Load and display header image
!ifdef MUI_HEADERIMAGE
InitPluginsDir
!ifdef MUI_HEADERIMAGE_${UN}BITMAP_RTL
${if} $(^RTL) == 1
File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UN}BITMAP_RTL}"
!pragma verifyloadimage "${MUI_HEADERIMAGE_${UN}BITMAP_RTL}"
!insertmacro MUI_HEADERIMAGE_INITHELPER_LOADIMAGE "${UN}" "_RTL" ${IMGRESID} "$PLUGINSDIR\modern-header.bmp"
${else}
!endif
File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UN}BITMAP}"
!pragma verifyloadimage "${MUI_HEADERIMAGE_${UN}BITMAP}"
!insertmacro MUI_HEADERIMAGE_INITHELPER_LOADIMAGE "${UN}" "" ${IMGRESID} "$PLUGINSDIR\modern-header.bmp"
!ifdef MUI_HEADERIMAGE_${UN}BITMAP_RTL
${endif}
!endif
!endif
!macroend
!macro MUI_GUIINIT_OUTERDIALOG UNINSTALLER
;Initialize outer dialog (fonts & colors)
;Header
GetDlgItem $mui.Header.Text $HWNDPARENT 1037
CreateFont $mui.Header.Text.Font "$(^Font)" "$(^FontSize)" "700"
SendMessage $mui.Header.Text ${WM_SETFONT} $mui.Header.Text.Font 0
GetDlgItem $mui.Header.SubText $HWNDPARENT 1038
!ifndef MUI_HEADER_TRANSPARENT_TEXT
SetCtlColors $mui.Header.Text "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
SetCtlColors $mui.Header.SubText "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
!else
SetCtlColors $mui.Header.Text "${MUI_TEXTCOLOR}" "transparent"
SetCtlColors $mui.Header.SubText "${MUI_TEXTCOLOR}" "transparent"
!endif
;Header image
!insertmacro MUI_HEADERIMAGE_INIT "${UNINSTALLER}" 1046
;Header background
GetDlgItem $mui.Header.Background $HWNDPARENT 1034
SetCtlColors $mui.Header.Background "" "${MUI_BGCOLOR}"
;Header icon image background
!ifndef MUI_HEADERIMAGE
GetDlgItem $mui.Header.Image $HWNDPARENT 1039
SetCtlColors $mui.Header.Image "" "${MUI_BGCOLOR}"
!endif
;Branding text
GetDlgItem $mui.Branding.Background $HWNDPARENT 1028
SetCtlColors $mui.Branding.Background /BRANDING
GetDlgItem $mui.Branding.Text $HWNDPARENT 1256
SetCtlColors $mui.Branding.Text /BRANDING
SendMessage $mui.Branding.Text ${WM_SETTEXT} 0 "STR:$(^Branding) "
;Lines
GetDlgItem $mui.Line.Standard $HWNDPARENT 1035
GetDlgItem $mui.Line.FullWindow $HWNDPARENT 1045
;Buttons
GetDlgItem $mui.Button.Next $HWNDPARENT 1
GetDlgItem $mui.Button.Cancel $HWNDPARENT 2
GetDlgItem $mui.Button.Back $HWNDPARENT 3
!macroend
;--------------------------------
;Interface functions
!macro MUI_FUNCTION_GUIINIT
Function .onGUIInit
!insertmacro MUI_GUIINIT_OUTERDIALOG ""
!ifdef MUI_PAGE_FUNCTION_GUIINIT
Call "${MUI_PAGE_FUNCTION_GUIINIT}"
!endif
!ifdef MUI_CUSTOMFUNCTION_GUIINIT
Call "${MUI_CUSTOMFUNCTION_GUIINIT}"
!endif
FunctionEnd
!macroend
!macro MUI_UNFUNCTION_GUIINIT
Function un.onGUIInit
!insertmacro MUI_GUIINIT_OUTERDIALOG UN
!ifdef MUI_UNPAGE_FUNCTION_GUIINIT
Call "${MUI_UNPAGE_FUNCTION_GUIINIT}"
!endif
!ifdef MUI_CUSTOMFUNCTION_UNGUIINIT
Call "${MUI_CUSTOMFUNCTION_UNGUIINIT}"
!endif
FunctionEnd
!macroend
!macro MUI_FUNCTION_ABORTWARNING
Function .onUserAbort
!ifdef MUI_PAGE_FUNCTION_ABORTWARNING
Call ${MUI_PAGE_FUNCTION_ABORTWARNING}
!endif
!ifdef MUI_ABORTWARNING
!insertmacro MUI_ABORTWARNING
!endif
!ifdef MUI_CUSTOMFUNCTION_ABORT
Call "${MUI_CUSTOMFUNCTION_ABORT}"
!endif
FunctionEnd
!macroend
!macro MUI_FUNCTION_UNABORTWARNING
Function un.onUserAbort
!ifdef MUI_UNPAGE_FUNCTION_ABORTWARNING
Call ${MUI_UNPAGE_FUNCTION_ABORTWARNING}
!endif
!ifdef MUI_UNABORTWARNING
!insertmacro MUI_UNABORTWARNING
!endif
!ifdef MUI_CUSTOMFUNCTION_UNABORT
Call "${MUI_CUSTOMFUNCTION_UNABORT}"
!endif
FunctionEnd
!macroend

View File

@ -0,0 +1,198 @@
/*
NSIS Modern User Interface
Localization
*/
;--------------------------------
;Variables
!macro MUI_LANGDLL_VARIABLES
!ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
!ifndef MUI_LANGDLL_REGISTRY_VARIABLES
!define MUI_LANGDLL_REGISTRY_VARIABLES
;/GLOBAL because the macros are included in a function
Var /GLOBAL mui.LangDLL.RegistryLanguage
!endif
!endif
!macroend
;--------------------------------
;Include language files
!macro MUI_LANGUAGEEX LangDir NLFID
!verbose push ${MUI_VERBOSE}
!ifndef MUI_PAGE_UNINSTALLER_PREFIX
!ifndef MUI_DISABLE_INSERT_LANGUAGE_AFTER_PAGES_WARNING ; Define this to avoid the warning if you only have custom pages
!warning "MUI_LANGUAGE[EX] should be inserted after the MUI_[UN]PAGE_* macros"
!endif
!endif
!insertmacro MUI_INSERT
;Include a language
LoadLanguageFile "${LangDir}\${NLFID}.nlf"
;Include MUI language file
!insertmacro LANGFILE_INCLUDE_WITHDEFAULT \
"${LangDir}\${NLFID}.nsh" "${NSISDIR}\Contrib\Language files\English.nsh"
;Add language to list of languages for selection dialog
!define /ifndef MUI_LANGDLL_LANGUAGES ""
!define /redef MUI_LANGDLL_LANGUAGES \
`"${LANGFILE_${NLFID}_LANGDLL}" "${LANG_${NLFID}}" ${MUI_LANGDLL_LANGUAGES}`
!define /ifndef MUI_LANGDLL_LANGUAGES_CP ""
!define /redef MUI_LANGDLL_LANGUAGES_CP \
`"${LANGFILE_${NLFID}_LANGDLL}" "${LANG_${NLFID}}" "${LANG_${NLFID}_CP}" ${MUI_LANGDLL_LANGUAGES_CP}`
!verbose pop
!macroend
!macro MUI_LANGUAGE NLFID
!verbose push ${MUI_VERBOSE}
!insertmacro MUI_LANGUAGEEX "${NSISDIR}\Contrib\Language files" "${NLFID}"
!verbose pop
!macroend
;--------------------------------
;Language selection
!macro MUI_LANGDLL_DISPLAY
!verbose push
!verbose ${MUI_VERBOSE}
!ifndef MUI_LANGDLL_LANGUAGES
!warning "MUI_LANGDLL_DISPLAY should only be used after inserting the MUI_LANGUAGE macro(s)"
!endif
!insertmacro MUI_LANGDLL_VARIABLES
!insertmacro MUI_DEFAULT MUI_LANGDLL_WINDOWTITLE "Installer Language"
!insertmacro MUI_DEFAULT MUI_LANGDLL_INFO "Please select a language."
!ifdef MUI_LANGDLL_REGISTRY_VARIABLES
ReadRegStr $mui.LangDLL.RegistryLanguage "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}"
${if} $mui.LangDLL.RegistryLanguage != ""
;Set default language to registry language
StrCpy $LANGUAGE $mui.LangDLL.RegistryLanguage
${endif}
!endif
!ifdef NSIS_CONFIG_SILENT_SUPPORT
${unless} ${Silent}
!endif
!ifndef MUI_LANGDLL_ALWAYSSHOW
!ifdef MUI_LANGDLL_REGISTRY_VARIABLES
${if} $mui.LangDLL.RegistryLanguage == ""
!endif
!endif
;Show language selection dialog
!ifdef MUI_LANGDLL_ALLLANGUAGES
LangDLL::LangDialog "${MUI_LANGDLL_WINDOWTITLE}" "${MUI_LANGDLL_INFO}" A ${MUI_LANGDLL_LANGUAGES} ""
!else
LangDLL::LangDialog "${MUI_LANGDLL_WINDOWTITLE}" "${MUI_LANGDLL_INFO}" AC ${MUI_LANGDLL_LANGUAGES_CP} ""
!endif
Pop $LANGUAGE
${if} $LANGUAGE == "cancel"
Abort
${endif}
!ifndef MUI_LANGDLL_ALWAYSSHOW
!ifdef MUI_LANGDLL_REGISTRY_VARIABLES
${endif}
!endif
!endif
!ifdef NSIS_CONFIG_SILENT_SUPPORT
${endif}
!endif
!verbose pop
!macroend
!macro MUI_LANGDLL_SAVELANGUAGE
;Save language in registry
!ifndef MUI_PAGE_UNINSTALLER
IfAbort mui.langdllsavelanguage_abort
!ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
WriteRegStr "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}" $LANGUAGE
!endif
mui.langdllsavelanguage_abort:
!endif
!macroend
!macro MUI_UNGETLANGUAGE
;Get language from registry in uninstaller
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_LANGDLL_VARIABLES
!ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
ReadRegStr $mui.LangDLL.RegistryLanguage "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}"
${if} $mui.LangDLL.RegistryLanguage = ""
!endif
!insertmacro MUI_LANGDLL_DISPLAY
!ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
${else}
StrCpy $LANGUAGE $mui.LangDLL.RegistryLanguage
${endif}
!endif
!verbose pop
!macroend
;--------------------------------
;Rerserve LangDLL file
!macro MUI_RESERVEFILE_LANGDLL
!verbose push
!verbose ${MUI_VERBOSE}
ReserveFile /plugin LangDLL.dll
!verbose pop
!macroend

View File

@ -0,0 +1,117 @@
/*
NSIS Modern User Interface - Version 2.1
Copyright 2002-2023 Joost Verburg
Contributors: Amir Szekely, Anders Kjersem
*/
!ifndef MUI_INCLUDED
!verbose push 3
!define MUI_INCLUDED
!define MUI_SYSVERSION "2.1"
!verbose pop
!echo "NSIS Modern User Interface version ${MUI_SYSVERSION} - Copyright 2002-2023 Joost Verburg"
;--------------------------------
!verbose push 3
!define /IfNDef MUI_VERBOSE 3
!verbose ${MUI_VERBOSE}
!addincludedir "${NSISDIR}\Contrib\Modern UI 2"
;--------------------------------
;Header files required by MUI
!include WinMessages.nsh
!include LogicLib.nsh
!include nsDialogs.nsh
!include LangFile.nsh
;--------------------------------
;Macros for compile-time defines
!macro MUI_DEFAULT SYMBOL CONTENT
;Define symbol if not yet defined
;For setting default values
!ifndef "${SYMBOL}"
!define "${SYMBOL}" "${CONTENT}"
!endif
!macroend
!macro MUI_SET SYMBOL CONTENT
;Define symbol and undefine if necessary
!insertmacro MUI_UNSET "${SYMBOL}"
!define "${SYMBOL}" "${CONTENT}"
!macroend
!macro MUI_UNSET SYMBOL
;Undefine symbol if defined
!ifdef "${SYMBOL}"
!undef "${SYMBOL}"
!endif
!macroend
;--------------------------------
;MUI interface
!include "Deprecated.nsh"
!include "Interface.nsh"
!include "Localization.nsh"
!include "Pages.nsh"
;--------------------------------
;Pages
!include "Pages\Components.nsh"
!include "Pages\Directory.nsh"
!include "Pages\Finish.nsh"
!include "Pages\InstallFiles.nsh"
!include "Pages\License.nsh"
!include "Pages\StartMenu.nsh"
!include "Pages\UninstallConfirm.nsh"
!include "Pages\Welcome.nsh"
;--------------------------------
;Insert MUI code in script
!macro MUI_INSERT
!ifndef MUI_INSERT
!define MUI_INSERT
;This macro is included when the first language file is included,
;after the pages.
;Interface settings
!insertmacro MUI_INTERFACE
;Interface functions - Installer
!insertmacro MUI_FUNCTION_GUIINIT
!insertmacro MUI_FUNCTION_ABORTWARNING
;Interface functions - Uninstaller
!ifdef MUI_UNINSTALLER
!insertmacro MUI_UNFUNCTION_GUIINIT
!insertmacro MUI_FUNCTION_UNABORTWARNING
!endif
!endif
!macroend
!verbose pop
!endif ;~ MUI_INCLUDED

View File

@ -0,0 +1,324 @@
/*
NSIS Modern User Interface
Support code for all pages
*/
;--------------------------------
;Page initialization
!macro MUI_PAGE_INIT
!ifdef MUI_INSERT
!warning "MUI_PAGE_* inserted after MUI_LANGUAGE"
!endif
;Include interface settings if necessary
!insertmacro MUI_INTERFACE
;Define settings for installer page
!insertmacro MUI_UNSET MUI_PAGE_UNINSTALLER
!insertmacro MUI_UNSET MUI_PAGE_UNINSTALLER_PREFIX
!insertmacro MUI_UNSET MUI_PAGE_UNINSTALLER_FUNCPREFIX
!insertmacro MUI_SET MUI_PAGE_UNINSTALLER_PREFIX ""
!insertmacro MUI_SET MUI_PAGE_UNINSTALLER_FUNCPREFIX ""
;Generate unique ID
!insertmacro MUI_UNSET MUI_UNIQUEID
!define MUI_UNIQUEID ${__LINE__}
!macroend
!macro MUI_UNPAGE_INIT
!ifdef MUI_INSERT
!warning "MUI_UNPAGE_* inserted after MUI_LANGUAGE"
!endif
;Include interface settings
!insertmacro MUI_INTERFACE
;Define prefixes for uninstaller page
!insertmacro MUI_SET MUI_UNINSTALLER ""
!insertmacro MUI_SET MUI_PAGE_UNINSTALLER ""
!insertmacro MUI_SET MUI_PAGE_UNINSTALLER_PREFIX "UN"
!insertmacro MUI_SET MUI_PAGE_UNINSTALLER_FUNCPREFIX "un."
;Generate unique ID
!insertmacro MUI_UNSET MUI_UNIQUEID
!define MUI_UNIQUEID ${__LINE__}
!macroend
;--------------------------------
;Header text for standard MUI page
!macro MUI_HEADER_TEXT_PAGE TEXT SUBTEXT
!ifdef MUI_PAGE_HEADER_TEXT & MUI_PAGE_HEADER_SUBTEXT
!insertmacro MUI_HEADER_TEXT "${MUI_PAGE_HEADER_TEXT}" "${MUI_PAGE_HEADER_SUBTEXT}"
!else ifdef MUI_PAGE_HEADER_TEXT
!insertmacro MUI_HEADER_TEXT "${MUI_PAGE_HEADER_TEXT}" "${SUBTEXT}"
!else ifdef MUI_PAGE_HEADER_SUBTEXT
!insertmacro MUI_HEADER_TEXT "${TEXT}" "${MUI_PAGE_HEADER_SUBTEXT}"
!else
!insertmacro MUI_HEADER_TEXT "${TEXT}" "${SUBTEXT}"
!endif
!insertmacro MUI_UNSET MUI_PAGE_HEADER_TEXT
!insertmacro MUI_UNSET MUI_PAGE_HEADER_SUBTEXT
!macroend
;--------------------------------
;Header text for custom page
!macro MUI_HEADER_TEXT TEXT SUBTEXT ;Called from script
!verbose push
!verbose ${MUI_VERBOSE}
!ifdef MUI_HEADER_TRANSPARENT_TEXT
LockWindow on
!endif
SendMessage $mui.Header.Text ${WM_SETTEXT} 0 "STR:${TEXT}"
SendMessage $mui.Header.SubText ${WM_SETTEXT} 0 "STR:${SUBTEXT}"
!ifdef MUI_HEADER_TRANSPARENT_TEXT
LockWindow off
!endif
!verbose pop
!macroend
;--------------------------------
;Custom page functions
!macro MUI_PAGE_FUNCTION_CUSTOM TYPE
!ifdef MUI_PAGE_CUSTOMFUNCTION_${TYPE}
Call "${MUI_PAGE_CUSTOMFUNCTION_${TYPE}}"
!undef MUI_PAGE_CUSTOMFUNCTION_${TYPE}
!endif
!macroend
;--------------------------------
;Support for full window pages (like welcome/finish page)
!macro MUI_PAGE_FUNCTION_FULLWINDOW
!ifndef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_FULLWINDOW
!define MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_FULLWINDOW
Function ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}muiPageLoadFullWindow
LockWindow on
;The branding text needs to be hidden because the full windows page
;overlaps with it.
ShowWindow $mui.Branding.Background ${SW_HIDE}
ShowWindow $mui.Branding.Text ${SW_HIDE}
;The texts need to be hidden because otherwise they may show through
;the page above when the Alt key is pressed.
ShowWindow $mui.Header.Text ${SW_HIDE}
ShowWindow $mui.Header.SubText ${SW_HIDE}
ShowWindow $mui.Header.Image ${SW_HIDE}
;Show line below full width of page
ShowWindow $mui.Line.Standard ${SW_HIDE}
ShowWindow $mui.Line.FullWindow ${SW_NORMAL}
LockWindow off
FunctionEnd
Function ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}muiPageUnloadFullWindow
;Set everything back to normal again
LockWindow on
ShowWindow $mui.Branding.Background ${SW_NORMAL}
ShowWindow $mui.Branding.Text ${SW_NORMAL}
ShowWindow $mui.Header.Text ${SW_NORMAL}
ShowWindow $mui.Header.SubText ${SW_NORMAL}
ShowWindow $mui.Header.Image ${SW_NORMAL}
ShowWindow $mui.Line.Standard ${SW_NORMAL}
ShowWindow $mui.Line.FullWindow ${SW_HIDE}
LockWindow off
FunctionEnd
!endif
!macroend
!macro MUI_INTERNAL_FULLWINDOW_LOADWIZARDIMAGE _un _hwndImg _ImgPath _RetImgHandle
!ifdef MUI_${_un}WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
!insertmacro MUI_DEFAULT MUI_${_un}WELCOMEFINISHPAGE_BITMAP_STRETCH NoStretchNoCropNoAlign ; Legacy compatibility
!endif
!insertmacro MUI_DEFAULT MUI_${_un}WELCOMEFINISHPAGE_BITMAP_STRETCH FitControl
!if "${MUI_${_un}WELCOMEFINISHPAGE_BITMAP_STRETCH}" == "NoStretchNoCropNoAlign"
${NSD_SetImage} ${_hwndImg} "${_ImgPath}" "${_RetImgHandle}"
!else if "${MUI_${_un}WELCOMEFINISHPAGE_BITMAP_STRETCH}" == "NoStretchNoCrop"
!insertmacro MUI_LOADANDXALIGNIMAGE ${_hwndImg} "${_ImgPath}" Auto "${_RetImgHandle}"
!else if "${MUI_${_un}WELCOMEFINISHPAGE_BITMAP_STRETCH}" == "AspectFitHeight"
!insertmacro MUI_LOADANDASPECTSTRETCHIMAGETOCONTROLHEIGHT ${_hwndImg} "${_ImgPath}" Auto "${_RetImgHandle}"
!else
!if "${MUI_${_un}WELCOMEFINISHPAGE_BITMAP_STRETCH}" != "FitControl"
!warning 'MUI_${_un}WELCOMEFINISHPAGE_BITMAP_STRETCH set to unknown value, defaulting to FitControl'
!endif
${NSD_SetStretchedImage} ${_hwndImg} "${_ImgPath}" "${_RetImgHandle}"
!endif
!macroend
;--------------------------------
;Helper macros
!include Util.nsh
!macro MUI_INTERNAL_LOADANDSIZEIMAGE _macro _hwndImg _ImgPath _XAlign _RetImgHandle
!if "${_XAlign}" == "Auto"
${if} $(^RTL) == 1
Push "*${_ImgPath}"
${Else}
Push "${_ImgPath}"
${EndIf}
!else if "${_XAlign}" == "Right"
Push "*${_ImgPath}"
!else
Push "${_ImgPath}"
!endif
Push "${_hwndImg}"
${CallArtificialFunction} ${_macro}
!if "${_RetImgHandle}" == "Leak"
!insertmacro _LOGICLIB_TEMP
Pop $_LOGICLIB_TEMP
!else if "${_RetImgHandle}" != "Stack"
Pop ${_RetImgHandle}
!endif
!macroend
!macro MUI_LOADANDXALIGNIMAGE _hwndImg _ImgPath _XAlign _RetImgHandle
!insertmacro MUI_INTERNAL_LOADANDSIZEIMAGE \
MUI_INTERNAL_LOADANDXALIGNIMAGE "${_hwndImg}" "${_ImgPath}" "${_XAlign}" "${_RetImgHandle}"
!macroend
!macro MUI_INTERNAL_LOADANDXALIGNIMAGE
System::Store "S"
System::Call 'USER32::GetWindowRect(psr0,@r1)'
System::Call 'USER32::MapWindowPoints(p0,p$hwndparent,pr1,i2)' ; Note: Assuming control is not in inner dialog
System::Call '*$1(i.r5,i.r6,i.r7,i.r8)'
IntOp $7 $7 - $5
IntOp $8 $8 - $6
Pop $1
StrCpy $3 $1 1
${If} $3 == "*" ; Move control to the right?
StrCpy $1 $1 "" 1
${Endif}
System::Call 'USER32::LoadImage(p0,tr1,i${IMAGE_BITMAP},i0,i0,i${LR_LOADFROMFILE})p.r2'
SendMessage $0 ${STM_SETIMAGE} ${IMAGE_BITMAP} $2 $1
Push $2 ; Return value
System::Call 'GDI32::DeleteObject(pr1)' ; Note: Assuming the previous image (if any) was a bitmap
System::Call 'USER32::GetClientRect(pr0,@r1)'
System::Call '*$1(i,i,i.r1,i.r2)'
${If} $3 == "*"
${AndIf} $1 < $7 ; ImgW < CtlW
IntOp $3 $7 - $1
IntOp $5 $5 + $3
System::Call 'USER32::SetWindowPos(pr0,p0,ir5,ir6,i,i,i0x15)'
${EndIf}
System::Store "L"
!macroend
!macro MUI_LOADANDASPECTSTRETCHIMAGETOCONTROLHEIGHT _hwndImg _ImgPath _XAlign _RetImgHandle
!insertmacro MUI_INTERNAL_LOADANDSIZEIMAGE \
MUI_INTERNAL_LOADANDASPECTSTRETCHIMAGETOCONTROLHEIGHT "${_hwndImg}" "${_ImgPath}" "${_XAlign}" "${_RetImgHandle}"
!macroend
!macro MUI_INTERNAL_LOADANDASPECTSTRETCHIMAGETOCONTROLHEIGHT
System::Store "S"
System::Call 'USER32::GetWindowRect(psr0,@r1)'
System::Call 'USER32::MapWindowPoints(p0,p$hwndparent,pr1,i2)' ; Note: Assuming control is not in inner dialog
System::Call '*$1(i.r5,i.r6,i.r7,i.r8)'
IntOp $7 $7 - $5
IntOp $8 $8 - $6
Pop $1
StrCpy $3 $1 1
${If} $3 == "*" ; Move control to the right?
StrCpy $1 $1 "" 1
${Endif}
System::Call 'USER32::LoadImage(p0,tr1,i${IMAGE_BITMAP},i0,i0,i${LR_LOADFROMFILE})p.r2'
SendMessage $0 ${STM_SETIMAGE} ${IMAGE_BITMAP} $2 $1
Push $2 ; Return value
System::Call 'GDI32::DeleteObject(pr1)' ; Note: Assuming the previous image (if any) was a bitmap
System::Call 'USER32::GetClientRect(pr0,@r1)'
System::Call '*$1(i,i,i.r1,i.r2)'
IntOp $R7 $7 * 10000
IntOp $R8 $8 * 10000
IntOp $R1 $1 * 10000
IntOp $R2 $2 * 10000
IntOp $R3 $R1 / $2
StrCpy $R4 10000
${If} $R1 > $R2
StrCpy $R3 10000
IntOp $R4 $R2 / $1
${EndIf}
${DoWhile} $R2 > $R8 ; ImgH > CtlH
IntOp $R1 $R1 - $R3
IntOp $R2 $R2 - $R4
${Loop}
${DoWhile} $R2 < $R8 ; ImgH < CtlH
IntOp $R1 $R1 + $R3
IntOp $R2 $R2 + $R4
${Loop}
IntOp $1 $R1 / 10000
IntOp $2 $R2 / 10000
${If} $1 < $7
${AndIf} $3 == "*"
IntOp $R3 $7 - $1
IntOp $5 $5 + $R3
${EndIf}
${DoWhile} $2 > $8 ; Non-aspect-maintained stretch to make it a pixel perfect match
IntOp $2 $2 - 1
IntOp $1 $1 - 1
${IfThen} $3 == "*" ${|} IntOp $5 $5 + 1 ${|}
${Loop}
System::Call 'USER32::SetWindowPos(pr0,p0,ir5,ir6,ir1,ir2,i0x14)'
System::Store "L"
!macroend

View File

@ -0,0 +1,242 @@
/*
NSIS Modern User Interface
Components page
*/
;--------------------------------
;Page interface settings and variables
!macro MUI_COMPONENTSPAGE_INTERFACE
!ifndef MUI_COMPONENTSPAGE_INTERFACE
!define MUI_COMPONENTSPAGE_INTERFACE
Var mui.ComponentsPage
Var mui.ComponentsPage.Text
Var mui.ComponentsPage.InstTypesText
Var mui.ComponentsPage.ComponentsText
Var mui.ComponentsPage.InstTypes
Var mui.ComponentsPage.Components
Var mui.ComponentsPage.DescriptionTitle
Var mui.ComponentsPage.DescriptionText.Info
Var mui.ComponentsPage.DescriptionText
Var mui.ComponentsPage.SpaceRequired
!insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_CHECKBITMAP "${NSISDIR}\Contrib\Graphics\Checks\modern.bmp"
!insertmacro MUI_DEFAULT MUI_UI_COMPONENTSPAGE_SMALLDESC "${NSISDIR}\Contrib\UIs\modern_smalldesc.exe"
!insertmacro MUI_DEFAULT MUI_UI_COMPONENTSPAGE_NODESC "${NSISDIR}\Contrib\UIs\modern_nodesc.exe"
;Apply settings
!ifdef MUI_COMPONENTSPAGE_SMALLDESC
ChangeUI IDD_SELCOM "${MUI_UI_COMPONENTSPAGE_SMALLDESC}"
!else ifdef MUI_COMPONENTSPAGE_NODESC
ChangeUI IDD_SELCOM "${MUI_UI_COMPONENTSPAGE_NODESC}"
!endif
CheckBitmap "${MUI_COMPONENTSPAGE_CHECKBITMAP}"
!endif
!macroend
;--------------------------------
;Page declaration
!macro MUI_PAGEDECLARATION_COMPONENTS
!insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}COMPONENTSPAGE ""
!insertmacro MUI_COMPONENTSPAGE_INTERFACE
!insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_TOP ""
!insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_COMPLIST ""
!insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_INSTTYPE ""
!insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE "$(MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE)"
!insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO "$(MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO)"
PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}components
PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsLeave_${MUI_UNIQUEID}
Caption " "
ComponentText "${MUI_COMPONENTSPAGE_TEXT_TOP}" "${MUI_COMPONENTSPAGE_TEXT_INSTTYPE}" "${MUI_COMPONENTSPAGE_TEXT_COMPLIST}"
PageExEnd
!insertmacro MUI_FUNCTION_COMPONENTSPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsLeave_${MUI_UNIQUEID}
!undef MUI_COMPONENTSPAGE_TEXT_TOP
!undef MUI_COMPONENTSPAGE_TEXT_COMPLIST
!undef MUI_COMPONENTSPAGE_TEXT_INSTTYPE
!insertmacro MUI_UNSET MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE
!insertmacro MUI_UNSET MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO
!macroend
!macro MUI_PAGE_COMPONENTS
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_PAGE_INIT
!insertmacro MUI_PAGEDECLARATION_COMPONENTS
!verbose pop
!macroend
!macro MUI_UNPAGE_COMPONENTS
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_UNPAGE_INIT
!insertmacro MUI_PAGEDECLARATION_COMPONENTS
!verbose pop
!macroend
;--------------------------------
;Page functions
!macro MUI_FUNCTION_COMPONENTSPAGE PRE SHOW LEAVE
Function "${PRE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
!insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_COMPONENTS_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_COMPONENTS_SUBTITLE)
FunctionEnd
Function "${SHOW}"
;Get control handles
FindWindow $mui.ComponentsPage "#32770" "" $HWNDPARENT
GetDlgItem $mui.ComponentsPage.Text $mui.ComponentsPage 1006
GetDlgItem $mui.ComponentsPage.InstTypesText $mui.ComponentsPage 1021
GetDlgItem $mui.ComponentsPage.ComponentsText $mui.ComponentsPage 1022
GetDlgItem $mui.ComponentsPage.InstTypes $mui.ComponentsPage 1017
GetDlgItem $mui.ComponentsPage.Components $mui.ComponentsPage 1032
GetDlgItem $mui.ComponentsPage.DescriptionTitle $mui.ComponentsPage 1042
GetDlgItem $mui.ComponentsPage.DescriptionText $mui.ComponentsPage 1043
GetDlgItem $mui.ComponentsPage.SpaceRequired $mui.ComponentsPage 1023
;Default text in description textbox
SendMessage $mui.ComponentsPage.DescriptionTitle ${WM_SETTEXT} 0 "STR:${MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE}"
EnableWindow $mui.ComponentsPage.DescriptionText 0
SendMessage $mui.ComponentsPage.DescriptionText ${WM_SETTEXT} 0 "STR:${MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO}"
StrCpy $mui.ComponentsPage.DescriptionText.Info "${MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO}" ;Text for current components page
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
FunctionEnd
Function "${LEAVE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
FunctionEnd
!macroend
;--------------------------------
;Script functions for components descriptions
!macro MUI_DESCRIPTION_BEGIN
${if} $0 == -1
;No mouse hover over component in list
SendMessage $mui.ComponentsPage.DescriptionText ${WM_SETTEXT} 0 "STR:"
EnableWindow $mui.ComponentsPage.DescriptionText 0
SendMessage $mui.ComponentsPage.DescriptionText ${WM_SETTEXT} 0 "STR:$mui.ComponentsPage.DescriptionText.Info"
!macroend
!macro MUI_DESCRIPTION_TEXT VAR TEXT
!verbose push
!verbose ${MUI_VERBOSE}
${elseif} $0 == ${VAR}
SendMessage $mui.ComponentsPage.DescriptionText ${WM_SETTEXT} 0 "STR:"
EnableWindow $mui.ComponentsPage.DescriptionText 1
SendMessage $mui.ComponentsPage.DescriptionText ${WM_SETTEXT} 0 "STR:${TEXT}"
!verbose pop
!macroend
!macro MUI_DESCRIPTION_END
!verbose push
!verbose ${MUI_VERBOSE}
${endif}
!verbose pop
!macroend
!macro MUI_FUNCTION_DESCRIPTION_BEGIN
!verbose push
!verbose ${MUI_VERBOSE}
Function .onMouseOverSection
!insertmacro MUI_DESCRIPTION_BEGIN
!verbose pop
!macroend
!macro MUI_FUNCTION_DESCRIPTION_END
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_DESCRIPTION_END
!ifdef MUI_CUSTOMFUNCTION_ONMOUSEOVERSECTION
Call "${MUI_CUSTOMFUNCTION_ONMOUSEOVERSECTION}"
!endif
FunctionEnd
!verbose pop
!macroend
!macro MUI_UNFUNCTION_DESCRIPTION_BEGIN
!verbose push
!verbose ${MUI_VERBOSE}
Function un.onMouseOverSection
!insertmacro MUI_DESCRIPTION_BEGIN
!verbose pop
!macroend
!macro MUI_UNFUNCTION_DESCRIPTION_END
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_DESCRIPTION_END
!ifdef MUI_CUSTOMFUNCTION_UNONMOUSEOVERSECTION
Call "${MUI_CUSTOMFUNCTION_UNONMOUSEOVERSECTION}"
!endif
FunctionEnd
!verbose pop
!macroend

View File

@ -0,0 +1,126 @@
/*
NSIS Modern User Interface
Directory page
*/
;--------------------------------
;Page interface settings and variables
!macro MUI_DIRECTORYPAGE_INTERFACE
!ifndef MUI_DIRECTORYPAGE_INTERFACE
!define MUI_DIRECTORYPAGE_INTERFACE
Var mui.DirectoryPage
Var mui.DirectoryPage.Text
Var mui.DirectoryPage.DirectoryBox
Var mui.DirectoryPage.Directory
Var mui.DirectoryPage.BrowseButton
Var mui.DirectoryPage.SpaceRequired
Var mui.DirectoryPage.SpaceAvailable
!endif
!macroend
;--------------------------------
;Page declaration
!macro MUI_PAGEDECLARATION_DIRECTORY
!insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}DIRECTORYPAGE ""
!insertmacro MUI_DIRECTORYPAGE_INTERFACE
!insertmacro MUI_DEFAULT MUI_DIRECTORYPAGE_TEXT_TOP ""
!insertmacro MUI_DEFAULT MUI_DIRECTORYPAGE_TEXT_DESTINATION ""
PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}directory
PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryLeave_${MUI_UNIQUEID}
Caption " "
DirText "${MUI_DIRECTORYPAGE_TEXT_TOP}" "${MUI_DIRECTORYPAGE_TEXT_DESTINATION}"
!ifdef MUI_DIRECTORYPAGE_VARIABLE
DirVar "${MUI_DIRECTORYPAGE_VARIABLE}"
!endif
!ifdef MUI_DIRECTORYPAGE_VERIFYONLEAVE
DirVerify leave
!endif
PageExEnd
!insertmacro MUI_FUNCTION_DIRECTORYPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryLeave_${MUI_UNIQUEID}
!undef MUI_DIRECTORYPAGE_TEXT_TOP
!undef MUI_DIRECTORYPAGE_TEXT_DESTINATION
!insertmacro MUI_UNSET MUI_DIRECTORYPAGE_VARIABLE
!insertmacro MUI_UNSET MUI_DIRECTORYPAGE_VERIFYONLEAVE
!macroend
!macro MUI_PAGE_DIRECTORY
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_PAGE_INIT
!insertmacro MUI_PAGEDECLARATION_DIRECTORY
!verbose pop
!macroend
!macro MUI_UNPAGE_DIRECTORY
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_UNPAGE_INIT
!insertmacro MUI_PAGEDECLARATION_DIRECTORY
!verbose pop
!macroend
;--------------------------------
;Page functions
!macro MUI_FUNCTION_DIRECTORYPAGE PRE SHOW LEAVE
Function "${PRE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
!insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_DIRECTORY_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_DIRECTORY_SUBTITLE)
FunctionEnd
Function "${SHOW}"
;Get control handles
FindWindow $mui.DirectoryPage "#32770" "" $HWNDPARENT
GetDlgItem $mui.DirectoryPage.Text $mui.DirectoryPage 1006
GetDlgItem $mui.DirectoryPage.DirectoryBox $mui.DirectoryPage 1020
GetDlgItem $mui.DirectoryPage.Directory $mui.DirectoryPage 1019
GetDlgItem $mui.DirectoryPage.BrowseButton $mui.DirectoryPage 1001
GetDlgItem $mui.DirectoryPage.SpaceRequired $mui.DirectoryPage 1023
GetDlgItem $mui.DirectoryPage.SpaceAvailable $mui.DirectoryPage 1024
!ifdef MUI_DIRECTORYPAGE_BGCOLOR
!insertmacro MUI_DEFAULT MUI_DIRECTORYPAGE_TEXTCOLOR ""
SetCtlColors $mui.DirectoryPage.Directory "${MUI_DIRECTORYPAGE_TEXTCOLOR}" "${MUI_DIRECTORYPAGE_BGCOLOR}"
!endif
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
FunctionEnd
Function "${LEAVE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
FunctionEnd
!macroend

View File

@ -0,0 +1,510 @@
/*
NSIS Modern User Interface
Finish page (implemented using nsDialogs)
*/
;--------------------------------
;Page interface settings and variables
!macro MUI_FINISHPAGE_INTERFACE
!ifndef MUI_FINISHPAGE_INTERFACE
!define MUI_FINISHPAGE_INTERFACE
Var mui.FinishPage
Var mui.FinishPage.Image
Var mui.FinishPage.Image.Bitmap
Var mui.FinishPage.Title
Var mui.FinishPage.Title.Font
Var mui.FinishPage.Text
!endif
!ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
!ifndef MUI_FINISHPAGE_RETURNVALUE_VARIABLES
!define MUI_FINISHPAGE_RETURNVALUE_VARIABLES
Var mui.FinishPage.ReturnValue
!endif
!else ifdef MUI_FINISHPAGE_RUN | MUI_FINISHPAGE_SHOWREADME
!ifndef MUI_FINISHPAGE_RETURNVALUE_VARIABLES
!define MUI_FINISHPAGE_RETURNVALUE_VARIABLES
Var mui.FinishPage.ReturnValue
!endif
!endif
!ifdef MUI_FINISHPAGE_CANCEL_ENABLED
!ifndef MUI_FINISHPAGE_CANCEL_ENABLED_VARIABLES
!define MUI_FINISHPAGE_CANCEL_ENABLED_VARIABLES
Var mui.FinishPage.DisableAbortWarning
!endif
!endif
!ifdef MUI_FINISHPAGE_RUN
!ifndef MUI_FINISHPAGE_RUN_VARIABLES
!define MUI_FINISHPAGE_RUN_VARIABLES
Var mui.FinishPage.Run
!endif
!endif
!ifdef MUI_FINISHPAGE_SHOWREADME
!ifndef MUI_FINISHPAGE_SHOWREADME_VARIABLES
!define MUI_FINISHPAGE_SHOWREADME_VARIABLES
Var mui.FinishPage.ShowReadme
!endif
!endif
!ifdef MUI_FINISHPAGE_LINK
!ifndef MUI_FINISHPAGE_LINK_VARIABLES
!define MUI_FINISHPAGE_LINK_VARIABLES
Var mui.FinishPage.Link
!endif
!endif
!ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
!ifndef MUI_FINISHPAGE_REBOOT_VARIABLES
!define MUI_FINISHPAGE_REBOOT_VARIABLES
Var mui.FinishPage.RebootNow
Var mui.FinishPage.RebootLater
!endif
!endif
!insertmacro MUI_DEFAULT MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\win.bmp"
!if "${MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_BITMAP}" == ""
!error "Invalid MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_BITMAP"
!endif
!macroend
;--------------------------------
;Interface initialization
!macro MUI_FINISHPAGE_GUIINIT
!ifndef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_GUINIT
!define MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_GUINIT
Function ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPage.GUIInit
InitPluginsDir
File "/oname=$PLUGINSDIR\modern-wizard.bmp" "${MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_BITMAP}"
!pragma verifyloadimage "${MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_BITMAP}"
!ifdef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_GUIINIT
Call "${MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_GUIINIT}"
!endif
!ifndef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}FINISHPAGE_NOAUTOCLOSE
SetAutoClose true
!endif
FunctionEnd
!insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_GUIINIT ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPage.GUIInit
!endif
!macroend
;--------------------------------
;Abort warning
!macro MUI_FINISHPAGE_ABORTWARNING
!ifdef MUI_FINISHPAGE_CANCEL_ENABLED
!ifndef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}FINISHPAGE_ABORTWARNING
!define MUI_${MUI_PAGE_UNINSTALLER_PREFIX}FINISHPAGE_ABORTWARNING
Function ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPage.AbortWarning
${if} $mui.FinishPage.DisableAbortWarning == "1"
Quit
${endif}
!ifdef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_ABORTWARNING
Call ${MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_ABORTWARNING}
!endif
FunctionEnd
!insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_ABORTWARNING ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPage.AbortWarning
!endif
!endif
!macroend
;--------------------------------
;Page declaration
!macro MUI_PAGEDECLARATION_FINISH
!insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}FINISHPAGE ""
!insertmacro MUI_FINISHPAGE_INTERFACE
!insertmacro MUI_FINISHPAGE_GUIINIT
!insertmacro MUI_FINISHPAGE_ABORTWARNING
!insertmacro MUI_DEFAULT MUI_FINISHPAGE_TITLE "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_INFO_TITLE)"
!insertmacro MUI_DEFAULT MUI_FINISHPAGE_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_INFO_TEXT)"
!insertmacro MUI_DEFAULT MUI_FINISHPAGE_BUTTON "$(MUI_BUTTONTEXT_FINISH)"
!insertmacro MUI_DEFAULT MUI_FINISHPAGE_TEXT_REBOOT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_INFO_REBOOT)"
!insertmacro MUI_DEFAULT MUI_FINISHPAGE_TEXT_REBOOTNOW "$(MUI_TEXT_FINISH_REBOOTNOW)"
!insertmacro MUI_DEFAULT MUI_FINISHPAGE_TEXT_REBOOTLATER "$(MUI_TEXT_FINISH_REBOOTLATER)"
!insertmacro MUI_DEFAULT MUI_FINISHPAGE_RUN_TEXT "$(MUI_TEXT_FINISH_RUN)"
!insertmacro MUI_DEFAULT MUI_FINISHPAGE_SHOWREADME_TEXT "$(MUI_TEXT_FINISH_SHOWREADME)"
!insertmacro MUI_DEFAULT MUI_FINISHPAGE_LINK_COLOR "000080"
!insertmacro MUI_PAGE_FUNCTION_FULLWINDOW
PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}custom
PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPage.Pre_${MUI_UNIQUEID} \
${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPage.Leave_${MUI_UNIQUEID}
Caption " "
PageExEnd
!insertmacro MUI_FUNCTION_FINISHPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPage.Pre_${MUI_UNIQUEID} \
${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPage.Leave_${MUI_UNIQUEID} \
${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPage.Link_${MUI_UNIQUEID}
!insertmacro MUI_UNSET MUI_FINISHPAGE_TITLE
!insertmacro MUI_UNSET MUI_FINISHPAGE_TITLE_3LINES
!insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT
!insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_LARGE
!insertmacro MUI_UNSET MUI_FINISHPAGE_BUTTON
!insertmacro MUI_UNSET MUI_FINISHPAGE_CANCEL_ENABLED
!insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_REBOOT
!insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_REBOOTNOW
!insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_REBOOTLATER
!insertmacro MUI_UNSET MUI_FINISHPAGE_REBOOTLATER_DEFAULT
!insertmacro MUI_UNSET MUI_FINISHPAGE_RUN
!insertmacro MUI_UNSET MUI_FINISHPAGE_RUN_TEXT
!insertmacro MUI_UNSET MUI_FINISHPAGE_RUN_PARAMETERS
!insertmacro MUI_UNSET MUI_FINISHPAGE_RUN_NOTCHECKED
!insertmacro MUI_UNSET MUI_FINISHPAGE_RUN_FUNCTION
!insertmacro MUI_UNSET MUI_FINISHPAGE_SHOWREADME
!insertmacro MUI_UNSET MUI_FINISHPAGE_SHOWREADME_TEXT
!insertmacro MUI_UNSET MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
!insertmacro MUI_UNSET MUI_FINISHPAGE_SHOWREADME_FUNCTION
!insertmacro MUI_UNSET MUI_FINISHPAGE_LINK
!insertmacro MUI_UNSET MUI_FINISHPAGE_LINK_LOCATION
!insertmacro MUI_UNSET MUI_FINISHPAGE_LINK_COLOR
!insertmacro MUI_UNSET MUI_FINISHPAGE_NOREBOOTSUPPORT
!insertmacro MUI_UNSET MUI_FINISHPAGE_ABORTWARNINGCHECK
!insertmacro MUI_UNSET MUI_FINISHPAGE_CURFIELD_TOP
!insertmacro MUI_UNSET MUI_FINISHPAGE_CURFIELD_BOTTOM
!macroend
!macro MUI_PAGE_FINISH
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_PAGE_INIT
!insertmacro MUI_PAGEDECLARATION_FINISH
!verbose pop
!macroend
!macro MUI_UNPAGE_FINISH
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_UNPAGE_INIT
!insertmacro MUI_PAGEDECLARATION_FINISH
!verbose pop
!macroend
;--------------------------------
;Page functions
!macro MUI_FUNCTION_FINISHPAGE PRE LEAVE LINK
!ifdef MUI_FINISHPAGE_LINK
Function "${LINK}"
ExecShell open "${MUI_FINISHPAGE_LINK_LOCATION}"
FunctionEnd
!endif
Function "${PRE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
;Set text on Next button
SendMessage $mui.Button.Next ${WM_SETTEXT} 0 "STR:${MUI_FINISHPAGE_BUTTON}"
;Enable cancel button if set in script
!ifdef MUI_FINISHPAGE_CANCEL_ENABLED
EnableWindow $mui.Button.Cancel 1
!endif
;Create dialog
nsDialogs::Create 1044
Pop $mui.FinishPage
nsDialogs::SetRTL $(^RTL)
SetCtlColors $mui.FinishPage "" "${MUI_BGCOLOR}"
;Image control
${NSD_CreateBitmap} 0u 0u 109u 193u ""
Pop $mui.FinishPage.Image
!insertmacro MUI_INTERNAL_FULLWINDOW_LOADWIZARDIMAGE "${MUI_PAGE_UNINSTALLER_PREFIX}" $mui.FinishPage.Image $PLUGINSDIR\modern-wizard.bmp $mui.FinishPage.Image.Bitmap
;Positiong of controls
;Title
!ifndef MUI_FINISHPAGE_TITLE_3LINES
!define MUI_FINISHPAGE_TITLE_HEIGHT 28
!else
!define MUI_FINISHPAGE_TITLE_HEIGHT 38
!endif
;Text
;17 = 10 (top margin) + 7 (distance between texts)
!define /math MUI_FINISHPAGE_TEXT_TOP 17 + ${MUI_FINISHPAGE_TITLE_HEIGHT}
;Height if space required for radio buttons or check boxes
!ifndef MUI_FINISHPAGE_TEXT_LARGE
!define MUI_FINISHPAGE_TEXT_HEIGHT_BUTTONS 40
!else
!define MUI_FINISHPAGE_TEXT_HEIGHT_BUTTONS 60
!endif
!define /math MUI_FINISHPAGE_TEXT_BOTTOM_BUTTONS ${MUI_FINISHPAGE_TEXT_TOP} + ${MUI_FINISHPAGE_TEXT_HEIGHT_BUTTONS}
;Positioning of radio buttons to ask for a reboot
!ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
!define /math MUI_FINISHPAGE_REBOOTNOW_TOP ${MUI_FINISHPAGE_TEXT_BOTTOM_BUTTONS} + 5 ;Distance between text and options
;25 = 10 (height of first radio button) + 15 (distance between buttons)
!define /math MUI_FINISHPAGE_REBOOTLATER_TOP ${MUI_FINISHPAGE_REBOOTNOW_TOP} + 25
!endif
;Positioning of checkboxes
!ifdef MUI_FINISHPAGE_RUN
!define /math MUI_FINISHPAGE_RUN_TOP ${MUI_FINISHPAGE_TEXT_BOTTOM_BUTTONS} + 5 ;Distance between text and options
!endif
!ifdef MUI_FINISHPAGE_SHOWREADME
!ifdef MUI_FINISHPAGE_RUN
;25 = 10 (height of run checkbox) + 10 (distance between checkboxes)
!define /math MUI_FINISHPAGE_SHOWREADME_TOP ${MUI_FINISHPAGE_RUN_TOP} + 20
!else
!define /math MUI_FINISHPAGE_SHOWREADME_TOP ${MUI_FINISHPAGE_TEXT_BOTTOM_BUTTONS} + 5 ;Distance between text and options
!endif
!endif
!ifndef MUI_FINISHPAGE_RUN & MUI_FINISHPAGE_SHOWREADME
;Height if full space is available for text and link
!ifndef MUI_FINISHPAGE_LINK
!define MUI_FINISHPAGE_TEXT_HEIGHT 130
!else
!define MUI_FINISHPAGE_TEXT_HEIGHT 120
!endif
!endif
!ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
${if} ${RebootFlag}
;Title text
${NSD_CreateLabel} 120u 10u 195u ${MUI_FINISHPAGE_TITLE_HEIGHT}u "${MUI_FINISHPAGE_TITLE}"
Pop $mui.FinishPage.Title
SetCtlColors $mui.FinishPage.Title "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
CreateFont $mui.FinishPage.Title.Font "$(^Font)" "12" "700"
SendMessage $mui.FinishPage.Title ${WM_SETFONT} $mui.FinishPage.Title.Font 0
;Finish text
${NSD_CreateLabel} 120u ${MUI_FINISHPAGE_TEXT_TOP}u 195u ${MUI_FINISHPAGE_TEXT_HEIGHT_BUTTONS}u "${MUI_FINISHPAGE_TEXT_REBOOT}"
Pop $mui.FinishPage.Text
SetCtlColors $mui.FinishPage.Text "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
;Radio buttons for reboot page
${NSD_CreateRadioButton} 120u ${MUI_FINISHPAGE_REBOOTNOW_TOP}u 195u 10u "${MUI_FINISHPAGE_TEXT_REBOOTNOW}"
Pop $mui.FinishPage.RebootNow
SetCtlColors $mui.FinishPage.RebootNow "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
${NSD_CreateRadioButton} 120u ${MUI_FINISHPAGE_REBOOTLATER_TOP}u 195u 10u "${MUI_FINISHPAGE_TEXT_REBOOTLATER}"
Pop $mui.FinishPage.RebootLater
SetCtlColors $mui.FinishPage.RebootLater "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
!ifndef MUI_FINISHPAGE_REBOOTLATER_DEFAULT
SendMessage $mui.FinishPage.RebootNow ${BM_SETCHECK} ${BST_CHECKED} 0
!else
SendMessage $mui.FinishPage.RebootLater ${BM_SETCHECK} ${BST_CHECKED} 0
!endif
${NSD_SetFocus} $mui.FinishPage.RebootNow
${else}
!endif
;Title text
${NSD_CreateLabel} 120u 10u 195u ${MUI_FINISHPAGE_TITLE_HEIGHT}u "${MUI_FINISHPAGE_TITLE}"
Pop $mui.FinishPage.Title
SetCtlColors $mui.FinishPage.Title "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
CreateFont $mui.FinishPage.Title.Font "$(^Font)" "12" "700"
SendMessage $mui.FinishPage.Title ${WM_SETFONT} $mui.FinishPage.Title.Font 0
;Finish text
!ifndef MUI_FINISHPAGE_RUN & MUI_FINISHPAGE_SHOWREADME
${NSD_CreateLabel} 120u ${MUI_FINISHPAGE_TEXT_TOP}u 195u ${MUI_FINISHPAGE_TEXT_HEIGHT}u "${MUI_FINISHPAGE_TEXT}"
!else
${NSD_CreateLabel} 120u ${MUI_FINISHPAGE_TEXT_TOP}u 195u ${MUI_FINISHPAGE_TEXT_HEIGHT_BUTTONS}u "${MUI_FINISHPAGE_TEXT}"
!endif
Pop $mui.FinishPage.Text
SetCtlColors $mui.FinishPage.Text "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
;Checkboxes
!ifdef MUI_FINISHPAGE_RUN
${NSD_CreateCheckbox} 120u ${MUI_FINISHPAGE_RUN_TOP}u 195u 10u "${MUI_FINISHPAGE_RUN_TEXT}"
Pop $mui.FinishPage.Run
SetCtlColors $mui.FinishPage.Run "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
!ifndef MUI_FINISHPAGE_RUN_NOTCHECKED
SendMessage $mui.FinishPage.Run ${BM_SETCHECK} ${BST_CHECKED} 0
!endif
${NSD_SetFocus} $mui.FinishPage.Run
!endif
!ifdef MUI_FINISHPAGE_SHOWREADME
${NSD_CreateCheckbox} 120u ${MUI_FINISHPAGE_SHOWREADME_TOP}u 195u 10u "${MUI_FINISHPAGE_SHOWREADME_TEXT}"
Pop $mui.FinishPage.ShowReadme
SetCtlColors $mui.FinishPage.ShowReadme "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
!ifndef MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
SendMessage $mui.FinishPage.ShowReadme ${BM_SETCHECK} ${BST_CHECKED} 0
!endif
!ifndef MUI_FINISHPAGE_RUN
${NSD_SetFocus} $mui.FinishPage.ShowReadme
!endif
!endif
;Link
!ifdef MUI_FINISHPAGE_LINK
${NSD_CreateLink} 120u 175u 195u 10u "${MUI_FINISHPAGE_LINK}"
Pop $mui.FinishPage.Link
SetCtlColors $mui.FinishPage.Link "${MUI_FINISHPAGE_LINK_COLOR}" "${MUI_BGCOLOR}"
${NSD_OnClick} $mui.FinishPage.Link "${LINK}"
!endif
!ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
${endif}
!endif
!ifdef MUI_FINISHPAGE_CANCEL_ENABLED
StrCpy $mui.FinishPage.DisableAbortWarning "1"
!endif
!ifndef MUI_FORCECLASSICCONTROLS
${If} ${IsHighContrastModeActive}
!endif
; SetCtlColors does not change the check/radio text color (bug #443)
!ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
System::Call 'UXTHEME::SetWindowTheme(p$mui.FinishPage.RebootNow,w" ",w" ")'
System::Call 'UXTHEME::SetWindowTheme(p$mui.FinishPage.RebootLater,w" ",w" ")'
!endif
!ifdef MUI_FINISHPAGE_RUN
System::Call 'UXTHEME::SetWindowTheme(p$mui.FinishPage.Run,w" ",w" ")'
!endif
!ifdef MUI_FINISHPAGE_SHOWREADME
System::Call 'UXTHEME::SetWindowTheme(p$mui.FinishPage.ShowReadme,w" ",w" ")'
!endif
!ifndef MUI_FORCECLASSICCONTROLS
${EndIf}
!endif
;Show page
Call ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}muiPageLoadFullWindow
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
nsDialogs::Show
!insertmacro MUI_PAGE_FUNCTION_CUSTOM DESTROYED
Call ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}muiPageUnloadFullWindow
!ifdef MUI_FINISHPAGE_CANCEL_ENABLED
StrCpy $mui.FinishPage.DisableAbortWarning ""
!endif
;Delete image from memory
${NSD_FreeImage} $mui.FinishPage.Image.Bitmap
!insertmacro MUI_UNSET MUI_FINISHPAGE_TITLE_HEIGHT
!insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_TOP
!insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_HEIGHT
!insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_HEIGHT_BUTTONS
!insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_BOTTOM_BUTTONS
!insertmacro MUI_UNSET MUI_FINISHPAGE_REBOOTNOW_TOP
!insertmacro MUI_UNSET MUI_FINISHPAGE_REBOOTLATER_TOP
!insertmacro MUI_UNSET MUI_FINISHPAGE_RUN_TOP
!insertmacro MUI_UNSET MUI_FINISHPAGE_SHOWREADME_TOP
FunctionEnd
Function "${LEAVE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
!ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
;Check whether the user has chosen to reboot the computer
${if} ${RebootFlag}
SendMessage $mui.FinishPage.RebootNow ${BM_GETCHECK} 0 0 $mui.FinishPage.ReturnValue
${if} $mui.FinishPage.ReturnValue = ${BST_CHECKED}
Reboot
${else}
Return
${endif}
${endif}
!endif
;Run functions depending on checkbox state
!ifdef MUI_FINISHPAGE_RUN
SendMessage $mui.FinishPage.Run ${BM_GETCHECK} 0 0 $mui.FinishPage.ReturnValue
${if} $mui.FinishPage.ReturnValue = ${BST_CHECKED}
!ifndef MUI_FINISHPAGE_RUN_FUNCTION
!ifndef MUI_FINISHPAGE_RUN_PARAMETERS
Exec "$\"${MUI_FINISHPAGE_RUN}$\""
!else
Exec "$\"${MUI_FINISHPAGE_RUN}$\" ${MUI_FINISHPAGE_RUN_PARAMETERS}"
!endif
!else
Call "${MUI_FINISHPAGE_RUN_FUNCTION}"
!endif
${endif}
!endif
!ifdef MUI_FINISHPAGE_SHOWREADME
SendMessage $mui.FinishPage.ShowReadme ${BM_GETCHECK} 0 0 $mui.FinishPage.ReturnValue
${if} $mui.FinishPage.ReturnValue = ${BST_CHECKED}
!ifndef MUI_FINISHPAGE_SHOWREADME_FUNCTION
ExecShell open "${MUI_FINISHPAGE_SHOWREADME}"
!else
Call "${MUI_FINISHPAGE_SHOWREADME_FUNCTION}"
!endif
${endif}
!endif
FunctionEnd
!macroend

View File

@ -0,0 +1,149 @@
/*
NSIS Modern User Interface
InstallFiles page
*/
;--------------------------------
;Page interface settings and variables
!macro MUI_INSTFILESPAGE_INTERFACE
!ifndef MUI_INSTFILESYPAGE_INTERFACE
!define MUI_INSTFILESYPAGE_INTERFACE
!insertmacro MUI_DEFAULT MUI_INSTFILESPAGE_COLORS "/windows"
!insertmacro MUI_DEFAULT MUI_INSTFILESPAGE_PROGRESSBAR "smooth"
Var mui.InstFilesPage
Var mui.InstFilesPage.Text
Var mui.InstFilesPage.ProgressBar
Var mui.InstFilesPage.ShowLogButton
Var mui.InstFilesPage.Log
;Apply settings
InstallColors ${MUI_INSTFILESPAGE_COLORS}
InstProgressFlags ${MUI_INSTFILESPAGE_PROGRESSBAR}
SubCaption 4 " "
UninstallSubCaption 2 " "
!endif
!macroend
;--------------------------------
;Page declaration
!macro MUI_PAGEDECLARATION_INSTFILES
!insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INSTFILESPAGE ""
!insertmacro MUI_INSTFILESPAGE_INTERFACE
PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}instfiles
PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesLeave_${MUI_UNIQUEID}
Caption " "
PageExEnd
!insertmacro MUI_FUNCTION_INSTFILESPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesLeave_${MUI_UNIQUEID}
!insertmacro MUI_UNSET MUI_INSTFILESPAGE_FINISHHEADER_TEXT
!insertmacro MUI_UNSET MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT
!insertmacro MUI_UNSET MUI_INSTFILESPAGE_ABORTWARNING_TEXT
!insertmacro MUI_UNSET MUI_INSTFILESPAGE_ABORTWARNING_SUBTEXT
!macroend
!macro MUI_PAGE_INSTFILES
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_PAGE_INIT
!insertmacro MUI_PAGEDECLARATION_INSTFILES
!verbose pop
!macroend
!macro MUI_UNPAGE_INSTFILES
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_UNPAGE_INIT
!insertmacro MUI_PAGEDECLARATION_INSTFILES
!verbose pop
!macroend
;--------------------------------
;Page functions
!macro MUI_FUNCTION_INSTFILESPAGE PRE SHOW LEAVE
Function "${PRE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
!insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_${MUI_PAGE_UNINSTALLER_PREFIX}INSTALLING_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_${MUI_PAGE_UNINSTALLER_PREFIX}INSTALLING_SUBTITLE)
FunctionEnd
Function "${SHOW}"
;Get controls handles
FindWindow $mui.InstFilesPage "#32770" "" $HWNDPARENT
GetDlgItem $mui.InstFilesPage.Text $mui.InstFilesPage 1006
GetDlgItem $mui.InstFilesPage.ProgressBar $mui.InstFilesPage 1004
GetDlgItem $mui.InstFilesPage.ShowLogButton $mui.InstFilesPage 1027
GetDlgItem $mui.InstFilesPage.Log $mui.InstFilesPage 1016
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
FunctionEnd
Function "${LEAVE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
;Set text on completed page header
IfAbort mui.endheader_abort
!ifdef MUI_INSTFILESPAGE_FINISHHEADER_TEXT & MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT
!insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_FINISHHEADER_TEXT}" "${MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT}"
!else ifdef MUI_INSTFILESPAGE_FINISHHEADER_TEXT
!insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_FINISHHEADER_TEXT}" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_SUBTITLE)"
!else ifdef MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT
!insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_TITLE)" "${MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT}"
!else
!insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_TITLE)" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_SUBTITLE)"
!endif
Goto mui.endheader_done
mui.endheader_abort:
!ifdef MUI_INSTFILESPAGE_ABORTHEADER_TEXT & MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT
!insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_ABORTHEADER_TEXT}" "${MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT}"
!else ifdef MUI_INSTFILESPAGE_ABORTHEADER_TEXT
!insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_ABORTHEADER_TEXT}" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_SUBTITLE)"
!else ifdef MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT
!insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_TITLE)" "${MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT}"
!else
!insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_TITLE)" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_SUBTITLE)"
!endif
mui.endheader_done:
!insertmacro MUI_LANGDLL_SAVELANGUAGE
FunctionEnd
!macroend

View File

@ -0,0 +1,143 @@
/*
NSIS Modern User Interface
License page
*/
;--------------------------------
;Page interface settings and variables
!macro MUI_LICENSEPAGE_INTERFACE
!ifndef MUI_LICENSEPAGE_INTERFACE
!define MUI_LICENSEPAGE_INTERFACE
Var mui.LicensePage
Var mui.Licensepage.TopText
Var mui.Licensepage.Text
Var mui.Licensepage.LicenseText
!insertmacro MUI_DEFAULT MUI_LICENSEPAGE_BGCOLOR "/windows"
;Apply settings
LicenseBkColor "${MUI_LICENSEPAGE_BGCOLOR}"
!endif
!macroend
;--------------------------------
;Page declaration
!macro MUI_PAGEDECLARATION_LICENSE LICENSEDATA
!insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}LICENSEPAGE ""
!insertmacro MUI_LICENSEPAGE_INTERFACE
!insertmacro MUI_DEFAULT MUI_LICENSEPAGE_TEXT_TOP "$(MUI_INNERTEXT_LICENSE_TOP)"
!insertmacro MUI_DEFAULT MUI_LICENSEPAGE_BUTTON ""
!insertmacro MUI_DEFAULT MUI_LICENSEPAGE_CHECKBOX_TEXT ""
!insertmacro MUI_DEFAULT MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT ""
!insertmacro MUI_DEFAULT MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE ""
PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}license
PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicensePre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseLeave_${MUI_UNIQUEID}
Caption " "
LicenseData "${LICENSEDATA}"
!ifndef MUI_LICENSEPAGE_TEXT_BOTTOM
!ifndef MUI_LICENSEPAGE_CHECKBOX & MUI_LICENSEPAGE_RADIOBUTTONS
LicenseText "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_LICENSE_BOTTOM)" "${MUI_LICENSEPAGE_BUTTON}"
!else ifdef MUI_LICENSEPAGE_CHECKBOX
LicenseText "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_LICENSE_BOTTOM_CHECKBOX)" "${MUI_LICENSEPAGE_BUTTON}"
!else
LicenseText "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS)" "${MUI_LICENSEPAGE_BUTTON}"
!endif
!else
LicenseText "${MUI_LICENSEPAGE_TEXT_BOTTOM}" "${MUI_LICENSEPAGE_BUTTON}"
!endif
!ifdef MUI_LICENSEPAGE_CHECKBOX
LicenseForceSelection checkbox "${MUI_LICENSEPAGE_CHECKBOX_TEXT}"
!else ifdef MUI_LICENSEPAGE_RADIOBUTTONS
LicenseForceSelection radiobuttons "${MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT}" "${MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE}"
!endif
PageExEnd
!insertmacro MUI_FUNCTION_LICENSEPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicensePre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseLeave_${MUI_UNIQUEID}
!insertmacro MUI_UNSET MUI_LICENSEPAGE_TEXT_TOP
!insertmacro MUI_UNSET MUI_LICENSEPAGE_TEXT_BOTTOM
!insertmacro MUI_UNSET MUI_LICENSEPAGE_BUTTON
!insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX
!insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX_TEXT
!insertmacro MUI_UNSET MUI_LICENSEPAGE_RADIOBUTTONS
!insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX_TEXT_ACCEPT
!insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX_TEXT_DECLINE
!macroend
!macro MUI_PAGE_LICENSE LICENSEDATA
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_PAGE_INIT
!insertmacro MUI_PAGEDECLARATION_LICENSE "${LICENSEDATA}"
!verbose pop
!macroend
!macro MUI_UNPAGE_LICENSE LICENSEDATA
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_UNPAGE_INIT
!insertmacro MUI_PAGEDECLARATION_LICENSE "${LICENSEDATA}"
!verbose pop
!macroend
;--------------------------------
;Page functions
!macro MUI_FUNCTION_LICENSEPAGE PRE SHOW LEAVE
Function "${PRE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
!insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_LICENSE_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_LICENSE_SUBTITLE)
FunctionEnd
Function "${SHOW}"
;Get control handles
FindWindow $mui.LicensePage "#32770" "" $HWNDPARENT
GetDlgItem $mui.LicensePage.TopText $mui.LicensePage 1040
GetDlgItem $mui.LicensePage.Text $mui.LicensePage 1006
GetDlgItem $mui.LicensePage.LicenseText $mui.LicensePage 1000
;Top text
SendMessage $mui.LicensePage.TopText ${WM_SETTEXT} 0 "STR:${MUI_LICENSEPAGE_TEXT_TOP}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
FunctionEnd
Function "${LEAVE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
FunctionEnd
!macroend

View File

@ -0,0 +1,236 @@
/*
NSIS Modern User Interface
Start Menu folder page
*/
;--------------------------------
;Page interface settings and variables
!macro MUI_STARTMENUPAGE_INTERFACE
!ifndef MUI_STARTMENUPAGE_INTERFACE
!define MUI_STARTMENUPAGE_INTERFACE
Var mui.StartMenuPage
Var mui.StartMenuPage.Location
Var mui.StartMenuPage.FolderList
Var mui.StartMenuPage.Temp
!endif
!ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT & MUI_STARTMENUPAGE_REGISTRY_KEY & MUI_STARTMENUPAGE_REGISTRY_VALUENAME
!ifndef MUI_STARTMENUPAGE_REGISTRY_VARIABLES
!define MUI_STARTMENUPAGE_REGISTRY_VARIABLES
Var mui.StartMenuPage.RegistryLocation
!endif
!endif
!macroend
;--------------------------------
;Page declaration
!macro MUI_PAGEDECLARATION_STARTMENU ID VAR
!insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}STARTMENUPAGE ""
!insertmacro MUI_STARTMENUPAGE_INTERFACE
!insertmacro MUI_DEFAULT MUI_STARTMENUPAGE_DEFAULTFOLDER "$(^Name)"
!insertmacro MUI_DEFAULT MUI_STARTMENUPAGE_TEXT_TOP "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_STARTMENU_TOP)"
!insertmacro MUI_DEFAULT MUI_STARTMENUPAGE_TEXT_CHECKBOX "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_STARTMENU_CHECKBOX)"
!define MUI_STARTMENUPAGE_VARIABLE "${VAR}"
!define "MUI_STARTMENUPAGE_${ID}_VARIABLE" "${MUI_STARTMENUPAGE_VARIABLE}"
!define "MUI_STARTMENUPAGE_${ID}_DEFAULTFOLDER" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
!ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT
!define "MUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT" "${MUI_STARTMENUPAGE_REGISTRY_ROOT}"
!endif
!ifdef MUI_STARTMENUPAGE_REGISTRY_KEY
!define "MUI_STARTMENUPAGE_${ID}_REGISTRY_KEY" "${MUI_STARTMENUPAGE_REGISTRY_KEY}"
!endif
!ifdef MUI_STARTMENUPAGE_REGISTRY_VALUENAME
!define "MUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
!endif
PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}custom
PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuLeave_${MUI_UNIQUEID}
Caption " "
PageExEnd
!insertmacro MUI_FUNCTION_STARTMENUPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuLeave_${MUI_UNIQUEID}
!undef MUI_STARTMENUPAGE_VARIABLE
!undef MUI_STARTMENUPAGE_TEXT_TOP
!undef MUI_STARTMENUPAGE_TEXT_CHECKBOX
!undef MUI_STARTMENUPAGE_DEFAULTFOLDER
!insertmacro MUI_UNSET MUI_STARTMENUPAGE_NODISABLE
!insertmacro MUI_UNSET MUI_STARTMENUPAGE_REGISTRY_ROOT
!insertmacro MUI_UNSET MUI_STARTMENUPAGE_REGISTRY_KEY
!insertmacro MUI_UNSET MUI_STARTMENUPAGE_REGISTRY_VALUENAME
!macroend
!macro MUI_PAGE_STARTMENU ID VAR
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_PAGE_INIT
!insertmacro MUI_PAGEDECLARATION_STARTMENU "${ID}" "${VAR}"
!verbose pop
!macroend
;--------------------------------
;Page functions
!macro MUI_FUNCTION_STARTMENUPAGE PRE LEAVE
Function "${PRE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
!ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT & MUI_STARTMENUPAGE_REGISTRY_KEY & MUI_STARTMENUPAGE_REGISTRY_VALUENAME
;Get Start Menu location from registry
${if} "${MUI_STARTMENUPAGE_VARIABLE}" == ""
ReadRegStr $mui.StartMenuPage.RegistryLocation "${MUI_STARTMENUPAGE_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
${if} $mui.StartMenuPage.RegistryLocation != ""
StrCpy "${MUI_STARTMENUPAGE_VARIABLE}" $mui.StartMenuPage.RegistryLocation
${endif}
ClearErrors
${endif}
!endif
!insertmacro MUI_HEADER_TEXT_PAGE $(MUI_TEXT_STARTMENU_TITLE) $(MUI_TEXT_STARTMENU_SUBTITLE)
${if} $(^RTL) == "0"
!ifndef MUI_STARTMENUPAGE_NODISABLE
StartMenu::Init /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" /checknoshortcuts "${MUI_STARTMENUPAGE_TEXT_CHECKBOX}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
!else
StartMenu::Init /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
!endif
${else}
!ifndef MUI_STARTMENUPAGE_NODISABLE
StartMenu::Init /rtl /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" /checknoshortcuts "${MUI_STARTMENUPAGE_TEXT_CHECKBOX}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
!else
StartMenu::Init /rtl /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
!endif
${endif}
Pop $mui.StartMenuPage
;Get control handles
GetDlgItem $mui.StartMenuPage.Location $mui.StartMenuPage 1002
GetDlgItem $mui.StartMenuPage.FolderList $mui.StartMenuPage 1004
!ifdef MUI_STARTMENUPAGE_BGCOLOR
!insertmacro MUI_DEFAULT MUI_STARTMENUPAGE_TEXTCOLOR ""
SetCtlColors $mui.StartMenuPage.Location "${MUI_STARTMENUPAGE_TEXTCOLOR}" "${MUI_STARTMENUPAGE_BGCOLOR}"
SetCtlColors $mui.StartMenuMenu.FolderList "${MUI_STARTMENUPAGE_TEXTCOLOR}" "${MUI_STARTMENUPAGE_BGCOLOR}"
!endif
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
StartMenu::Show
!insertmacro MUI_PAGE_FUNCTION_CUSTOM DESTROYED
Pop $mui.StartMenuPage.Temp
${if} $mui.StartMenuPage.Temp == "success"
Pop "${MUI_STARTMENUPAGE_VARIABLE}"
${endif}
FunctionEnd
Function "${LEAVE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
FunctionEnd
!macroend
;--------------------------------
;Script macros to get Start Menu folder
!macro MUI_STARTMENU_GETFOLDER ID VAR
!verbose push
!verbose ${MUI_VERBOSE}
;Get Start Menu folder from registry
;Can be called from the script in the uninstaller
!ifdef MUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT & MUI_STARTMENUPAGE_${ID}_REGISTRY_KEY & MUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME
ReadRegStr $mui.StartMenuPage.RegistryLocation "${MUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_${ID}_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME}"
${if} $mui.StartMenuPage.RegistryLocation != ""
StrCpy "${VAR}" $mui.StartMenuPage.RegistryLocation
${else}
StrCpy "${VAR}" "${MUI_STARTMENUPAGE_${ID}_DEFAULTFOLDER}"
${endif}
!else
StrCpy "${VAR}" "${MUI_STARTMENUPAGE_${ID}_DEFAULTFOLDER}"
!endif
!verbose pop
!macroend
!macro MUI_STARTMENU_WRITE_BEGIN ID
;The code in the script to write the shortcuts should be put between the
;MUI_STARTMENU_WRITE_BEGIN and MUI_STARTMENU_WRITE_END macros
!verbose push
!verbose ${MUI_VERBOSE}
!define MUI_STARTMENUPAGE_CURRENT_ID "${ID}"
StrCpy $mui.StartMenuPage.Temp "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}" 1
;If the folder start with >, the user has chosen not to create a shortcut
${if} $mui.StartMenuPage.Temp != ">"
${if} "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}" == ""
;Get folder from registry if the variable doesn't contain anything
!insertmacro MUI_STARTMENU_GETFOLDER "${MUI_STARTMENUPAGE_CURRENT_ID}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}"
${endif}
!verbose pop
!macroend
!macro MUI_STARTMENU_WRITE_END
!verbose push
!verbose ${MUI_VERBOSE}
!ifdef MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_ROOT & MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_KEY & MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_VALUENAME
;Write folder to registry
WriteRegStr "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_VALUENAME}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}"
!endif
${endif}
!undef MUI_STARTMENUPAGE_CURRENT_ID
!verbose pop
!macroend

View File

@ -0,0 +1,100 @@
/*
NSIS Modern User Interface
Uninstall confirmation page
*/
;--------------------------------
;Page interface settings and variables
!macro MUI_UNCONFIRMPAGE_INTERFACE
!ifndef MUI_UNCONFIRMPAGE_INTERFACE
!define MUI_UNCONFIRMPAGE_INTERFACE
Var mui.UnConfirmPage
Var mui.UnConfirmPage.Text
Var mui.UnConfirmPage.DirectoryText
Var mui.UnConfirmPage.Directory
!endif
!macroend
;--------------------------------
;Page declaration
!macro MUI_PAGEDECLARATION_CONFIRM
!insertmacro MUI_SET MUI_UNCONFIRMPAGE ""
!insertmacro MUI_UNCONFIRMPAGE_INTERFACE
!insertmacro MUI_DEFAULT MUI_UNCONFIRMPAGE_TEXT_TOP ""
!insertmacro MUI_DEFAULT MUI_UNCONFIRMPAGE_TEXT_LOCATION ""
PageEx un.uninstConfirm
PageCallbacks un.mui.ConfirmPre_${MUI_UNIQUEID} un.mui.ConfirmShow_${MUI_UNIQUEID} un.mui.ConfirmLeave_${MUI_UNIQUEID}
Caption " "
UninstallText "${MUI_UNCONFIRMPAGE_TEXT_TOP}" "${MUI_UNCONFIRMPAGE_TEXT_LOCATION}"
!ifdef MUI_UNCONFIRMPAGE_VARIABLE
DirVar "${MUI_UNCONFIRMPAGE_VARIABLE}"
!endif
PageExEnd
!insertmacro MUI_UNFUNCTION_CONFIRMPAGE un.mui.ConfirmPre_${MUI_UNIQUEID} un.mui.ConfirmShow_${MUI_UNIQUEID} un.mui.ConfirmLeave_${MUI_UNIQUEID}
!insertmacro MUI_UNSET MUI_UNCONFIRMPAGE_TEXT_TOP
!insertmacro MUI_UNSET MUI_UNCONFIRMPAGE_TEXT_LOCATION
!macroend
!macro MUI_UNPAGE_CONFIRM
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_UNPAGE_INIT
!insertmacro MUI_PAGEDECLARATION_CONFIRM
!verbose pop
!macroend
;--------------------------------
;Page functions
!macro MUI_UNFUNCTION_CONFIRMPAGE PRE SHOW LEAVE
Function "${PRE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
!insertmacro MUI_HEADER_TEXT_PAGE $(MUI_UNTEXT_CONFIRM_TITLE) $(MUI_UNTEXT_CONFIRM_SUBTITLE)
FunctionEnd
Function "${SHOW}"
;Get controls handles
FindWindow $mui.UnConfirmPage "#32770" "" $HWNDPARENT
GetDlgItem $mui.UnConfirmPage.Text $mui.UnConfirmPage 1006
GetDlgItem $mui.UnConfirmPage.DirectoryText $mui.UnConfirmPage 1029
GetDlgItem $mui.UnConfirmPage.Directory $mui.UnConfirmPage 1000
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
FunctionEnd
Function "${LEAVE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
FunctionEnd
!macroend

View File

@ -0,0 +1,181 @@
/*
NSIS Modern User Interface
Welcome page (implemented using nsDialogs)
*/
;--------------------------------
;Page interface settings and variables
!macro MUI_WELCOMEPAGE_INTERFACE
!ifndef MUI_WELCOMEPAGE_INTERFACE
!define MUI_WELCOMEPAGE_INTERFACE
Var mui.WelcomePage
Var mui.WelcomePage.Image
Var mui.WelcomePage.Image.Bitmap
Var mui.WelcomePage.Title
Var mui.WelcomePage.Title.Font
Var mui.WelcomePage.Text
!endif
!insertmacro MUI_DEFAULT MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\win.bmp"
!if "${MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_BITMAP}" == ""
!error "Invalid MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_BITMAP"
!endif
!macroend
;--------------------------------
;Interface initialization
!macro MUI_WELCOMEPAGE_GUIINIT
!ifndef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEWELCOMEPAGE_GUINIT
!define MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEWELCOMEPAGE_GUINIT
Function ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.WelcomePage.GUIInit
InitPluginsDir
File "/oname=$PLUGINSDIR\modern-wizard.bmp" "${MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_BITMAP}"
!pragma verifyloadimage "${MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_BITMAP}"
!ifdef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_GUIINIT
Call "${MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_GUIINIT}"
!endif
FunctionEnd
!insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_GUIINIT ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.WelcomePage.GUIInit
!endif
!macroend
;--------------------------------
;Page declaration
!macro MUI_PAGEDECLARATION_WELCOME
!insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEPAGE ""
!insertmacro MUI_WELCOMEPAGE_INTERFACE
!insertmacro MUI_WELCOMEPAGE_GUIINIT
!insertmacro MUI_DEFAULT MUI_WELCOMEPAGE_TITLE "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_WELCOME_INFO_TITLE)"
!insertmacro MUI_DEFAULT MUI_WELCOMEPAGE_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_WELCOME_INFO_TEXT)"
!insertmacro MUI_PAGE_FUNCTION_FULLWINDOW
PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}custom
PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.WelcomePre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.WelcomeLeave_${MUI_UNIQUEID}
PageExEnd
!insertmacro MUI_FUNCTION_WELCOMEPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.WelcomePre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.WelcomeLeave_${MUI_UNIQUEID}
!insertmacro MUI_UNSET MUI_WELCOMEPAGE_TITLE
!insertmacro MUI_UNSET MUI_WELCOMEPAGE_TITLE_3LINES
!insertmacro MUI_UNSET MUI_WELCOMEPAGE_TEXT
!macroend
!macro MUI_PAGE_WELCOME
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_PAGE_INIT
!insertmacro MUI_PAGEDECLARATION_WELCOME
!verbose pop
!macroend
!macro MUI_UNPAGE_WELCOME
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_UNPAGE_INIT
!insertmacro MUI_PAGEDECLARATION_WELCOME
!verbose pop
!macroend
;--------------------------------
;Page functions
!macro MUI_FUNCTION_WELCOMEPAGE PRE LEAVE
Function "${PRE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
;Create dialog
nsDialogs::Create 1044
Pop $mui.WelcomePage
nsDialogs::SetRTL $(^RTL)
SetCtlColors $mui.WelcomePage "" "${MUI_BGCOLOR}"
;Image control
${NSD_CreateBitmap} 0u 0u 109u 193u ""
Pop $mui.WelcomePage.Image
!insertmacro MUI_INTERNAL_FULLWINDOW_LOADWIZARDIMAGE "${MUI_PAGE_UNINSTALLER_PREFIX}" $mui.WelcomePage.Image $PLUGINSDIR\modern-wizard.bmp $mui.WelcomePage.Image.Bitmap
;Positiong of controls
;Title
!ifndef MUI_WELCOMEPAGE_TITLE_3LINES
!define MUI_WELCOMEPAGE_TITLE_HEIGHT 28
!else
!define MUI_WELCOMEPAGE_TITLE_HEIGHT 38
!endif
;Text
;17 = 10 (top margin) + 7 (distance between texts)
!define /math MUI_WELCOMEPAGE_TEXT_TOP 17 + ${MUI_WELCOMEPAGE_TITLE_HEIGHT}
;Title
${NSD_CreateLabel} 120u 10u 195u ${MUI_WELCOMEPAGE_TITLE_HEIGHT}u "${MUI_WELCOMEPAGE_TITLE}"
Pop $mui.WelcomePage.Title
SetCtlColors $mui.WelcomePage.Title "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
CreateFont $mui.WelcomePage.Title.Font "$(^Font)" "12" "700"
SendMessage $mui.WelcomePage.Title ${WM_SETFONT} $mui.WelcomePage.Title.Font 0
;Welcome text
${NSD_CreateLabel} 120u ${MUI_WELCOMEPAGE_TEXT_TOP}u 195u 130u "${MUI_WELCOMEPAGE_TEXT}"
Pop $mui.WelcomePage.Text
SetCtlColors $mui.WelcomePage.Text "${MUI_TEXTCOLOR}" "${MUI_BGCOLOR}"
;Show page
Call ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}muiPageLoadFullWindow
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
nsDialogs::Show
!insertmacro MUI_PAGE_FUNCTION_CUSTOM DESTROYED
Call ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}muiPageUnloadFullWindow
;Delete image from memory
${NSD_FreeImage} $mui.WelcomePage.Image.Bitmap
!insertmacro MUI_UNSET MUI_WELCOMEPAGE_TITLE_HEIGHT
!insertmacro MUI_UNSET MUI_WELCOMEPAGE_TEXT_TOP
FunctionEnd
Function "${LEAVE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
FunctionEnd
!macroend

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More