Skip to content

Commit 16720db

Browse files
authored
2.1 (#9)
1 parent 79f6d8b commit 16720db

File tree

7 files changed

+71
-38
lines changed

7 files changed

+71
-38
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Patch for Northstar.Client to enable client-side mods on official servers.
2020
Titanfall2
2121
+R2Titanfall
2222
+packages
23-
+NanohmProtogen-VanillaPlus-2.0.0
23+
+NanohmProtogen-VanillaPlus-2.1.0
2424
```
2525

2626
Note that the folder in `packages` is NOT a `.zip` file

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2.1
2+
- Fix infinite connecting bug introduced in 2.0
3+
- Allow user to disable main menu promos (in mod settings)
4+
- Allow user to change Vanilla+ logo transparency (in mod settings)
5+
16
2.0
27
- Rework/rewrite of VanillaPlus
38
- Restore FD functionality

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "VanillaPlus",
3-
"version_number": "2.0.0",
3+
"version_number": "2.1.0",
44
"website_url": "https://github.com/Zayveeo5e/NP.VanillaPlus",
55
"description": "Modified Northstar.Client to load Client-Side mods on Vanilla servers",
66
"dependencies": []

mods/NP.VanillaPlus/mod.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"Name" : "VanillaPlus",
33
"Description": "A stripped down and modified Northstar.Client mod that allows for client-side mod loading on official Respawn servers\n\nMade by Nanohm, remastered by Cyn",
44
"LoadPriority": -1,
5-
"Version": "2.0",
5+
"Version": "2.1",
66

77
"Dependencies": {
88
"HAS_CLIENT": "Northstar.Client",
@@ -35,6 +35,14 @@
3535
{
3636
"Name": "mod_remind",
3737
"DefaultValue": "1"
38+
},
39+
{
40+
"Name": "menu_promos",
41+
"DefaultValue": "1"
42+
},
43+
{
44+
"Name": "vp_title_transparency",
45+
"DefaultValue": "155"
3846
}
3947
],
4048

mods/NP.VanillaPlus/mod/scripts/vscripts/ui/menu_main.nut

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ void function UpdateTrialLabel()
587587
//bool isTrialVersion
588588
//bool lastIsTrialVersion = Script_IsRunningTrialVersion()
589589

590-
Hud_SetColor( file.trialLabel, 255, 255, 255, 255 )
590+
Hud_SetColor( file.trialLabel, 255, 255, 255, GetConVarInt("vp_title_transparency"))
591591
Hud_SetText( file.trialLabel, "Vanilla+" )
592592
Hud_SetVisible( file.trialLabel, true )
593593

mods/NP.VanillaPlus/mod/scripts/vscripts/ui/panel_mainmenu.nut

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -718,12 +718,12 @@ void function TrackInstallProgress()
718718

719719
bool function IsStryderAuthenticated()
720720
{
721-
return GetConVarInt( "mp_allowed" ) != -1
721+
return true
722722
}
723723

724724
bool function IsStryderAllowingMP()
725725
{
726-
return GetConVarInt( "mp_allowed" ) == 1
726+
return true
727727
}
728728

729729
#if PS4_PROG
@@ -758,43 +758,13 @@ enum eMainMenuPromoDataProperty
758758
smallButton2ImageIndex
759759
}
760760

761-
void function UpdatePromoData()
762-
{
763-
file.promoData = GetMainMenuPromos()
764-
765-
UpdateWhatsNewData()
766-
UpdateSpotlightData()
767-
}
768-
769761
void function UICodeCallback_MainMenuPromosUpdated()
770762
{
771763
printt( "MainMenuPromos updated" )
772764

773765
UpdatePromoData()
774766
}
775767

776-
void function UpdateWhatsNewData()
777-
{
778-
// file.promoData.newInfo_ImageIndex
779-
//RuiSetString( file.whatsNew, "line1Text", "`2%$rui/menu/main_menu/whats_new_bulletpoint%`0 Updated Live Fire Maps!\n`2%$rui/menu/main_menu/whats_new_bulletpoint%`0 Prime Titans`0 in the Store\n`2%$rui/menu/main_menu/whats_new_bulletpoint% DOUBLE XP`0 weekend!" )//file.promoData.newInfo_Title1 )
780-
RuiSetString( file.whatsNew, "line1Text", file.promoData.newInfo_Title1 )
781-
RuiSetString( file.whatsNew, "line2Text", file.promoData.newInfo_Title2 )
782-
RuiSetString( file.whatsNew, "line3Text", file.promoData.newInfo_Title3 )
783-
784-
bool isVisible = true
785-
if ( file.promoData.newInfo_Title1 == "" && file.promoData.newInfo_Title2 == "" && file.promoData.newInfo_Title3 == "" )
786-
isVisible = false
787-
788-
RuiSetBool( file.whatsNew, "isVisible", isVisible )
789-
}
790-
791-
void function UpdateSpotlightData()
792-
{
793-
SetSpotlightButtonData( file.spotlightButtons[0], file.promoData.largeButton_Url, file.promoData.largeButton_ImageIndex, file.promoData.largeButton_Title, file.promoData.largeButton_Text )
794-
SetSpotlightButtonData( file.spotlightButtons[1], file.promoData.smallButton1_Url, file.promoData.smallButton1_ImageIndex, file.promoData.smallButton1_Title )
795-
SetSpotlightButtonData( file.spotlightButtons[2], file.promoData.smallButton2_Url, file.promoData.smallButton2_ImageIndex, file.promoData.smallButton2_Title )
796-
}
797-
798768
void function SetSpotlightButtonData( var button, string link, int imageIndex, string title, string details = "skip" )
799769
{
800770
var rui = Hud_GetRui( button )
@@ -853,4 +823,36 @@ void function SpotlightButton_Activate( var button )
853823
{
854824
LaunchExternalWebBrowser( link, WEBBROWSER_FLAG_MUTEGAME )
855825
}
856-
}
826+
}
827+
828+
// these are modified functions from vanilla
829+
// this is so the user can control if they want to see main menu promos
830+
831+
void function UpdatePromoData()
832+
{
833+
file.promoData = GetMainMenuPromos()
834+
835+
VP_ShouldShowPromos()
836+
}
837+
838+
void function VP_ShouldShowPromos() {
839+
if (GetConVarInt("menu_promos") == 1) {
840+
// file.promoData.newInfo_ImageIndex
841+
//RuiSetString( file.whatsNew, "line1Text", "`2%$rui/menu/main_menu/whats_new_bulletpoint%`0 Updated Live Fire Maps!\n`2%$rui/menu/main_menu/whats_new_bulletpoint%`0 Prime Titans`0 in the Store\n`2%$rui/menu/main_menu/whats_new_bulletpoint% DOUBLE XP`0 weekend!" )//file.promoData.newInfo_Title1 )
842+
RuiSetString( file.whatsNew, "line1Text", file.promoData.newInfo_Title1 )
843+
RuiSetString( file.whatsNew, "line2Text", file.promoData.newInfo_Title2 )
844+
RuiSetString( file.whatsNew, "line3Text", file.promoData.newInfo_Title3 )
845+
846+
bool isVisible = true
847+
if ( file.promoData.newInfo_Title1 == "" && file.promoData.newInfo_Title2 == "" && file.promoData.newInfo_Title3 == "" )
848+
isVisible = false
849+
850+
RuiSetBool( file.whatsNew, "isVisible", isVisible )
851+
852+
SetSpotlightButtonData( file.spotlightButtons[0], file.promoData.largeButton_Url, file.promoData.largeButton_ImageIndex, file.promoData.largeButton_Title, file.promoData.largeButton_Text )
853+
SetSpotlightButtonData( file.spotlightButtons[1], file.promoData.smallButton1_Url, file.promoData.smallButton1_ImageIndex, file.promoData.smallButton1_Title )
854+
SetSpotlightButtonData( file.spotlightButtons[2], file.promoData.smallButton2_Url, file.promoData.smallButton2_ImageIndex, file.promoData.smallButton2_Title )
855+
}
856+
else
857+
return
858+
}

