From 3409d64a1628bb82e4fcafb2a94c1c34cafcffa7 Mon Sep 17 00:00:00 2001 From: MortonPL Date: Tue, 22 Aug 2023 02:02:57 +0200 Subject: [PATCH 01/18] Add second migration guide --- Docs/Migration-INI.md | 827 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 827 insertions(+) create mode 100644 Docs/Migration-INI.md diff --git a/Docs/Migration-INI.md b/Docs/Migration-INI.md new file mode 100644 index 000000000..474fd8903 --- /dev/null +++ b/Docs/Migration-INI.md @@ -0,0 +1,827 @@ +# Migrating to client 7 +It is **highly recommended** to make a complete backup of your mod before starting. + +## Replace binary files +1. Replace contents of `Resources/Binaries` and `Resources/Compatibility` with new files. +2. Replace your launcher executable in root directory (whetever it's called, YRLauncher, MentalOmegaLauncher, etc.). + +## Edit `ClientDefinitions.ini` +1. Add `[Settings]UnixLauncherExe=YRLauncher.sh` +2. Create `YRLauncher.sh` in root directory: +```sh +#!/bin/sh + +cd "$(dirname "$0")" +dotnet Resources/Binaries/UniversalGL/clientogl.dll "$@" +``` +3. Add these entries in `[Settings]` (fill with whatever you want): +```ini +; Comma-separated list of files required to run the game / mod that are not included in the installation. +RequiredFiles= +; Comma-separated list of files that cannot be present to run the game / mod without problems. +ForbiddenFiles= +``` + +## Edit `SkirmishLobby.ini` +1. Change `[INISystem]BasedOn` from `MultiplayerGameLobby.ini` to `GameLobbyBase.ini`. +2. Add `$BaseSection=GameLobbyBase` to `[SkirmishLobby]` +3. Remove `[lbMapList]` section +4. Add these two sections: +```ini +[GameOptionsPanel] +$CC-GODD03=cmbGameSpeedCapSkirmish:GameLobbyDropDown + +[cmbGameSpeedCapSkirmish] +$BaseSection=cmbGameSpeedCap +Items=Fastest (MAX),Faster (60 FPS),Fast (30 FPS),Medium (20 FPS),Slow (15 FPS),Slower (12 FPS),Slowest (10 FPS) +``` +## Add `GameLobbyBase.ini` +```ini +[INISystem] +BasedOn=GenericWindow.ini + +[GameLobbyBase] +PlayerOptionLocationX=12 ; def=25 +PlayerOptionLocationY=25 ; def=24 +PlayerOptionVerticalMargin=9 ; def=12 +PlayerOptionHorizontalMargin=5 ; def=3 +PlayerOptionCaptionLocationY=6 ; def=6 +PlayerNameWidth=127 ; def=136 +SideWidth=120 ; def=91 +ColorWidth=80 ; def=79 +StartWidth=50 ; def=49 +TeamWidth=50 ; def=46 + +; controls +$CC00=btnLaunchGame:GameLaunchButton +$CC01=btnLeaveGame:XNAClientButton +$CC03=MapPreviewBox:MapPreviewBox +$CC04=GameOptionsPanel:XNAPanel +$CC05=PlayerOptionsPanel:XNAPanel +$CC06=lblMapName:XNALabel +$CC07=lblMapAuthor:XNALabel +$CC08=lblGameMode:XNALabel +$CC09=lblMapSize:XNALabel +$CC12=lbMapList:XNAMultiColumnListBox +$CC13=ddGameMode:XNAClientDropDown +$CC14=lblGameModeSelect:XNALabel +$CC15=btnPickRandomMap:XNAClientButton +$CC16=tbMapSearch:XNASuggestionTextBox +$CC17=PlayerExtraOptionsPanel:PlayerExtraOptionsPanel +$CC18=lbChatMessages:ChatListBox +$CC19=tbChatInput:XNAChatTextBox +$CC20=panelBorderTop:XNAExtraPanel +$CC21=panelBorderBottom:XNAExtraPanel +$CC22=panelBorderLeft:XNAExtraPanel +$CC23=panelBorderRight:XNAExtraPanel +$CC24=panelBorderCornerTL:XNAExtraPanel +$CC25=panelBorderCornerTR:XNAExtraPanel +$CC26=panelBorderCornerBL:XNAExtraPanel +$CC27=panelBorderCornerBR:XNAExtraPanel + +[lblName] +Text=Players; in the game its Players, makes more sense than Name actually, eh + +[lblSide] +Text=Side + +[lblStart] +Text=Start +Visible=true + +[lblColor] +Text=Color + +[lblTeam] +Text=Team + +[ddPlayerStartBase] +Enabled=true +Visible=true + +[ddPlayerStart0] +$BaseSection=ddPlayerStartBase + +[ddPlayerStart1] +$BaseSection=ddPlayerStartBase + +[ddPlayerStart2] +$BaseSection=ddPlayerStartBase + +[ddPlayerStart3] +$BaseSection=ddPlayerStartBase + +[ddPlayerStart4] +$BaseSection=ddPlayerStartBase + +[ddPlayerStart5] +$BaseSection=ddPlayerStartBase + +[ddPlayerStart6] +$BaseSection=ddPlayerStartBase + +[ddPlayerStart7] +$BaseSection=ddPlayerStartBase + +[lbMapList] +$X=LOBBY_EMPTY_SPACE_SIDES +$Y=EMPTY_SPACE_TOP + 33 +$Width=getWidth($ParentControl) - (getX($Self) + (getWidth(MapPreviewBox) + LOBBY_EMPTY_SPACE_SIDES + LOBBY_PANEL_SPACING) +$Height=getBottom(MapPreviewBox) - getY($Self) +SolidColorBackgroundTexture=0,0,0,128 + +[ddGameMode] +$Width=180 +$Height=DEFAULT_CONTROL_HEIGHT +$X=getRight(lbMapList) - getWidth($Self) +$Y=getY(lbMapList) - getHeight($Self) - EMPTY_SPACE_TOP + +[lblGameModeSelect] +Text=Game mode: +$X=getX(ddGameMode) - getWidth($Self) - LABEL_SPACING +$Y=getY(ddGameMode) + 1 + +[btnMapSortAlphabetically] +Visible=false +Enabled=false + +[btnLaunchGame] +Text=Launch Game +$Width=BUTTON_WIDTH_133 +$Height=DEFAULT_BUTTON_HEIGHT +$X=LOBBY_EMPTY_SPACE_SIDES +$Y=getHeight($ParentControl) - getHeight($Self) - EMPTY_SPACE_BOTTOM + +[btnPickRandomMap] +Text=Pick Random Map +$Width=BUTTON_WIDTH_133 +$Height=DEFAULT_BUTTON_HEIGHT +$X=LOBBY_EMPTY_SPACE_SIDES +$Y=getY(btnLaunchGame) - getHeight($Self) - LOBBY_PANEL_SPACING + +[tbMapSearch] +Suggestion=Search map... +$Width=getRight(lbMapList) - getRight(btnPickRandomMap) - LOBBY_PANEL_SPACING +$Height=DEFAULT_BUTTON_HEIGHT ;DEFAULT_CONTROL_HEIGHT +$X=getRight(btnPickRandomMap) + LOBBY_PANEL_SPACING +$Y=getY(btnPickRandomMap) ; + 1 +BackColor=255,255,255 +;SolidColorBackgroundTexture=0,0,0,128 + +[MapPreviewBox] +$Width=812 +$Height=380 +$X=getWidth($ParentControl) - getWidth($Self) - LOBBY_EMPTY_SPACE_SIDES +$Y=292 +SolidColorBackgroundTexture=0,0,0,128 + +[lblMapName] +$Height=DEFAULT_LBL_HEIGHT +$X=getX(MapPreviewBox) +$Y=getBottom(MapPreviewBox) + LABEL_SPACING + +[lblMapAuthor] +$TextAnchor=LEFT +$AnchorPoint=getRight(MapPreviewBox),getY(lblMapName) + +[lblGameMode] +$Height=DEFAULT_LBL_HEIGHT +$X=getX(lblMapName) +$Y=getBottom(lblMapName) + LABEL_SPACING + +[lblMapSize] +$Height=DEFAULT_LBL_HEIGHT +$X=getX(lblGameMode) +$Y=getBottom(lblGameMode) + LABEL_SPACING + +[btnLeaveGame] +Text=Leave Game +$Width=BUTTON_WIDTH_133 +$Height=DEFAULT_BUTTON_HEIGHT +$X=getWidth($ParentControl) - getWidth($Self) - LOBBY_EMPTY_SPACE_SIDES +$Y=getY(btnLaunchGame) + +[PlayerOptionsPanel] +$X=getX(MapPreviewBox) +$Y=EMPTY_SPACE_TOP +$Width=getWidth($ParentControl) - (getX($Self) + (getWidth(GameOptionsPanel) + LOBBY_EMPTY_SPACE_SIDES + LOBBY_PANEL_SPACING) +$Height=getHeight(GameOptionsPanel) +SolidColorBackgroundTexture=0,0,0,128 + +$CC00=btnPlayerExtraOptionsOpen:XNAClientButton + +[PlayerExtraOptionsPanel] +$Width=238 +$Height=247 +$X=getRight(PlayerOptionsPanel) - getWidth($Self) +$Y=getY(PlayerOptionsPanel) +SolidColorBackgroundTexture=0,0,0,128 + +[btnPlayerExtraOptionsOpen] +$Width=OPEN_BUTTON_WIDTH +$Height=OPEN_BUTTON_HEIGHT +$X=getWidth($ParentControl) - getWidth($Self) +$Y=0 +IdleTexture=optionsButton.png +HoverTexture=optionsButton_c.png + +[GameOptionsPanel] +$Width=330 +$Height=270 +$X=getWidth($ParentControl) - getWidth($Self) - LOBBY_EMPTY_SPACE_SIDES +$Y=EMPTY_SPACE_TOP +SolidColorBackgroundTexture=0,0,0,128 + +; Left column checkboxes +$CC-GO01=chkShortGame:GameLobbyCheckBox +$CC-GO02=chkRedeplMCV:GameLobbyCheckBox +$CC-GO03=chkSuperWeapons:GameLobbyCheckBox +$CC-GO04=chkCrates:GameLobbyCheckBox +$CC-GO05=chkBuildOffAlly:GameLobbyCheckBox +$CC-GO06=chkMultiEngineer:GameLobbyCheckBox + +; Right column checkboxes +$CC-GO07=chkIngameAllying:GameLobbyCheckBox +$CC-GO08=chkStolenTech:GameLobbyCheckBox +$CC-GO09=chkNavalCombat:GameLobbyCheckBox +$CC-GO10=chkDestroyableBridges:GameLobbyCheckBox +$CC-GO11=chkBrutalAI:GameLobbyCheckBox +$CC-GO12=chkNoSpawnPreview:GameLobbyCheckBox + +; Dropdowns +$CC-GODD01=cmbCredits:GameLobbyDropDown +$CC-GODD02=lblCredits:XNALabel +; $CC-GODD03=cmbGameSpeedCap:GameLobbyDropDown ; different in MP and SP +$CC-GODD03PH=cmbGameSpeedCapPlaceholder:XNAControl +$CC-GODD04=lblGameSpeedCap:XNALabel +$CC-GODD05=cmbTechLevel:GameLobbyDropDown +$CC-GODD06=lblTechLevel:XNALabel +$CC-GODD07=cmbStartingUnits:GameLobbyDropDown +$CC-GODD08=lblStartingUnits:XNALabel + +$CC01=BtnSaveLoadGameOptions:XNAClientButton + +[BtnSaveLoadGameOptions] +$Width=OPEN_BUTTON_WIDTH +$Height=OPEN_BUTTON_HEIGHT +$X=getWidth($ParentControl) - getWidth($Self) +$Y=0 +IdleTexture=optionsButton.png +HoverTexture=optionsButton_c.png + +;============================ +; LEFT Column Checkboxes +;============================ + +[chkShortGame] +Text=Short Game +SpawnIniOption=ShortGame +Checked=True +ToolTip=Players win when all enemy buildings are destroyed. +$X=EMPTY_SPACE_SIDES +$Y=EMPTY_SPACE_TOP + +[chkRedeplMCV] +Text=MCV Repacks +SpawnIniOption=MCVRedeploy +Checked=True +ToolTip=Players have the ability to move their command center after it's deployed. +$X=getX(chkShortGame) +$Y=getBottom(chkShortGame) + GAME_OPTION_ROW_SPACING + +[chkSuperWeapons] +Text=Superweapons +SpawnIniOption=Superweapons +Checked=False +ToolTip=Allow superweapons to be built. +$X=getX(chkShortGame) +$Y=getBottom(chkRedeplMCV) + GAME_OPTION_ROW_SPACING + +[chkCrates] +Text=Crates Appear +SpawnIniOption=Crates +Checked=False +ToolTip=Random power-up crates will appear. +$X=getX(chkShortGame) +$Y=getBottom(chkSuperWeapons) + GAME_OPTION_ROW_SPACING + +[chkBuildOffAlly] +Text=Build Off Allies +SpawnIniOption=BuildOffAlly +Checked=True +ToolTip=Allow players to build near their allies' Construction Yards. +$X=getX(chkShortGame) +$Y=getBottom(chkCrates) + GAME_OPTION_ROW_SPACING + +[chkMultiEngineer] +Text=Multi Engineer +SpawnIniOption=MultiEngineer +Checked=False +ToolTip=Capturing structures requires 3 Engineers instead of 1. +$X=getX(chkShortGame) +$Y=getBottom(chkBuildOffAlly) + GAME_OPTION_ROW_SPACING + +;============================ +; Right Column Checkboxes +;============================ + +[chkIngameAllying] +Text=Ingame Allying +SpawnIniOption=AlliesAllowed +CustomIniPath=INI/Game Options/AlliesAllowed.ini +Checked=True +ToolTip=Players can form and break alliances in game. +$X=getX(chkShortGame) + GAME_OPTION_COLUMN_SPACING +$Y=getY(chkShortGame) + +[chkStolenTech] +Text=Stolen Tech +CustomIniPath=INI/Game Options/StolenTech.ini +Checked=True +ToolTip=Allow infiltration of battle labs for stolen tech infantry. +Reversed=yes +$X=getX(chkIngameAllying) +$Y=getBottom(chkIngameAllying) + GAME_OPTION_ROW_SPACING + +[chkNavalCombat] +Text=Naval Combat +CustomIniPath=INI/Game Options/NavalCombat.ini +Checked=True +ToolTip=Allow shipyards and naval units to be built. +Reversed=yes +$X=getX(chkIngameAllying) +$Y=getBottom(chkStolenTech) + GAME_OPTION_ROW_SPACING + +[chkDestroyableBridges] +Text=Destroyable Bridges +CustomIniPath=INI/Game Options/DestroyableBridges.ini +Checked=True +Location=1038,86 +ToolTip=Allow bridges to be destroyed by conventional weapons & force firing. +Reversed=yes +$X=getX(chkIngameAllying) +$Y=getBottom(chkNavalCombat) + GAME_OPTION_ROW_SPACING + +[chkBrutalAI] +Text=Brutal AI +CustomIniPath=INI/Game Options/BrutalAI.ini +Checked=False +Location=1038,107 +ToolTip=Makes the AI harder across all levels. +$X=getX(chkIngameAllying) +$Y=getBottom(chkDestroyableBridges) + GAME_OPTION_ROW_SPACING + +[chkNoSpawnPreview] +Text=No Spawn Previews +CustomIniPath=INI/Game Options/NoSpawnPreview.ini +Checked=True +Location=1038,128 +ToolTip=Do not display players' starting locations in loading screen map preview. +$X=getX(chkIngameAllying) +$Y=getBottom(chkBrutalAI) + GAME_OPTION_ROW_SPACING + + +;============================ +; Dropdowns +;============================ + +[lblCredits] +Text=Credits: +$Height=DEFAULT_LBL_HEIGHT +$X=getX(cmbCredits) +$Y=getY(cmbCredits) - LABEL_SPACING - DEFAULT_LBL_HEIGHT + +[cmbCredits] +OptionName=Starting Credits +Items=50000,45000,40000,35000,30000,25000,20000,15000,10000 +DefaultIndex=7 +SpawnIniOption=Credits +DataWriteMode=String +ToolTip=Changes how many credits players start with. +$Width=GAME_OPTION_DD_WIDTH +$Height=GAME_OPTION_DD_HEIGHT +$X=EMPTY_SPACE_SIDES +$Y=getHeight($ParentControl) - (getHeight($Self) + EMPTY_SPACE_BOTTOM) + +[lblGameSpeedCap] +Text=Game Speed: +$Height=DEFAULT_LBL_HEIGHT +$X=getX(cmbGameSpeedCapPlaceholder) +$Y=getY(cmbGameSpeedCapPlaceholder) - LABEL_SPACING - DEFAULT_LBL_HEIGHT + +[cmbGameSpeedCapPlaceholder] +Visible=false +Enabled=false +$Width=GAME_OPTION_DD_WIDTH +$Height=GAME_OPTION_DD_HEIGHT +$X=getX(cmbCredits) +$Y=getY(lblCredits) - LOBBY_PANEL_SPACING - GAME_OPTION_DD_HEIGHT + +; not actually a control in this file, used for inheritance +[cmbGameSpeedCap] +OptionName=Game Speed +; Items= ... +DefaultIndex=2 +SpawnIniOption=GameSpeed +DataWriteMode=Index +ToolTip=Changes game speed cap. +$Width=getWidth(cmbGameSpeedCapPlaceholder) +$Height=getHeight(cmbGameSpeedCapPlaceholder) +$X=getX(cmbGameSpeedCapPlaceholder) +$Y=getY(cmbGameSpeedCapPlaceholder) + +[lblTechLevel] +Text=Tech Level: +$X=getX(cmbTechLevel) +$Y=getY(cmbTechLevel) - LABEL_SPACING - DEFAULT_LBL_HEIGHT +Enabled=no +Visible=no + +[cmbTechLevel] +OptionName=Tech Level +Items=10,9,8,7,6,5,4,3,2,1 +DefaultIndex=0 +SpawnIniOption=TechLevel +DataWriteMode=String +ToolTip=Changes maximum tech level for all players. +$Width=GAME_OPTION_DD_WIDTH +$Height=GAME_OPTION_DD_HEIGHT +$X=EMPTY_SPACE_SIDES + GAME_OPTION_COLUMN_SPACING +$Y=getY(cmbCredits) +Enabled=no +Visible=no + +[lblStartingUnits] +Text=Starting Units: +$X=getX(cmbStartingUnits) +$Y=getY(cmbStartingUnits) - LABEL_SPACING - DEFAULT_LBL_HEIGHT + +[cmbStartingUnits] +OptionName=Starting Units +Items=10,9,8,7,6,5,4,3,2,1,0 +DefaultIndex=10 +SpawnIniOption=UnitCount +DataWriteMode=String +ToolTip=Changes how many infantry units players start with. +$Width=GAME_OPTION_DD_WIDTH +$Height=GAME_OPTION_DD_HEIGHT +$X=getX(cmbTechLevel) +$Y=getY(lblTechLevel) - LOBBY_PANEL_SPACING - GAME_OPTION_DD_HEIGHT + +; Window Border Sides + +[panelBorderTop] +Location=0,-8 +BackgroundTexture=border-top.png +DrawMode=Stretched +Size=0,9 +FillWidth=0 + +[panelBorderBottom] +Location=0,999 +BackgroundTexture=border-bottom.png +DrawMode=Stretched +Size=0,9 +FillWidth=0 +DistanceFromBottomBorder=-8 + +[panelBorderLeft] +Location=-8,0 +BackgroundTexture=border-left.png +DrawMode=Stretched +Size=9,0 +FillHeight=0 + +[panelBorderRight] +Location=999,0 +BackgroundTexture=border-right.png +DrawMode=Stretched +Size=9,0 +FillHeight=0 +DistanceFromRightBorder=-8 + +; Window Border Corners + +[panelBorderCornerTL] +Location=-8,-8 +BackgroundTexture=border-corner-tl.png +Size=9,9 + +[panelBorderCornerTR] +Location=999,-8 +BackgroundTexture=border-corner-tr.png +Size=9,9 +DistanceFromRightBorder=-8 + +[panelBorderCornerBL] +Location=-8,999 +BackgroundTexture=border-corner-bl.png +Size=9,9 +DistanceFromBottomBorder=-8 + +[panelBorderCornerBR] +Location=999,999 +BackgroundTexture=border-corner-br.png +Size=9,9 +DistanceFromRightBorder=-8 +DistanceFromRightBorder=-8 +DistanceFromBottomBorder=-8 +``` + +# Edit `GameOptions.ini` +Move all game lobby options to `GameLobbyBase.ini`. + +# Rename old `MultiplayerGameLobby.ini` to something else and create new `MultiplayerGameLobby.ini` +```ini +[INISystem] +BasedOn=GameLobbyBase.ini + +[MultiplayerGameLobby] +$BaseSection=GameLobbyBase +PlayerOptionLocationX=36 +PlayerOptionLocationY=25 ; def=24 +PlayerOptionVerticalMargin=9 ; def=12 +PlayerOptionHorizontalMargin=5 ; def=3 +PlayerOptionCaptionLocationY=6 ; def=6 +PlayerStatusIndicatorX=8 +PlayerStatusIndicatorY=0 +PlayerNameWidth=135 ; def=136 +SideWidth=110 ; def=91 +ColorWidth=80 ; def=79 +StartWidth=45 ; def=49 +TeamWidth=35 ; def=46 + +; controls +$CCMP00=btnLockGame:XNAClientButton +$CCMP01=chkAutoReady:XNAClientCheckBox + +[lbMapList] +$Height=291 + +[btnPickRandomMap] +$Y=getBottom(lbMapList) + LOBBY_PANEL_SPACING + +[tbMapSearch] +$X=getRight(btnPickRandomMap) + LOBBY_PANEL_SPACING +$Y=getY(btnPickRandomMap) + +[lbChatMessagesBase] +SolidColorBackgroundTexture=0,0,0,128 +$Width=getWidth(lbMapList) +$X=LOBBY_EMPTY_SPACE_SIDES + +[lbChatMessages_Host] +$BaseSection=lbChatMessagesBase +$Y=getBottom(btnPickRandomMap) + LOBBY_PANEL_SPACING +$Height=getBottom(MapPreviewBox) - (getBottom(btnPickRandomMap) + LOBBY_PANEL_SPACING) + +[lbChatMessages_Player] +$BaseSection=lbChatMessagesBase +$Y=EMPTY_SPACE_TOP +$Height=getBottom(MapPreviewBox) - (getY($Self) + +[tbChatInputBase] +Suggestion=Type here to chat... +$Width=getWidth(lbMapList) +$Height=DEFAULT_CONTROL_HEIGHT +$X=LOBBY_EMPTY_SPACE_SIDES +$Y=getBottom(MapPreviewBox) + LOBBY_PANEL_SPACING + +[tbChatInput_Host] +$BaseSection=tbChatInputBase + +[tbChatInput_Player] +$BaseSection=tbChatInputBase + +[btnLockGame] +$Width=BUTTON_WIDTH_133 +$Height=DEFAULT_BUTTON_HEIGHT +$X=getRight(btnLaunchGame) + LOBBY_PANEL_SPACING +$Y=getY(btnLaunchGame) + +[chkAutoReady] +Text=Auto-Ready +$X=getRight(btnLaunchGame) + LOBBY_PANEL_SPACING +$Y=getY(btnLaunchGame) + 2 +Enabled=true +Visible=true + +[GameOptionsPanel] +$CC-GODD03=cmbGameSpeedCapMultiplayer:GameLobbyDropDown + +[cmbGameSpeedCapMultiplayer] +$BaseSection=cmbGameSpeedCap +Items=Fastest (60 FPS),Faster (45 FPS),Fast (30 FPS),Medium (20 FPS),Slow (15 FPS),Slower (12 FPS),Slowest (10 FPS) +``` + +# Create `CnCNetGameLobby.ini` +```ini +[INISystem] +BasedOn=MultiplayerGameLobby.ini + +[MultiplayerGameLobby] +$CCMP99=btnChangeTunnel:XNAClientButton + +[btnChangeTunnel] +Text=Change Tunnel +$Width=BUTTON_WIDTH_133 +$Height=DEFAULT_BUTTON_HEIGHT +$X=getX(btnLeaveGame) - getWidth($Self) - LOBBY_PANEL_SPACING +$Y=getY(btnLeaveGame) +``` + +# Create `LANGameLobby.ini` +```ini +[INISystem] +BasedOn=MultiplayerGameLobby.ini +``` + +# Edit `CnCNetLobby.ini` +Add these sections: +```ini +[btnGameSortAlpha] +Location=12,12 + +[btnGameFilterOptions] +Location=43,12 +``` + +# Edit `GenericWindow.ini` +Replace `[SkirmishLobby]` and `[MultiplayerGameLobby]` sections with this: +```ini +[GameLobbyBase] +BackgroundTexture=gamelobbybg.png +DrawBorders=true +Size=1230,750 +``` + +# Edit `GlobalThemeSettings.ini` +Add this section: +```ini +[ParserConstants] +DEFAULT_LBL_HEIGHT=12 +DEFAULT_CONTROL_HEIGHT=21 +DEFAULT_BUTTON_HEIGHT=23 + +BUTTON_WIDTH_133=133 + +OPEN_BUTTON_WIDTH=18 +OPEN_BUTTON_HEIGHT=22 ;18 + +EMPTY_SPACE_TOP=12 +EMPTY_SPACE_BOTTOM=12 +EMPTY_SPACE_SIDES=12 +BUTTON_SPACING=12 +LABEL_SPACING=6 +CHECKBOX_SPACING=24 + +LOBBY_EMPTY_SPACE_SIDES=12 +LOBBY_PANEL_SPACING=10 + +GAME_OPTION_COLUMN_SPACING=160 +GAME_OPTION_ROW_SPACING=6 +GAME_OPTION_DD_WIDTH=132 +GAME_OPTION_DD_HEIGHT=22 +``` + +# Create `ManualUpdateQueryWindow.ini` +```ini +[INISystem] +BasedOn=GenericWindow.ini + +[btnClose] +Location=176,110 +``` + +# Edit `OptionsWindow.ini` +1. **OPTIONAL?** Add sections: +```ini +[DisplayOptionsPanelExtraControls] +0=chkMEDDraw:FileSettingCheckBox + +[chkMEDDraw] +Location=285,147 +Text=Enable DDWrapper for map editor +ToolTip=Enables DirectDraw wrapper & emulation for map editor.@Turning this option on can help if you are encountering problems with editor viewport not displaying or being laggy. +EnabledFile0=Resources/Compatibility/DLL/ddwrapper.dll,Map Editor/ddraw32.dll,OverwriteOnMismatch +EnabledFile1=Resources/Compatibility/Configs/aqrit.cfg,Map Editor/aqrit.cfg,KeepChanges +DefaultValue=false +SettingSection=Video +SettingKey=UseDDWrapperForMapEditor +``` + +2. **OPTIONAL** Add sections: +```ini +[GameOptionsPanelExtraControls] +; Enable if using Phobos +;0=chkTooltipsExtra:SettingCheckBox +;1=chkPrioritySelection:SettingCheckBox +;2=chkBuildingPlacement:SettingCheckBox + +[chkTooltipsExtra] +Location=24,151, ;12,151 +Text=Sidebar Tooltip Descriptions +ToolTip=Enables additional information in sidebar tooltips. +DefaultValue=true +ParentCheckBoxName=chkTooltips +ParentCheckBoxRequiredValue=true +SettingSection=Phobos +SettingKey=ToolTipDescriptions + +[chkPrioritySelection] +Location=242,54 +Text=Mass Selection Filtering +ToolTip=If enabled, non-combat units are not selected if mass-selecting together with combat units. +DefaultValue=false +SettingSection=Phobos +SettingKey=PrioritySelectionFiltering + +[chkBuildingPlacement] +Location=242,78 +Text=Show Building Placement Preview +ToolTip=If enabled, shows a preview image of the building when placing it. +DefaultValue=false +SettingSection=Phobos +SettingKey=ShowBuildingPlacementPreview +``` + +3. **OPTIONAL?** Add sections: +```ini +[lblPlayerName] +Location=12,195 + +[tbPlayerName] +Location=113,193 + +[lblNotice] +Location=12,220 + +[btnConfigureHotkeys] +Location=12,290 +``` + +4. Add sections: +```ini +[chkDisablePrivateMessagePopup] +Location=12,138 +Text=Disable private message pop-ups + +[chkAllowGameInvitesFromFriendsOnly] +Location=276,68 +Text=Only receive game invitations@from friends + +[lblAllPrivateMessagesFrom] +Location=276,138 + +[ddAllowPrivateMessagesFrom] +Location=470,137 + +[gameListPanel] +Location=0,200 +``` + +# Create new `PlayerExtraOptionsPanel.ini` +```ini +[btnClose] +Location=220,0 +Size=18,18 + +[lblHeader] +Location=12,6 + +[chkBoxForceRandomSides] +Location=12,28 + +[chkBoxForceRandomColors] +Location=12,50 + +[chkBoxForceRandomTeams] +Location=12,72 + +[chkBoxForceRandomStarts] +Location=12,94 + +[chkBoxUseTeamStartMappings] +Location=12,130 + +[btnHelp] +Location=160,130 + +[lblPreset] +Location=12,156 + +[ddTeamStartMappingPreset] +Size=157,21 +Location=65,154 + +[teamStartMappingsPanel] +Location=12,189 +``` + +# Add new assets +Everything goes into theme directory: +- `favActive.png` and `favInactive.png`, 21x21 +- `optionsButton.png`, `optionsButton_c.png`, `optionsButtonActive.png`, `optionsButtonActive_c.png`, `optionsButtonClose.png` and `optionsButtonClose_c.png`, 18x18 +- `questionMark.png` and `questionMark_c.png`, 18x18 +- `sortAlphaAsc.png`, `sortAlphaDesc.png` and `sortAlphaNone.png`, 21x21 +- `statusAI.png`, `statusClear.png`, `statusEmpty.png`, `statusError.png`, `statusInProgress.png`, `statusOk.png`, `statusUnavailable.png`, `statusWarning.png`, 21x21 From e030eed08d6605af2269b5cb5b2809d3592cd786 Mon Sep 17 00:00:00 2001 From: MortonPL Date: Sat, 26 Aug 2023 21:55:08 +0200 Subject: [PATCH 02/18] Update Migration-INI.md --- Docs/Migration-INI.md | 65 +++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 30 deletions(-) diff --git a/Docs/Migration-INI.md b/Docs/Migration-INI.md index 474fd8903..77c12c87d 100644 --- a/Docs/Migration-INI.md +++ b/Docs/Migration-INI.md @@ -1,20 +1,22 @@ # Migrating to client 7 +This guide uses [YR mod base](https://github.com/Starkku/cncnet-client-mod-base) configuration as an example. The majority of changes also applies to to non-YR client configurations. + It is **highly recommended** to make a complete backup of your mod before starting. ## Replace binary files 1. Replace contents of `Resources/Binaries` and `Resources/Compatibility` with new files. -2. Replace your launcher executable in root directory (whetever it's called, YRLauncher, MentalOmegaLauncher, etc.). +2. Replace your launcher executable in root directory (whetever it's called, `YRLauncher.exe`, `MentalOmegaLauncher.exe`, etc.). ## Edit `ClientDefinitions.ini` -1. Add `[Settings]UnixLauncherExe=YRLauncher.sh` -2. Create `YRLauncher.sh` in root directory: +1. Add `[Settings]->UnixLauncherExe=Launcher.sh` (script file name can be anything) +2. Create `Launcher.sh` in root directory: ```sh #!/bin/sh cd "$(dirname "$0")" dotnet Resources/Binaries/UniversalGL/clientogl.dll "$@" ``` -3. Add these entries in `[Settings]` (fill with whatever you want): +3. Add these entries in `[Settings]` (fill with your required/forbidden mod files): ```ini ; Comma-separated list of files required to run the game / mod that are not included in the installation. RequiredFiles= @@ -23,7 +25,7 @@ ForbiddenFiles= ``` ## Edit `SkirmishLobby.ini` -1. Change `[INISystem]BasedOn` from `MultiplayerGameLobby.ini` to `GameLobbyBase.ini`. +1. Change `[INISystem]->BasedOn` from `MultiplayerGameLobby.ini` to `GameLobbyBase.ini`. 2. Add `$BaseSection=GameLobbyBase` to `[SkirmishLobby]` 3. Remove `[lbMapList]` section 4. Add these two sections: @@ -35,7 +37,13 @@ $CC-GODD03=cmbGameSpeedCapSkirmish:GameLobbyDropDown $BaseSection=cmbGameSpeedCap Items=Fastest (MAX),Faster (60 FPS),Fast (30 FPS),Medium (20 FPS),Slow (15 FPS),Slower (12 FPS),Slowest (10 FPS) ``` + ## Add `GameLobbyBase.ini` + +This file is the base layout of all game lobbies (skirmish, LAN, CnCNet). **Game options have been moved from `GameOptions.ini` to this file**. +To add controls in the game options panel, add `$CC-GO` prefixed list entries in `[GameOptionsPanel]`, then create their own sections. +See example configuration below. + ```ini [INISystem] BasedOn=GenericWindow.ini @@ -528,10 +536,10 @@ DistanceFromRightBorder=-8 DistanceFromBottomBorder=-8 ``` -# Edit `GameOptions.ini` -Move all game lobby options to `GameLobbyBase.ini`. +## Edit `GameOptions.ini` +After adding all game lobby options to `GameLobbyBase.ini`, remove them here. -# Rename old `MultiplayerGameLobby.ini` to something else and create new `MultiplayerGameLobby.ini` +## Rename/Remove old `MultiplayerGameLobby.ini` and create new `MultiplayerGameLobby.ini` ```ini [INISystem] BasedOn=GameLobbyBase.ini @@ -614,7 +622,7 @@ $BaseSection=cmbGameSpeedCap Items=Fastest (60 FPS),Faster (45 FPS),Fast (30 FPS),Medium (20 FPS),Slow (15 FPS),Slower (12 FPS),Slowest (10 FPS) ``` -# Create `CnCNetGameLobby.ini` +## Create `CnCNetGameLobby.ini` ```ini [INISystem] BasedOn=MultiplayerGameLobby.ini @@ -630,13 +638,13 @@ $X=getX(btnLeaveGame) - getWidth($Self) - LOBBY_PANEL_SPACING $Y=getY(btnLeaveGame) ``` -# Create `LANGameLobby.ini` +## Create `LANGameLobby.ini` ```ini [INISystem] BasedOn=MultiplayerGameLobby.ini ``` -# Edit `CnCNetLobby.ini` +## Edit `CnCNetLobby.ini` Add these sections: ```ini [btnGameSortAlpha] @@ -646,7 +654,7 @@ Location=12,12 Location=43,12 ``` -# Edit `GenericWindow.ini` +## Edit `GenericWindow.ini` Replace `[SkirmishLobby]` and `[MultiplayerGameLobby]` sections with this: ```ini [GameLobbyBase] @@ -655,8 +663,8 @@ DrawBorders=true Size=1230,750 ``` -# Edit `GlobalThemeSettings.ini` -Add this section: +## Edit `GlobalThemeSettings.ini` +Add this section (**Without this section, the client will crash with new `GameLobbyBase.ini`**): ```ini [ParserConstants] DEFAULT_LBL_HEIGHT=12 @@ -684,7 +692,7 @@ GAME_OPTION_DD_WIDTH=132 GAME_OPTION_DD_HEIGHT=22 ``` -# Create `ManualUpdateQueryWindow.ini` +## Create `ManualUpdateQueryWindow.ini` ```ini [INISystem] BasedOn=GenericWindow.ini @@ -693,8 +701,8 @@ BasedOn=GenericWindow.ini Location=176,110 ``` -# Edit `OptionsWindow.ini` -1. **OPTIONAL?** Add sections: +## Edit `OptionsWindow.ini` +1. **OPTIONAL** Add sections: ```ini [DisplayOptionsPanelExtraControls] 0=chkMEDDraw:FileSettingCheckBox @@ -710,7 +718,7 @@ SettingSection=Video SettingKey=UseDDWrapperForMapEditor ``` -2. **OPTIONAL** Add sections: +2. **OPTIONAL (YR)** Add sections: ```ini [GameOptionsPanelExtraControls] ; Enable if using Phobos @@ -745,7 +753,7 @@ SettingSection=Phobos SettingKey=ShowBuildingPlacementPreview ``` -3. **OPTIONAL?** Add sections: +3. Add sections: ```ini [lblPlayerName] Location=12,195 @@ -758,10 +766,7 @@ Location=12,220 [btnConfigureHotkeys] Location=12,290 -``` -4. Add sections: -```ini [chkDisablePrivateMessagePopup] Location=12,138 Text=Disable private message pop-ups @@ -780,7 +785,7 @@ Location=470,137 Location=0,200 ``` -# Create new `PlayerExtraOptionsPanel.ini` +## Create new `PlayerExtraOptionsPanel.ini` ```ini [btnClose] Location=220,0 @@ -818,10 +823,10 @@ Location=65,154 Location=12,189 ``` -# Add new assets -Everything goes into theme directory: -- `favActive.png` and `favInactive.png`, 21x21 -- `optionsButton.png`, `optionsButton_c.png`, `optionsButtonActive.png`, `optionsButtonActive_c.png`, `optionsButtonClose.png` and `optionsButtonClose_c.png`, 18x18 -- `questionMark.png` and `questionMark_c.png`, 18x18 -- `sortAlphaAsc.png`, `sortAlphaDesc.png` and `sortAlphaNone.png`, 21x21 -- `statusAI.png`, `statusClear.png`, `statusEmpty.png`, `statusError.png`, `statusInProgress.png`, `statusOk.png`, `statusUnavailable.png`, `statusWarning.png`, 21x21 +## Add new assets +Every file here can be either in `Resources` or in theme directories: +- `favActive.png` and `favInactive.png`, 21x21 pixels +- `optionsButton.png`, `optionsButton_c.png`, `optionsButtonActive.png`, `optionsButtonActive_c.png`, `optionsButtonClose.png` and `optionsButtonClose_c.png`, 18x18 pixels +- `questionMark.png` and `questionMark_c.png`, 18x18 pixels +- `sortAlphaAsc.png`, `sortAlphaDesc.png` and `sortAlphaNone.png`, 21x21 pixels +- `statusAI.png`, `statusClear.png`, `statusEmpty.png`, `statusError.png`, `statusInProgress.png`, `statusOk.png`, `statusUnavailable.png`, `statusWarning.png`, 21x21 pixels From 50008758c2d9bf6d9afba9de1ac54228eded13b6 Mon Sep 17 00:00:00 2001 From: MortonPL Date: Sat, 26 Aug 2023 22:00:07 +0200 Subject: [PATCH 03/18] Add mention in the main migration guide --- Docs/Migration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/Migration.md b/Docs/Migration.md index 4734fed6c..5ad4a7f6d 100644 --- a/Docs/Migration.md +++ b/Docs/Migration.md @@ -26,7 +26,7 @@ Migrating from older versions DrawBorders=false ``` -- The [Tiberian Sun Client v6 Changes](https://github.com/CnCNet/xna-cncnet-client/pull/275) breaks compatibility. You need to reimplement the ini files for `SkirmishLobby`, `LANLobby`, and `CnCNetLobby` with the new `INItializableWindow` format. Also, add the `[$ExtraControls]` section in `GenericWindow.ini` file if you rely on `[ExtraControls]`. Define constants in `[ParserConstants]` section in `DTACnCNetClient.ini` file, which might be used from the `INItializableWindow` configuration. +- The [Tiberian Sun Client v6 Changes](https://github.com/CnCNet/xna-cncnet-client/pull/275) breaks compatibility. You need to reimplement the ini files for `SkirmishLobby`, `LANLobby`, and `CnCNetLobby` with the new `INItializableWindow` format. Also, add the `[$ExtraControls]` section in `GenericWindow.ini` file if you rely on `[ExtraControls]`. Define constants in `[ParserConstants]` section in `DTACnCNetClient.ini` file, which might be used from the `INItializableWindow` configuration. See [this guide](/Docs/Migration-INI.md) for details. - The new [player status indicators feature](https://github.com/CnCNet/xna-cncnet-client/pull/251) replaces the old "player is ready" indicators in game lobby. This requires: - renaming `PlayerReadyBox*` tags into `PlayerStatusIndicator*` (which now have default values of `0` and `0` instead of `7` and `4` for `X` and `Y` respectively); From 09f2e0bae9f6d286ed6cdaa45cc960c2f9b46136 Mon Sep 17 00:00:00 2001 From: MortonPL Date: Sat, 26 Aug 2023 22:11:13 +0200 Subject: [PATCH 04/18] Update Migration-INI.md --- Docs/Migration-INI.md | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/Docs/Migration-INI.md b/Docs/Migration-INI.md index 77c12c87d..97e673283 100644 --- a/Docs/Migration-INI.md +++ b/Docs/Migration-INI.md @@ -1,12 +1,8 @@ -# Migrating to client 7 +# Migrating from older versions - INI configuration This guide uses [YR mod base](https://github.com/Starkku/cncnet-client-mod-base) configuration as an example. The majority of changes also applies to to non-YR client configurations. It is **highly recommended** to make a complete backup of your mod before starting. -## Replace binary files -1. Replace contents of `Resources/Binaries` and `Resources/Compatibility` with new files. -2. Replace your launcher executable in root directory (whetever it's called, `YRLauncher.exe`, `MentalOmegaLauncher.exe`, etc.). - ## Edit `ClientDefinitions.ini` 1. Add `[Settings]->UnixLauncherExe=Launcher.sh` (script file name can be anything) 2. Create `Launcher.sh` in root directory: @@ -823,7 +819,33 @@ Location=65,154 Location=12,189 ``` -## Add new assets +## Appendix + +For completion's sake, below are additional steps required for a complete migration (beyond INIs). + +### Replace binary files + +1. Replace contents of `Resources/Binaries` and `Resources/Compatibility` with new files. +2. Replace your launcher executable in root directory (whetever it's called, `YRLauncher.exe`, `MentalOmegaLauncher.exe`, etc.). +3. Remove `Resources/clientdx.exe`, `Resources/clientxna.exe` and `Resources/clientogl.exe`. In their place create these scripts (replace `YRLanucher.exe` inside with your main client executable name): +`Resources/clientdx.bat`: +``` +cd .. +YRLauncher.exe -DX +``` +`Resources/clientogl.bat`: +``` +cd .. +YRLauncher.exe -OGL +``` +`Resources/clientxna.bat`: +``` +cd .. +YRLauncher.exe -XNA +``` + +### Add new assets + Every file here can be either in `Resources` or in theme directories: - `favActive.png` and `favInactive.png`, 21x21 pixels - `optionsButton.png`, `optionsButton_c.png`, `optionsButtonActive.png`, `optionsButtonActive_c.png`, `optionsButtonClose.png` and `optionsButtonClose_c.png`, 18x18 pixels From 7d895fb9696e01a9fa5f92c99151036237fe0341 Mon Sep 17 00:00:00 2001 From: MortonPL Date: Wed, 28 Feb 2024 15:41:22 +0100 Subject: [PATCH 05/18] Add extra empty lines between headers and code blocks --- Docs/Migration-INI.md | 57 ++++++++++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 14 deletions(-) diff --git a/Docs/Migration-INI.md b/Docs/Migration-INI.md index 97e673283..7d1226c1e 100644 --- a/Docs/Migration-INI.md +++ b/Docs/Migration-INI.md @@ -1,18 +1,23 @@ # Migrating from older versions - INI configuration + This guide uses [YR mod base](https://github.com/Starkku/cncnet-client-mod-base) configuration as an example. The majority of changes also applies to to non-YR client configurations. It is **highly recommended** to make a complete backup of your mod before starting. ## Edit `ClientDefinitions.ini` + 1. Add `[Settings]->UnixLauncherExe=Launcher.sh` (script file name can be anything) 2. Create `Launcher.sh` in root directory: + ```sh #!/bin/sh cd "$(dirname "$0")" dotnet Resources/Binaries/UniversalGL/clientogl.dll "$@" ``` + 3. Add these entries in `[Settings]` (fill with your required/forbidden mod files): + ```ini ; Comma-separated list of files required to run the game / mod that are not included in the installation. RequiredFiles= @@ -21,10 +26,12 @@ ForbiddenFiles= ``` ## Edit `SkirmishLobby.ini` -1. Change `[INISystem]->BasedOn` from `MultiplayerGameLobby.ini` to `GameLobbyBase.ini`. + +1. Change `[INISystem]->BasedOn` from `MultiplayerGameLobby.ini` to `GameLobbyBase.ini` 2. Add `$BaseSection=GameLobbyBase` to `[SkirmishLobby]` 3. Remove `[lbMapList]` section 4. Add these two sections: + ```ini [GameOptionsPanel] $CC-GODD03=cmbGameSpeedCapSkirmish:GameLobbyDropDown @@ -45,16 +52,16 @@ See example configuration below. BasedOn=GenericWindow.ini [GameLobbyBase] -PlayerOptionLocationX=12 ; def=25 -PlayerOptionLocationY=25 ; def=24 -PlayerOptionVerticalMargin=9 ; def=12 -PlayerOptionHorizontalMargin=5 ; def=3 +PlayerOptionLocationX=12 ; def=25 +PlayerOptionLocationY=25 ; def=24 +PlayerOptionVerticalMargin=9 ; def=12 +PlayerOptionHorizontalMargin=5 ; def=3 PlayerOptionCaptionLocationY=6 ; def=6 PlayerNameWidth=127 ; def=136 -SideWidth=120 ; def=91 -ColorWidth=80 ; def=79 -StartWidth=50 ; def=49 -TeamWidth=50 ; def=46 +SideWidth=120 ; def=91 +ColorWidth=80 ; def=79 +StartWidth=50 ; def=49 +TeamWidth=50 ; def=46 ; controls $CC00=btnLaunchGame:GameLaunchButton @@ -208,7 +215,7 @@ $Y=getY(btnLaunchGame) [PlayerOptionsPanel] $X=getX(MapPreviewBox) $Y=EMPTY_SPACE_TOP -$Width=getWidth($ParentControl) - (getX($Self) + (getWidth(GameOptionsPanel) + LOBBY_EMPTY_SPACE_SIDES + LOBBY_PANEL_SPACING) +$Width=getWidth($ParentControl) - (getX($Self) + (getWidth(GameOptionsPanel) + LOBBY_EMPTY_SPACE_SIDES + LOBBY_PANEL_SPACING)) $Height=getHeight(GameOptionsPanel) SolidColorBackgroundTexture=0,0,0,128 @@ -533,9 +540,11 @@ DistanceFromBottomBorder=-8 ``` ## Edit `GameOptions.ini` + After adding all game lobby options to `GameLobbyBase.ini`, remove them here. ## Rename/Remove old `MultiplayerGameLobby.ini` and create new `MultiplayerGameLobby.ini` + ```ini [INISystem] BasedOn=GameLobbyBase.ini @@ -582,7 +591,7 @@ $Height=getBottom(MapPreviewBox) - (getBottom(btnPickRandomMap) + LOBBY_PANEL_SP [lbChatMessages_Player] $BaseSection=lbChatMessagesBase $Y=EMPTY_SPACE_TOP -$Height=getBottom(MapPreviewBox) - (getY($Self) +$Height=getBottom(MapPreviewBox) - getY($Self) [tbChatInputBase] Suggestion=Type here to chat... @@ -619,6 +628,7 @@ Items=Fastest (60 FPS),Faster (45 FPS),Fast (30 FPS),Medium (20 FPS),Slow (15 FP ``` ## Create `CnCNetGameLobby.ini` + ```ini [INISystem] BasedOn=MultiplayerGameLobby.ini @@ -635,13 +645,16 @@ $Y=getY(btnLeaveGame) ``` ## Create `LANGameLobby.ini` + ```ini [INISystem] BasedOn=MultiplayerGameLobby.ini ``` ## Edit `CnCNetLobby.ini` + Add these sections: + ```ini [btnGameSortAlpha] Location=12,12 @@ -651,7 +664,9 @@ Location=43,12 ``` ## Edit `GenericWindow.ini` + Replace `[SkirmishLobby]` and `[MultiplayerGameLobby]` sections with this: + ```ini [GameLobbyBase] BackgroundTexture=gamelobbybg.png @@ -660,7 +675,9 @@ Size=1230,750 ``` ## Edit `GlobalThemeSettings.ini` + Add this section (**Without this section, the client will crash with new `GameLobbyBase.ini`**): + ```ini [ParserConstants] DEFAULT_LBL_HEIGHT=12 @@ -689,6 +706,7 @@ GAME_OPTION_DD_HEIGHT=22 ``` ## Create `ManualUpdateQueryWindow.ini` + ```ini [INISystem] BasedOn=GenericWindow.ini @@ -698,7 +716,9 @@ Location=176,110 ``` ## Edit `OptionsWindow.ini` + 1. **OPTIONAL** Add sections: + ```ini [DisplayOptionsPanelExtraControls] 0=chkMEDDraw:FileSettingCheckBox @@ -715,6 +735,7 @@ SettingKey=UseDDWrapperForMapEditor ``` 2. **OPTIONAL (YR)** Add sections: + ```ini [GameOptionsPanelExtraControls] ; Enable if using Phobos @@ -750,6 +771,7 @@ SettingKey=ShowBuildingPlacementPreview ``` 3. Add sections: + ```ini [lblPlayerName] Location=12,195 @@ -782,6 +804,7 @@ Location=0,200 ``` ## Create new `PlayerExtraOptionsPanel.ini` + ```ini [btnClose] Location=220,0 @@ -829,17 +852,22 @@ For completion's sake, below are additional steps required for a complete migrat 2. Replace your launcher executable in root directory (whetever it's called, `YRLauncher.exe`, `MentalOmegaLauncher.exe`, etc.). 3. Remove `Resources/clientdx.exe`, `Resources/clientxna.exe` and `Resources/clientogl.exe`. In their place create these scripts (replace `YRLanucher.exe` inside with your main client executable name): `Resources/clientdx.bat`: -``` + +```sh cd .. YRLauncher.exe -DX ``` + `Resources/clientogl.bat`: -``` + +```sh cd .. YRLauncher.exe -OGL ``` + `Resources/clientxna.bat`: -``` + +```sh cd .. YRLauncher.exe -XNA ``` @@ -847,6 +875,7 @@ YRLauncher.exe -XNA ### Add new assets Every file here can be either in `Resources` or in theme directories: + - `favActive.png` and `favInactive.png`, 21x21 pixels - `optionsButton.png`, `optionsButton_c.png`, `optionsButtonActive.png`, `optionsButtonActive_c.png`, `optionsButtonClose.png` and `optionsButtonClose_c.png`, 18x18 pixels - `questionMark.png` and `questionMark_c.png`, 18x18 pixels From 9b5da7647ac4e8d9737fa640617e352a85ce2f99 Mon Sep 17 00:00:00 2001 From: MortonPL Date: Wed, 28 Feb 2024 16:53:32 +0100 Subject: [PATCH 06/18] Reference a specific mod base commit, revert .NET 7 changes --- Docs/Migration-INI.md | 41 ++++++++++++++--------------------------- 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/Docs/Migration-INI.md b/Docs/Migration-INI.md index 7d1226c1e..037596e38 100644 --- a/Docs/Migration-INI.md +++ b/Docs/Migration-INI.md @@ -1,8 +1,10 @@ # Migrating from older versions - INI configuration -This guide uses [YR mod base](https://github.com/Starkku/cncnet-client-mod-base) configuration as an example. The majority of changes also applies to to non-YR client configurations. +Migrating to client version [2.7][client]. -It is **highly recommended** to make a complete backup of your mod before starting. +This guide uses [YR mod base][mod_base] (commit `34efc04`) configuration as an example. The majority of changes also applies to non-YR client configurations. + +It is **highly recommended** to make a complete backup of your game/mod before starting. ## Edit `ClientDefinitions.ini` @@ -16,7 +18,7 @@ cd "$(dirname "$0")" dotnet Resources/Binaries/UniversalGL/clientogl.dll "$@" ``` -3. Add these entries in `[Settings]` (fill with your required/forbidden mod files): +3. **OPTIONAL** Add these entries in `[Settings]` (fill with your required/forbidden mod files): ```ini ; Comma-separated list of files required to run the game / mod that are not included in the installation. @@ -844,40 +846,25 @@ Location=12,189 ## Appendix -For completion's sake, below are additional steps required for a complete migration (beyond INIs). +For completion's sake, below are additional steps required for a complete migration (beyond INIs) to client version [2.7][client]. ### Replace binary files 1. Replace contents of `Resources/Binaries` and `Resources/Compatibility` with new files. -2. Replace your launcher executable in root directory (whetever it's called, `YRLauncher.exe`, `MentalOmegaLauncher.exe`, etc.). -3. Remove `Resources/clientdx.exe`, `Resources/clientxna.exe` and `Resources/clientogl.exe`. In their place create these scripts (replace `YRLanucher.exe` inside with your main client executable name): -`Resources/clientdx.bat`: - -```sh -cd .. -YRLauncher.exe -DX -``` - -`Resources/clientogl.bat`: - -```sh -cd .. -YRLauncher.exe -OGL -``` - -`Resources/clientxna.bat`: - -```sh -cd .. -YRLauncher.exe -XNA -``` +2. Replace your launcher executable in root directory (whetever it's called, `YRLauncher.exe`, `MentalOmegaLauncher.exe`, etc.) with +version [2.0.7](https://github.com/CnCNet/dta-mg-client-launcher/releases/tag/v2.0.7). ### Add new assets -Every file here can be either in `Resources` or in theme directories: +Every file here can be placed either in `Resources` or in theme directories: - `favActive.png` and `favInactive.png`, 21x21 pixels - `optionsButton.png`, `optionsButton_c.png`, `optionsButtonActive.png`, `optionsButtonActive_c.png`, `optionsButtonClose.png` and `optionsButtonClose_c.png`, 18x18 pixels - `questionMark.png` and `questionMark_c.png`, 18x18 pixels - `sortAlphaAsc.png`, `sortAlphaDesc.png` and `sortAlphaNone.png`, 21x21 pixels - `statusAI.png`, `statusClear.png`, `statusEmpty.png`, `statusError.png`, `statusInProgress.png`, `statusOk.png`, `statusUnavailable.png`, `statusWarning.png`, 21x21 pixels + +You can find example assets in the [YR mod base][mod_base]. + +[client]: https://github.com/CnCNet/xna-cncnet-client/releases/tag/2.7 +[mod_base]: https://github.com/Starkku/cncnet-client-mod-base From 99794bbe7b58f0f342d581e7f058eaf4b96efe0b Mon Sep 17 00:00:00 2001 From: MortonPL Date: Wed, 28 Feb 2024 17:50:29 +0100 Subject: [PATCH 07/18] Make large code blocks collapsible, add more descriptions --- Docs/Migration-INI.md | 69 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 3 deletions(-) diff --git a/Docs/Migration-INI.md b/Docs/Migration-INI.md index 037596e38..40192b527 100644 --- a/Docs/Migration-INI.md +++ b/Docs/Migration-INI.md @@ -8,6 +8,8 @@ It is **highly recommended** to make a complete backup of your game/mod before s ## Edit `ClientDefinitions.ini` +The way the client is launched on Unix systems has changed. + 1. Add `[Settings]->UnixLauncherExe=Launcher.sh` (script file name can be anything) 2. Create `Launcher.sh` in root directory: @@ -29,6 +31,9 @@ ForbiddenFiles= ## Edit `SkirmishLobby.ini` +Skirmish game lobby used to be based on multiplayer game lobby. Now, skirmish and multiplayer lobbies share a new base layout instead. +Map list (`lbMapList`) has been moved to the base layout. Game speed dropdown (`cmbGameSpeedCapSkirmish`) has been moved here from `GameOptions.ini`. + 1. Change `[INISystem]->BasedOn` from `MultiplayerGameLobby.ini` to `GameLobbyBase.ini` 2. Add `$BaseSection=GameLobbyBase` to `[SkirmishLobby]` 3. Remove `[lbMapList]` section @@ -46,9 +51,11 @@ Items=Fastest (MAX),Faster (60 FPS),Fast (30 FPS),Medium (20 FPS),Slow (15 FPS), ## Add `GameLobbyBase.ini` This file is the base layout of all game lobbies (skirmish, LAN, CnCNet). **Game options have been moved from `GameOptions.ini` to this file**. -To add controls in the game options panel, add `$CC-GO` prefixed list entries in `[GameOptionsPanel]`, then create their own sections. See example configuration below. +
+Click to show file content + ```ini [INISystem] BasedOn=GenericWindow.ini @@ -541,12 +548,54 @@ DistanceFromRightBorder=-8 DistanceFromBottomBorder=-8 ``` +
+ +### Port custom game options + +If your game/mod has custom game options, you have to port them yourself. To add controls in the game options panel, add `$CC-GO` prefixed list entries in `[GameOptionsPanel]`, then create their own sections. In example: + +Before in `GameOptions.ini`: + +```ini +[MultiplayerGameLobby] +CheckBoxes=chkNewOption... + +[SkirmishLobby] +CheckBoxes=chkNewOption... + +[chkNewOption] +Text=My New Option +CustomIniPath=INI\Game Options\MyNewOption.ini +ToolTip=Enable this new option. +Checked=False +Location=1126,79 +``` + +After in `GameLobbyBase.ini`: + +```ini +[GameOptionsPanel] +$CC-GONEW=chkNewOption:GameLobbyCheckBox + +[chkNewOption] +Text=My New Option +CustomIniPath=INI/Game Options/MyNewOption.ini +ToolTip=Enable this new option. +Checked=False +Location=1126,79 ; $X and $Y are recommended instead +``` + ## Edit `GameOptions.ini` -After adding all game lobby options to `GameLobbyBase.ini`, remove them here. +After adding all game lobby options to `GameLobbyBase.ini`, remove them here, as well as `SkirmishGameLobby` and `MultiplayerGameLobby` sections. ## Rename/Remove old `MultiplayerGameLobby.ini` and create new `MultiplayerGameLobby.ini` +This file extends the game lobby base with multiplayer-specific controls, such as the chat box and lock and ready buttons. + +
+Click to show file content + ```ini [INISystem] BasedOn=GameLobbyBase.ini @@ -629,8 +678,12 @@ $BaseSection=cmbGameSpeedCap Items=Fastest (60 FPS),Faster (45 FPS),Fast (30 FPS),Medium (20 FPS),Slow (15 FPS),Slower (12 FPS),Slowest (10 FPS) ``` +
+ ## Create `CnCNetGameLobby.ini` +This file extends the multiplayer game lobby with CnCNet-specific controls, like the change tunnel button. + ```ini [INISystem] BasedOn=MultiplayerGameLobby.ini @@ -648,6 +701,8 @@ $Y=getY(btnLeaveGame) ## Create `LANGameLobby.ini` +This stub file can extend the multiplayer lobby with LAN-specifc controls. + ```ini [INISystem] BasedOn=MultiplayerGameLobby.ini @@ -655,6 +710,8 @@ BasedOn=MultiplayerGameLobby.ini ## Edit `CnCNetLobby.ini` +Two new buttons have been added to the CnCNet lobby: one for sorting game room list by name, and one for opening advanced filtering options panel. + Add these sections: ```ini @@ -678,7 +735,7 @@ Size=1230,750 ## Edit `GlobalThemeSettings.ini` -Add this section (**Without this section, the client will crash with new `GameLobbyBase.ini`**): +This file now also contains the `ParserConstants` section, which lists user-defined constants used for positioning controls within panels and windows. **Without this section, the client will crash with new `GameLobbyBase.ini` layout**. Add the following: ```ini [ParserConstants] @@ -709,6 +766,8 @@ GAME_OPTION_DD_HEIGHT=22 ## Create `ManualUpdateQueryWindow.ini` +It is now possible to force a manual query for game/mod updates, which displays a new window. + ```ini [INISystem] BasedOn=GenericWindow.ini @@ -719,6 +778,8 @@ Location=176,110 ## Edit `OptionsWindow.ini` +New checkboxes have been added in the options window. + 1. **OPTIONAL** Add sections: ```ini @@ -807,6 +868,8 @@ Location=0,200 ## Create new `PlayerExtraOptionsPanel.ini` +A new panel that allows for convenient match setup has been added in the game lobby. + ```ini [btnClose] Location=220,0 From dea90750b6614c3422ae1ff4d9d7f3980fbf6bb6 Mon Sep 17 00:00:00 2001 From: MortonPL Date: Thu, 29 Feb 2024 16:39:07 +0100 Subject: [PATCH 08/18] Refer to the new version as 2.11.0.0 --- Docs/Migration-INI.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Docs/Migration-INI.md b/Docs/Migration-INI.md index 40192b527..ea73e29be 100644 --- a/Docs/Migration-INI.md +++ b/Docs/Migration-INI.md @@ -1,6 +1,6 @@ # Migrating from older versions - INI configuration -Migrating to client version [2.7][client]. +Migrating to client version [2.11.0.0][client]. This guide uses [YR mod base][mod_base] (commit `34efc04`) configuration as an example. The majority of changes also applies to non-YR client configurations. @@ -909,7 +909,7 @@ Location=12,189 ## Appendix -For completion's sake, below are additional steps required for a complete migration (beyond INIs) to client version [2.7][client]. +For completion's sake, below are additional steps required for a complete migration (beyond INIs) to client version [2.11.0.0][client]. ### Replace binary files @@ -929,5 +929,5 @@ Every file here can be placed either in `Resources` or in theme directories: You can find example assets in the [YR mod base][mod_base]. -[client]: https://github.com/CnCNet/xna-cncnet-client/releases/tag/2.7 +[client]: https://github.com/CnCNet/xna-cncnet-client/releases/tag/2.11.0.0 [mod_base]: https://github.com/Starkku/cncnet-client-mod-base From 122cd69bf691af8ca9611ea00b1508c75d8ff6a7 Mon Sep 17 00:00:00 2001 From: MortonPL Date: Thu, 29 Feb 2024 16:52:02 +0100 Subject: [PATCH 09/18] Mention .NET 8 binaries again --- Docs/Migration-INI.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Docs/Migration-INI.md b/Docs/Migration-INI.md index ea73e29be..14d824653 100644 --- a/Docs/Migration-INI.md +++ b/Docs/Migration-INI.md @@ -18,6 +18,7 @@ The way the client is launched on Unix systems has changed. cd "$(dirname "$0")" dotnet Resources/Binaries/UniversalGL/clientogl.dll "$@" +# dotnet Resources/BinariesNET8/UniversalGL/clientogl.dll "$@" # if you want to use .NET 8 ``` 3. **OPTIONAL** Add these entries in `[Settings]` (fill with your required/forbidden mod files): @@ -565,7 +566,7 @@ CheckBoxes=chkNewOption... [chkNewOption] Text=My New Option -CustomIniPath=INI\Game Options\MyNewOption.ini +CustomIniPath=INI/Game Options/MyNewOption.ini ToolTip=Enable this new option. Checked=False Location=1126,79 @@ -913,8 +914,9 @@ For completion's sake, below are additional steps required for a complete migrat ### Replace binary files -1. Replace contents of `Resources/Binaries` and `Resources/Compatibility` with new files. -2. Replace your launcher executable in root directory (whetever it's called, `YRLauncher.exe`, `MentalOmegaLauncher.exe`, etc.) with +1. Replace contents of `Resources/Binaries` and `Resources/Compatibility` with new files. This directory contains the .NET Framework 4.8 version of the client. +2. **OPTIONAL** Copy contents of downloaded `BinariesNET8` into a new directory `Resources/BinariesNET8`. This directory contains the .NET 8 version of the client. +3. Replace your launcher executable in root directory (whetever it's called, `YRLauncher.exe`, `MentalOmegaLauncher.exe`, etc.) with version [2.0.7](https://github.com/CnCNet/dta-mg-client-launcher/releases/tag/v2.0.7). ### Add new assets From d20f44fa0ffce5c6be8ccc59cf0df43cf9b7b757 Mon Sep 17 00:00:00 2001 From: MortonPL Date: Thu, 29 Feb 2024 17:23:39 +0100 Subject: [PATCH 10/18] Reorder paragraphs --- Docs/Migration-INI.md | 62 ++++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/Docs/Migration-INI.md b/Docs/Migration-INI.md index 14d824653..93f5e6f7e 100644 --- a/Docs/Migration-INI.md +++ b/Docs/Migration-INI.md @@ -30,29 +30,11 @@ RequiredFiles= ForbiddenFiles= ``` -## Edit `SkirmishLobby.ini` - -Skirmish game lobby used to be based on multiplayer game lobby. Now, skirmish and multiplayer lobbies share a new base layout instead. -Map list (`lbMapList`) has been moved to the base layout. Game speed dropdown (`cmbGameSpeedCapSkirmish`) has been moved here from `GameOptions.ini`. - -1. Change `[INISystem]->BasedOn` from `MultiplayerGameLobby.ini` to `GameLobbyBase.ini` -2. Add `$BaseSection=GameLobbyBase` to `[SkirmishLobby]` -3. Remove `[lbMapList]` section -4. Add these two sections: - -```ini -[GameOptionsPanel] -$CC-GODD03=cmbGameSpeedCapSkirmish:GameLobbyDropDown - -[cmbGameSpeedCapSkirmish] -$BaseSection=cmbGameSpeedCap -Items=Fastest (MAX),Faster (60 FPS),Fast (30 FPS),Medium (20 FPS),Slow (15 FPS),Slower (12 FPS),Slowest (10 FPS) -``` - ## Add `GameLobbyBase.ini` +Skirmish game lobby used to be based on multiplayer game lobby. Now, skirmish and multiplayer lobbies share a new base layout instead. This file is the base layout of all game lobbies (skirmish, LAN, CnCNet). **Game options have been moved from `GameOptions.ini` to this file**. -See example configuration below. +See example configuration below or in [YR mod base][mod_base].
Click to show file content @@ -147,7 +129,7 @@ $BaseSection=ddPlayerStartBase [lbMapList] $X=LOBBY_EMPTY_SPACE_SIDES $Y=EMPTY_SPACE_TOP + 33 -$Width=getWidth($ParentControl) - (getX($Self) + (getWidth(MapPreviewBox) + LOBBY_EMPTY_SPACE_SIDES + LOBBY_PANEL_SPACING) +$Width=getWidth($ParentControl) - (getX($Self) + (getWidth(MapPreviewBox) + LOBBY_EMPTY_SPACE_SIDES + LOBBY_PANEL_SPACING)) $Height=getBottom(MapPreviewBox) - getY($Self) SolidColorBackgroundTexture=0,0,0,128 @@ -555,7 +537,7 @@ DistanceFromBottomBorder=-8 If your game/mod has custom game options, you have to port them yourself. To add controls in the game options panel, add `$CC-GO` prefixed list entries in `[GameOptionsPanel]`, then create their own sections. In example: -Before in `GameOptions.ini`: +In `GameOptions.ini` in previous versions: ```ini [MultiplayerGameLobby] @@ -572,7 +554,7 @@ Checked=False Location=1126,79 ``` -After in `GameLobbyBase.ini`: +In `GameLobbyBase.ini` in the new version: ```ini [GameOptionsPanel] @@ -586,13 +568,29 @@ Checked=False Location=1126,79 ; $X and $Y are recommended instead ``` -## Edit `GameOptions.ini` +## Edit `SkirmishLobby.ini` + +This file extends the game lobby base with skirmish-specific controls. Map list (`lbMapList`) has been moved to the base layout. Game speed dropdown (`cmbGameSpeedCapSkirmish`) has been moved here from `GameOptions.ini`. +If you have a modified `[SkirmishLobby]` section in `GameOptions.ini`, move it here. -After adding all game lobby options to `GameLobbyBase.ini`, remove them here, as well as `SkirmishGameLobby` and `MultiplayerGameLobby` sections. +1. Change `[INISystem]->BasedOn` from `MultiplayerGameLobby.ini` to `GameLobbyBase.ini` +2. Add `$BaseSection=GameLobbyBase` to `[SkirmishLobby]` +3. Remove `[lbMapList]` section +4. Add these two sections: + +```ini +[GameOptionsPanel] +$CC-GODD03=cmbGameSpeedCapSkirmish:GameLobbyDropDown + +[cmbGameSpeedCapSkirmish] +$BaseSection=cmbGameSpeedCap +Items=Fastest (MAX),Faster (60 FPS),Fast (30 FPS),Medium (20 FPS),Slow (15 FPS),Slower (12 FPS),Slowest (10 FPS) +``` ## Rename/Remove old `MultiplayerGameLobby.ini` and create new `MultiplayerGameLobby.ini` This file extends the game lobby base with multiplayer-specific controls, such as the chat box and lock and ready buttons. +If you have a modified `[MultiplayerGameLobby]` section in `GameOptions.ini`, move it here instead of using the example one below.
Click to show file content @@ -723,6 +721,10 @@ Location=12,12 Location=43,12 ``` +## Edit `GameOptions.ini` + +After adding all game lobby options to `GameLobbyBase.ini`, remove them here. Remove `[SkirmishLobby]` and `[MultiplayerGameLobby]` sections too. + ## Edit `GenericWindow.ini` Replace `[SkirmishLobby]` and `[MultiplayerGameLobby]` sections with this: @@ -798,14 +800,14 @@ SettingSection=Video SettingKey=UseDDWrapperForMapEditor ``` -2. **OPTIONAL (YR)** Add sections: +2. **OPTIONAL (YR+Phobos)** Add sections: ```ini [GameOptionsPanelExtraControls] -; Enable if using Phobos -;0=chkTooltipsExtra:SettingCheckBox -;1=chkPrioritySelection:SettingCheckBox -;2=chkBuildingPlacement:SettingCheckBox +; Only available with Phobos +0=chkTooltipsExtra:SettingCheckBox +1=chkPrioritySelection:SettingCheckBox +2=chkBuildingPlacement:SettingCheckBox [chkTooltipsExtra] Location=24,151, ;12,151 From 4061596124bd0081bdc1c9939c1c3a5695375e4c Mon Sep 17 00:00:00 2001 From: MortonPL Date: Thu, 29 Feb 2024 17:52:15 +0100 Subject: [PATCH 11/18] Enforce 80 character line width --- Docs/Migration-INI.md | 91 ++++++++++++++++++++++++++++++------------- 1 file changed, 63 insertions(+), 28 deletions(-) diff --git a/Docs/Migration-INI.md b/Docs/Migration-INI.md index 93f5e6f7e..7f59f947d 100644 --- a/Docs/Migration-INI.md +++ b/Docs/Migration-INI.md @@ -2,15 +2,19 @@ Migrating to client version [2.11.0.0][client]. -This guide uses [YR mod base][mod_base] (commit `34efc04`) configuration as an example. The majority of changes also applies to non-YR client configurations. +This guide uses [YR mod base][mod_base] (commit `34efc04`) configuration +as an example. The majority of changes also applies to non-YR client +configurations. -It is **highly recommended** to make a complete backup of your game/mod before starting. +It is **highly recommended** to make a complete backup of your game/mod +before starting. ## Edit `ClientDefinitions.ini` The way the client is launched on Unix systems has changed. -1. Add `[Settings]->UnixLauncherExe=Launcher.sh` (script file name can be anything) +1. Add `[Settings]->UnixLauncherExe=Launcher.sh` (script file name can be + anything) 2. Create `Launcher.sh` in root directory: ```sh @@ -18,10 +22,12 @@ The way the client is launched on Unix systems has changed. cd "$(dirname "$0")" dotnet Resources/Binaries/UniversalGL/clientogl.dll "$@" -# dotnet Resources/BinariesNET8/UniversalGL/clientogl.dll "$@" # if you want to use .NET 8 +# or if you want to use .NET 8: +# dotnet Resources/BinariesNET8/UniversalGL/clientogl.dll "$@" ``` -3. **OPTIONAL** Add these entries in `[Settings]` (fill with your required/forbidden mod files): +3. **OPTIONAL** Add these entries in `[Settings]` (fill with your + required/forbidden mod files): ```ini ; Comma-separated list of files required to run the game / mod that are not included in the installation. @@ -32,9 +38,12 @@ ForbiddenFiles= ## Add `GameLobbyBase.ini` -Skirmish game lobby used to be based on multiplayer game lobby. Now, skirmish and multiplayer lobbies share a new base layout instead. -This file is the base layout of all game lobbies (skirmish, LAN, CnCNet). **Game options have been moved from `GameOptions.ini` to this file**. -See example configuration below or in [YR mod base][mod_base]. +Skirmish game lobby used to be based on multiplayer game lobby. Now, skirmish +and multiplayer lobbies share a new base layout instead. +This file is the base layout of all game lobbies (skirmish, LAN, CnCNet). +**Game options have been moved from `GameOptions.ini` to this file**. + +See example configuration below or in [YR mod base][mod_base]:
Click to show file content @@ -535,9 +544,11 @@ DistanceFromBottomBorder=-8 ### Port custom game options -If your game/mod has custom game options, you have to port them yourself. To add controls in the game options panel, add `$CC-GO` prefixed list entries in `[GameOptionsPanel]`, then create their own sections. In example: +If your game/mod has custom game options, you have to port them yourself. +To add controls in the game options panel, add `$CC-GO` prefixed list entries +in `[GameOptionsPanel]`, then create their own sections. -In `GameOptions.ini` in previous versions: +Example option in `GameOptions.ini` in previous versions: ```ini [MultiplayerGameLobby] @@ -554,7 +565,7 @@ Checked=False Location=1126,79 ``` -In `GameLobbyBase.ini` in the new version: +Example option in `GameLobbyBase.ini` in the new version: ```ini [GameOptionsPanel] @@ -570,7 +581,9 @@ Location=1126,79 ; $X and $Y are recommended instead ## Edit `SkirmishLobby.ini` -This file extends the game lobby base with skirmish-specific controls. Map list (`lbMapList`) has been moved to the base layout. Game speed dropdown (`cmbGameSpeedCapSkirmish`) has been moved here from `GameOptions.ini`. +This file extends the game lobby base with skirmish-specific controls. Map list +(`lbMapList`) has been moved to the base layout. Game speed dropdown +(`cmbGameSpeedCapSkirmish`) has been moved here from `GameOptions.ini`. If you have a modified `[SkirmishLobby]` section in `GameOptions.ini`, move it here. 1. Change `[INISystem]->BasedOn` from `MultiplayerGameLobby.ini` to `GameLobbyBase.ini` @@ -587,10 +600,12 @@ $BaseSection=cmbGameSpeedCap Items=Fastest (MAX),Faster (60 FPS),Fast (30 FPS),Medium (20 FPS),Slow (15 FPS),Slower (12 FPS),Slowest (10 FPS) ``` -## Rename/Remove old `MultiplayerGameLobby.ini` and create new `MultiplayerGameLobby.ini` +## Edit `MultiplayerGameLobby.ini` -This file extends the game lobby base with multiplayer-specific controls, such as the chat box and lock and ready buttons. -If you have a modified `[MultiplayerGameLobby]` section in `GameOptions.ini`, move it here instead of using the example one below. +This file extends the game lobby base with multiplayer-specific controls, +such as the chat box and lock and ready buttons. **Remove (or port) previous +content of this file.** If you have a modified `[MultiplayerGameLobby]` section +in `GameOptions.ini`, move it here instead of using the example one below.
Click to show file content @@ -681,7 +696,8 @@ Items=Fastest (60 FPS),Faster (45 FPS),Fast (30 FPS),Medium (20 FPS),Slow (15 FP ## Create `CnCNetGameLobby.ini` -This file extends the multiplayer game lobby with CnCNet-specific controls, like the change tunnel button. +This file extends the multiplayer game lobby with CnCNet-specific controls, +like the change tunnel button. ```ini [INISystem] @@ -709,7 +725,8 @@ BasedOn=MultiplayerGameLobby.ini ## Edit `CnCNetLobby.ini` -Two new buttons have been added to the CnCNet lobby: one for sorting game room list by name, and one for opening advanced filtering options panel. +Two new buttons have been added to the CnCNet lobby: one for sorting game room +list by name, and one for opening advanced filtering options panel. Add these sections: @@ -723,7 +740,8 @@ Location=43,12 ## Edit `GameOptions.ini` -After adding all game lobby options to `GameLobbyBase.ini`, remove them here. Remove `[SkirmishLobby]` and `[MultiplayerGameLobby]` sections too. +After adding all game lobby options to `GameLobbyBase.ini`, remove them here. +Remove `[SkirmishLobby]` and `[MultiplayerGameLobby]` sections, too. ## Edit `GenericWindow.ini` @@ -738,7 +756,12 @@ Size=1230,750 ## Edit `GlobalThemeSettings.ini` -This file now also contains the `ParserConstants` section, which lists user-defined constants used for positioning controls within panels and windows. **Without this section, the client will crash with new `GameLobbyBase.ini` layout**. Add the following: +This file now also contains the `ParserConstants` section, which lists +user-defined constants used for positioning controls within panels and windows. +**Without this section, the client will crash with new `GameLobbyBase.ini` +layout**. + +Add the following: ```ini [ParserConstants] @@ -769,7 +792,8 @@ GAME_OPTION_DD_HEIGHT=22 ## Create `ManualUpdateQueryWindow.ini` -It is now possible to force a manual query for game/mod updates, which displays a new window. +It is now possible to force a manual query for game/mod updates, which displays +a new window. ```ini [INISystem] @@ -871,7 +895,8 @@ Location=0,200 ## Create new `PlayerExtraOptionsPanel.ini` -A new panel that allows for convenient match setup has been added in the game lobby. +A new panel that allows for convenient match setup has been added in the +game lobby. ```ini [btnClose] @@ -912,24 +937,34 @@ Location=12,189 ## Appendix -For completion's sake, below are additional steps required for a complete migration (beyond INIs) to client version [2.11.0.0][client]. +For completion's sake, below are additional steps required for a complete +migration (beyond INI changes) to client version [2.11.0.0][client]. ### Replace binary files -1. Replace contents of `Resources/Binaries` and `Resources/Compatibility` with new files. This directory contains the .NET Framework 4.8 version of the client. -2. **OPTIONAL** Copy contents of downloaded `BinariesNET8` into a new directory `Resources/BinariesNET8`. This directory contains the .NET 8 version of the client. -3. Replace your launcher executable in root directory (whetever it's called, `YRLauncher.exe`, `MentalOmegaLauncher.exe`, etc.) with -version [2.0.7](https://github.com/CnCNet/dta-mg-client-launcher/releases/tag/v2.0.7). +1. Replace contents of `Resources/Binaries` and `Resources/Compatibility` with + new files. This directory contains the .NET Framework 4.8 version + of the client. +2. **OPTIONAL** Copy contents of downloaded `BinariesNET8` into a new directory + `Resources/BinariesNET8`. This directory contains the .NET 8 version + of the client. +3. Replace your launcher executable in root directory (whetever it's called, + `YRLauncher.exe`, `MentalOmegaLauncher.exe`, etc.) with version + [2.0.7](https://github.com/CnCNet/dta-mg-client-launcher/releases/tag/v2.0.7). ### Add new assets Every file here can be placed either in `Resources` or in theme directories: - `favActive.png` and `favInactive.png`, 21x21 pixels -- `optionsButton.png`, `optionsButton_c.png`, `optionsButtonActive.png`, `optionsButtonActive_c.png`, `optionsButtonClose.png` and `optionsButtonClose_c.png`, 18x18 pixels +- `optionsButton.png`, `optionsButton_c.png`, `optionsButtonActive.png`, + `optionsButtonActive_c.png`, `optionsButtonClose.png` + and `optionsButtonClose_c.png`, 18x18 pixels - `questionMark.png` and `questionMark_c.png`, 18x18 pixels - `sortAlphaAsc.png`, `sortAlphaDesc.png` and `sortAlphaNone.png`, 21x21 pixels -- `statusAI.png`, `statusClear.png`, `statusEmpty.png`, `statusError.png`, `statusInProgress.png`, `statusOk.png`, `statusUnavailable.png`, `statusWarning.png`, 21x21 pixels +- `statusAI.png`, `statusClear.png`, `statusEmpty.png`, `statusError.png`, + `statusInProgress.png`, `statusOk.png`, `statusUnavailable.png`, + `statusWarning.png`, 21x21 pixels You can find example assets in the [YR mod base][mod_base]. From 9b3b85ef205879cab4330785c4eaa2dfa7d556a4 Mon Sep 17 00:00:00 2001 From: MortonPL Date: Thu, 29 Feb 2024 18:15:20 +0100 Subject: [PATCH 12/18] Don't use the word "root" when referring to the game directory root --- Docs/Migration-INI.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Docs/Migration-INI.md b/Docs/Migration-INI.md index 7f59f947d..25ff6bce3 100644 --- a/Docs/Migration-INI.md +++ b/Docs/Migration-INI.md @@ -15,7 +15,7 @@ The way the client is launched on Unix systems has changed. 1. Add `[Settings]->UnixLauncherExe=Launcher.sh` (script file name can be anything) -2. Create `Launcher.sh` in root directory: +2. Create `Launcher.sh` in game directory: ```sh #!/bin/sh @@ -948,7 +948,7 @@ migration (beyond INI changes) to client version [2.11.0.0][client]. 2. **OPTIONAL** Copy contents of downloaded `BinariesNET8` into a new directory `Resources/BinariesNET8`. This directory contains the .NET 8 version of the client. -3. Replace your launcher executable in root directory (whetever it's called, +3. Replace your launcher executable in game directory (whetever it's called, `YRLauncher.exe`, `MentalOmegaLauncher.exe`, etc.) with version [2.0.7](https://github.com/CnCNet/dta-mg-client-launcher/releases/tag/v2.0.7). From 31a1eaa71ab5db4248ff6bd5dabb64a1bd65bffd Mon Sep 17 00:00:00 2001 From: MortonPL Date: Thu, 29 Feb 2024 18:36:43 +0100 Subject: [PATCH 13/18] Make .NET 8 build not optional --- Docs/Migration-INI.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Docs/Migration-INI.md b/Docs/Migration-INI.md index 25ff6bce3..2eaaf164b 100644 --- a/Docs/Migration-INI.md +++ b/Docs/Migration-INI.md @@ -21,9 +21,7 @@ The way the client is launched on Unix systems has changed. #!/bin/sh cd "$(dirname "$0")" -dotnet Resources/Binaries/UniversalGL/clientogl.dll "$@" -# or if you want to use .NET 8: -# dotnet Resources/BinariesNET8/UniversalGL/clientogl.dll "$@" +dotnet Resources/BinariesNET8/UniversalGL/clientogl.dll "$@" ``` 3. **OPTIONAL** Add these entries in `[Settings]` (fill with your @@ -945,7 +943,7 @@ migration (beyond INI changes) to client version [2.11.0.0][client]. 1. Replace contents of `Resources/Binaries` and `Resources/Compatibility` with new files. This directory contains the .NET Framework 4.8 version of the client. -2. **OPTIONAL** Copy contents of downloaded `BinariesNET8` into a new directory +2. Copy contents of downloaded `BinariesNET8` into a new directory `Resources/BinariesNET8`. This directory contains the .NET 8 version of the client. 3. Replace your launcher executable in game directory (whetever it's called, From 1550fe2b06776d0b626365af266c96bce8efe652 Mon Sep 17 00:00:00 2001 From: MortonPL Date: Sun, 3 Mar 2024 15:25:35 +0100 Subject: [PATCH 14/18] Mention the second stage updater --- Docs/Migration-INI.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Docs/Migration-INI.md b/Docs/Migration-INI.md index 2eaaf164b..80325b137 100644 --- a/Docs/Migration-INI.md +++ b/Docs/Migration-INI.md @@ -949,6 +949,8 @@ migration (beyond INI changes) to client version [2.11.0.0][client]. 3. Replace your launcher executable in game directory (whetever it's called, `YRLauncher.exe`, `MentalOmegaLauncher.exe`, etc.) with version [2.0.7](https://github.com/CnCNet/dta-mg-client-launcher/releases/tag/v2.0.7). +4. Replace the second-stage updater in `Resource/Updater` with version + [1.0.16](https://github.com/CnCNet/cncnet-client-updater/releases/tag/v1.0.16). ### Add new assets From a3f80aa17756fcd315b44ffcf33400b4e5bf1fcb Mon Sep 17 00:00:00 2001 From: MortonPL Date: Sun, 3 Mar 2024 18:50:58 +0100 Subject: [PATCH 15/18] Stash --- Docs/Migration-INI.md | 79 +++++++++++++++++++++++++++++-------------- 1 file changed, 54 insertions(+), 25 deletions(-) diff --git a/Docs/Migration-INI.md b/Docs/Migration-INI.md index 80325b137..3fa44df40 100644 --- a/Docs/Migration-INI.md +++ b/Docs/Migration-INI.md @@ -36,10 +36,10 @@ ForbiddenFiles= ## Add `GameLobbyBase.ini` -Skirmish game lobby used to be based on multiplayer game lobby. Now, skirmish -and multiplayer lobbies share a new base layout instead. -This file is the base layout of all game lobbies (skirmish, LAN, CnCNet). -**Game options have been moved from `GameOptions.ini` to this file**. +Unlike in previous versions, skirmish and multiplayer lobbies share a common, +abstract base layout. This file is the base layout of all game lobbies +(skirmish, LAN, CnCNet). **Game options have been moved from `GameOptions.ini` +to this file**. See example configuration below or in [YR mod base][mod_base]: @@ -579,18 +579,26 @@ Location=1126,79 ; $X and $Y are recommended instead ## Edit `SkirmishLobby.ini` -This file extends the game lobby base with skirmish-specific controls. Map list -(`lbMapList`) has been moved to the base layout. Game speed dropdown -(`cmbGameSpeedCapSkirmish`) has been moved here from `GameOptions.ini`. -If you have a modified `[SkirmishLobby]` section in `GameOptions.ini`, move it here. +This file extends the game lobby base with skirmish-specific controls. +**Remove (or port) previous content of this file.** If you have a modified +`[SkirmishLobby]` section in `GameOptions.ini`, move it here instead of using +the example one below. Remove `CheckBoxes`,`DropDowns` and`Labels` entries; +if you have custom game options, see section +[Port custom game options](#port-custom-game-options) on how to port them. -1. Change `[INISystem]->BasedOn` from `MultiplayerGameLobby.ini` to `GameLobbyBase.ini` -2. Add `$BaseSection=GameLobbyBase` to `[SkirmishLobby]` -3. Remove `[lbMapList]` section -4. Add these two sections: +
+Click to show file content ```ini +[INISystem] +BasedOn=GameLobbyBase.ini + +[SkirmishLobby] +$BaseSection=GameLobbyBase +PlayerNameWidth=120 + [GameOptionsPanel] +$Width=337 $CC-GODD03=cmbGameSpeedCapSkirmish:GameLobbyDropDown [cmbGameSpeedCapSkirmish] @@ -598,12 +606,17 @@ $BaseSection=cmbGameSpeedCap Items=Fastest (MAX),Faster (60 FPS),Fast (30 FPS),Medium (20 FPS),Slow (15 FPS),Slower (12 FPS),Slowest (10 FPS) ``` +
+ ## Edit `MultiplayerGameLobby.ini` This file extends the game lobby base with multiplayer-specific controls, such as the chat box and lock and ready buttons. **Remove (or port) previous content of this file.** If you have a modified `[MultiplayerGameLobby]` section in `GameOptions.ini`, move it here instead of using the example one below. +Remove `CheckBoxes`,`DropDowns` and`Labels` entries; if you have custom game +options, see section +[Port custom game options](#port-custom-game-options) on how to port them.
Click to show file content @@ -692,10 +705,11 @@ Items=Fastest (60 FPS),Faster (45 FPS),Fast (30 FPS),Medium (20 FPS),Slow (15 FP
-## Create `CnCNetGameLobby.ini` +## Edit `CnCNetGameLobby.ini` This file extends the multiplayer game lobby with CnCNet-specific controls, -like the change tunnel button. +like the change tunnel button. **Remove (or port) previous content +of this file.** ```ini [INISystem] @@ -712,9 +726,10 @@ $X=getX(btnLeaveGame) - getWidth($Self) - LOBBY_PANEL_SPACING $Y=getY(btnLeaveGame) ``` -## Create `LANGameLobby.ini` +## Edit `LANGameLobby.ini` This stub file can extend the multiplayer lobby with LAN-specifc controls. +**Remove (or port) previous content of this file.** ```ini [INISystem] @@ -743,7 +758,7 @@ Remove `[SkirmishLobby]` and `[MultiplayerGameLobby]` sections, too. ## Edit `GenericWindow.ini` -Replace `[SkirmishLobby]` and `[MultiplayerGameLobby]` sections with this: +Replace `[SkirmishLobby]` with this: ```ini [GameLobbyBase] @@ -938,19 +953,33 @@ Location=12,189 For completion's sake, below are additional steps required for a complete migration (beyond INI changes) to client version [2.11.0.0][client]. -### Replace binary files +### Update client binary files -1. Replace contents of `Resources/Binaries` and `Resources/Compatibility` with - new files. This directory contains the .NET Framework 4.8 version - of the client. +1. Replace contents of `Resources/Binaries` with new files. This directory + contains the .NET Framework 4.8 version of the client. 2. Copy contents of downloaded `BinariesNET8` into a new directory `Resources/BinariesNET8`. This directory contains the .NET 8 version of the client. -3. Replace your launcher executable in game directory (whetever it's called, - `YRLauncher.exe`, `MentalOmegaLauncher.exe`, etc.) with version - [2.0.7](https://github.com/CnCNet/dta-mg-client-launcher/releases/tag/v2.0.7). -4. Replace the second-stage updater in `Resource/Updater` with version - [1.0.16](https://github.com/CnCNet/cncnet-client-updater/releases/tag/v1.0.16). + +### Update the client launcher + +The client launcher (that resides in the game directory) has been updated. +You can replace the old one with version +[2.0.7](https://github.com/CnCNet/dta-mg-client-launcher/releases/tag/v2.0.7). +Remember to rename it from `CncNetLauncherStub.exe` to your launcher name, i.e. +`YRLauncher.exe`, `MentalOmegaLauncher.exe`. Rename the `.config` file +appropriately, i.e. `YRLauncher.exe.config`, `MentalOmegaLauncher.exe.config`. + +### Update the second-stage updater + +The second-stage updater (formerly `clientupdt.dat`) has been reworked. +The new version [1.0.16](https://github.com/CnCNet/cncnet-client-updater/releases/tag/v1.0.16) +should be placed in new directory `Resources/Updater`. The new version +has two variants, for .NET Framework 4.8 (`SecondStageUpdater.exe`) +and for .NET 8.0 (`SecondStageUpdater.dll`). If you want to use the .NET 8.0 +client, you should include the .NET 8.0 updater. + +The old updater will still work, but is no longer maintained. ### Add new assets From 3edeeb85e477efd07b79846104885e1f11adbf3d Mon Sep 17 00:00:00 2001 From: SadPencil Date: Mon, 26 Feb 2024 18:53:22 +0800 Subject: [PATCH 16/18] Ensure that the migration guide works --- Docs/Migration-INI.md | 123 +++++++++++++++++++----------------------- 1 file changed, 54 insertions(+), 69 deletions(-) diff --git a/Docs/Migration-INI.md b/Docs/Migration-INI.md index 3fa44df40..151aad47c 100644 --- a/Docs/Migration-INI.md +++ b/Docs/Migration-INI.md @@ -1,10 +1,13 @@ # Migrating from older versions - INI configuration -Migrating to client version [2.11.0.0][client]. +Migrating to client version [2.11.0.0][client] from pre-2.8.0.0. -This guide uses [YR mod base][mod_base] (commit `34efc04`) configuration -as an example. The majority of changes also applies to non-YR client -configurations. +This guide uses [YR mod base][mod_base] configuration as an example by +migrating from commit +[`6ce7db7`](https://github.com/Starkku/cncnet-client-mod-base/commit/6ce7db7fd753df329fb435c3aa5ba90505e5f3a2) +to +[`34efc04`](https://github.com/Starkku/cncnet-client-mod-base/commit/34efc0454c64e4af28e8177e63f3d9546cbbc6fb). +The majority of changes also applies to non-YR client configurations. It is **highly recommended** to make a complete backup of your game/mod before starting. @@ -13,9 +16,9 @@ before starting. The way the client is launched on Unix systems has changed. -1. Add `[Settings]->UnixLauncherExe=Launcher.sh` (script file name can be +1. Add `[Settings]->UnixLauncherExe=YRLauncher.sh` (script file name can be anything) -2. Create `Launcher.sh` in game directory: +2. Create `YRLauncher.sh` in game directory: ```sh #!/bin/sh @@ -586,19 +589,14 @@ the example one below. Remove `CheckBoxes`,`DropDowns` and`Labels` entries; if you have custom game options, see section [Port custom game options](#port-custom-game-options) on how to port them. -
-Click to show file content - ```ini [INISystem] BasedOn=GameLobbyBase.ini [SkirmishLobby] $BaseSection=GameLobbyBase -PlayerNameWidth=120 [GameOptionsPanel] -$Width=337 $CC-GODD03=cmbGameSpeedCapSkirmish:GameLobbyDropDown [cmbGameSpeedCapSkirmish] @@ -606,8 +604,6 @@ $BaseSection=cmbGameSpeedCap Items=Fastest (MAX),Faster (60 FPS),Fast (30 FPS),Medium (20 FPS),Slow (15 FPS),Slower (12 FPS),Slowest (10 FPS) ``` -
- ## Edit `MultiplayerGameLobby.ini` This file extends the game lobby base with multiplayer-specific controls, @@ -705,7 +701,7 @@ Items=Fastest (60 FPS),Faster (45 FPS),Fast (30 FPS),Medium (20 FPS),Slow (15 FP
-## Edit `CnCNetGameLobby.ini` +## Create `CnCNetGameLobby.ini` This file extends the multiplayer game lobby with CnCNet-specific controls, like the change tunnel button. **Remove (or port) previous content @@ -726,7 +722,7 @@ $X=getX(btnLeaveGame) - getWidth($Self) - LOBBY_PANEL_SPACING $Y=getY(btnLeaveGame) ``` -## Edit `LANGameLobby.ini` +## Create `LANGameLobby.ini` This stub file can extend the multiplayer lobby with LAN-specifc controls. **Remove (or port) previous content of this file.** @@ -736,21 +732,6 @@ This stub file can extend the multiplayer lobby with LAN-specifc controls. BasedOn=MultiplayerGameLobby.ini ``` -## Edit `CnCNetLobby.ini` - -Two new buttons have been added to the CnCNet lobby: one for sorting game room -list by name, and one for opening advanced filtering options panel. - -Add these sections: - -```ini -[btnGameSortAlpha] -Location=12,12 - -[btnGameFilterOptions] -Location=43,12 -``` - ## Edit `GameOptions.ini` After adding all game lobby options to `GameLobbyBase.ini`, remove them here. @@ -758,7 +739,7 @@ Remove `[SkirmishLobby]` and `[MultiplayerGameLobby]` sections, too. ## Edit `GenericWindow.ini` -Replace `[SkirmishLobby]` with this: +Replace `[SkirmishLobby]` and `[MultiplayerGameLobby]` with this: ```ini [GameLobbyBase] @@ -820,7 +801,42 @@ Location=176,110 New checkboxes have been added in the options window. -1. **OPTIONAL** Add sections: +1. Add sections: + +```ini +[lblPlayerName] +Location=12,195 + +[tbPlayerName] +Location=113,193 + +[lblNotice] +Location=12,220 + +[btnConfigureHotkeys] +Location=12,290 + +[chkDisablePrivateMessagePopup] +Location=12,138 +Text=Disable private message pop-ups + +[chkAllowGameInvitesFromFriendsOnly] +Location=276,68 +Text=Only receive game invitations@from friends + +[lblAllPrivateMessagesFrom] +Location=276,138 + +[ddAllowPrivateMessagesFrom] +Location=470,137 + +[gameListPanel] +Location=0,200 + +[btnForceUpdate] +``` + +2. **OPTIONAL** Add sections: ```ini [DisplayOptionsPanelExtraControls] @@ -837,7 +853,7 @@ SettingSection=Video SettingKey=UseDDWrapperForMapEditor ``` -2. **OPTIONAL (YR+Phobos)** Add sections: +3. **OPTIONAL (YR+Phobos)** Add sections: ```ini [GameOptionsPanelExtraControls] @@ -873,39 +889,6 @@ SettingSection=Phobos SettingKey=ShowBuildingPlacementPreview ``` -3. Add sections: - -```ini -[lblPlayerName] -Location=12,195 - -[tbPlayerName] -Location=113,193 - -[lblNotice] -Location=12,220 - -[btnConfigureHotkeys] -Location=12,290 - -[chkDisablePrivateMessagePopup] -Location=12,138 -Text=Disable private message pop-ups - -[chkAllowGameInvitesFromFriendsOnly] -Location=276,68 -Text=Only receive game invitations@from friends - -[lblAllPrivateMessagesFrom] -Location=276,138 - -[ddAllowPrivateMessagesFrom] -Location=470,137 - -[gameListPanel] -Location=0,200 -``` - ## Create new `PlayerExtraOptionsPanel.ini` A new panel that allows for convenient match setup has been added in the @@ -955,11 +938,13 @@ migration (beyond INI changes) to client version [2.11.0.0][client]. ### Update client binary files -1. Replace contents of `Resources/Binaries` with new files. This directory +1. Replace `clientdx.exe`, `clientogl.exe` and `clientxna.exe` in `Resources` + with new files. Compiled `.pdb` and `.config` files are optional. +2. Replace contents of `Resources/Binaries` with new files. This directory contains the .NET Framework 4.8 version of the client. -2. Copy contents of downloaded `BinariesNET8` into a new directory +3. **OPTIONAL** Copy contents of downloaded `BinariesNET8` into a new directory `Resources/BinariesNET8`. This directory contains the .NET 8 version - of the client. + of the client that enabled experimental cross-platform Unix support. ### Update the client launcher From 354c71e3d9199eac4aed229cc01aaba0547e4684 Mon Sep 17 00:00:00 2001 From: MortonPL Date: Sun, 3 Mar 2024 20:12:57 +0100 Subject: [PATCH 17/18] Add directory tree view for executables --- Docs/Migration-INI.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Docs/Migration-INI.md b/Docs/Migration-INI.md index 151aad47c..ee4db817c 100644 --- a/Docs/Migration-INI.md +++ b/Docs/Migration-INI.md @@ -946,6 +946,24 @@ migration (beyond INI changes) to client version [2.11.0.0][client]. `Resources/BinariesNET8`. This directory contains the .NET 8 version of the client that enabled experimental cross-platform Unix support. +The `Resources` directory should look like this (omitting configuration +files and assets): + +```plaintext +/Resources # override the `Resources` folder to update the client binaries +├── Binaries # this folder contains partial .NET 4.8 client files +├── BinariesNET8 # this folder contains .NET 8.0 client files, where modders can either delete it, or keep it for an experimental cross-platform support +├── clientdx.exe # .NET 4.8 client main executable +├── clientdx.exe.config # distributed along with `.exe` file. Can be removed but it is better to keep it. +├── clientdx.pdb # .pdb file contains debug symbols. It can be either deleted or retained. +├── clientogl.exe # .NET 4.8 client main executable +├── clientogl.exe.config # same as above +├── clientogl.pdb # same as above +├── clientxna.exe # .NET 4.8 client main executable +├── clientxna.exe.config # same as above +└── clientxna.pdb # same as above +``` + ### Update the client launcher The client launcher (that resides in the game directory) has been updated. @@ -964,6 +982,17 @@ has two variants, for .NET Framework 4.8 (`SecondStageUpdater.exe`) and for .NET 8.0 (`SecondStageUpdater.dll`). If you want to use the .NET 8.0 client, you should include the .NET 8.0 updater. +The `Updater` directory should look like this: + +```plaintext +/Resources/Updater +├── Rampastring.Tools.dll # common dependencies of .NET 4.8/.NET 8.0 second-stage updater +├── SecondStageUpdater.dll # .NET 8.0 second-stage updater +├── SecondStageUpdater.exe # .NET 4.8 second-stage updater +├── SecondStageUpdater.exe.config # .NET 4.8 second-stage updater +└── SecondStageUpdater.runtimeconfig.json # .NET 8.0 second-stage updater +``` + The old updater will still work, but is no longer maintained. ### Add new assets From b74ee9ecba99a0bf3c1e73dd5ecf3e12cd5a5280 Mon Sep 17 00:00:00 2001 From: MortonPL Date: Sun, 3 Mar 2024 21:53:46 +0100 Subject: [PATCH 18/18] Remove hard line wrap --- Docs/Migration-INI.md | 101 ++++++++++-------------------------------- 1 file changed, 24 insertions(+), 77 deletions(-) diff --git a/Docs/Migration-INI.md b/Docs/Migration-INI.md index ee4db817c..6fddab930 100644 --- a/Docs/Migration-INI.md +++ b/Docs/Migration-INI.md @@ -1,23 +1,16 @@ # Migrating from older versions - INI configuration -Migrating to client version [2.11.0.0][client] from pre-2.8.0.0. +Migrating to client version [2.11.0.0][client] from pre-2.11.0.0. -This guide uses [YR mod base][mod_base] configuration as an example by -migrating from commit -[`6ce7db7`](https://github.com/Starkku/cncnet-client-mod-base/commit/6ce7db7fd753df329fb435c3aa5ba90505e5f3a2) -to -[`34efc04`](https://github.com/Starkku/cncnet-client-mod-base/commit/34efc0454c64e4af28e8177e63f3d9546cbbc6fb). -The majority of changes also applies to non-YR client configurations. +This guide uses [YR mod base][mod_base] configuration as an example by migrating from commit [`6ce7db7`](https://github.com/Starkku/cncnet-client-mod-base/commit/6ce7db7fd753df329fb435c3aa5ba90505e5f3a2) to [`34efc04`](https://github.com/Starkku/cncnet-client-mod-base/commit/34efc0454c64e4af28e8177e63f3d9546cbbc6fb). The majority of changes also applies to non-YR client configurations. -It is **highly recommended** to make a complete backup of your game/mod -before starting. +It is **highly recommended** to make a complete backup of your game/mod before starting. ## Edit `ClientDefinitions.ini` The way the client is launched on Unix systems has changed. -1. Add `[Settings]->UnixLauncherExe=YRLauncher.sh` (script file name can be - anything) +1. Add `[Settings]->UnixLauncherExe=YRLauncher.sh` (script file name can be anything) 2. Create `YRLauncher.sh` in game directory: ```sh @@ -27,8 +20,7 @@ cd "$(dirname "$0")" dotnet Resources/BinariesNET8/UniversalGL/clientogl.dll "$@" ``` -3. **OPTIONAL** Add these entries in `[Settings]` (fill with your - required/forbidden mod files): +3. **OPTIONAL** Add these entries in `[Settings]` (fill with your required/forbidden mod files): ```ini ; Comma-separated list of files required to run the game / mod that are not included in the installation. @@ -39,10 +31,7 @@ ForbiddenFiles= ## Add `GameLobbyBase.ini` -Unlike in previous versions, skirmish and multiplayer lobbies share a common, -abstract base layout. This file is the base layout of all game lobbies -(skirmish, LAN, CnCNet). **Game options have been moved from `GameOptions.ini` -to this file**. +Unlike in previous versions, skirmish and multiplayer lobbies share a common, abstract base layout. This file is the base layout of all game lobbies (skirmish, LAN, CnCNet). **Game options have been moved from `GameOptions.ini` to this file**. See example configuration below or in [YR mod base][mod_base]: @@ -545,9 +534,7 @@ DistanceFromBottomBorder=-8 ### Port custom game options -If your game/mod has custom game options, you have to port them yourself. -To add controls in the game options panel, add `$CC-GO` prefixed list entries -in `[GameOptionsPanel]`, then create their own sections. +If your game/mod has custom game options, you have to port them yourself. To add controls in the game options panel, add `$CC-GO` prefixed list entries in `[GameOptionsPanel]`, then create their own sections. Example option in `GameOptions.ini` in previous versions: @@ -582,12 +569,7 @@ Location=1126,79 ; $X and $Y are recommended instead ## Edit `SkirmishLobby.ini` -This file extends the game lobby base with skirmish-specific controls. -**Remove (or port) previous content of this file.** If you have a modified -`[SkirmishLobby]` section in `GameOptions.ini`, move it here instead of using -the example one below. Remove `CheckBoxes`,`DropDowns` and`Labels` entries; -if you have custom game options, see section -[Port custom game options](#port-custom-game-options) on how to port them. +This file extends the game lobby base with skirmish-specific controls. **Remove (or port) previous content of this file.** If you have a modified `[SkirmishLobby]` section in `GameOptions.ini`, move it here instead of using the example one below. Remove `CheckBoxes`,`DropDowns` and`Labels` entries; if you have custom game options, see section [Port custom game options](#port-custom-game-options) on how to port them. ```ini [INISystem] @@ -606,13 +588,7 @@ Items=Fastest (MAX),Faster (60 FPS),Fast (30 FPS),Medium (20 FPS),Slow (15 FPS), ## Edit `MultiplayerGameLobby.ini` -This file extends the game lobby base with multiplayer-specific controls, -such as the chat box and lock and ready buttons. **Remove (or port) previous -content of this file.** If you have a modified `[MultiplayerGameLobby]` section -in `GameOptions.ini`, move it here instead of using the example one below. -Remove `CheckBoxes`,`DropDowns` and`Labels` entries; if you have custom game -options, see section -[Port custom game options](#port-custom-game-options) on how to port them. +This file extends the game lobby base with multiplayer-specific controls, such as the chat box and lock and ready buttons. **Remove (or port) previous content of this file.** If you have a modified `[MultiplayerGameLobby]` section in `GameOptions.ini`, move it here instead of using the example one below. Remove `CheckBoxes`,`DropDowns` and`Labels` entries; if you have custom game options, see section [Port custom game options](#port-custom-game-options) on how to port them.
Click to show file content @@ -703,9 +679,7 @@ Items=Fastest (60 FPS),Faster (45 FPS),Fast (30 FPS),Medium (20 FPS),Slow (15 FP ## Create `CnCNetGameLobby.ini` -This file extends the multiplayer game lobby with CnCNet-specific controls, -like the change tunnel button. **Remove (or port) previous content -of this file.** +This file extends the multiplayer game lobby with CnCNet-specific controls, like the change tunnel button. **Remove (or port) previous content of this file.** ```ini [INISystem] @@ -724,8 +698,7 @@ $Y=getY(btnLeaveGame) ## Create `LANGameLobby.ini` -This stub file can extend the multiplayer lobby with LAN-specifc controls. -**Remove (or port) previous content of this file.** +This stub file can extend the multiplayer lobby with LAN-specifc controls. **Remove (or port) previous content of this file.** ```ini [INISystem] @@ -734,8 +707,7 @@ BasedOn=MultiplayerGameLobby.ini ## Edit `GameOptions.ini` -After adding all game lobby options to `GameLobbyBase.ini`, remove them here. -Remove `[SkirmishLobby]` and `[MultiplayerGameLobby]` sections, too. +After adding all game lobby options to `GameLobbyBase.ini`, remove them here. Remove `[SkirmishLobby]` and `[MultiplayerGameLobby]` sections, too. ## Edit `GenericWindow.ini` @@ -750,10 +722,7 @@ Size=1230,750 ## Edit `GlobalThemeSettings.ini` -This file now also contains the `ParserConstants` section, which lists -user-defined constants used for positioning controls within panels and windows. -**Without this section, the client will crash with new `GameLobbyBase.ini` -layout**. +This file now also contains the `ParserConstants` section, which lists user-defined constants used for positioning controls within panels and windows. **Without this section, the client will crash with new `GameLobbyBase.ini` layout**. Add the following: @@ -786,8 +755,7 @@ GAME_OPTION_DD_HEIGHT=22 ## Create `ManualUpdateQueryWindow.ini` -It is now possible to force a manual query for game/mod updates, which displays -a new window. +It is now possible to force a manual query for game/mod updates, which displays a new window. ```ini [INISystem] @@ -891,8 +859,7 @@ SettingKey=ShowBuildingPlacementPreview ## Create new `PlayerExtraOptionsPanel.ini` -A new panel that allows for convenient match setup has been added in the -game lobby. +A new panel that allows for convenient match setup has been added in the game lobby. ```ini [btnClose] @@ -933,21 +900,15 @@ Location=12,189 ## Appendix -For completion's sake, below are additional steps required for a complete -migration (beyond INI changes) to client version [2.11.0.0][client]. +For completion's sake, below are additional steps required for a complete migration (beyond INI changes) to client version [2.11.0.0][client] from pre-2.11.0.0. ### Update client binary files -1. Replace `clientdx.exe`, `clientogl.exe` and `clientxna.exe` in `Resources` - with new files. Compiled `.pdb` and `.config` files are optional. -2. Replace contents of `Resources/Binaries` with new files. This directory - contains the .NET Framework 4.8 version of the client. -3. **OPTIONAL** Copy contents of downloaded `BinariesNET8` into a new directory - `Resources/BinariesNET8`. This directory contains the .NET 8 version - of the client that enabled experimental cross-platform Unix support. +1. Replace `clientdx.exe`, `clientogl.exe` and `clientxna.exe` in `Resources` with new files. Compiled `.pdb` and `.config` files are optional. +2. Replace contents of `Resources/Binaries` with new files. This directory contains the .NET Framework 4.8 version of the client. +3. **OPTIONAL** Copy contents of downloaded `BinariesNET8` into a new directory `Resources/BinariesNET8`. This directory contains the .NET 8 version of the client that enabled experimental cross-platform Unix support. -The `Resources` directory should look like this (omitting configuration -files and assets): +The `Resources` directory should look like this (omitting configuration files and assets): ```plaintext /Resources # override the `Resources` folder to update the client binaries @@ -966,21 +927,11 @@ files and assets): ### Update the client launcher -The client launcher (that resides in the game directory) has been updated. -You can replace the old one with version -[2.0.7](https://github.com/CnCNet/dta-mg-client-launcher/releases/tag/v2.0.7). -Remember to rename it from `CncNetLauncherStub.exe` to your launcher name, i.e. -`YRLauncher.exe`, `MentalOmegaLauncher.exe`. Rename the `.config` file -appropriately, i.e. `YRLauncher.exe.config`, `MentalOmegaLauncher.exe.config`. +The client launcher (that resides in the game directory) has been updated. You can replace the old one with version [2.0.7](https://github.com/CnCNet/dta-mg-client-launcher/releases/tag/v2.0.7). Remember to rename it from `CncNetLauncherStub.exe` to your launcher name, i.e. `YRLauncher.exe`, `MentalOmegaLauncher.exe`. Rename the `.config` file appropriately, i.e. `YRLauncher.exe.config`, `MentalOmegaLauncher.exe.config`. ### Update the second-stage updater -The second-stage updater (formerly `clientupdt.dat`) has been reworked. -The new version [1.0.16](https://github.com/CnCNet/cncnet-client-updater/releases/tag/v1.0.16) -should be placed in new directory `Resources/Updater`. The new version -has two variants, for .NET Framework 4.8 (`SecondStageUpdater.exe`) -and for .NET 8.0 (`SecondStageUpdater.dll`). If you want to use the .NET 8.0 -client, you should include the .NET 8.0 updater. +The second-stage updater (formerly `clientupdt.dat`) has been reworked. The new version [1.0.16](https://github.com/CnCNet/cncnet-client-updater/releases/tag/v1.0.16) should be placed in new directory `Resources/Updater`. The new version has two variants, for .NET Framework 4.8 (`SecondStageUpdater.exe`) and for .NET 8.0 (`SecondStageUpdater.dll`). If you want to use the .NET 8.0 client, you should include the .NET 8.0 updater. The `Updater` directory should look like this: @@ -1000,14 +951,10 @@ The old updater will still work, but is no longer maintained. Every file here can be placed either in `Resources` or in theme directories: - `favActive.png` and `favInactive.png`, 21x21 pixels -- `optionsButton.png`, `optionsButton_c.png`, `optionsButtonActive.png`, - `optionsButtonActive_c.png`, `optionsButtonClose.png` - and `optionsButtonClose_c.png`, 18x18 pixels +- `optionsButton.png`, `optionsButton_c.png`, `optionsButtonActive.png`, `optionsButtonActive_c.png`, `optionsButtonClose.png` and `optionsButtonClose_c.png`, 18x18 pixels - `questionMark.png` and `questionMark_c.png`, 18x18 pixels - `sortAlphaAsc.png`, `sortAlphaDesc.png` and `sortAlphaNone.png`, 21x21 pixels -- `statusAI.png`, `statusClear.png`, `statusEmpty.png`, `statusError.png`, - `statusInProgress.png`, `statusOk.png`, `statusUnavailable.png`, - `statusWarning.png`, 21x21 pixels +- `statusAI.png`, `statusClear.png`, `statusEmpty.png`, `statusError.png`, `statusInProgress.png`, `statusOk.png`, `statusUnavailable.png`, `statusWarning.png`, 21x21 pixels You can find example assets in the [YR mod base][mod_base].