Update of /cvsroot/netrek/client/netrekxp/tools/VBasic config utility In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv13747/tools/VBasic config utility Added Files: Form1.frm Form1.frx Form2.frm Form2.frx Form3.frm Form3.frx MSSCCPRJ.SCC README.txt controls.txt netrekconfig.VBP netrekconfig.vbw netrekrc netrekrc.sav Log Message: Adding Joe Evango's Visual Basic configuration utiity to client source code. Not used in Netrek XP 2006, but left here in case anyone wants to use it or improve on it. --- NEW FILE: Form2.frm --- VERSION 5.00 Begin VB.Form Form2 BackColor = &H80000008& Caption = "Netrek Configuration Utility (Page 2 of 3)" ClientHeight = 9855 ClientLeft = 2355 ClientTop = 480 ClientWidth = 10905 Icon = "Form2.frx":0000 LinkTopic = "Form2" ScaleHeight = 9855 ScaleWidth = 10905 Begin VB.CheckBox Check4 BackColor = &H80000007& Caption = "Show Warpstreaks" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H8000000E& Height = 375 Left = 3600 TabIndex = 14 Top = 8400 Value = 1 'Checked Width = 2175 End Begin VB.CheckBox Check3 BackColor = &H80000007& Caption = "Show Stars" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H8000000E& Height = 375 Left = 720 TabIndex = 13 Top = 7800 Value = 1 'Checked Width = 1695 End Begin VB.CommandButton Command2 Caption = "Cancel" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 5280 TabIndex = 12 Top = 9240 Width = 1095 End Begin VB.CheckBox Check2 BackColor = &H80000012& Caption = "Enable Tip Window" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H8000000E& Height = 255 Left = 3600 TabIndex = 10 Top = 7920 Value = 1 'Checked Width = 2175 End Begin VB.CheckBox Check1 BackColor = &H80000007& Caption = "Enable Sound" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H8000000E& Height = 375 Left = 720 TabIndex = 9 Top = 8400 Value = 1 'Checked Width = 1695 End Begin VB.CommandButton Command1 Caption = "Next" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 3960 TabIndex = 8 Top = 9240 Width = 1095 End Begin VB.OptionButton Option4 BackColor = &H80000012& Caption = "BRMH Style" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H8000000E& Height = 375 Left = 360 TabIndex = 6 Top = 5160 Width = 2175 End Begin VB.OptionButton Option3 BackColor = &H80000012& Caption = "Kill Watch Style (Default)" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H8000000E& Height = 375 Left = 360 TabIndex = 5 Top = 4800 Value = -1 'True Width = 2535 End Begin VB.OptionButton Option2 BackColor = &H80000012& Caption = "COW Style" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H8000000E& Height = 375 Left = 360 TabIndex = 4 Top = 4440 Width = 2295 End Begin VB.OptionButton Option1 BackColor = &H80000012& Caption = "Old Style" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H8000000E& Height = 375 Left = 360 TabIndex = 3 Top = 4080 Width = 2295 End Begin VB.Label Label5 BackColor = &H80000008& Caption = "Misc. Options" BeginProperty Font Name = "MS Sans Serif" Size = 12 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FF0000& Height = 375 Left = 360 TabIndex = 11 Top = 7200 Width = 1935 End Begin VB.Label Label3 BackColor = &H80000012& Caption = $"Form2.frx":08CA BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H8000000E& Height = 615 Left = 240 TabIndex = 7 Top = 3360 Width = 7095 End Begin VB.Label Label4 Alignment = 2 'Center BackColor = &H80000012& Caption = $"Form2.frx":09C7 BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H008080FF& Height = 615 Left = 0 TabIndex = 2 Top = 2160 Width = 10935 End Begin VB.Label Label2 Alignment = 2 'Center BackColor = &H00000000& Caption = $"Form2.frx":0B16 BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 1095 Left = 120 TabIndex = 1 Top = 1320 Width = 10695 End Begin VB.Image Image1 Height = 1050 Left = 4200 Picture = "Form2.frx":0C7A Top = 240 Width = 1980 End Begin VB.Image pl4 Height = 3375 Left = 3120 Picture = "Form2.frx":7904 Top = 4080 Visible = 0 'False Width = 7605 End Begin VB.Image pl3 Height = 3345 Left = 3120 Picture = "Form2.frx":5B4BA Top = 4080 Width = 7620 End Begin VB.Image pl2 Height = 3360 Left = 3120 Picture = "Form2.frx":AE488 Top = 4080 Visible = 0 'False Width = 7605 End Begin VB.Image pl1 Height = 3390 Left = 3120 Picture = "Form2.frx":101A4A Top = 4080 Visible = 0 'False Width = 7590 End Begin VB.Label Label1 BackColor = &H80000008& Caption = "PlayerList:" BeginProperty Font Name = "MS Sans Serif" Size = 12 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FF0000& Height = 375 Left = 240 TabIndex = 0 Top = 3000 Width = 1455 End End Attribute VB_Name = "Form2" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False ' Netrek Configurator v1.0 - written by Joe Evango ' ' Program notes from Joe 4/30/06- ' Code contains some comments, pretty easy to follow the logic. ' I am currently using a config directory that contains two netrekrc files, netrek.one and netrek.sep. ' This is done for the two messaging window configs. This should be easy enough to implement into the code ' in order to eliminate the extra sub directory and files if someone has time. ' ' This utility writes to the netrekrc file and assumes it is in located the same folder as the utility so if the ' netrekrc file does not exist the utility will not run properly and error out. When it is run it will also save ' your old netrekrc file as netrek.sav. ' ' Since Netrek code has always been freely shared in the community I will do the same with this config utility. ' Please feel free to help improve the utility and/or include the utility as an add-on if you are working on ' a Windows client. Also feel free to use the logic in this code to create a config utility for another OS. It ' took a while to put the keymap portion of this together but it works well. I only ask that if any modifications ' are made you also make your code changes available to the community. It would also be nice if I was mentioned as ' a contributor in your code comments. ' Variables below for game options are self explanitory Option Explicit Dim playlist As Integer Dim sound As Integer Dim tips As Integer Dim stars As Integer Dim warp As Integer Private Sub Command1_Click() Dim fnum2 As Integer Dim pltxt As String Dim tiptxt As String Dim soundtxt As String Dim startxt As String Dim warptxt As String Dim metatxt As String fnum2 = FreeFile ' Open the file for append. Open ".\netrekrc" For Append As fnum2 ' Add the command. If (Check1.Value = vbChecked) Then sound = 1 End If If (Check1.Value = vbUnchecked) Then sound = 0 End If If (Check2.Value = vbChecked) Then tips = 1 End If If (Check2.Value = vbUnchecked) Then tips = 0 End If If (Check3.Value = vbChecked) Then stars = 1 End If If (Check3.Value = vbUnchecked) Then stars = 0 End If If (Check4.Value = vbChecked) Then warp = 1 End If If (Check4.Value = vbUnchecked) Then warp = 0 End If If playlist = 1 Then pltxt = "playerListStyle: 1" End If If playlist = 2 Then pltxt = "playerListStyle: 2" End If If playlist = 3 Then pltxt = "playerListStyle: 3" End If If playlist = 4 Then pltxt = "playerListStyle: 4" End If If tips = 1 Then tiptxt = "showHints: on" End If If tips = 0 Then tiptxt = "showHints: off" End If If sound = 1 Then soundtxt = "sound: on" End If If sound = 0 Then soundtxt = "sound: off" End If If stars = 0 Then startxt = "showStars: off" End If If stars = 1 Then startxt = "showStars: on" End If If warp = 1 Then warptxt = "warpStreaks: on" End If If warp = 0 Then warptxt = "warpStreaks: off" End If Print #fnum2, pltxt Print #fnum2, Chr(13) Print #fnum2, tiptxt Print #fnum2, Chr(13) Print #fnum2, soundtxt Print #fnum2, Chr(13) Print #fnum2, startxt Print #fnum2, Chr(13) Print #fnum2, warptxt ' Close the file. Close fnum2 'MsgBox "Your configuration has been saved. Your old configuration file has been saved as netrekrc.sav in your Netrek install directory" Form3.Show Unload Form2 End Sub Private Sub Command2_Click() Unload Form2 End Sub Private Sub Form_Load() playlist = 3 End Sub Private Sub Option1_Click() playlist = 1 pl1.Visible = True pl2.Visible = False pl3.Visible = False pl4.Visible = False End Sub Private Sub Option2_Click() playlist = 2 pl1.Visible = False pl2.Visible = True pl3.Visible = False pl4.Visible = False End Sub Private Sub Option3_Click() playlist = 3 pl1.Visible = False pl2.Visible = False pl3.Visible = True pl4.Visible = False End Sub Private Sub Option4_Click() playlist = 4 pl1.Visible = False pl2.Visible = False pl3.Visible = False pl4.Visible = True End Sub Private Sub Text1_Change(Index As Integer) End Sub --- NEW FILE: Form3.frm --- VERSION 5.00 Begin VB.Form Form3 BackColor = &H80000007& Caption = "Netrek Configuration Utility (Page 3 of 3)" ClientHeight = 9900 ClientLeft = 2475 ClientTop = 465 ClientWidth = 10875 Icon = "Form3.frx":0000 LinkTopic = "Form3" ScaleHeight = 9900 ScaleWidth = 10875 Begin VB.TextBox Text1 Height = 285 Index = 22 Left = 6360 MaxLength = 1 TabIndex = 55 Text = "4" [...1253 lines suppressed...] Print #fnum3, "Max Warp - " + Text1(9) Print #fnum3, "Half Speed - " + Text1(10) Print #fnum3, "Quit - " + Text1(15) Print #fnum3, "Plasma - " + Text1(18) Print #fnum3, Chr(13) Print #fnum3, "Warp 0 - " + Text1(19) Print #fnum3, "Warp 2 - " + Text1(20) Print #fnum3, "Warp 3 - " + Text1(21) Print #fnum3, "Warp 4 - " + Text1(22) Close #fnum3 Unload Form3 MsgBox "YOUR CONFIGURATION HAS BEEN CREATED! After you click on OK a document with the controls you have chosen will open. A shortcut to this document has been created in your Netrek Config Utility program group. If you need additional assistance please visit www.netrek.org." Shell Application & " " & FileName, vbNormalFocus Else End If End Sub --- NEW FILE: Form1.frx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: MSSCCPRJ.SCC --- [SCC] SCC=This is a source code control file [netrekconfig.VBP] SCC_Project_Name=this project is not under source code control SCC_Aux_Path=<This is an empty string for the mssccprj.scc file> --- NEW FILE: controls.txt --- These are the controls you have chosen: Mouse Controls: Left Button - Torpedoes Middle Button - Unmap Special Windows (i.e. Close tip window) Right Button - Steer Keyboard Controls: Messaging - m (Be sure to hold your mouse cursor over the Galaxy or Tactical maps when you press 'm'. After pressing 'm' type 'A' to send messages to the All Window, type 'T' to send messages to the Team Window, or type the letter/number of the player you would like to send a message to. After you type A, T, or the player letter/number, type your message and press enter.) Help - h Torpedoes - t Phasers - f Shield - s Bomb - b Cloak - c Drop Armies - x Pickup Armies - z Detonate Own Torps - D Detonate Enemy Torps - d Tractor - T Pressor - y Repair - R Refit Ship Type - r Lock on Target - l Target Info - i Max Warp - @ Half Speed - # Quit - \ Plasma - g Warp 0 - 0 Warp 2 - 2 Warp 3 - 3 Warp 4 - 4 --- NEW FILE: Form1.frm --- VERSION 5.00 Begin VB.Form Form1 BackColor = &H00000000& Caption = "Netrek Configuration Utility (Page 1 of 3)" ClientHeight = 10080 ClientLeft = 2355 ClientTop = 480 ClientWidth = 10830 Icon = "Form1.frx":0000 LinkTopic = "Form1" PaletteMode = 1 'UseZOrder ScaleHeight = 10080 ScaleWidth = 10830 Begin VB.CommandButton Command1 Caption = "Cancel" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 5280 TabIndex = 13 Top = 9480 Width = 1095 End Begin VB.CommandButton cmdAdd Caption = "Next" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 3960 TabIndex = 12 Top = 9480 Width = 1095 End Begin VB.Frame Frame1 BackColor = &H80000012& BorderStyle = 0 'None Caption = "Frame1" Height = 2415 Left = 120 TabIndex = 4 Top = 6960 Width = 10815 Begin VB.OptionButton dash0 BackColor = &H80000012& Caption = "Text Dashboard" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H8000000E& Height = 255 Left = 120 TabIndex = 8 Top = 1440 Width = 1815 End Begin VB.OptionButton dash2 BackColor = &H80000012& Caption = "KRP Dashboard" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H8000000E& Height = 255 Left = 120 TabIndex = 7 Top = 2160 Width = 1815 End Begin VB.OptionButton dash1 BackColor = &H80000012& Caption = "COW Dashboard" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H8000000E& Height = 255 Left = 120 TabIndex = 6 Top = 1800 Width = 1935 End Begin VB.OptionButton dash3 BackColor = &H80000012& Caption = "Labs Dashboard (Default)" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H8000000E& Height = 255 Left = 120 TabIndex = 5 Top = 1080 Value = -1 'True Width = 2535 End Begin VB.Image pic3 Height = 735 Left = 2760 Picture = "Form1.frx":08CA Top = 1560 Width = 7710 End Begin VB.Image pic2 Height = 690 Left = 2760 Picture = "Form1.frx":13094 Top = 1560 Visible = 0 'False Width = 7665 End Begin VB.Image pic1 Height = 675 Left = 2760 Picture = "Form1.frx":244D6 Top = 1560 Visible = 0 'False Width = 7650 End Begin VB.Image pic0 Height = 720 Left = 2760 Picture = "Form1.frx":35264 Top = 1560 Visible = 0 'False Width = 7650 End Begin VB.Label Label3 BackColor = &H80000012& Caption = $"Form1.frx":471E6 BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H8000000E& Height = 495 Index = 1 Left = 120 TabIndex = 10 Top = 480 Width = 6615 End Begin VB.Label Label1 BackColor = &H00000000& Caption = "Dashboard:" BeginProperty Font Name = "MS Sans Serif" Size = 12 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FF0000& Height = 375 Index = 1 Left = 240 TabIndex = 9 Top = 120 Width = 1455 End End Begin VB.OptionButton Option1 BackColor = &H00000000& Caption = "Separate Message Windows (Default)" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H8000000E& Height = 375 Left = 240 TabIndex = 1 Top = 4320 Value = -1 'True Width = 3615 End Begin VB.OptionButton Option2 BackColor = &H00000000& Caption = "One Message Window" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H8000000E& Height = 255 Left = 240 TabIndex = 0 Top = 4680 Width = 2655 End Begin VB.Label Label5 Alignment = 2 'Center BackColor = &H00000000& Caption = $"Form1.frx":47278 BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 855 Left = 0 TabIndex = 14 Top = 1320 Width = 10695 End Begin VB.Label Label4 Alignment = 2 'Center BackColor = &H80000012& Caption = $"Form1.frx":473DC BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H008080FF& Height = 615 Left = 0 TabIndex = 11 Top = 2280 Width = 10695 End Begin VB.Label Label3 BackColor = &H00000000& Caption = $"Form1.frx":4752C BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H8000000E& Height = 735 Index = 0 Left = 120 TabIndex = 3 Top = 3600 Width = 6135 End Begin VB.Label Label1 BackColor = &H00000000& Caption = "Message Windows:" BeginProperty Font Name = "MS Sans Serif" Size = 12 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FF0000& Height = 375 Index = 0 Left = 240 TabIndex = 2 Top = 3240 Width = 2415 End Begin VB.Image separate Height = 2355 Left = 4440 Picture = "Form1.frx":475F8 Top = 4320 Width = 5415 End Begin VB.Image one Height = 2325 Left = 4440 Picture = "Form1.frx":70F06 Top = 4320 Visible = 0 'False Width = 5355 End Begin VB.Image Image1 Height = 1050 Left = 4200 Picture = "Form1.frx":99858 Top = 240 Width = 1980 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False ' Netrek Configurator v1.0 - written by Joe Evango ' ' Program notes from Joe 4/30/06- ' Code contains some comments, pretty easy to follow the logic. ' I am currently using a config directory that contains two netrekrc files, netrek.one and netrek.sep. ' This is done for the two messaging window configs. This should be easy enough to implement into the code ' in order to eliminate the extra sub directory and files if someone has time. ' ' This utility writes to the netrekrc file and assumes it is in located the same folder as the utility so if the ' netrekrc file does not exist the utility will not run properly and error out. When it is run it will also save ' your old netrekrc file as netrek.sav. ' ' Since Netrek code has always been freely shared in the community I will do the same with this config utility. ' Please feel free to help improve the utility and/or include the utility as an add-on if you are working on ' a Windows client. Also feel free to use the logic in this code to create a config utility for another OS. It ' took a while to put the keymap portion of this together but it works well. I only ask that if any modifications ' are made you also make your code changes available to the community. It would also be nice if I was mentioned as ' a contributor in your code comments. Option Explicit Dim screen As Integer Dim dash As Integer Private Sub cmdAdd_Click() Dim fnum As Integer Dim txt As String Dim configtag As String Dim currentdate As String currentdate = Date fnum = FreeFile ' Three section message window, saves your old netrekrc If screen = 0 Then FileCopy ".\netrekrc", ".\netrekrc.sav" FileCopy ".\configs\netrekrc.sep", ".\netrekrc" Else ' One section message window, saves your old netrekrc FileCopy ".\netrekrc", ".\netrekrc.sav" FileCopy ".\configs\netrekrc.one", ".\netrekrc" End If ' Open the file for append. Open ".\netrekrc" For Append As fnum ' Add the command. If dash = 0 Then txt = "newdashboard: 0" End If If dash = 1 Then txt = "newdashboard: 1" End If If dash = 2 Then txt = "newdashboard: 2" End If If dash = 3 Then txt = "newdashboard: 3" End If configtag = "###Configuration changes added by the Netrek Configurator on " + currentdate Print #fnum, Chr(13) Print #fnum, configtag Print #fnum, Chr(13) Print #fnum, txt ' Close the file. Close fnum ' MsgBox "Your configuration has been saved" Form2.Show Unload Form1 End Sub Private Sub Command1_Click() Unload Form1 End Sub ' Pick a dashboard Private Sub dash0_Click() dash = 0 pic0.Visible = True pic1.Visible = False pic2.Visible = False pic3.Visible = False End Sub Private Sub dash1_Click() dash = 1 pic0.Visible = False pic1.Visible = True pic2.Visible = False pic3.Visible = False End Sub Private Sub dash2_Click() dash = 2 pic0.Visible = False pic1.Visible = False pic2.Visible = True pic3.Visible = False End Sub Private Sub dash3_Click() dash = 3 pic0.Visible = False pic1.Visible = False pic2.Visible = False pic3.Visible = True End Sub Private Sub Form_Load() dash = 3 End Sub Private Sub Option1_Click() screen = 0 one.Visible = False separate.Visible = True End Sub Private Sub Option2_Click() screen = 1 separate.Visible = False one.Visible = True End Sub --- NEW FILE: netrekrc.sav --- ########################## Login Options ################################### name:guest login:new-be-nice ########################### Network Options ################################## dontPing: on useRSA: on askForUpdate: on tryUDP: on tryShort: on updatesPerSec: 10 udpClientReceive: 1 udpClientSend: 1 udpDebug: 0 udpSequenceChk: off netStatFreq: 3 netstats: off newMesgFlags: on agriCAPS: on ############################## Key Maps ###################################### buttonmap: keymap:\Qa at q0Q0gffp ########################### Sound stuff ###################################### sound: on sounddir: .\Sounds ############################ Mouse Options ################################### continuousMouse: on motionThresh: 0 tpdotdist: 10 shiftedMouse: off ########################### Options ########################################## forceDisplay: 0 forceMono: 0 cloakChars: ?? clock: 1 colorfulPhasers: on continueTractor: on defaultShip: CA dashboard: on enemyPhasers: 1 phasorShrink: 16 theirPhasorShrink: 16 shrinkPhasorOnMiss: on extraAlertBorder: on galacticFrequent: on keepInfo: 15 keepPeace: on logMessage: off macroKey: TAB messageHUD: 2 metaStatusLevel: 4 PhaserMsg: 5 phaserMsgI: on phaserShrink: 6 phaserStats: on phaserWindow: on reportKills: on shortKillMesg: on showFuelOnLocal: off showGalactic: 1 showLocal: 1 showLock: 3 showMapPlanetNames: on showMySpeed: off showPlanetNames: on showPlayerStatus: on showShields: on showStats: off showTractorPressor: on sortPlayers: on ########################### WINDOW PLACEMENT ################################## ############################################################################### # Fonts # #Valid values are 8,9,10, and 13 fontsize: 10 ############################################################################### # Window placement # # Since changing fonts causes changes to the window sizes # this section has gone through many revisions as well # # The next iteration of all this using the new dashboard.... # I don't usually want to see the MOTD until I'm in # To encourage motd reading I'll activate this - jn WaitMotd.mapped: on ## The main window -- only map it when there's no wait queue netrek.geometry: 1150x875+0 # the maximal window for my sparc 2 #This is a Win32-only option. Hitting ALT-ENTER during #the game will toggle the caption bar also. netrek.w32caption: on war.geometry: +700 help.parent: netrek help.geometry: 500x25+0+525 planet.parent: netrek planet.geometry: +20 ## Ok, on the left side we have a column of six windows; message, ## warning, new dash (ie tstats), my messages, team messages, all ## messages. I have the total messages maped to cover this whole area ## so by using ? you can toggle between seeing the broken up messages ## or the total window. The stats window has been removed in favor of ## the new dashboard. message.parent: netrek message.geometry: 502x19+508+504 message.mapped: on warn.parent: netrek warn.geometry: 502x18+508+523 warn.mapped: on tstat.parent: netrek tstat.geometry: 510x45+0+504 tstat.mapped: on review_your.parent: netrek review_your.geometry: 82x4+0+547 review_your.mapped: on review_team.parent: netrek review_team.geometry: 82x7+0+595 review_team.mapped: on review_all.parent: netrek review_all.geometry: 82x3+0+673 review_all.mapped: on ## With this setup, you can use "?" to cycle between the big review window, the ## four small message windows, and no windows at all. # review.parent: netrek review.geometry: 82x20+0+547 review.mapped: off ## phaser window ## dunno if the following line is really needed or not.... phaserWindow: on ## 0 = don't show 1 = all 2 = team 3 = indiv ## 4 = kill 5 = total PhaserMsg: 1 #(show hit percentage on phaser messages) PhaserStats: on player.parent: netrek player.geometry: +508+542 player.mapped: on reportkills: on review_kill.parent: netrek review.geometry: 80x40+510+170 review_kill.geometry: 82x4+0+712 review_kill.mapped: on ## a couple of other window mappings # # Some UDP stuff udp.geometry: +0+0 udp.mapped: off # I'm planning on using the new dash instead showstats: off stats.parent: netrek stats.geommac.s.%i:%y loss, %v ping, %V stddev stats geometry: 160x108+332+550 # puts the stats window further down stats.geometry: 160x94+842+500 #MACROS dist.taking: (%c) %i Carrying %a to %l @ %n with %f fuel, %d damage dist.help: (%c) %i NEEDS HELP NOW! I have %a armies, %d damage, %s shields! dist.space_control: HELP CONTROL AT %l! GET THERE NOW! lite.taking: /c/l /0 /| %c carrying to %l | lite.space_control: /l /| %l in danger | lite.pickup: /h /| %p++ @ %l | lite.help: %?%S=SB%{/c%}%?%a>0%{/c%} /| %c needs help | /0 lite.crippled:/h | %h is cripple | mac.H.A:% /~\ |_| ~|~ |_| (~ |_| | | |\/| /~\ |\| | ~|~ \./ | mac.H.A:% \_/ | | , | | | (_ | | |_| | | |~| | | | | | . mac.O.T:% /`\ /~_ /~_ ~|~ |_| <~ |~> .^. <~ <~ | mac.O.T:% \./ \_/ \_/ | | | <_ |_> |~| _> <_ . mac.D.T:% | | <~ | |~) \./ /~\ | | |~) |~> /\ (~ <~ \~/ \~/ mac.D.T:% |~| <_ |_ |~ | \_/ |_| |~\ |_> /~~\ _) <_ o o mac.g.A:% ---- __| __| \ | _ \ __|_ _| _ \ __| mac.g.A:% ---- (_ | _| . | ( | ( | | | _| mac.g.A:% ----\___|___|_|\_|\___/ \___|___|___/ ___| mac.m.A:% ,__, Moo! mac.m.A:% (..)/___ mac.m.A:% (__) )\ mac.m.A:% ||--|| * mac.L.A:_____\\ ~ ~ //__"What just happened?"_ mac.L.A:_____(/ @ @ /)________________________ mac.L.A:___oOOo-(_)-oOOo <-(%p)%U ###Configuration changes added by the Netrek Configurator on 5/28/2006 newdashboard: 2 playerListStyle: 1 showHints: on sound: on showStars: on warpStreaks: on --- NEW FILE: netrekconfig.vbw --- Form1 = 140, 63, 667, 527, , 36, 38, 565, 502, C Form2 = 86, 199, 719, 1111, C, 34, 25, 561, 481, C Form3 = 341, 75, 948, 962, C, -18, -8, 695, 495, C --- NEW FILE: Form3.frx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Form2.frx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: netrekrc --- ########################## Login Options ################################### name:guest login:new-be-nice ########################### Network Options ################################## dontPing: on useRSA: on askForUpdate: on tryUDP: on tryShort: on updatesPerSec: 10 udpClientReceive: 1 udpClientSend: 1 udpDebug: 0 udpSequenceChk: off netStatFreq: 3 netstats: off newMesgFlags: on agriCAPS: on ############################## Key Maps ###################################### buttonmap: keymap:\Qa at q0Q0gffp ########################### Sound stuff ###################################### sound: on sounddir: .\Sounds ############################ Mouse Options ################################### continuousMouse: on motionThresh: 0 tpdotdist: 10 shiftedMouse: off ########################### Options ########################################## forceDisplay: 0 forceMono: 0 cloakChars: ?? clock: 1 colorfulPhasers: on continueTractor: on defaultShip: CA dashboard: on enemyPhasers: 1 phasorShrink: 16 theirPhasorShrink: 16 shrinkPhasorOnMiss: on extraAlertBorder: on galacticFrequent: on keepInfo: 15 keepPeace: on logMessage: off macroKey: TAB messageHUD: 2 metaStatusLevel: 4 PhaserMsg: 5 phaserMsgI: on phaserShrink: 6 phaserStats: on phaserWindow: on reportKills: on shortKillMesg: on showFuelOnLocal: off showGalactic: 1 showLocal: 1 showLock: 3 showMapPlanetNames: on showMySpeed: off showPlanetNames: on showPlayerStatus: on showShields: on showStats: off showTractorPressor: on sortPlayers: on ########################### WINDOW PLACEMENT ################################## ############################################################################### # Fonts # #Valid values are 8,9,10, and 13 fontsize: 10 ############################################################################### # Window placement # # Since changing fonts causes changes to the window sizes # this section has gone through many revisions as well # # The next iteration of all this using the new dashboard.... # I don't usually want to see the MOTD until I'm in # To encourage motd reading I'll activate this - jn WaitMotd.mapped: on ## The main window -- only map it when there's no wait queue netrek.geometry: 1150x875+0 # the maximal window for my sparc 2 #This is a Win32-only option. Hitting ALT-ENTER during #the game will toggle the caption bar also. netrek.w32caption: on war.geometry: +700 help.parent: netrek help.geometry: 500x25+0+525 planet.parent: netrek planet.geometry: +20 ## Ok, on the left side we have a column of six windows; message, ## warning, new dash (ie tstats), my messages, team messages, all ## messages. I have the total messages maped to cover this whole area ## so by using ? you can toggle between seeing the broken up messages ## or the total window. The stats window has been removed in favor of ## the new dashboard. message.parent: netrek message.geometry: 502x19+508+504 message.mapped: on warn.parent: netrek warn.geometry: 502x18+508+523 warn.mapped: on tstat.parent: netrek tstat.geometry: 510x45+0+504 tstat.mapped: on review_your.parent: netrek review_your.geometry: 82x4+0+547 review_your.mapped: on review_team.parent: netrek review_team.geometry: 82x7+0+595 review_team.mapped: on review_all.parent: netrek review_all.geometry: 82x3+0+673 review_all.mapped: on ## With this setup, you can use "?" to cycle between the big review window, the ## four small message windows, and no windows at all. # review.parent: netrek review.geometry: 82x20+0+547 review.mapped: off ## phaser window ## dunno if the following line is really needed or not.... phaserWindow: on ## 0 = don't show 1 = all 2 = team 3 = indiv ## 4 = kill 5 = total PhaserMsg: 1 #(show hit percentage on phaser messages) PhaserStats: on player.parent: netrek player.geometry: +508+542 player.mapped: on reportkills: on review_kill.parent: netrek review.geometry: 80x40+510+170 review_kill.geometry: 82x4+0+712 review_kill.mapped: on ## a couple of other window mappings # # Some UDP stuff udp.geometry: +0+0 udp.mapped: off # I'm planning on using the new dash instead showstats: off stats.parent: netrek stats.geommac.s.%i:%y loss, %v ping, %V stddev stats geometry: 160x108+332+550 # puts the stats window further down stats.geometry: 160x94+842+500 #MACROS dist.taking: (%c) %i Carrying %a to %l @ %n with %f fuel, %d damage dist.help: (%c) %i NEEDS HELP NOW! I have %a armies, %d damage, %s shields! dist.space_control: HELP CONTROL AT %l! GET THERE NOW! lite.taking: /c/l /0 /| %c carrying to %l | lite.space_control: /l /| %l in danger | lite.pickup: /h /| %p++ @ %l | lite.help: %?%S=SB%{/c%}%?%a>0%{/c%} /| %c needs help | /0 lite.crippled:/h | %h is cripple | mac.H.A:% /~\ |_| ~|~ |_| (~ |_| | | |\/| /~\ |\| | ~|~ \./ | mac.H.A:% \_/ | | , | | | (_ | | |_| | | |~| | | | | | . mac.O.T:% /`\ /~_ /~_ ~|~ |_| <~ |~> .^. <~ <~ | mac.O.T:% \./ \_/ \_/ | | | <_ |_> |~| _> <_ . mac.D.T:% | | <~ | |~) \./ /~\ | | |~) |~> /\ (~ <~ \~/ \~/ mac.D.T:% |~| <_ |_ |~ | \_/ |_| |~\ |_> /~~\ _) <_ o o mac.g.A:% ---- __| __| \ | _ \ __|_ _| _ \ __| mac.g.A:% ---- (_ | _| . | ( | ( | | | _| mac.g.A:% ----\___|___|_|\_|\___/ \___|___|___/ ___| mac.m.A:% ,__, Moo! mac.m.A:% (..)/___ mac.m.A:% (__) )\ mac.m.A:% ||--|| * mac.L.A:_____\\ ~ ~ //__"What just happened?"_ mac.L.A:_____(/ @ @ /)________________________ mac.L.A:___oOOo-(_)-oOOo <-(%p)%U ###Configuration changes added by the Netrek Configurator on 6/11/2006 newdashboard: 2 playerListStyle: 3 showHints: on sound: on showStars: on warpStreaks: on ###Keymap added by the Netrek Configurator on 6/11/2006 keymap:\Qq0Q0gffp ###Buttonmap added by the Netrek Configurator on 6/11/2006 buttonmap:1t --- NEW FILE: netrekconfig.VBP --- Type=Exe Form=Form1.frm Form=Form2.frm Form=Form3.frm IconForm="Form1" Startup="Form1" HelpFile="" Title="netrekconfig" ExeName32="netrekconfig.exe" Command32="" Name="Netrek_Configurator" HelpContextID="0" CompatibleMode="0" MajorVer=1 MinorVer=0 RevisionVer=0 AutoIncrementVer=0 ServerSupportFiles=0 VersionCompanyName="PlayNetrek.org" CompilationType=0 OptimizationType=0 FavorPentiumPro(tm)=0 CodeViewDebugInfo=0 NoAliasing=0 BoundsCheck=0 OverflowCheck=0 FlPointCheck=0 FDIVCheck=0 UnroundedFP=0 StartMode=0 Unattended=0 Retained=0 ThreadPerObject=0 MaxNumberOfThreads=1 DebugStartupOption=0 [MS Transaction Server] AutoRefresh=1 --- NEW FILE: README.txt --- Netrek Configurator v1.0 - written by Joe Evango Program notes from Joe 4/30/06- Code contains some comments, pretty easy to follow the logic. I am currently using a config directory that contains two netrekrc files, netrek.one and netrek.sep. This is done for the two messaging window configs. This should be easy enough to implement into the code in order to eliminate the extra sub directory and files if someone has time. This utility writes to the netrekrc file and assumes it is in located the same folder as the utility so if the netrekrc file does not exist the utility will not run properly and error out. When it is run it will also save your old netrekrc file as netrek.sav. Since Netrek code has always been freely shared in the community I will do the same with this config utility. Please feel free to help improve the utility and/or include the utility as an add-on if you are working on a Windows client. Also feel free to use the logic in this code to create a config utility for another OS. It took a while to put the keymap portion of this together but it works well. I only ask that if any modifications are made you also make your code changes available to the community. It would also be nice if I was mentioned as a contributor in your code comments.