Merge branch '2023-10-01'

This commit is contained in:
Beu 2023-09-29 13:03:16 +02:00
commit 5956325fea
17 changed files with 399 additions and 162 deletions

View File

@ -381,11 +381,11 @@ Void SetHolidayShowdownControlML() {
declare Real GlobalEndPosY; declare Real GlobalEndPosY;
if (Frame_UI.Visible) { if (Frame_UI.Visible) {
Quad_Toggle.ChangeImageUrl("file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/128x128/ICON_ARROW_TOP.dds"); Quad_Toggle.ChangeImageUrl("file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/128x128/ICON_ARROW_TOP.dds");
GlobalEndPosY = -28.; GlobalEndPosY = -28.;
AnimMgr.Add(Frame_UI, "<frame hidden=\"1\" />", Now, 250, CAnimManager::EAnimManagerEasing::Linear); AnimMgr.Add(Frame_UI, "<frame hidden=\"1\" />", Now, 250, CAnimManager::EAnimManagerEasing::Linear);
} else { } else {
Quad_Toggle.ChangeImageUrl("file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/128x128/ICON_ARROW_BOTTOM.dds"); Quad_Toggle.ChangeImageUrl("file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/128x128/ICON_ARROW_BOTTOM.dds");
GlobalEndPosY = 0.; GlobalEndPosY = 0.;
Frame_UI.Visible = True; Frame_UI.Visible = True;
} }
@ -761,13 +761,13 @@ Void SetHolidayShowdownControlML() {
<frame id="frame-global" hidden="1" pos="-60 -63"> <frame id="frame-global" hidden="1" pos="-60 -63">
<frame pos="-2 -25" id="frame-toggle"> <frame pos="-2 -25" id="frame-toggle">
<quad id="Toggle_Bg_SettingButton" size="4 4" class="quad-base" opacity="0.5" halign="center" valign="center" bgcolor="000" scriptevents="1"/> <quad id="Toggle_Bg_SettingButton" size="4 4" class="quad-base" opacity="0.5" halign="center" valign="center" bgcolor="000" scriptevents="1"/>
<quad id="Toggle_Icon_SettingButton" size="4 4" class="quad-base" z-index="3" opacity="0.9" halign="center" valign="center" image="file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/128x128/ICON_ARROW_BOTTOM.dds" colorize="fff"/> <quad id="Toggle_Icon_SettingButton" size="4 4" class="quad-base" z-index="3" opacity="0.9" halign="center" valign="center" image="file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/128x128/ICON_ARROW_BOTTOM.dds" colorize="fff"/>
</frame> </frame>
<frame id="frame-UI"> <frame id="frame-UI">
<quad id="quad-bg" z-index="-1" size="27 27" bgcolor="000" opacity="0.5" pos="0 0"/> <quad id="quad-bg" z-index="-1" size="27 27" bgcolor="000" opacity="0.5" pos="0 0"/>
<frame pos="-2 -21"> <frame pos="-2 -21">
<quad id="BindKey_SettingButton" size="4 4" class="quad-base" opacity="0.5" halign="center" valign="center" bgcolor="000" scriptevents="1"/> <quad id="BindKey_SettingButton" size="4 4" class="quad-base" opacity="0.5" halign="center" valign="center" bgcolor="000" scriptevents="1"/>
<quad size="4 4" class="quad-base" z-index="3" opacity="0.9" halign="center" valign="center" image="file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/128x128/Icones_128_icon_settings_key_02.dds" colorize="fff"/> <quad size="4 4" class="quad-base" z-index="3" opacity="0.9" halign="center" valign="center" image="file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/128x128/Icones_128_icon_settings_key_02.dds" colorize="fff"/>
</frame> </frame>
<frame id="Admin_Frame" pos="-2 -13"> <frame id="Admin_Frame" pos="-2 -13">
<frame pos="0 0"> <frame pos="0 0">
@ -873,12 +873,12 @@ Void SetHolidayShowdownLiveRaceML() {
declare Real GlobalEndPosX; declare Real GlobalEndPosX;
if (Frame_UI.Visible) { if (Frame_UI.Visible) {
Quad_Toggle.ChangeImageUrl("file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/128x128/ICON_ARROW_RIGHT_OBLIQUE.dds"); Quad_Toggle.ChangeImageUrl("file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/128x128/ICON_ARROW_RIGHT_OBLIQUE.dds");
Quad_Toggle.RelativePosition_V3.X = 5.; Quad_Toggle.RelativePosition_V3.X = 5.;
GlobalEndPosX = -220.; GlobalEndPosX = -220.;
AnimMgr.Add(Frame_UI, "<frame hidden=\"1\" />", Now, 250, CAnimManager::EAnimManagerEasing::Linear); AnimMgr.Add(Frame_UI, "<frame hidden=\"1\" />", Now, 250, CAnimManager::EAnimManagerEasing::Linear);
} else { } else {
Quad_Toggle.ChangeImageUrl("file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/128x128/ICON_ARROW_LEFT_OBLIQUE.dds"); Quad_Toggle.ChangeImageUrl("file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/128x128/ICON_ARROW_LEFT_OBLIQUE.dds");
Quad_Toggle.RelativePosition_V3.X = 0.; Quad_Toggle.RelativePosition_V3.X = 0.;
GlobalEndPosX = -160.; GlobalEndPosX = -160.;
Frame_UI.Visible = True; Frame_UI.Visible = True;
@ -911,15 +911,15 @@ Void SetHolidayShowdownLiveRaceML() {
if (_PlayerInfo.RoundPoints > 0) { if (_PlayerInfo.RoundPoints > 0) {
Label_Player_PointsValue.Value = "+" ^ _PlayerInfo.RoundPoints; Label_Player_PointsValue.Value = "+" ^ _PlayerInfo.RoundPoints;
Quad_Player_PointsIcon.ChangeImageUrl("file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/256x256/Icones_256_icon_damier_02.dds"); Quad_Player_PointsIcon.ChangeImageUrl("file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/256x256/Icones_256_icon_damier_02.dds");
Quad_Player_PointsBg.BgColor = <0.839,0.098,0.098>; Quad_Player_PointsBg.BgColor = <0.839,0.098,0.098>;
} else if (_PlayerInfo.RaceTime > 0) { } else if (_PlayerInfo.RaceTime > 0) {
Label_Player_PointsValue.Value = TL::TimeToText(_PlayerInfo.RaceTime, True, True) ; Label_Player_PointsValue.Value = TL::TimeToText(_PlayerInfo.RaceTime, True, True) ;
Quad_Player_PointsIcon.ChangeImageUrl("file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/256x256/Icones_256_icon_damier_02.dds"); Quad_Player_PointsIcon.ChangeImageUrl("file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/256x256/Icones_256_icon_damier_02.dds");
Quad_Player_PointsBg.BgColor = <0.839,0.098,0.098>; Quad_Player_PointsBg.BgColor = <0.839,0.098,0.098>;
} else if (_PlayerInfo.Eliminated) { } else if (_PlayerInfo.Eliminated) {
Label_Player_PointsValue.Value = _("|DidNotFinish|DNF"); Label_Player_PointsValue.Value = _("|DidNotFinish|DNF");
Quad_Player_PointsIcon.ChangeImageUrl("file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/256x256/Icones_256_icon_cross_01.dds"); Quad_Player_PointsIcon.ChangeImageUrl("file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/256x256/Icones_256_icon_cross_01.dds");
Quad_Player_PointsBg.BgColor = <0.588,0.588,0.588>; Quad_Player_PointsBg.BgColor = <0.588,0.588,0.588>;
} else { } else {
Label_Player_PointsValue.Value = TL::ToText(_PlayerInfo.Altitude); Label_Player_PointsValue.Value = TL::ToText(_PlayerInfo.Altitude);
@ -1096,7 +1096,7 @@ Void SetHolidayShowdownLiveRaceML() {
</framemodel> </framemodel>
<frame id="frame-global" pos="-160 50"> <frame id="frame-global" pos="-160 50">
<frame pos="58 -2.5" id="frame-toggle"> <frame pos="58 -2.5" id="frame-toggle">
<quad id="Toggle_SettingButton" pos="0 0" size="4 4" class="quad-base" z-index="3" opacity="0.9" scriptevents="1" halign="center" valign="center" image="file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/128x128/ICON_ARROW_LEFT_OBLIQUE.dds" colorize="fff"/> <quad id="Toggle_SettingButton" pos="0 0" size="4 4" class="quad-base" z-index="3" opacity="0.9" scriptevents="1" halign="center" valign="center" image="file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/128x128/ICON_ARROW_LEFT_OBLIQUE.dds" colorize="fff"/>
</frame> </frame>
<frame id="frame-UI"> <frame id="frame-UI">
<quad id="quad-bg" pos="0 0" z-index="-1" size="60 14" bgcolor="000" opacity="0.5" /><!-- 16 + (ML::Max(NB_Players,16) * 6) --> <quad id="quad-bg" pos="0 0" z-index="-1" size="60 14" bgcolor="000" opacity="0.5" /><!-- 16 + (ML::Max(NB_Players,16) * 6) -->

View File

@ -1,10 +1,10 @@
/** /**
* LastManStanding mode * LastManStanding mode
*/ */
#Extends "Libs/Nadeo/TMNext/TrackMania/Modes/TMNextRoundsBase.Script.txt" #Extends "Modes/Nadeo/Trackmania/Base/TrackmaniaRoundsBase.Script.txt"
#Const CompatibleMapTypes "TrackMania\\TM_Race,TM_Race" #Const CompatibleMapTypes "TrackMania\\TM_Race,TM_Race"
#Const Version "2023-07-14" #Const Version "2023-09-25"
#Const ScriptName "Modes/TM2020-Gamemodes/LastManStanding.Script.txt" #Const ScriptName "Modes/TM2020-Gamemodes/LastManStanding.Script.txt"
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
@ -12,14 +12,14 @@
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
#Include "TextLib" as TL #Include "TextLib" as TL
#Include "MathLib" as ML #Include "MathLib" as ML
#Include "Libs/Nadeo/TMNext/TrackMania/Modes/Rounds/StateManager.Script.txt" as StateMgr #Include "Libs/Nadeo/Trackmania/Modes/Rounds/StateManager.Script.txt" as StateMgr
#Include "Libs/Nadeo/TMNext/TrackMania/Menu/Constants.Script.txt" as MenuConsts #Include "Libs/Nadeo/Trackmania/MainMenu/Constants.Script.txt" as MenuConsts
#Include "Libs/Nadeo/ModeLibs/Common/Utils.Script.txt" as ModeUtils #Include "Libs/Nadeo/CMGame/Modes/Utils.Script.txt" as ModeUtils
// UI from Race // UI from Race
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/ScoresTable_Server.Script.txt" as UIModules_ScoresTable #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/ScoresTable_Server.Script.txt" as UIModules_ScoresTable
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/PauseMenuOnline_Server.Script.txt" as UIModules_PauseMenu_Online #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/PauseMenuOnline_Server.Script.txt" as UIModules_PauseMenu_Online
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/BigMessage_Server.Script.txt" as UIModules_BigMessage #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/BigMessage_Server.Script.txt" as UIModules_BigMessage
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
// Settings // Settings
@ -47,7 +47,7 @@
#Const Description "$zIn $<$t$6F9LastManStanding$> mode, The goal is to be the last player not to fall off the structure. Collisions are activated and you can push your opponents to win. From a certain time, malus are sent to all the players of the game to accelerate its end." #Const Description "$zIn $<$t$6F9LastManStanding$> mode, The goal is to be the last player not to fall off the structure. Collisions are activated and you can push your opponents to win. From a certain time, malus are sent to all the players of the game to accelerate its end."
#Const C_HudModulePath "" //< Path to the hud module #Const C_HudModulePath "" //< Path to the hud module
#Const C_ManiaAppUrl "file://Media/ManiaApps/Nadeo/TMNext/TrackMania/Rounds/Rounds.Script.txt" //< Url of the mania app #Const C_ManiaAppUrl "file://Media/ManiaApps/Nadeo/Trackmania/Modes/Rounds.Script.txt" //< Url of the mania app
#Const C_FakeUsersNb 0 #Const C_FakeUsersNb 0
#Const C_Malus_Reset 0 #Const C_Malus_Reset 0
@ -127,9 +127,7 @@ UIManager.UIAll.ScoreTableOnlyManialink = True;
ClientManiaAppUrl = C_ManiaAppUrl; ClientManiaAppUrl = C_ManiaAppUrl;
Race::SortScores(Race::C_Sort_TotalPoints); Race::SortScores(Race::C_Sort_TotalPoints);
UIModules_PauseMenu_Online::SetHelp(Description); UIModules_PauseMenu_Online::SetHelp(Description);
UIManager.UIAll.OverlayHideSpectatorControllers = True;
UIManager.UIAll.OverlayHideSpectatorInfos = True; UIManager.UIAll.OverlayHideSpectatorInfos = True;
UIManager.UIAll.OverlayHideChrono = True;
UIManager.UIAll.OverlayHideCountdown = True; UIManager.UIAll.OverlayHideCountdown = True;
Markers::SetDefaultMarker_HudVisibility(CUIConfigMarker::EHudVisibility::Always); Markers::SetDefaultMarker_HudVisibility(CUIConfigMarker::EHudVisibility::Always);

View File

@ -1,9 +1,9 @@
// #RequireContext CSmMode // #RequireContext CSmMode
#Include "MathLib" as ML #Include "MathLib" as ML
#Include "Libs/Nadeo/CommonLibs/Common/Log.Script.txt" as Log #Include "Libs/Nadeo/CMGame/Utils/Log.Script.txt" as Log
#Include "Libs/Nadeo/TMxSM/Race/Events.Script.txt" as Events #Include "Libs/Nadeo/TMGame/Modes/Events.Script.txt" as Events
#Include "Libs/Nadeo/TMxSM/Race/Race.Script.txt" as Race #Include "Libs/Nadeo/TMGame/Modes/Race.Script.txt" as Race
#Const C_Malus_Reset 0 #Const C_Malus_Reset 0
#Const C_Malus_ForceEngine 1 #Const C_Malus_ForceEngine 1

View File

@ -532,12 +532,12 @@ Void SetML() {
declare Real GlobalEndPosX; declare Real GlobalEndPosX;
if (Frame_UI.Visible) { if (Frame_UI.Visible) {
Quad_Toggle.ChangeImageUrl("file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/128x128/ICON_ARROW_RIGHT_OBLIQUE.dds"); Quad_Toggle.ChangeImageUrl("file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/128x128/ICON_ARROW_RIGHT_OBLIQUE.dds");
Quad_Toggle.RelativePosition_V3.X = 5.; Quad_Toggle.RelativePosition_V3.X = 5.;
GlobalEndPosX = -220.; GlobalEndPosX = -220.;
AnimMgr.Add(Frame_UI, "<frame hidden=\"1\" />", Now, 250, CAnimManager::EAnimManagerEasing::Linear); AnimMgr.Add(Frame_UI, "<frame hidden=\"1\" />", Now, 250, CAnimManager::EAnimManagerEasing::Linear);
} else { } else {
Quad_Toggle.ChangeImageUrl("file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/128x128/ICON_ARROW_LEFT_OBLIQUE.dds"); Quad_Toggle.ChangeImageUrl("file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/128x128/ICON_ARROW_LEFT_OBLIQUE.dds");
Quad_Toggle.RelativePosition_V3.X = 0.; Quad_Toggle.RelativePosition_V3.X = 0.;
GlobalEndPosX = -160.; GlobalEndPosX = -160.;
Frame_UI.Visible = True; Frame_UI.Visible = True;
@ -1076,7 +1076,7 @@ Void SetML() {
</stylesheet> </stylesheet>
<frame id="frame-global" hidden="1" pos="-160 40"> <frame id="frame-global" hidden="1" pos="-160 40">
<frame pos="58 -2.5" id="frame-toggle" z-index=1> <frame pos="58 -2.5" id="frame-toggle" z-index=1>
<quad id="Toggle_SettingButton" pos="0 0" size="4 4" class="quad-base" z-index="3" opacity="0.9" scriptevents="1" halign="center" valign="center" image="file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/128x128/ICON_ARROW_LEFT_OBLIQUE.dds" colorize="fff"/> <quad id="Toggle_SettingButton" pos="0 0" size="4 4" class="quad-base" z-index="3" opacity="0.9" scriptevents="1" halign="center" valign="center" image="file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/128x128/ICON_ARROW_LEFT_OBLIQUE.dds" colorize="fff"/>
</frame> </frame>
<frame id="frame-UI"> <frame id="frame-UI">
<quad id="quad-bg" pos="0 0" z-index="-1" size="60 74" bgcolor="000" opacity="0.5" /> <!-- 85 for regular, 74 without spec control--> <quad id="quad-bg" pos="0 0" z-index="-1" size="60 74" bgcolor="000" opacity="0.5" /> <!-- 85 for regular, 74 without spec control-->
@ -1086,7 +1086,7 @@ Void SetML() {
<label class="text-suffix" pos="30 -9" textsize="1.5" z-index="0" size="50 10" id="SubTitle" text=""/> <label class="text-suffix" pos="30 -9" textsize="1.5" z-index="0" size="50 10" id="SubTitle" text=""/>
<frame pos="58 -6"> <frame pos="58 -6">
<quad id="BindKey_SettingButton" size="4 4" z-index="1" class="quad-base" opacity="0" halign="center" valign="center" bgcolor="fff" scriptevents="1"/> <quad id="BindKey_SettingButton" size="4 4" z-index="1" class="quad-base" opacity="0" halign="center" valign="center" bgcolor="fff" scriptevents="1"/>
<quad size="4 4" class="quad-base" z-index="3" opacity="0.9" halign="center" valign="center" image="file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/128x128/Icones_128_icon_settings_key_02.dds" colorize="fff"/> <quad size="4 4" class="quad-base" z-index="3" opacity="0.9" halign="center" valign="center" image="file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/128x128/Icones_128_icon_settings_key_02.dds" colorize="fff"/>
</frame> </frame>
<frame pos="0.5 -6"> <frame pos="0.5 -6">
<frame pos="30 0"> <frame pos="30 0">

248
TM_Alfadream.Script.txt Normal file
View File

@ -0,0 +1,248 @@
#Extends "Modes/TrackMania/TM_Cup_Online.Script.txt"
#Setting S_PointsLimit 50
#Setting S_RoundsPerMap 4
#Setting S_PointsRepartition "10,6,4,3,0"
#Setting S_PlayersPerMatch 12
#Const C_ML_TeamPicker "Custom_TeamPicker"
***Match_StartServer***
***
Clans::SetClansNb(6);
Clans::SetUseForcedClans(True);
WarmUp::SetSpawnInRequestedClan(False); // Must be disabled because Clans are forced
***
***Match_StartMatch***
***
declare netwrite Integer[Text] Net_Custom_PlayersClan for Teams[0] ;
Net_Custom_PlayersClan = [];
Teams[2].Name = "Cyan";
Teams[3].Name = "Pink";
Teams[4].Name = "Yellow";
Teams[5].Name = "Green";
***
***Match_InitMap***
***
log(Dbg_DumpDeclareForVariables(This, False));
Users_SetNbFakeUsers(11,0);
if (GetPlayersNb() < S_PlayersPerMatch) {
SendPickManialink();
declare netwrite Integer[Text] Net_Custom_PlayersClan for Teams[0] = [];
foreach (Player in AllPlayers) {
if (Player.IsFakePlayer) {
Net_Custom_PlayersClan[Player.User.WebServicesUserId] = ML::Rand(1,6);
Player.Score.LadderClan = Net_Custom_PlayersClan[Player.User.WebServicesUserId];
}
}
while (GetPlayersNb() < S_PlayersPerMatch) {
MB_Yield();
foreach (Event in UIManager.PendingEvents) {
if (Event.Type == CUIConfigEvent::EType::OnLayerCustomEvent && Event.CustomEventType == "Custom_Join_Clan") {
declare CSmPlayer Player = GetPlayer(Event.UI);
if (Player != Null) {
Net_Custom_PlayersClan[Player.User.WebServicesUserId] = TL::ToInteger(Event.CustomEventData[0]);
Player.Score.LadderClan = Net_Custom_PlayersClan[Player.User.WebServicesUserId];
SetPlayerClan(Player, Net_Custom_PlayersClan[Player.User.WebServicesUserId]);
}
}
}
}
Layers::Detach(C_ML_TeamPicker);
}
declare Int2[] Custom_RoundsVersus for This = [];
Custom_RoundsVersus = GenerateRoundVersus();
***
***Match_InitRound***
***
declare Integer Custom_NbOfValidRounds for This = 0;
Custom_NbOfValidRounds = G_NbOfValidRounds;
declare Int2[] Custom_RoundsVersus for This = [];
if (Custom_NbOfValidRounds >= 3) {
UIModules_BigMessage::SetMessage("All teams play");
} else {
declare CTeam Team1 <=> Teams[Custom_RoundsVersus[Custom_NbOfValidRounds].X - 1];
declare CTeam Team2 <=> Teams[Custom_RoundsVersus[Custom_NbOfValidRounds].Y - 1];
UIModules_BigMessage::SetMessage(Team1.Name ^ " vs " ^ Team2.Name);
}
MB_Sleep(3000);
UIModules_BigMessage::SetMessage("");
***
***Match_Yield***
***
foreach (Event in PendingEvents) {
if (Event.Type == CSmModeEvent::EType::OnPlayerAdded) {
declare netwrite Integer[Text] Net_Custom_PlayersClan for Teams[0] = [];
if (Net_Custom_PlayersClan.existskey(Event.Player.User.WebServicesUserId)) {
Event.Player.Score.LadderClan = Net_Custom_PlayersClan[Event.Player.User.WebServicesUserId];
SetPlayerClan(Event.Player, Net_Custom_PlayersClan[Event.Player.User.WebServicesUserId]);
}
}
}
***
***Rounds_SpawnPlayer***
***
SetPlayerClan(Player, Player.Score.LadderClan);
Race::Start(Player, StartTime);
***
***Rounds_CheckCanSpawn***
***
declare netwrite Integer[Text] Net_Custom_PlayersClan for Teams[0] = [];
if (!Net_Custom_PlayersClan.existskey(_Player.Score.User.WebServicesUserId)) return False;
// TODO Team can spawn
declare Integer Custom_NbOfValidRounds for This = 0;
if (Custom_NbOfValidRounds <= 2) {
declare Int2[] Custom_RoundsVersus for This = [];
if (Custom_RoundsVersus.existskey(Custom_NbOfValidRounds)) {
if (Custom_RoundsVersus[Custom_NbOfValidRounds].X != Net_Custom_PlayersClan[_Player.Score.User.WebServicesUserId]
&& Custom_RoundsVersus[Custom_NbOfValidRounds].Y != Net_Custom_PlayersClan[_Player.Score.User.WebServicesUserId]) {
return False;
}
}
}
log(_Player.Score.User.Name ^" " ^_Player.Score.LadderClan);
***
Integer GetPlayersNb() {
declare netwrite Integer[Text] Net_Custom_PlayersClan for Teams[0] = [];
return Net_Custom_PlayersClan.count;
}
Int2[] GenerateRoundVersus() {
declare Integer[Integer] SortingTeam;
for (I, 1, 6) {
SortingTeam[I] = ML::Rand(0, 10000);
}
SortingTeam = SortingTeam.sort();
declare Integer[] SortedTeam;
foreach (ClanId => Rand in SortingTeam.sort()) {
SortedTeam.add(ClanId);
}
declare Int2[] RoundOrder;
for (I, 0, 2) {
RoundOrder.add(<SortedTeam[I * 2], SortedTeam[I * 2 + 1]>);
}
return RoundOrder;
}
Void SendPickManialink() {
declare Text Manialink = """
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<manialink version="3" name="{{{C_ML_TeamPicker}}}">
<stylesheet>
<style class="center" halign="center" valign="center" />
</stylesheet>
<framemodel id="framemodel-team">
<label id="label-team-name" pos="0 -5" class="center" textsize=3 textfont="GameFontExtraBold"/>
<frame id="frame-players" pos="0 -15">
<label pos="0 0" class="center" textsize=2 textfont="GameFontSemiBold"/>
<label pos="0 -5" class="center" textsize=2 textfont="GameFontSemiBold"/>
<label pos="0 -10" class="center" textsize=2 textfont="GameFontSemiBold"/>
<label pos="0 -15" class="center" textsize=2 textfont="GameFontSemiBold"/>
</frame>
<label id="label-join-clan" pos="0 -76" class="center" style="CardButtonSmallS" text="Join" scriptevents=2/>
</framemodel>
<frame id="frame-global">
<quad id="background" class="center" z-index="-1" size="180 80" bgcolor="000" opacity="0.7" />
<frame id="frame-teams">
<frameinstance modelid="framemodel-team" pos="-45 40" data-clanid="2"/>
<frameinstance modelid="framemodel-team" pos="-15 40" data-clanid="3"/>
<frameinstance modelid="framemodel-team" pos="15 40" data-clanid="4"/>
<frameinstance modelid="framemodel-team" pos="45 40" data-clanid="5"/>
<frameinstance modelid="framemodel-team" pos="75 40" data-clanid="6"/>
</frame>
</frame>
<script><!--
#Include "TextLib" as TL
#Include "TimeLib" as TimeLib
#Const C_AttachId {{{dump(C_ML_TeamPicker)}}}
main() {
log("Init");
declare CMlFrame Frame_Teams <=> (Page.GetFirstChild("frame-teams") as CMlFrame);
foreach (Key => Control in Frame_Teams.Controls) {
if (!Teams.existskey(Key)) break;
declare CMlFrame Frame <=> Control as CMlFrame;
declare CMlLabel Label_TeamName <=> (Frame.GetFirstChild("label-team-name") as CMlLabel);
Label_TeamName.Value = Teams[Key].Name;
Label_TeamName.TextColor = Teams[Key].ColorPrimary;
}
// Wait C++ initialize the player
wait (InputPlayer != Null);
declare netread Integer[Text] Net_Custom_PlayersClan for Teams[0] = [];
while(True) {
yield;
declare Text[][Integer] PlayerPerTeams = [];
foreach (Player in Players) {
if (!Net_Custom_PlayersClan.existskey(Player.User.WebServicesUserId)) continue;
declare Integer TeamId = Net_Custom_PlayersClan[Player.User.WebServicesUserId] - 1;
if (!PlayerPerTeams.existskey(TeamId)) PlayerPerTeams[TeamId] = [];
PlayerPerTeams[TeamId].add(Player.User.Name);
}
foreach (TeamId => Control in Frame_Teams.Controls) {
declare CMlFrame Frame_Team <=> Control as CMlFrame;
declare CMlFrame Frame_Players <=> (Frame_Team.GetFirstChild("frame-players") as CMlFrame);
foreach (Key => Control in Frame_Players.Controls) {
declare CMlLabel Label <=> Control as CMlLabel ;
//declare CMlLabel Label <=> (Frame_Player.GetFirstChild("") as CMlLabel);
if (PlayerPerTeams.existskey(TeamId) && PlayerPerTeams[TeamId].existskey(Key)) {
Label.Value = PlayerPerTeams[TeamId][Key];
} else {
Label.Value = "";
}
}
}
foreach (Event in PendingEvents) {
if (Event.Type == CMlScriptEvent::Type::MouseClick) {
if (Event.ControlId == "label-join-clan") {
declare Text ClanId = Event.Control.Parent.DataAttributeGet("clanid");
SendCustomEvent("Custom_Join_Clan", [ClanId]);
}
}
}
}
}
--></script>
</manialink>
""";
Layers::Create(C_ML_TeamPicker, Manialink);
Layers::SetType(C_ML_TeamPicker, CUILayer::EUILayerType::Normal);
Layers::Attach(C_ML_TeamPicker);
}

View File

@ -3,10 +3,10 @@
*/ */
// #RequireContext CSmMode // #RequireContext CSmMode
#Extends "Libs/Nadeo/TMNext/TrackMania/Modes/TMNextBase.Script.txt" #Extends "Modes/Nadeo/Trackmania/Base/TrackmaniaBase.Script.txt"
#Const CompatibleMapTypes "TrackMania\\TM_Race,TM_Race" #Const CompatibleMapTypes "TrackMania\\TM_Race,TM_Race"
#Const Version "2022-05-20" #Const Version "2023-09-25"
#Const ScriptName "Modes/TM2020-Gamemodes/TM_CPKnockout.Script.txt" #Const ScriptName "Modes/TM2020-Gamemodes/TM_CPKnockout.Script.txt"
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
@ -15,7 +15,7 @@
#Include "TextLib" as TL #Include "TextLib" as TL
#Include "MathLib" as ML #Include "MathLib" as ML
#Include "Libs/Nadeo/Trackmania/MainMenu/Constants.Script.txt" as MenuConsts #Include "Libs/Nadeo/Trackmania/MainMenu/Constants.Script.txt" as MenuConsts
#Include "Libs/Nadeo/TMGame/Modes/Rounds/StateManager.Script.txt" as StateMgr #Include "Libs/Nadeo/Trackmania/Modes/Rounds/StateManager.Script.txt" as StateMgr
#Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/ScoresTable_Server.Script.txt" as UIModules_ScoresTable #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/ScoresTable_Server.Script.txt" as UIModules_ScoresTable
#Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/TimeGap_Server.Script.txt" as UIModules_TimeGap #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/TimeGap_Server.Script.txt" as UIModules_TimeGap
#Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/Checkpoint_Server.Script.txt" as UIModules_Checkpoint #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/Checkpoint_Server.Script.txt" as UIModules_Checkpoint
@ -51,7 +51,7 @@
#Const Description _("$zIn $<$t$6F9Laps$> mode, the goal is to drive as far as possible by passing $<$t$6F9checkpoints$>.\n\nThe laps mode takes place on multilap (cyclical) maps, and is played in one go for every map.\n\nWhen the time is up, the $<$t$6F9winner$> is the player who passed the most $<$t$6F9checkpoints$>. In case of draws, the winner is the player who passed the last checkpoint first.") #Const Description _("$zIn $<$t$6F9Laps$> mode, the goal is to drive as far as possible by passing $<$t$6F9checkpoints$>.\n\nThe laps mode takes place on multilap (cyclical) maps, and is played in one go for every map.\n\nWhen the time is up, the $<$t$6F9winner$> is the player who passed the most $<$t$6F9checkpoints$>. In case of draws, the winner is the player who passed the last checkpoint first.")
#Const C_HudModulePath "" //< Path to the hud module #Const C_HudModulePath "" //< Path to the hud module
#Const C_ManiaAppUrl "file://Media/ManiaApps/Nadeo/TMNext/TrackMania/Laps/Laps.Script.txt" //< Url of the mania app #Const C_ManiaAppUrl "file://Media/ManiaApps/Nadeo/Trackmania/Modes/Laps.Script.txt" //< Url of the mania app
#Const C_UploadRecord True #Const C_UploadRecord True
#Const C_DisplayRecordGhost False #Const C_DisplayRecordGhost False
@ -387,6 +387,6 @@ Void EliminatePlayer(CSmPlayer _Player) {
UIManager.UIAll.SendChat("Player $<$ff6" ^ _Player.User.Name ^ "$> is $<$f00eliminated$>"); UIManager.UIAll.SendChat("Player $<$ff6" ^ _Player.User.Name ^ "$> is $<$f00eliminated$>");
// waiting GetCustomPoints function in ScoresTable_Server // waiting GetCustomPoints function in ScoresTable_Server
declare netwrite Text[][Text] Net_TMxSM_ScoresTable_CustomPoints for Teams[0]; declare netwrite Text[][Text] Net_TMGame_ScoresTable_CustomPoints for Teams[0];
Net_TMxSM_ScoresTable_CustomPoints[_Player.User.WebServicesUserId] = [_("|Status|K.O."), "f00"]; Net_TMGame_ScoresTable_CustomPoints[_Player.User.WebServicesUserId] = [_("|Status|K.O."), "f00"];
} }

View File

@ -1,29 +1,26 @@
/** /**
* Time Attack mode * Time Attack mode
*/ */
#Extends "Libs/Nadeo/TMNext/TrackMania/Modes/TMNextBase.Script.txt" #Extends "Modes/Nadeo/Trackmania/Base/TrackmaniaBase.Script.txt"
//#RequireContext CSmMode //#RequireContext CSmMode
#Const CompatibleMapTypes "TrackMania\\TM_Race,TM_Race" #Const CompatibleMapTypes "TrackMania\\TM_Race,TM_Race"
#Const Version "2023-09-24" #Const Version "2023-09-25"
#Const ScriptName "Modes/TrackMania/TM_TimeAttack_Online.Script.txt" #Const ScriptName "Modes/TM2020-Gamemodes/TM_ClimbTheMap.Script.txt"
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
// Libraries // Libraries
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
#Include "TextLib" as TL #Include "TextLib" as TL
#Include "MathLib" as ML #Include "MathLib" as ML
#Include "Libs/Nadeo/CommonLibs/Common/Task.Script.txt" as Task #Include "Libs/Nadeo/CMGame/Utils/Task.Script.txt" as Task
#Include "Libs/Nadeo/TMNext/TrackMania/Modes/TimeAttack/StateManager.Script.txt" as StateMgr #Include "Libs/Nadeo/Trackmania/Modes/TimeAttack/StateManager.Script.txt" as StateMgr
#Include "Libs/Nadeo/TMNext/TrackMania/Modes/TrophyRanking.Script.txt" as TrophyRanking #Include "Libs/Nadeo/Trackmania/MainMenu/Constants.Script.txt" as MenuConsts
#Include "Libs/Nadeo/TMNext/TrackMania/Menu/Constants.Script.txt" as MenuConsts
#Include "Libs/Nadeo/CommonLibs/Common/Tracking.Script.txt" as Tracking
// UI from Race // UI from Race
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/TimeGap_Server.Script.txt" as UIModules_TimeGap #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/TimeGap_Server.Script.txt" as UIModules_TimeGap
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/Checkpoint_Server.Script.txt" as UIModules_Checkpoint #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/Checkpoint_Server.Script.txt" as UIModules_Checkpoint
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/PauseMenuOnline_Server.Script.txt" as UIModules_PauseMenu_Online #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/PauseMenuOnline_Server.Script.txt" as UIModules_PauseMenu_Online
#Include "ManiaApps/Nadeo/TMNext/TrackMania/TimeAttack/UIModules/EndMatchTrophy_Server.Script.txt" as UIModules_EndMatchTrophy
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
// Settings // Settings
@ -39,7 +36,7 @@
#Const Description _("$zIn $<$t$6F9Time Attack$> mode, the goal is to set the $<$t$6F9best time$>.\n\nYou have as many tries as you want, and you can $<$t$6F9retry$> when you want by pressing the respawn button.\n\nWhen the time is up, the $<$t$6F9winner$> is the player with the $<$t$6F9best time$>.") #Const Description _("$zIn $<$t$6F9Time Attack$> mode, the goal is to set the $<$t$6F9best time$>.\n\nYou have as many tries as you want, and you can $<$t$6F9retry$> when you want by pressing the respawn button.\n\nWhen the time is up, the $<$t$6F9winner$> is the player with the $<$t$6F9best time$>.")
#Const C_HudModulePath "" //< Path to the hud module #Const C_HudModulePath "" //< Path to the hud module
#Const C_ManiaAppUrl "file://Media/ManiaApps/Nadeo/TMNext/TrackMania/TimeAttack/TimeAttack.Script.txt" //< Url of the mania app #Const C_ManiaAppUrl "file://Media/ManiaApps/Nadeo/Trackmania/Modes/TimeAttack.Script.txt" //< Url of the mania app
#Const C_UploadRecord True #Const C_UploadRecord True
#Const C_DisplayRecordGhost False #Const C_DisplayRecordGhost False
@ -427,7 +424,6 @@ if (Map_XmlRpc_AltitudePerLogin_Queue.count > 0) {
StateMgr::ForcePlayersStates([StateMgr::C_State_Waiting]); StateMgr::ForcePlayersStates([StateMgr::C_State_Waiting]);
Race::EnableIntroDuringMatch(False); Race::EnableIntroDuringMatch(False);
TrophyRanking::UpdateUsersRank();
CarRank::Update(CarRank::C_SortCriteria_BestRace); CarRank::Update(CarRank::C_SortCriteria_BestRace);
Race::StopSkipOutroAll(); Race::StopSkipOutroAll();
*** ***

View File

@ -3,7 +3,7 @@
* This mode is used to debug your modes during development. * This mode is used to debug your modes during development.
* To use it, you just have to change the line below to put the path of your mode: * To use it, you just have to change the line below to put the path of your mode:
*/ */
#Extends "Modes/TrackMania/TM_TimeAttack_Online.Script.txt" #Extends "Modes/TrackMania/TM_Rounds_Online.Script.txt"
// #RequireContext CSmMode // #RequireContext CSmMode
#Include "TimeLib" as TiL #Include "TimeLib" as TiL

View File

@ -2,10 +2,10 @@
/* /*
* This mode uses the TMGL World Cup mode and removes all references to it * This mode uses the TMGL World Cup mode and removes all references to it
*/ */
#Extends "Modes/TrackMania/TM_Final86TMGL_Online.Script.txt" #Extends "Modes/TrackMania/Deprecated/TM_Final86TMGL_Online.Script.txt"
// #RequireContext CSmMode // #RequireContext CSmMode
#Include "ManiaApps/Nadeo/TMNext/TrackMania/UIModules/TMGLMarkers_Server.Script.txt" as UIModules_TMGLMarkers #Include "Libs/Nadeo/Trackmania/Modes/UIModules/TMGLMarkers_Server.Script.txt" as UIModules_TMGLMarkers
#Setting S_PointsLimit 100 #Setting S_PointsLimit 100
#Setting S_RoundsPerMap 3 #Setting S_RoundsPerMap 3

View File

@ -1,10 +1,10 @@
/** /**
* Official Knockout mode with delayed countdown (Finish Timeout) * Official Knockout mode with delayed countdown (Finish Timeout)
*/ */
#Extends "Libs/Nadeo/TMNext/TrackMania/Modes/TMNextRoundsBase.Script.txt" #Extends "Modes/Nadeo/Trackmania/Base/TrackmaniaRoundsBase.Script.txt"
#Const CompatibleMapTypes "TrackMania\\TM_Race,TM_Race" #Const CompatibleMapTypes "TrackMania\\TM_Race,TM_Race"
#Const Version "2023-06-21" #Const Version "2023-09-25"
#Const ScriptName "Modes/TrackMania/TM_Knockout_Online.Script.txt" #Const ScriptName "Modes/TrackMania/TM_Knockout_Online.Script.txt"
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
@ -12,21 +12,24 @@
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
#Include "TextLib" as TL #Include "TextLib" as TL
#Include "MathLib" as ML #Include "MathLib" as ML
#Include "Libs/Nadeo/CommonLibs/Common/Semver.Script.txt" as Semver #Include "Libs/Nadeo/CMGame/Utils/Semver.Script.txt" as Semver
#Include "Libs/Nadeo/TMNext/TrackMania/Modes/Knockout/StateManager.Script.txt" as StateMgr #Include "Libs/Nadeo/CMGame/Modes/Utils.Script.txt" as ModeUtils
#Include "Libs/Nadeo/TMNext/TrackMania/Menu/Constants.Script.txt" as MenuConsts #Include "Libs/Nadeo/Trackmania/Modes/Knockout/StateManager.Script.txt" as StateMgr
#Include "ManiaApps/Nadeo/TMNext/TrackMania/Knockout/UIModules/KnockoutInfo_Server.Script.txt" as UIModules_KnockoutInfo #Include "Libs/Nadeo/Trackmania/MainMenu/Constants.Script.txt" as MenuConsts
#Include "ManiaApps/Nadeo/TMNext/TrackMania/TimeAttack/UIModules/BestRaceViewer_Server.Script.txt" as UIModules_BestRaceViewer #Include "Libs/Nadeo/Trackmania/Modes/Knockout/UIModules/KnockoutInfo_Server.Script.txt" as UIModules_KnockoutInfo
#Include "ManiaApps/Nadeo/TMNext/TrackMania/Knockout/UIModules/KnockedOutPlayers_Server.Script.txt" as UIModules_KnockedOutPlayers #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/ScoresTable_Server.Script.txt" as UIModules_ScoresTable
#Include "ManiaApps/Nadeo/TMNext/TrackMania/Knockout/UIModules/KnockoutReward_Server.Script.txt" as UIModules_KnockoutReward #Include "Libs/Nadeo/Trackmania/Modes/TimeAttack/UIModules/BestRaceViewer_Server.Script.txt" as UIModules_BestRaceViewer
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/PauseMenuOnline_Server.Script.txt" as UIModules_PauseMenu_Online #Include "Libs/Nadeo/Trackmania/Modes/Knockout/UIModules/KnockedOutPlayers_Server.Script.txt" as UIModules_KnockedOutPlayers
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/Checkpoint_Server.Script.txt" as UIModules_Checkpoint #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/BigMessage_Server.Script.txt" as UIModules_BigMessage
#Include "Libs/Nadeo/Trackmania/Modes/Knockout/UIModules/KnockoutReward_Server.Script.txt" as UIModules_KnockoutReward
#Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/PauseMenuOnline_Server.Script.txt" as UIModules_PauseMenu_Online
#Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/Checkpoint_Server.Script.txt" as UIModules_Checkpoint
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
// Settings // Settings
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
#Setting S_FinishTimeout 5 as _("Finish timeout") #Setting S_FinishTimeout 5 as _("Finish timeout")
#Setting S_RoundsPerMap -1 as _("Number of rounds per track") ///< Number of round to play on one map before going to the next one #Setting S_RoundsPerMap -1 as _("Number of rounds per map") ///< Number of round to play on one map before going to the next one
#Setting S_WarmUpNb 0 as _("Number of warm up") #Setting S_WarmUpNb 0 as _("Number of warm up")
#Setting S_WarmUpDuration 0 as _("Duration of one warm up") #Setting S_WarmUpDuration 0 as _("Duration of one warm up")
#Setting S_WarmUpTimeout -1 as _("Warm up timeout") #Setting S_WarmUpTimeout -1 as _("Warm up timeout")
@ -66,7 +69,7 @@
#Const Description _("$zIn $<$t$6F9Knockout$> mode, the goal is to be the last player standing. \n\nYou play a series of races as in Round mode. $<$t$6F9At the end of each race, the last players are eliminated$>!\n\nThe winner is the player who eliminates all of their opponents.") #Const Description _("$zIn $<$t$6F9Knockout$> mode, the goal is to be the last player standing. \n\nYou play a series of races as in Round mode. $<$t$6F9At the end of each race, the last players are eliminated$>!\n\nThe winner is the player who eliminates all of their opponents.")
#Const C_HudModulePath "" //< Path to the hud module #Const C_HudModulePath "" //< Path to the hud module
#Const C_ManiaAppUrl "file://Media/ManiaApps/Nadeo/TMNext/TrackMania/Knockout/Knockout.Script.txt" //< Url of the mania app #Const C_ManiaAppUrl "file://Media/ManiaApps/Nadeo/Trackmania/Modes/Knockout.Script.txt" //< Url of the mania app
#Const C_FakeUsersNb 0 #Const C_FakeUsersNb 0
#Const C_Callback_Elimination "Trackmania.Knockout.Elimination" #Const C_Callback_Elimination "Trackmania.Knockout.Elimination"

View File

@ -3,10 +3,10 @@
*/ */
// #RequireContext CSmMode // #RequireContext CSmMode
#Extends "Libs/Nadeo/TMNext/TrackMania/Modes/TMNextBase.Script.txt" #Extends "Modes/Nadeo/Trackmania/Base/TrackmaniaBase.Script.txt"
#Const CompatibleMapTypes "TrackMania\\TM_Race,TM_Race" #Const CompatibleMapTypes "TrackMania\\TM_Race,TM_Race"
#Const Version "2022-10-22" #Const Version "2023-09-25"
#Const ScriptName "Modes/TM2020-Gamemodes/TM_LapsKnockout.Script.txt" #Const ScriptName "Modes/TM2020-Gamemodes/TM_LapsKnockout.Script.txt"
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
@ -14,15 +14,15 @@
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
#Include "TextLib" as TL #Include "TextLib" as TL
#Include "MathLib" as ML #Include "MathLib" as ML
#Include "Libs/Nadeo/TMNext/TrackMania/Menu/Constants.Script.txt" as MenuConsts #Include "Libs/Nadeo/Trackmania/MainMenu/Constants.Script.txt" as MenuConsts
#Include "Libs/Nadeo/TMNext/TrackMania/Modes/Laps/StateManager.Script.txt" as StateMgr #Include "Libs/Nadeo/Trackmania/Modes/Laps/StateManager.Script.txt" as StateMgr
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/ScoresTable_Server.Script.txt" as UIModules_ScoresTable #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/ScoresTable_Server.Script.txt" as UIModules_ScoresTable
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/TimeGap_Server.Script.txt" as UIModules_TimeGap #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/TimeGap_Server.Script.txt" as UIModules_TimeGap
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/Checkpoint_Server.Script.txt" as UIModules_Checkpoint #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/Checkpoint_Server.Script.txt" as UIModules_Checkpoint
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/PauseMenuOnline_Server.Script.txt" as UIModules_PauseMenu_Online #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/PauseMenuOnline_Server.Script.txt" as UIModules_PauseMenu_Online
#Include "ManiaApps/Nadeo/TMNext/TrackMania/LapsCommon/Libs/Constants.Script.txt" as LibLaps_Constants #Include "Libs/Nadeo/Trackmania/Modes/LapsCommon/Libs/Constants.Script.txt" as LibLaps_Constants
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/BigMessage_Server.Script.txt" as UIModules_BigMessage #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/BigMessage_Server.Script.txt" as UIModules_BigMessage
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
// Settings // Settings
@ -69,7 +69,7 @@
#Const Description _("$zIn $<$t$6F9Laps$> mode, the goal is to drive as far as possible by passing $<$t$6F9checkpoints$>.\n\nThe laps mode takes place on multilap (cyclical) maps, and is played in one go for every map.\n\nWhen the time is up, the $<$t$6F9winner$> is the player who passed the most $<$t$6F9checkpoints$>. In case of draws, the winner is the player who passed the last checkpoint first.") #Const Description _("$zIn $<$t$6F9Laps$> mode, the goal is to drive as far as possible by passing $<$t$6F9checkpoints$>.\n\nThe laps mode takes place on multilap (cyclical) maps, and is played in one go for every map.\n\nWhen the time is up, the $<$t$6F9winner$> is the player who passed the most $<$t$6F9checkpoints$>. In case of draws, the winner is the player who passed the last checkpoint first.")
#Const C_HudModulePath "" //< Path to the hud module #Const C_HudModulePath "" //< Path to the hud module
#Const C_ManiaAppUrl "file://Media/ManiaApps/Nadeo/TMNext/TrackMania/Laps/Laps.Script.txt" //< Url of the mania app #Const C_ManiaAppUrl "file://Media/ManiaApps/Nadeo/Trackmania/Modes/Laps.Script.txt" //< Url of the mania app
#Const C_FakeUsersNb 0 #Const C_FakeUsersNb 0
#Const C_UploadRecord True #Const C_UploadRecord True
@ -258,8 +258,7 @@ if (Last_NbLapsWithoutKO == 1) {
***Match_PlayLoop*** ***Match_PlayLoop***
*** ***
// Manage race events // Manage race events
declare RacePendingEvents = Race::GetPendingEvents(); foreach (Event in Race::GetPendingEvents()) {
foreach (Event in RacePendingEvents) {
Race::ValidEvent(Event); Race::ValidEvent(Event);
// Waypoint // Waypoint
@ -293,8 +292,8 @@ foreach (Event in RacePendingEvents) {
if (Event.IsEndRace) { if (Event.IsEndRace) {
// waiting GetCustomPoints function in ScoresTable_Server // waiting GetCustomPoints function in ScoresTable_Server
declare netwrite Text[][Text] Net_TMxSM_ScoresTable_CustomPoints for Teams[0]; declare netwrite Text[][Text] Net_TMGame_ScoresTable_CustomPoints for Teams[0];
declare Text[][Text] CustomTimes = Net_TMxSM_ScoresTable_CustomPoints; declare Text[][Text] CustomTimes = Net_TMGame_ScoresTable_CustomPoints;
foreach (Player in Players) { foreach (Player in Players) {
if (Player != Event.Player) { if (Player != Event.Player) {
CustomTimes[Player.User.WebServicesUserId] = [_("|Status|K.O."), "f00"]; CustomTimes[Player.User.WebServicesUserId] = [_("|Status|K.O."), "f00"];

View File

@ -7,7 +7,7 @@
#Extends "Modes/TrackMania/TM_Rounds_Online.Script.txt" #Extends "Modes/TrackMania/TM_Rounds_Online.Script.txt"
#Include "Libs/Nadeo/TMNext/TrackMania/Menu/Constants.Script.txt" as MenuConsts #Include "Libs/Nadeo/Trackmania/MainMenu/Constants.Script.txt" as MenuConsts
#Include "Modes/TM2020-Gamemodes/Libs/Malus.Script.txt" as Malus #Include "Modes/TM2020-Gamemodes/Libs/Malus.Script.txt" as Malus
@ -99,8 +99,8 @@ Void AddMalusUI() {
declare CMlFrame Frame_Global <=> (Page.GetFirstChild("frame-global") as CMlFrame); declare CMlFrame Frame_Global <=> (Page.GetFirstChild("frame-global") as CMlFrame);
declare CMlLabel Label_Message <=> (Frame_Global.GetFirstChild("label-message") as CMlLabel); declare CMlLabel Label_Message <=> (Frame_Global.GetFirstChild("label-message") as CMlLabel);
G_Sound_CountDown = Audio.CreateSound("file://Media/Manialinks/Nadeo/TMConsole/MapEditor/Sounds/MenuDialogHidden.wav", 1.0, False, False, False); G_Sound_CountDown = Audio.CreateSound("https://cdn.discordapp.com/attachments/767738540687228948/1155897620242366506/MenuDialogHidden-06471.wav", 1.0, False, False, False);
G_Sound_Malus = Audio.CreateSound("file://Media/Manialinks/Nadeo/TMConsole/MapEditor/Sounds/MenuDialogDisplayed.wav", 1.0, False, False, False); G_Sound_Malus = Audio.CreateSound("https://cdn.discordapp.com/attachments/767738540687228948/1155897620573737121/MenuDialogDisplayed-21252.wav", 1.0, False, False, False);
// Wait C++ initialize the player // Wait C++ initialize the player
wait (InputPlayer != Null); wait (InputPlayer != Null);

View File

@ -5,10 +5,10 @@
*/ */
// #RequireContext CSmMode // #RequireContext CSmMode
#Extends "Libs/Nadeo/TMNext/TrackMania/Modes/TMNextRoundsBase.Script.txt" #Extends "Modes/Nadeo/Trackmania/Base/TrackmaniaRoundsBase.Script.txt"
#Const CompatibleMapTypes "TrackMania\\TM_Race,TM_Race" #Const CompatibleMapTypes "TrackMania\\TM_Race,TM_Race"
#Const Version "2023-09-09" #Const Version "2023-09-25"
#Const ScriptName "Modes/TM2020-Gamemodes/TM_ReverseCup.Script.txt" #Const ScriptName "Modes/TM2020-Gamemodes/TM_ReverseCup.Script.txt"
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
@ -16,14 +16,14 @@
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
#Include "TextLib" as TL #Include "TextLib" as TL
#Include "MathLib" as ML #Include "MathLib" as ML
#Include "Libs/Nadeo/CommonLibs/Common/Semver.Script.txt" as Semver #Include "Libs/Nadeo/CMGame/Utils/Semver.Script.txt" as Semver
#Include "Libs/Nadeo/TMNext/TrackMania/Menu/Constants.Script.txt" as Menu_Const #Include "Libs/Nadeo/Trackmania/MainMenu/Constants.Script.txt" as Menu_Const
#Include "Libs/Nadeo/TMNext/TrackMania/Modes/CupCommon/Constants.Script.txt" as CupCommon_Const #Include "Libs/Nadeo/Trackmania/Modes/CupCommon/Constants.Script.txt" as CupCommon_Const
#Include "Libs/Nadeo/TMNext/TrackMania/Modes/Cup/StateManager.Script.txt" as StateMgr #Include "Libs/Nadeo/Trackmania/Modes/Cup/StateManager.Script.txt" as StateMgr
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/ScoresTable_Server.Script.txt" as UIModules_ScoresTable #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/ScoresTable_Server.Script.txt" as UIModules_ScoresTable
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/Checkpoint_Server.Script.txt" as UIModules_Checkpoint #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/Checkpoint_Server.Script.txt" as UIModules_Checkpoint
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/PauseMenuOnline_Server.Script.txt" as UIModules_PauseMenu_Online #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/PauseMenuOnline_Server.Script.txt" as UIModules_PauseMenu_Online
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/BigMessage_Server.Script.txt" as UIModules_BigMessage #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/BigMessage_Server.Script.txt" as UIModules_BigMessage
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
// Settings // Settings
@ -34,7 +34,6 @@
#Setting S_NbOfWinners 1 as _("Number of winners") #Setting S_NbOfWinners 1 as _("Number of winners")
#Setting S_FinishTimeout -1 as _("Finish timeout") #Setting S_FinishTimeout -1 as _("Finish timeout")
#Setting S_ComplexPointsRepartition "" as "JSON of PointsRepartition depending for the number of the Players Alive" // Example: {"3": [3, 6, 10], "4,5": [1, 3, 6,10]}
#Setting S_PointsRepartition "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20" #Setting S_PointsRepartition "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20"
#Setting S_RoundsPerMap 5 as _("Number of rounds per map") ///< Number of round to play on one map before going to the next one #Setting S_RoundsPerMap 5 as _("Number of rounds per map") ///< Number of round to play on one map before going to the next one
@ -55,7 +54,7 @@
#Const Description _("$zThe cup mode consists of $<$t$6F9a series of races on multiple maps$>.\n\nWhen you finish a race in a bad $<$t$6F9position$>, you loose $<$t$6F9points$> substracted from your total.\nServers might propose warmup races to get familiar with a map first.\n\nTo win, you must be the last player with points. Once you are a LastChance, if you finish a race last you will be eliminated.The cup mode ends once there is one player left.") #Const Description _("$zThe cup mode consists of $<$t$6F9a series of races on multiple maps$>.\n\nWhen you finish a race in a bad $<$t$6F9position$>, you loose $<$t$6F9points$> substracted from your total.\nServers might propose warmup races to get familiar with a map first.\n\nTo win, you must be the last player with points. Once you are a LastChance, if you finish a race last you will be eliminated.The cup mode ends once there is one player left.")
#Const C_HudModulePath "" //< Path to the hud module #Const C_HudModulePath "" //< Path to the hud module
#Const C_ManiaAppUrl "file://Media/ManiaApps/Nadeo/TMNext/TrackMania/Cup/Cup.Script.txt" //< Url of the mania app #Const C_ManiaAppUrl "file://Media/ManiaApps/Nadeo/Trackmania/Modes/Cup.Script.txt" //< Url of the mania app
#Const C_FakeUsersNb 0 #Const C_FakeUsersNb 0
#Const C_UploadRecord True #Const C_UploadRecord True
@ -136,9 +135,7 @@ UIModules_Checkpoint::SetRankMode(UIModules_Checkpoint::C_RankMode_CurrentRace);
UIModules_PauseMenu_Online::SetHelp(Description); UIModules_PauseMenu_Online::SetHelp(Description);
// Hide SM Overlay // Hide SM Overlay
UIManager.UIAll.OverlayHideSpectatorControllers = True;
UIManager.UIAll.OverlayHideSpectatorInfos = True; UIManager.UIAll.OverlayHideSpectatorInfos = True;
UIManager.UIAll.OverlayHideChrono = True;
UIManager.UIAll.OverlayHideCountdown = True; UIManager.UIAll.OverlayHideCountdown = True;
// Unload default UI // Unload default UI
@ -160,8 +157,8 @@ foreach (Event in PendingEvents) {
if (Server_MatchInfo.RegistrationClosed && !Server_MatchInfo.Participants.exists(Event.Player.User.Login)) { if (Server_MatchInfo.RegistrationClosed && !Server_MatchInfo.Participants.exists(Event.Player.User.Login)) {
Scores::SetPlayerMatchPoints(Event.Player.Score, C_Points_Spectator); Scores::SetPlayerMatchPoints(Event.Player.Score, C_Points_Spectator);
// Equivalent of getCustomPoints: // Equivalent of getCustomPoints:
declare netwrite Text[][Text] Net_TMxSM_ScoresTable_CustomPoints for Teams[0] = []; declare netwrite Text[][Text] Net_TMGame_ScoresTable_CustomPoints for Teams[0] = [];
Net_TMxSM_ScoresTable_CustomPoints[Event.Player.User.WebServicesUserId] = [C_Text_Spectator, C_Color_Spectator]; Net_TMGame_ScoresTable_CustomPoints[Event.Player.User.WebServicesUserId] = [C_Text_Spectator, C_Color_Spectator];
} }
} }
} }
@ -924,7 +921,7 @@ Void SetManialink_LiveRace() {
</framemodel> </framemodel>
<frame id="frame-global" pos="-160 50"> <frame id="frame-global" pos="-160 50">
<frame id="frame-toggle" pos="58 -2.5" > <frame id="frame-toggle" pos="58 -2.5" >
<quad id="Toggle_SettingButton" pos="0 0" size="4 4" class="quad-base" z-index="3" opacity="0.9" scriptevents="1" halign="center" valign="center" image="file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/128x128/ICON_ARROW_LEFT_OBLIQUE.dds" colorize="fff"/> <quad id="Toggle_SettingButton" pos="0 0" size="4 4" class="quad-base" z-index="3" opacity="0.9" scriptevents="1" halign="center" valign="center" image="file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/128x128/ICON_ARROW_LEFT_OBLIQUE.dds" colorize="fff"/>
</frame> </frame>
<frame id="frame-UI"> <frame id="frame-UI">
<quad id="quad-bg" pos="0 0" z-index="-1" size="60 14" bgcolor="000" opacity="0.5" /><!-- 16 + (ML::Max(NB_Players,16) * 5) --> <quad id="quad-bg" pos="0 0" z-index="-1" size="60 14" bgcolor="000" opacity="0.5" /><!-- 16 + (ML::Max(NB_Players,16) * 5) -->
@ -1030,12 +1027,12 @@ Void SetManialink_LiveRace() {
declare Real GlobalEndPosX; declare Real GlobalEndPosX;
if (Frame_UI.Visible) { if (Frame_UI.Visible) {
Quad_Toggle.ChangeImageUrl("file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/128x128/ICON_ARROW_RIGHT_OBLIQUE.dds"); Quad_Toggle.ChangeImageUrl("file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/128x128/ICON_ARROW_RIGHT_OBLIQUE.dds");
Quad_Toggle.RelativePosition_V3.X = 5.; Quad_Toggle.RelativePosition_V3.X = 5.;
GlobalEndPosX = -220.; GlobalEndPosX = -220.;
AnimMgr.Add(Frame_UI, "<frame hidden=\"1\" />", Now, 250, CAnimManager::EAnimManagerEasing::Linear); AnimMgr.Add(Frame_UI, "<frame hidden=\"1\" />", Now, 250, CAnimManager::EAnimManagerEasing::Linear);
} else { } else {
Quad_Toggle.ChangeImageUrl("file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/128x128/ICON_ARROW_LEFT_OBLIQUE.dds"); Quad_Toggle.ChangeImageUrl("file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/128x128/ICON_ARROW_LEFT_OBLIQUE.dds");
Quad_Toggle.RelativePosition_V3.X = 0.; Quad_Toggle.RelativePosition_V3.X = 0.;
GlobalEndPosX = -160.; GlobalEndPosX = -160.;
Frame_UI.Visible = True; Frame_UI.Visible = True;

View File

@ -1,10 +1,10 @@
/** /**
* Rounds mode * Rounds mode
*/ */
#Extends "Libs/Nadeo/TMNext/TrackMania/Modes/TMNextRoundsBase.Script.txt" #Extends "Modes/Nadeo/Trackmania/Base/TrackmaniaRoundsBase.Script.txt"
#Const CompatibleMapTypes "TrackMania\\TM_Race,TM_Race" #Const CompatibleMapTypes "TrackMania\\TM_Race,TM_Race"
#Const Version "2023-09-04" #Const Version "2023-09-25"
#Const ScriptName "Modes/TM2020-Gamemodes/TM_RoundsNearest.Script.txt" #Const ScriptName "Modes/TM2020-Gamemodes/TM_RoundsNearest.Script.txt"
// #RequireContext CSmMode // #RequireContext CSmMode
@ -14,12 +14,12 @@
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
#Include "TextLib" as TL #Include "TextLib" as TL
#Include "MathLib" as ML #Include "MathLib" as ML
#Include "Libs/Nadeo/CommonLibs/Common/Semver.Script.txt" as Semver #Include "Libs/Nadeo/CMGame/Utils/Semver.Script.txt" as Semver
#Include "Libs/Nadeo/TMNext/TrackMania/Menu/Constants.Script.txt" as MenuConsts #Include "Libs/Nadeo/Trackmania/MainMenu/Constants.Script.txt" as MenuConsts
#Include "Libs/Nadeo/TMNext/TrackMania/Modes/Rounds/StateManager.Script.txt" as StateMgr #Include "Libs/Nadeo/Trackmania/Modes/Rounds/StateManager.Script.txt" as StateMgr
#Include "Libs/Nadeo/CommonLibs/Common/Tracking.Script.txt" as Tracking #Include "Libs/Nadeo/TMGame/Utils/Tracking.Script.txt" as Tracking
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/Checkpoint_Server.Script.txt" as UIModules_Checkpoint #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/Checkpoint_Server.Script.txt" as UIModules_Checkpoint
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/PauseMenuOnline_Server.Script.txt" as UIModules_PauseMenu_Online #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/PauseMenuOnline_Server.Script.txt" as UIModules_PauseMenu_Online
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
// Settings // Settings
@ -44,7 +44,7 @@
#Const Description _("$zIn $<$t$6F9Rounds$z$z$> mode, the goal is to win a maximum number of $<$t$6F9points.\n\n$z$>The rounds mode consists of $<$t$6F9a series of races$z$>.\nWhen you finish a race in a good $<$t$6F9position$z$>, you get $<$t$6F9points$z$>, added to your total.\n\nThe $<$t$6F9winner$z$> is the first player whose total reaches the $<$t$6F9point limit$z$> (30 for example).") #Const Description _("$zIn $<$t$6F9Rounds$z$z$> mode, the goal is to win a maximum number of $<$t$6F9points.\n\n$z$>The rounds mode consists of $<$t$6F9a series of races$z$>.\nWhen you finish a race in a good $<$t$6F9position$z$>, you get $<$t$6F9points$z$>, added to your total.\n\nThe $<$t$6F9winner$z$> is the first player whose total reaches the $<$t$6F9point limit$z$> (30 for example).")
#Const C_HudModulePath "" //< Path to the hud module #Const C_HudModulePath "" //< Path to the hud module
#Const C_ManiaAppUrl "file://Media/ManiaApps/Nadeo/TMNext/TrackMania/Rounds/Rounds.Script.txt" //< Url of the mania app #Const C_ManiaAppUrl "file://Media/ManiaApps/Nadeo/Trackmania/Modes/Rounds.Script.txt" //< Url of the mania app
#Const C_PointsLimit_NotReached 0 #Const C_PointsLimit_NotReached 0
#Const C_PointsLimit_Reached 1 #Const C_PointsLimit_Reached 1
@ -105,9 +105,7 @@ UIModules_Checkpoint::SetRankMode(UIModules_Checkpoint::C_RankMode_CurrentRace);
UIModules_PauseMenu_Online::SetHelp(Description); UIModules_PauseMenu_Online::SetHelp(Description);
UIModules_Sign16x9Small::SetScoreMode(UIModules_Sign16x9Small::C_ScoreMode_Points); UIModules_Sign16x9Small::SetScoreMode(UIModules_Sign16x9Small::C_ScoreMode_Points);
// Hide SM Overlay // Hide SM Overlay
UIManager.UIAll.OverlayHideSpectatorControllers = True;
UIManager.UIAll.OverlayHideSpectatorInfos = True; UIManager.UIAll.OverlayHideSpectatorInfos = True;
UIManager.UIAll.OverlayHideChrono = True;
UIManager.UIAll.OverlayHideCountdown = True; UIManager.UIAll.OverlayHideCountdown = True;
UIModules_ScoresTable::DisplayRoundPoints(True); UIModules_ScoresTable::DisplayRoundPoints(True);

View File

@ -1,10 +1,10 @@
/** /**
* Royal Rounds mode * Royal Rounds mode
*/ */
#Extends "Libs/Nadeo/TMNext/TrackMania/Modes/TMNextRoundsBase.Script.txt" #Extends "Modes/Nadeo/Trackmania/Base/TrackmaniaRoundsBase.Script.txt"
#Const CompatibleMapTypes "TrackMania\\TM_Royal,TM_Royal" #Const CompatibleMapTypes "TrackMania\\TM_Royal,TM_Royal"
#Const Version "2021-08-21" #Const Version "2023-09-25"
#Const ScriptName "Modes/TrackMania/TM_RoyalRounds_Online.Script.txt" #Const ScriptName "Modes/TrackMania/TM_RoyalRounds_Online.Script.txt"
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
@ -12,17 +12,17 @@
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
#Include "TextLib" as TL #Include "TextLib" as TL
#Include "MathLib" as ML #Include "MathLib" as ML
#Include "Libs/Nadeo/CommonLibs/Common/Semver.Script.txt" as Semver #Include "Libs/Nadeo/CMGame/Utils/Semver.Script.txt" as Semver
#Include "Libs/Nadeo/ModeLibs/Common/Utils.Script.txt" as ModeUtils #Include "Libs/Nadeo/CMGame/Modes/Utils.Script.txt" as ModeUtils
#Include "Libs/Nadeo/TMNext/TrackMania/Menu/Constants.Script.txt" as MenuConsts #Include "Libs/Nadeo/Trackmania/MainMenu/Constants.Script.txt" as MenuConsts
#Include "Libs/Nadeo/TMNext/TrackMania/Modes/Rounds/StateManager.Script.txt" as StateMgr #Include "Libs/Nadeo/Trackmania/Modes/Rounds/StateManager.Script.txt" as StateMgr
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/ScoresTable_Server.Script.txt" as UIModules_ScoresTable #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/ScoresTable_Server.Script.txt" as UIModules_ScoresTable
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/PauseMenuOnline_Server.Script.txt" as UIModules_PauseMenu_Online #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/PauseMenuOnline_Server.Script.txt" as UIModules_PauseMenu_Online
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/Checkpoint_Server.Script.txt" as UIModules_Checkpoint #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/Checkpoint_Server.Script.txt" as UIModules_Checkpoint
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/BigMessage_Server.Script.txt" as UIModules_BigMessage #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/BigMessage_Server.Script.txt" as UIModules_BigMessage
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/Chrono_Server.Script.txt" as UIModules_Chrono #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/Chrono_Server.Script.txt" as UIModules_Chrono
#Include "ManiaApps/Nadeo/TMNext/TrackMania/Rounds/UIModules/SmallScoresTable_Server.Script.txt" as UIModules_SmallScoresTable #Include "Libs/Nadeo/Trackmania/Modes/Rounds/UIModules/SmallScoresTable_Server.Script.txt" as UIModules_SmallScoresTable
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
// Settings // Settings
@ -51,7 +51,7 @@
#Const Description _("$zIn $<$t$6F9RoyalRounds$z$z$> mode, the goal is to win a maximum number of $<$t$6F9points.\n\n$z$>The rounds mode consists of $<$t$6F9a series of races$z$>.\nWhen you finish a race in a good $<$t$6F9position$z$>, you get $<$t$6F9points$z$>, added to your total.\n\nThe $<$t$6F9winner$z$> is the first player whose total reaches the $<$t$6F9point limit$z$> (30 for example).") #Const Description _("$zIn $<$t$6F9RoyalRounds$z$z$> mode, the goal is to win a maximum number of $<$t$6F9points.\n\n$z$>The rounds mode consists of $<$t$6F9a series of races$z$>.\nWhen you finish a race in a good $<$t$6F9position$z$>, you get $<$t$6F9points$z$>, added to your total.\n\nThe $<$t$6F9winner$z$> is the first player whose total reaches the $<$t$6F9point limit$z$> (30 for example).")
#Const C_HudModulePath "" //< Path to the hud module #Const C_HudModulePath "" //< Path to the hud module
#Const C_ManiaAppUrl "file://Media/ManiaApps/Nadeo/TMNext/TrackMania/Rounds/Rounds.Script.txt" //< Url of the mania app #Const C_ManiaAppUrl "file://Media/ManiaApps/Nadeo/Trackmania/Modes/Rounds.Script.txt" //< Url of the mania app
#Const C_FakeUsersNb 0 #Const C_FakeUsersNb 0
@ -119,9 +119,7 @@ UIModules_Checkpoint::SetVisibleFor(UIModules_Checkpoint::C_Target_None);
UIModules_TimeGap::SetTimeGapMode(UIModules_TimeGap::C_TimeGapMode_Hidden); UIModules_TimeGap::SetTimeGapMode(UIModules_TimeGap::C_TimeGapMode_Hidden);
UIModules_PauseMenu_Online::SetHelp(Description); UIModules_PauseMenu_Online::SetHelp(Description);
// Hide SM Overlay // Hide SM Overlay
UIManager.UIAll.OverlayHideSpectatorControllers = True;
UIManager.UIAll.OverlayHideSpectatorInfos = True; UIManager.UIAll.OverlayHideSpectatorInfos = True;
UIManager.UIAll.OverlayHideChrono = True;
UIManager.UIAll.OverlayHideCountdown = True; UIManager.UIAll.OverlayHideCountdown = True;
SetML(); SetML();
@ -948,9 +946,9 @@ Boolean MapIsOver(Boolean _UseTieBreak, Integer _PointsLimit, Integer _ValidRoun
<quad pos="-0.75 -10" z-index="0" size="50 10" opacity="0.7" image="https://files.virtit.fr/TrackMania/UI/tilted_bg_half.dds" colorize="000" halign="center"/> <quad pos="-0.75 -10" z-index="0" size="50 10" opacity="0.7" image="https://files.virtit.fr/TrackMania/UI/tilted_bg_half.dds" colorize="000" halign="center"/>
<label id="label-text" pos="-1 -15" z-index="1" size="45 10" text="You are on the $<$fffwhite$> segment" textfont="GameFontSemiBold" halign="center" valign="center2" textprefix="$i" textsize="1.5" textcolor="D8D8D8"/> <label id="label-text" pos="-1 -15" z-index="1" size="45 10" text="You are on the $<$fffwhite$> segment" textfont="GameFontSemiBold" halign="center" valign="center2" textprefix="$i" textsize="1.5" textcolor="D8D8D8"/>
<quad id="quad-left-button" pos="-30 1.9" z-index="0" size="13 23" opacity="0.7" image="https://files.virtit.fr/TrackMania/UI/tilted_bg_left_button.dds" colorize="000" halign="center" scriptevents="1"/> <quad id="quad-left-button" pos="-30 1.9" z-index="0" size="13 23" opacity="0.7" image="https://files.virtit.fr/TrackMania/UI/tilted_bg_left_button.dds" colorize="000" halign="center" scriptevents="1"/>
<quad id="quad-left-arrow" pos="-30 -5" z-index="1" size="10 10" image="file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/128x128/ICON_ARROW_LEFT_OBLIQUE.dds" halign="center" colorize="000"/> <quad id="quad-left-arrow" pos="-30 -5" z-index="1" size="10 10" image="file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/128x128/ICON_ARROW_LEFT_OBLIQUE.dds" halign="center" colorize="000"/>
<quad id="quad-right-button" pos="30.2 1.6" z-index="0" size="13 23.5" opacity="0.7" image="https://files.virtit.fr/TrackMania/UI/tilted_bg_right_button.dds" colorize="000" halign="center" scriptevents="1"/> <quad id="quad-right-button" pos="30.2 1.6" z-index="0" size="13 23.5" opacity="0.7" image="https://files.virtit.fr/TrackMania/UI/tilted_bg_right_button.dds" colorize="000" halign="center" scriptevents="1"/>
<quad id="quad-right-arrow" pos="30 -5" z-index="1" size="10 10" image="file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/128x128/ICON_ARROW_RIGHT_OBLIQUE.dds" halign="center" colorize="1b2"/> <quad id="quad-right-arrow" pos="30 -5" z-index="1" size="10 10" image="file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/128x128/ICON_ARROW_RIGHT_OBLIQUE.dds" halign="center" colorize="1b2"/>
</frame> </frame>
</manialink> </manialink>
"""; """;

View File

@ -1,10 +1,10 @@
/** /**
* Seeding Time Attack mode * Seeding Time Attack mode
*/ */
#Extends "Libs/Nadeo/TMNext/TrackMania/Modes/TMNextBase.Script.txt" #Extends "Modes/Nadeo/Trackmania/Base/TrackmaniaBase.Script.txt"
#Const CompatibleMapTypes "TrackMania\\TM_Race,TM_Race" #Const CompatibleMapTypes "TrackMania\\TM_Race,TM_Race"
#Const Version "2021-10-16" #Const Version "2023-09-25"
#Const ScriptName "Modes/TM2020-Gamemodes/TM_SeedingTimeAttack_Online.Script.txt" #Const ScriptName "Modes/TM2020-Gamemodes/TM_SeedingTimeAttack_Online.Script.txt"
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
@ -12,20 +12,20 @@
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
#Include "TextLib" as TL #Include "TextLib" as TL
#Include "MathLib" as ML #Include "MathLib" as ML
#Include "Libs/Nadeo/CommonLibs/Common/Task.Script.txt" as Task #Include "Libs/Nadeo/CMGame/Utils/Task.Script.txt" as Task
#Include "Libs/Nadeo/TMNext/TrackMania/Modes/TimeAttack/StateManager.Script.txt" as StateMgr #Include "Libs/Nadeo/Trackmania/Modes/TimeAttack/StateManager.Script.txt" as StateMgr
#Include "Libs/Nadeo/TMNext/TrackMania/Modes/TrophyRanking.Script.txt" as TrophyRanking #Include "Libs/Nadeo/Trackmania/Modes/TrophyRanking.Script.txt" as TrophyRanking
#Include "Libs/Nadeo/TMNext/TrackMania/Menu/Constants.Script.txt" as MenuConsts #Include "Libs/Nadeo/Trackmania/MainMenu/Constants.Script.txt" as MenuConsts
#Include "Libs/Nadeo/ModeLibs/Common/Utils.Script.txt" as ModeUtils #Include "Libs/Nadeo/CMGame/Modes/Utils.Script.txt" as ModeUtils
#Include "Libs/Nadeo/CommonLibs/Common/Semver.Script.txt" as Semver #Include "Libs/Nadeo/CMGame/Utils/Semver.Script.txt" as Semver
// UI from Race // UI from Race
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/TimeGap_Server.Script.txt" as UIModules_TimeGap #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/TimeGap_Server.Script.txt" as UIModules_TimeGap
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/BigMessage_Server.Script.txt" as UIModules_BigMessage #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/BigMessage_Server.Script.txt" as UIModules_BigMessage
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/Checkpoint_Server.Script.txt" as UIModules_Checkpoint #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/Checkpoint_Server.Script.txt" as UIModules_Checkpoint
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/ScoresTable_Server.Script.txt" as UIModules_ScoresTable #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/ScoresTable_Server.Script.txt" as UIModules_ScoresTable
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/PauseMenuOnline_Server.Script.txt" as UIModules_PauseMenu_Online #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/PauseMenuOnline_Server.Script.txt" as UIModules_PauseMenu_Online
#Include "ManiaApps/Nadeo/TMNext/TrackMania/TimeAttack/UIModules/EndMatchTrophy_Server.Script.txt" as UIModules_EndMatchTrophy #Include "Libs/Nadeo/Trackmania/Modes/TimeAttack/UIModules/EndMatchTrophy_Server.Script.txt" as UIModules_EndMatchTrophy
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
@ -48,7 +48,7 @@
#Const Description _("$zIn $<$t$6F9Time Attack$> mode, the goal is to set the $<$t$6F9best time$>.\n\nYou have as many tries as you want, and you can $<$t$6F9retry$> when you want by pressing the respawn key.\n\nWhen the time is up, the $<$t$6F9winner$> is the player with the $<$t$6F9best time$>.") #Const Description _("$zIn $<$t$6F9Time Attack$> mode, the goal is to set the $<$t$6F9best time$>.\n\nYou have as many tries as you want, and you can $<$t$6F9retry$> when you want by pressing the respawn key.\n\nWhen the time is up, the $<$t$6F9winner$> is the player with the $<$t$6F9best time$>.")
#Const C_HudModulePath "" //< Path to the hud module #Const C_HudModulePath "" //< Path to the hud module
#Const C_ManiaAppUrl "file://Media/ManiaApps/Nadeo/TMNext/TrackMania/TimeAttack/TimeAttack.Script.txt" //< Url of the mania app #Const C_ManiaAppUrl "file://Media/ManiaApps/Nadeo/Trackmania/Modes/TimeAttack.Script.txt" //< Url of the mania app
#Const C_FakeUsersNb 0 #Const C_FakeUsersNb 0
#Const C_UploadRecord True #Const C_UploadRecord True
@ -170,7 +170,7 @@ UIModules_Record::SetSpecialVisibility(False);
***Match_InitMatch*** ***Match_InitMatch***
*** ***
declare Task::LibCommonTask_K_Task Match_TrophyTask; declare Task::K_Task Match_TrophyTask;
declare Integer Match_TrophyTaskEndTime; declare Integer Match_TrophyTaskEndTime;
declare Integer Match_MatchDuration; declare Integer Match_MatchDuration;
declare Boolean Match_CanForceTrophyRankUpdate for This = False; declare Boolean Match_CanForceTrophyRankUpdate for This = False;
@ -670,12 +670,12 @@ Void SetML() {
declare Real GlobalEndPosX; declare Real GlobalEndPosX;
if (Frame_UI.Visible) { if (Frame_UI.Visible) {
Quad_Toggle.ChangeImageUrl("file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/128x128/ICON_ARROW_RIGHT_OBLIQUE.dds"); Quad_Toggle.ChangeImageUrl("file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/128x128/ICON_ARROW_RIGHT_OBLIQUE.dds");
Quad_Toggle.RelativePosition_V3.X = 5.; Quad_Toggle.RelativePosition_V3.X = 5.;
GlobalEndPosX = -215.; GlobalEndPosX = -215.;
AnimMgr.Add(Frame_UI, "<frame hidden=\"1\" />", Now, 250, CAnimManager::EAnimManagerEasing::Linear); AnimMgr.Add(Frame_UI, "<frame hidden=\"1\" />", Now, 250, CAnimManager::EAnimManagerEasing::Linear);
} else { } else {
Quad_Toggle.ChangeImageUrl("file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/128x128/ICON_ARROW_LEFT_OBLIQUE.dds"); Quad_Toggle.ChangeImageUrl("file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/128x128/ICON_ARROW_LEFT_OBLIQUE.dds");
Quad_Toggle.RelativePosition_V3.X = 0.; Quad_Toggle.RelativePosition_V3.X = 0.;
GlobalEndPosX = -160.; GlobalEndPosX = -160.;
Frame_UI.Visible = True; Frame_UI.Visible = True;
@ -826,7 +826,7 @@ Void SetML() {
</framemodel> </framemodel>
<frame id="frame-global" pos="-160 30"> <frame id="frame-global" pos="-160 30">
<frame pos="53 -2.5" id="frame-toggle" z-index="1" > <frame pos="53 -2.5" id="frame-toggle" z-index="1" >
<quad id="quad-toggle" pos="0 0" size="4 4" class="quad-base" z-index="3" opacity="0.9" scriptevents="1" halign="center" valign="center" image="file://Media/Manialinks/Nadeo/TMNext/Menus/Icons/128x128/ICON_ARROW_LEFT_OBLIQUE.dds" colorize="fff"/> <quad id="quad-toggle" pos="0 0" size="4 4" class="quad-base" z-index="3" opacity="0.9" scriptevents="1" halign="center" valign="center" image="file://Media/Manialinks/Nadeo/CMGame/Utils/Icons/128x128/ICON_ARROW_LEFT_OBLIQUE.dds" colorize="fff"/>
</frame> </frame>
<frame id="frame-ui" z-index="1"> <frame id="frame-ui" z-index="1">
<quad pos="0 0" z-index="0" size="55 69" bgcolor="000" opacity="0.5"/> <quad pos="0 0" z-index="0" size="55 69" bgcolor="000" opacity="0.5"/>

View File

@ -3,10 +3,10 @@
* Quick script ordered by Bergie for Telialigaen * Quick script ordered by Bergie for Telialigaen
*/ */
// #RequireContext CSmMode // #RequireContext CSmMode
#Extends "Libs/Nadeo/TMNext/TrackMania/Modes/TMNextRoundsBase.Script.txt" #Extends "Modes/Nadeo/Trackmania/Base/TrackmaniaRoundsBase.Script.txt"
#Const CompatibleMapTypes "TrackMania\\TM_Race,TM_Race" #Const CompatibleMapTypes "TrackMania\\TM_Race,TM_Race"
#Const Version "2022-01-22" #Const Version "2023-09-25"
#Const ScriptName "Modes/TrackMania/TM_TimeAttackRounds_Online.Script.txt" #Const ScriptName "Modes/TrackMania/TM_TimeAttackRounds_Online.Script.txt"
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
@ -14,18 +14,18 @@
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
#Include "TextLib" as TL #Include "TextLib" as TL
#Include "MathLib" as ML #Include "MathLib" as ML
#Include "Libs/Nadeo/CommonLibs/Common/Task.Script.txt" as Task #Include "Libs/Nadeo/CMGame/Utils/Task.Script.txt" as Task
#Include "Libs/Nadeo/TMNext/TrackMania/Modes/TimeAttack/StateManager.Script.txt" as StateMgr #Include "Libs/Nadeo/Trackmania/Modes/TimeAttack/StateManager.Script.txt" as StateMgr
#Include "Libs/Nadeo/TMNext/TrackMania/Modes/TrophyRanking.Script.txt" as TrophyRanking #Include "Libs/Nadeo/Trackmania/Modes/TrophyRanking.Script.txt" as TrophyRanking
#Include "Libs/Nadeo/TMNext/TrackMania/Menu/Constants.Script.txt" as MenuConsts #Include "Libs/Nadeo/Trackmania/MainMenu/Constants.Script.txt" as MenuConsts
#Include "Libs/Nadeo/ModeLibs/Common/Utils.Script.txt" as ModeUtils #Include "Libs/Nadeo/CMGame/Modes/Utils.Script.txt" as ModeUtils
#Include "Libs/Nadeo/CommonLibs/Common/Semver.Script.txt" as Semver #Include "Libs/Nadeo/CMGame/Utils/Semver.Script.txt" as Semver
// UI from Race // UI from Race
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/Checkpoint_Server.Script.txt" as UIModules_Checkpoint #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/Checkpoint_Server.Script.txt" as UIModules_Checkpoint
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/ScoresTable_Server.Script.txt" as UIModules_ScoresTable #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/ScoresTable_Server.Script.txt" as UIModules_ScoresTable
#Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/PauseMenuOnline_Server.Script.txt" as UIModules_PauseMenu_Online #Include "Libs/Nadeo/TMGame/Modes/Base/UIModules/PauseMenuOnline_Server.Script.txt" as UIModules_PauseMenu_Online
#Include "ManiaApps/Nadeo/TMNext/TrackMania/TimeAttack/UIModules/EndMatchTrophy_Server.Script.txt" as UIModules_EndMatchTrophy #Include "Libs/Nadeo/Trackmania/Modes/TimeAttack/UIModules/EndMatchTrophy_Server.Script.txt" as UIModules_EndMatchTrophy
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
// Settings // Settings
@ -50,7 +50,7 @@
#Const Description _("$zIn $<$t$6F9Time Attack$> mode, the goal is to set the $<$t$6F9best time$>.\n\nYou have as many tries as you want, and you can $<$t$6F9retry$> when you want by pressing the respawn key.\n\nWhen the time is up, the $<$t$6F9winner$> is the player with the $<$t$6F9best time$>.") #Const Description _("$zIn $<$t$6F9Time Attack$> mode, the goal is to set the $<$t$6F9best time$>.\n\nYou have as many tries as you want, and you can $<$t$6F9retry$> when you want by pressing the respawn key.\n\nWhen the time is up, the $<$t$6F9winner$> is the player with the $<$t$6F9best time$>.")
#Const C_HudModulePath "" //< Path to the hud module #Const C_HudModulePath "" //< Path to the hud module
#Const C_ManiaAppUrl "file://Media/ManiaApps/Nadeo/TMNext/TrackMania/TimeAttack/TimeAttack.Script.txt" //< Url of the mania app #Const C_ManiaAppUrl "file://Media/ManiaApps/Nadeo/Trackmania/Modes/TimeAttack.Script.txt" //< Url of the mania app
#Const C_FakeUsersNb 0 #Const C_FakeUsersNb 0
#Const C_UploadRecord True #Const C_UploadRecord True
@ -168,7 +168,7 @@ UIModules_Record::SetSpecialVisibility(False);
***Match_InitMatch*** ***Match_InitMatch***
*** ***
declare Task::LibCommonTask_K_Task Match_TrophyTask; declare Task::K_Task Match_TrophyTask;
declare Integer Match_TrophyTaskEndTime; declare Integer Match_TrophyTaskEndTime;
declare Integer Match_MatchDuration; declare Integer Match_MatchDuration;
declare Boolean Match_CanForceTrophyRankUpdate for This = False; declare Boolean Match_CanForceTrophyRankUpdate for This = False;