mods/NP.VanillaPlus/mod/scripts/vscripts/vanillaplus_ui_init.gnut

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,28 @@
44

55
global function VanillaPlusUI_Init
66

7-
// Note: A majority of this is taken from Northstar.Client
87
void function VanillaPlusUI_Init()
98
{
9+
// this is here because if the user hasnt used northstar before
10+
// they'll get infinite matchmaking in vanilla
11+
// this is baked into northstar.dll, so it can't easily be removed
12+
13+
// we check that it's 0, because 2 is disabled so Northstar won't use the token
14+
// if it's 1, they've agreed before, and we shouldn't override that (and it'll still work)
15+
16+
// shoutout to Spoon for bringing this up to me
17+
if (GetConVarInt("ns_has_agreed_to_send_token") == 0) {
18+
ClientCommand("ns_has_agreed_to_send_token 2")
19+
ClientCommand("uiscript_reset")
20+
printt("Disabling Northstar token sending!")
21+
}
22+
1023
AddModTitle("Vanilla Plus Framework")
24+
25+
AddModCategory("General settings")
26+
AddConVarSettingEnum("menu_promos", "Display promos on the main menu (requires mod reloading)", ["No", "Yes"])
27+
ModSettings_AddSetting("vp_title_transparency", "Transparency of the Vanilla+ logo on the menu(requires mod reloading)", "int")
28+
1129
AddModCategory("Demo Settings")
1230
AddConVarSettingEnum("demo_autoRecord", "Record Demos", ["No", "Yes"])
1331
AddConVarSettingEnum("demo_playbackexactframes", "Playback Exact Frames", ["No", "Yes"])

0 commit comments

Comments
 (0)