snow/storage/hotfix.go

163 lines
6.1 KiB
Go
Raw Permalink Normal View History

2024-01-04 19:02:14 +00:00
package storage
2024-01-20 01:58:57 +00:00
import (
2024-02-16 01:14:14 +00:00
"fmt"
2024-05-16 02:09:38 +00:00
"os"
2024-02-16 01:14:14 +00:00
"strconv"
2024-01-20 01:58:57 +00:00
"github.com/ectrc/snow/aid"
)
2024-01-04 19:02:14 +00:00
func GetDefaultEngine() []byte {
2024-02-16 01:14:14 +00:00
portNumber, err := strconv.Atoi(aid.Config.API.Port[1:])
if err != nil {
return nil
}
portNumber++
realPort := fmt.Sprintf("%d", portNumber)
2024-01-20 01:58:57 +00:00
2024-02-16 01:14:14 +00:00
str := `
2024-01-04 19:02:14 +00:00
[XMPP]
bEnableWebsockets=true
2024-02-16 01:14:14 +00:00
[OnlineSubsystem]
bHasVoiceEnabled=true
2024-01-20 01:58:57 +00:00
[ConsoleVariables]
n.VerifyPeer=0
FortMatchmakingV2.ContentBeaconFailureCancelsMatchmaking=0
Fort.ShutdownWhenContentBeaconFails=0
FortMatchmakingV2.EnableContentBeacon=0
2024-01-04 19:02:14 +00:00
2024-01-20 01:58:57 +00:00
[/Script/Qos.QosRegionManager]
NumTestsPerRegion=5
2024-02-20 21:54:05 +00:00
PingTimeout=3.0
[/Script/Qos.QosRegionManager]
NumTestsPerRegion=5
PingTimeout=3.0
!RegionDefinitions=ClearArray
+RegionDefinitions=(DisplayName=NSLOCTEXT("MMRegion", "Europe", "Europe"), RegionId="EU", bEnabled=true, bVisible=true, bAutoAssignable=true)
+RegionDefinitions=(DisplayName=NSLOCTEXT("MMRegion", "North America", "North America"), RegionId="NA", bEnabled=true, bVisible=true, bAutoAssignable=true)
+RegionDefinitions=(DisplayName=NSLOCTEXT("MMRegion", "Oceania", "Oceania"), RegionId="OCE", bEnabled=true, bVisible=true, bAutoAssignable=true)
!DatacenterDefinitions=ClearArray
+DatacenterDefinitions=(Id="DE", RegionId="EU", bEnabled=true, Servers[0]=(Address="142.132.145.234", Port=22222))
+DatacenterDefinitions=(Id="VA", RegionId="NA", bEnabled=true, Servers[0]=(Address="69.10.34.38", Port=22222))
+DatacenterDefinitions=(Id="SYD", RegionId="OCE", bEnabled=true, Servers[0]=(Address="139.99.209.91", Port=22222))
!Datacenters=ClearArray
+Datacenters=(DisplayName=NSLOCTEXT("MMRegion", "Europe", "Europe"), RegionId="EU", bEnabled=true, bVisible=true, bBeta=false, Servers[0]=(Address="142.132.145.234", Port=22222))
+Datacenters=(DisplayName=NSLOCTEXT("MMRegion", "North America", "North America"), RegionId="NA", bEnabled=true, bVisible=true, bBeta=false, Servers[0]=(Address="69.10.34.38", Port=22222))
+Datacenters=(DisplayName=NSLOCTEXT("MMRegion", "Oceania", "Oceania"), RegionId="OCE", bEnabled=true, bVisible=true, bBeta=false, Servers[0]=(Address="139.99.209.91", Port=22222))
2024-02-20 21:54:05 +00:00
[LwsWebSocket]
bDisableCertValidation=true
bDisableDomainWhitelist=true
[/Script/Engine.NetworkSettings]
n.VerifyPeer=false
2024-02-20 21:54:05 +00:00
[WinHttpWebSocket]
bDisableCertValidation=true
2024-02-20 21:54:05 +00:00
bDisableDomainWhitelist=true`
2024-02-16 01:14:14 +00:00
if aid.Config.Fortnite.Season <= 2 {
str += `
[OnlineSubsystemMcp.Xmpp]
2024-02-20 21:54:05 +00:00
bUsePlainTextAuth=true
2024-02-16 01:14:14 +00:00
bUseSSL=false
Protocol=tcp
2024-05-16 02:09:38 +00:00
ServerAddr="` + aid.Config.API.XMPP.Host + aid.Config.API.XMPP.Port + `"
ServerPort=` + realPort + `
2024-02-16 01:14:14 +00:00
[OnlineSubsystemMcp.Xmpp Prod]
2024-02-20 21:54:05 +00:00
bUsePlainTextAuth=true
2024-02-16 01:14:14 +00:00
bUseSSL=false
Protocol=tcp
2024-05-16 02:09:38 +00:00
ServerAddr="` + aid.Config.API.XMPP.Host + aid.Config.API.XMPP.Port + `"
ServerPort=` + realPort
2024-02-16 01:14:14 +00:00
} else {
str += `
[OnlineSubsystemMcp.Xmpp]
bUseSSL=false
Protocol=ws
2024-05-16 02:09:38 +00:00
ServerAddr="ws://` + aid.Config.API.XMPP.Host + aid.Config.API.XMPP.Port + `/?SNOW_SOCKET_CONNECTION"
2024-02-16 01:14:14 +00:00
[OnlineSubsystemMcp.Xmpp Prod]
bUseSSL=false
Protocol=ws
2024-05-16 02:09:38 +00:00
ServerAddr="ws://` + aid.Config.API.XMPP.Host + aid.Config.API.XMPP.Port + `/?SNOW_SOCKET_CONNECTION"`
2024-02-16 01:14:14 +00:00
}
return []byte(str)
2024-01-31 16:20:26 +00:00
}
2024-05-16 02:09:38 +00:00
func GetDefaultGame() []byte {
file, err := os.ReadFile("config/DefaultGame.ini")
if err == nil {
return file
} else {
return []byte(`
2024-01-31 16:20:26 +00:00
[/Script/FortniteGame.FortGlobals]
bAllowLogout=false
[/Script/FortniteGame.FortChatManager]
bShouldRequestGeneralChatRooms=false
bShouldJoinGlobalChat=false
bShouldJoinFounderChat=false
bIsAthenaGlobalChatEnabled=false
[/Script/FortniteGame.FortOnlineAccount]
bEnableEulaCheck=false
2024-02-19 16:08:37 +00:00
bShouldCheckIfPlatformAllowed=false
[EpicPurchaseFlow]
bUsePaymentWeb=false
CI="http://127.0.0.1:3000/purchase"
GameDev="http://127.0.0.1:3000/purchase"
Stage="http://127.0.0.1:3000/purchase"
Prod="http://127.0.0.1:3000/purchase"
2024-02-19 16:08:37 +00:00
UEPlatform="FNGame"
2024-02-20 21:54:05 +00:00
[/Script/FortniteGame.FortTextHotfixConfig]
+TextReplacements=(Category=Game, bIsMinimalPatch=True, Namespace="", Key="68ADE44C49B20BFF78677799BE68B0EE", NativeString="FORTNITEMARES", LocalizedStrings=(("en","BOOST PERKS")))
+TextReplacements=(Category=Game, bIsMinimalPatch=True, Namespace="", Key="BE6B17BD456F3F13EEB2998AF91DC717", NativeString="THANKS FOR PLAYING!", LocalizedStrings=(("en","THANKS FOR SUPPORTING SNOW!")))
[/Script/FortniteGame.FortGameInstance]
!FrontEndPlaylistData=ClearArray
+FrontEndPlaylistData=(PlaylistName=Playlist_DefaultSolo, PlaylistAccess=(bEnabled=True, bIsDefaultPlaylist=True, bVisibleWhenDisabled=True, bDisplayAsNew=False, CategoryIndex=0, bDisplayAsLimitedTime=False, DisplayPriority=0))
+FrontEndPlaylistData=(PlaylistName=Playlist_DefaultDuo, PlaylistAccess=(bEnabled=True, bIsDefaultPlaylist=True, bVisibleWhenDisabled=True, bDisplayAsNew=False, CategoryIndex=0, bDisplayAsLimitedTime=False, DisplayPriority=1))
+FrontEndPlaylistData=(PlaylistName=Playlist_DefaultSquad, PlaylistAccess=(bEnabled=True, bIsDefaultPlaylist=True, bVisibleWhenDisabled=True, bDisplayAsNew=False, CategoryIndex=0, bDisplayAsLimitedTime=False, DisplayPriority=2))
+FrontEndPlaylistData=(PlaylistName=Playlist_ShowdownAlt_Solo, PlaylistAccess=(bEnabled=True, bIsDefaultPlaylist=False, bVisibleWhenDisabled=True, bDisplayAsNew=False, CategoryIndex=1, bDisplayAsLimitedTime=False, DisplayPriority=0))
+FrontEndPlaylistData=(PlaylistName=Playlist_ShowdownAlt_Duos, PlaylistAccess=(bEnabled=True, bIsDefaultPlaylist=False, bVisibleWhenDisabled=True, bDisplayAsNew=False, CategoryIndex=1, bDisplayAsLimitedTime=False, DisplayPriority=1))
2024-05-16 02:09:38 +00:00
`)
}
}
2024-05-16 02:09:38 +00:00
func GetDefaultRuntime() []byte {
file, err := os.ReadFile("config/DefaultRuntime.ini")
if err == nil {
return file
} else {
return []byte(`
2024-01-31 16:20:26 +00:00
[/Script/FortniteGame.FortRuntimeOptions]
2024-02-19 01:49:14 +00:00
!DisabledFrontendNavigationTabs=ClearArray
;+DisabledFrontendNavigationTabs=(TabName="AthenaChallenges",TabState=EFortRuntimeOptionTabState::Hidden)
;+DisabledFrontendNavigationTabs=(TabName="Showdown",TabState=EFortRuntimeOptionTabState::Hidden)
;+DisabledFrontendNavigationTabs=(TabName="AthenaStore",TabState=EFortRuntimeOptionTabState::Hidden)
[/Script/FortniteGame.FortRuntimeOptions]
bForceBRMode=True
bSkipSubgameSelect=True
bEnableInGameMatchmaking=True
2024-01-31 16:20:26 +00:00
bEnableGlobalChat=true
bDisableGifting=false
bDisableGiftingPC=false
bDisableGiftingPS4=false
bDisableGiftingXB=false
!ExperimentalCohortPercent=ClearArray
2024-05-16 02:09:38 +00:00
+ExperimentalCohortPercent=(CohortPercent=100,ExperimentNum=20)
`)
}
}