Results 1 to 9 of 9

Thread: Launcher for MP

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Hellhound1's Avatar *Knock Knock*
    Join Date
    Apr 2010
    Location
    United Kingdom
    Posts
    994

    Default Launcher for MP

    Hello everyone,

    Havent been around for a while, but im back and want to get MP up and running. GI is doing a fantastic job on the EDU files, so much to the point where we're fairly confident its better than EB.

    However, we've had troubles starting MP through the launcher (due to the launcher loading the wrong files and EDUs)

    So with my limited knowledge of programming i delved into the launcher code. So far so good, just one problem. Can anyone take a look at the following code and tell me why i get the error
    "C:\RS2 Beta\launcher\Roma Surrectum II MP.au3 (382) : ==> "EndSwitch" statement with no matching "Switch" statement.:"

    Im fairly sure they match up. But hey.
    Any help would be appreciated!

    Spoiler Alert, click show to read: 
    While 1
    If _SoundPos($sound, 2) >= _SoundLength($sound, 2) Then
    _SoundPlay($sound, 0)
    EndIf
    Switch GUIGetMsg()

    Case $GUI_EVENT_CLOSE, $quitButton
    ExitLoop





    Case $saveCmlLineParamsButton
    $cmdLineParams = GUICtrlRead ($cmdLineInput)
    If IniWrite(@ScriptDir & "\" & $iniFile, $defaultIniSection, $defaultIniKey, $cmdLineParams) == 0 Then
    MsgBox(BitOr(4096, 16), "Could not write to " & $iniFile, 12)
    Else
    MsgBox(4096, "RS II - message", "The changes have been saved. You can now start all RS II campaigns with your new options.", 12)
    EndIf

    Case $EngineSelectCombo
    $EngineSelected = GUICtrlRead($EngineSelectCombo)
    If $EngineSelected = "Select your engine" Then
    $EngineSelected = "RomeTW.exe"
    EndIf

    IniWrite(@ScriptDir & "\" & $iniFile, $defaultIniSection, "Engine", $EngineSelected)
    ; $iniFile, $defaultIniSection, $EngineIniKey, $defaultEngine
    If IniWrite(@ScriptDir & "\" & $iniFile, $defaultIniSection, $EngineIniKey, $EngineSelected) == 0 Then
    MsgBox(BitOr(4096, 16), "Could not write to " & $iniFile, 12)
    Else
    ; MsgBox(4096, "RS II - message", "The changes have been saved. You can now start all RS II campaigns with your new options.", 12)
    EndIf


    Case $FactionSelectCombo
    $FactionSelected = GUICtrlRead($FactionSelectCombo)
    $EngineSelected = GUICtrlRead($EngineSelectCombo)

    If $EngineSelected = "Select your engine" Then
    $EngineSelected = "RomeTW.exe"
    EndIf

    IniWrite(@ScriptDir & "\" & $iniFile, $defaultIniSection, "Faction", $FactionSelected)

    ; $iniFile, $defaultIniSection, $EngineIniKey, $defaultEngine
    If IniWrite(@ScriptDir & "\" & $iniFile, $defaultIniSection, $FactionIniKey, $FactionSelected) == 0 Then
    MsgBox(BitOr(4096, 16), "Could not write to " & $iniFile, 12)
    Else
    ; MsgBox(4096, "RS II - message", "The changes have been saved. You can now start all RS II campaigns with your new options.", 12)
    EndIf

    _FactionSelected()

    Case $maprwm
    _DeleteMapRwm()
    MsgBox(4096, "RS II - message", "All RS II map.rwm files have been removed.", 12)


    Case $SteamButton
    $Steam = MsgBox(4, "Steam?", "Do you use the Steam version of Rome Total War?")
    If $Steam = 6 Then
    IniWrite(@ScriptDir & "\launcher.ini", $defaultIniSection, "SteamLaunch", "Yes")
    GUICtrlSetData( $SteamButton, "Steam: YES" )
    _BISteam()
    Elseif $Steam = 7 Then
    IniWrite(@ScriptDir & "\launcher.ini", $defaultIniSection, "SteamLaunch", "No")
    GUICtrlSetData( $SteamButton, "Steam: NO" )
    Endif

    Case $playRSIIButton

    $EngineSelected = GUICtrlRead($EngineSelectCombo)

    If $EngineSelected = "Select your engine" Then
    $EngineSelected = "RomeTW.exe"
    EndIf

    ; $iniFile, $defaultIniSection, $EngineIniKey, $defaultEngine
    If IniWrite(@ScriptDir & "\" & $iniFile, $defaultIniSection, $FactionIniKey, $FactionSelected) == 0 Then
    MsgBox(BitOr(4096, 16), "Could not write to " & $iniFile, 12)
    Else
    ; MsgBox(4096, "RS II - message", "The changes have been saved. You can now start all RS II campaigns with your new options.", 12)
    EndIf

    ; $iniFile, $defaultIniSection, $EngineIniKey, $defaultEngine
    If IniWrite(@ScriptDir & "\" & $iniFile, $defaultIniSection, $EngineIniKey, $EngineSelected) == 0 Then
    MsgBox(BitOr(4096, 16), "Could not write to " & $iniFile, 12)
    Else
    ; MsgBox(4096, "RS II - message", "The changes have been saved. You can now start all RS II campaigns with your new options.", 12)
    EndIf

    If $Check = 0 Then
    $YesNo = MsgBox(4,"Ready?", "Are you ready to play multiplayer?")
    $Check = 1
    Else
    $YesNo = MsgBox(4,"Really ready?", "Are you really sure you're good enough?")
    EndIf

    If $YesNo = 6 Then

    _FactionSelected()

    $SteamIni = Iniread (@ScriptDir & "\launcher.ini", $defaultIniSection, "SteamLaunch", "0")

    If $SteamIni = "No" Then
    If FileExists($EngineSelected) Then
    If $SVNActive = 1 Then
    If $CurrentRevision = $PreviousRevision Then
    Else
    _DeleteMapRwm()
    EndIf
    Else
    EndIf
    Run($EngineSelected & " " & $FactionSelected & " " & $cmdLineParams)

    _SoundClose($sound)
    _SoundPlay($sound2, 1)

    ;Sleep(2000)
    ExitLoop
    Else
    Global $ErrorMsg1 = "You don't have Roma Surrectum II installed in the correct folder. (" & $GameDir & ")"
    Global $ErrorMsg2 = "Engine: " & $EngineSelected & ", Faction campaign: " & $FactionSelected
    Global $ErrorMsg3 = "In total: '" & $EngineSelected & " " & $FactionSelected & $cmdLineParams & "'"
    MsgBox(4096,"RS II - error", "If you get this error, then you've probably done something wrong. Please report the next three messages.")
    MsgBox(4096,"RS II - error 1/3", $ErrorMsg1)
    MsgBox(4096,"RS II - error 2/3", $ErrorMsg2)
    MsgBox(4096,"RS II - error 3/3", $ErrorMsg3)

    If IniWrite(@ScriptDir & "\" & $ErrorIni, $defaultErrorSection, $DefaultErrorReport1, $ErrorMsg1) == 0 Then
    MsgBox(BitOr(4096, 16), "Could not write to " & $iniFile, 12)
    Else
    ; MsgBox(4096, "RS II - message", "The changes have been saved. You can now start all RS II campaigns with your new options.", 12)
    EndIf
    If IniWrite(@ScriptDir & "\" & $ErrorIni, $defaultErrorSection, $DefaultErrorReport2, $ErrorMsg2) == 0 Then
    MsgBox(BitOr(4096, 16), "Could not write to " & $iniFile, 12)
    Else
    ; MsgBox(4096, "RS II - message", "The changes have been saved. You can now start all RS II campaigns with your new options.", 12)
    EndIf
    If IniWrite(@ScriptDir & "\" & $ErrorIni, $defaultErrorSection, $DefaultErrorReport3, $ErrorMsg3) == 0 Then
    MsgBox(BitOr(4096, 16), "Could not write to " & $iniFile, 12)
    Else
    ; MsgBox(4096, "RS II - message", "The changes have been saved. You can now start all RS II campaigns with your new options.", 12)
    EndIf
    $Check = 0
    EndIf

    ElseIf $SteamIni = "Yes" Then
    If FileExists($EngineSelected) Then
    If $SVNActive = 1 Then
    If $CurrentRevision = $PreviousRevision Then
    Else
    _DeleteMapRwm()
    EndIf
    EndIf
    EndIf


    EndSwitch
    WEnd


    Thanks!

  2. #2
    Hellhound1's Avatar *Knock Knock*
    Join Date
    Apr 2010
    Location
    United Kingdom
    Posts
    994

    Default Re: Launcher for MP

    Nevermind, its cool, IVE DONE IT ;D (with one seemingly pointless error at the end, which can be safely ignored until i figure out why)

    Ill package it into an installer, and if anybody has the time, can they check it works please?
    It'll include GIs latest EDU and the necessary files so that it doesnt mess with SP.

    ##Edit
    Ive uploaded the file

    Please try it out, no need to play a game, just load it up and make sure it works!
    Just need to install it to where your RTW.exe is kept.
    Cheers!
    ##Edit2
    it also includes the file that should stop desync in games.
    Last edited by Hellhound1; March 08, 2011 at 04:41 PM.

  3. #3
    |Sith|Galvanized Iron's Avatar Protector Domesticus
    Join Date
    Feb 2010
    Location
    I live in Kansas
    Posts
    4,710

    Default Re: Launcher for MP

    Its the Tactics 0.5 EDU?
    Also responsible for the Roma Surrectum II Multiplayer mode
    Rest In Peace Colonel Muammar Gaddafi
    Forward to Victory Great Leader Assad!


  4. #4
    Hellhound1's Avatar *Knock Knock*
    Join Date
    Apr 2010
    Location
    United Kingdom
    Posts
    994

    Default Re: Launcher for MP

    Yes it is. The latest one.

  5. #5
    Hellhound1's Avatar *Knock Knock*
    Join Date
    Apr 2010
    Location
    United Kingdom
    Posts
    994

    Default Re: Launcher for MP

    Updated with fix.
    Interesting change if anyones bothered, but the launcher will delete map.rwm EVERY time you click start game with this

  6. #6
    |Sith|Galvanized Iron's Avatar Protector Domesticus
    Join Date
    Feb 2010
    Location
    I live in Kansas
    Posts
    4,710

    Default Re: Launcher for MP

    Good news Hellhound, Roach was now able to launch RS II MP for the first time thanks to your work!
    Also responsible for the Roma Surrectum II Multiplayer mode
    Rest In Peace Colonel Muammar Gaddafi
    Forward to Victory Great Leader Assad!


  7. #7
    |Sith|Galvanized Iron's Avatar Protector Domesticus
    Join Date
    Feb 2010
    Location
    I live in Kansas
    Posts
    4,710

    Default Re: Launcher for MP

    Varangian also succesful now
    Also responsible for the Roma Surrectum II Multiplayer mode
    Rest In Peace Colonel Muammar Gaddafi
    Forward to Victory Great Leader Assad!


  8. #8
    Hellhound1's Avatar *Knock Knock*
    Join Date
    Apr 2010
    Location
    United Kingdom
    Posts
    994

    Default Re: Launcher for MP

    Thats brilliant news! Good to know it works.
    Im updating it soon though, cut down the size a little, and edit some little bits and pieces.

  9. #9
    Hellhound1's Avatar *Knock Knock*
    Join Date
    Apr 2010
    Location
    United Kingdom
    Posts
    994

    Default Re: Launcher for MP

    New update (with 0.7 edu) adds some extras to the launcher. Check out the credits ;]

    It also only deletes map.rwm for multiplayer, and has new launcher music!
    Last edited by Hellhound1; March 11, 2011 at 12:34 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •