skybaks / pyplanet-cup_manager

Competition Management Plugin for Trackmania Pyplanet
GNU General Public License v3.0
7 stars 2 forks source link

[TeamMode] 2v2 / 3v3 TM202 style like TM2020 Ranked #49

Open w1lla opened 2 years ago

w1lla commented 2 years ago

Hi,

I made a local.py with the following settings for maniaplanet and tm2020 not yet properly tested yet:

CUP_MANAGER_PRESETS = {
    'rounds180': {
        'aliases': [ 'smurfscup', 'sc' ],
        'script': {
            'tm': 'Rounds.Script.txt',
            'tmnext': 'Trackmania/TurboRounds.Script.txt',
        },
        'settings': {
            'S_FinishTimeout': 10,
            'S_PointsLimit': 180,
            'S_WarmUpNb': 1,
            'S_WarmUpDuration': 0,
            'S_PointsRepartition': '50,45,41,38,36,34,32,30,28,26,24,22,20,18,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,1,1',
            'S_TurboFinishTime': True,
        },
    },

    'rounds240': {
        'aliases': [],
        'script': {
            'tm': 'Rounds.Script.txt',
            'tmnext': 'Trackmania/TM_Rounds_Online.Script.txt',
        },
        'settings': {
            'S_FinishTimeout': 10,
            'S_PointsLimit': 240,
            'S_WarmUpNb': 1,
            'S_WarmUpDuration': 900,
            'S_PointsRepartition': '50,45,41,38,36,34,32,30,28,26,24,22,20,18,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,1,1',
            'S_TurboFinishTime': True,
        },
    },

    'rounds480': {
        'aliases': [ 'mxlc', 'mxvc', 'nac' ],
        'script': {
            'tm': 'Rounds.Script.txt',
            'tmnext': 'Trackmania/TurboRounds.Script.txt',
        },
        'settings': {
            'S_FinishTimeout': 10,
            'S_PointsLimit': 480,
            'S_WarmUpNb': 1,
            'S_WarmUpDuration': 600,
            'S_PointsRepartition': '50,45,41,38,36,34,32,30,28,26,24,22,20,18,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,1,1',
            'S_TurboFinishTime': True,
        },
    },

    'laps50': {
        'aliases': [ 'hec' ],
        'script': {
            'tm': 'Laps.Script.txt',
            'tmnext': 'Trackmania/TM_Laps_Online.Script.txt',
        },
        'settings': {
            'S_FinishTimeout': 360,
            'S_ForceLapsNb': 50,
            'S_WarmUpNb': 1,
            'S_WarmUpDuration': 600,
        },
    },

    'timeattack': {
        'aliases': [ 'ta' ],
        'script': {
            'tm': 'TimeAttack.Script.txt',
            'tmnext': 'Trackmania/TM_TimeAttack_Online.Script.txt',
        },
        'settings': {
            'S_TimeLimit': 360,
            'S_WarmUpNb': 0,
            'S_WarmUpDuration': 0,
        },
    },

    'rounds480nadeo': {
        'aliases': [ 'tmac', 'tmsc', 'tmic', 'rs' ],
        'script': {
            'tm': 'Rounds.Script.txt',
            'tmnext': 'Trackmania/TurboRounds.Script.txt',
        },
        'settings': {
            'S_FinishTimeout': 35,
            'S_PointsLimit': 480,
            'S_WarmUpNb': 1,
            'S_WarmUpDuration': 600,
            'S_PointsRepartition': '50,45,41,38,36,34,32,30,28,26,24,22,20,18,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,1,1',
        },
    },

    'tvs': {
        'aliases': [ 'tvs' ],
        'script': {
            'tm': 'Team.Script.txt',
            'tmnext': 'Trackmania/TM_Teams_Online.Script.txt',
        },
        'settings': {
            'S_FinishTimeout': 30,
            'S_FinishTimeoutDivider': 3,
            'S_MaxPointsPerRound': 6,
            'S_PointsGap': 1,
            'S_UseCustomPointsRepartition': 1,
            'S_PointsRepartition2VS': '4,3,2,1',
            'S_CumulatePoints': 0,
            'S_RoundsPerMap': -1,
            'S_MapsPerMatch': -1,
            'S_UseTieBreak': 1,
            'S_WarmUpTimeout': -1,
            'S_PointsRepartition1VS': '2,1',
            'S_UseAlternateRules': 0,
            'S_NoRoundTie': 1,
            'S_BalanceScore': 1,
            'S_EarlyEndMatchCallback': 1,
            'S_WarmUpNb': 1,
            'S_WarmUpDuration': 30,
            'S_PointsRepartition': '6,5,4,3,2,1',
        },
    },

}

# Use this to define planet reward payouts. Admins can select from these payout
# schemes from the match results view.
CUP_MANAGER_PAYOUTS = {
    'hec': [
        1000,
        700,
        500,
        400,
        300,
    ],

    'smurfscup': [
        6000,
        4000,
        3000,
        2500,
        1500,
        1000,
        800,
        600,
        400,
        200,
    ],

}

# Use this to define the name and alias of cup.
CUP_MANAGER_NAMES = {

    'mxlc': {
        'name': 'ManiaExchange Lagoon Cup',
        'preset_on': 'mxlc',
        'preset_off': 'timeattack',
        'map_count': 1,
    },

    'hec': {
        'name': 'Hypeboys Endurance Cup',
        'preset_on': 'laps50',
        'preset_off': 'timeattack',
        'map_count': 1,
        'payout': 'hec',
    },

    'nac': {
        'name': 'North America Cup',
        'preset_on': 'nac',
        'preset_off': 'timeattack',
        'map_count': 1,
    },

    'tec': {
        'name': 'Expedition Cup',
        'preset_on': 'rounds180',
        'preset_off': 'timeattack',
        'map_count': 6,
    },

    'tmic': {
        'name': 'TM2 Island Cup',
        'preset_on': 'rounds480nadeo',
        'preset_off': 'timeattack',
        'map_count': 1,
    },

    'tmac': {
        'name': 'TMOne Alpine Cup',
        'preset_on': 'rounds480nadeo',
        'preset_off': 'timeattack',
        'map_count': 1,
    },

    'tmsc': {
        'name': 'TMOne Speed Cup',
        'preset_on': 'rounds480nadeo',
        'preset_off': 'timeattack',
        'map_count': 1,
    },

    'nafc': {
        'name': 'NA Fun Cup',

        'preset_off': 'timeattack',

    },

    'tvs': {
        'name': 'Teams Versus Style like TM2020 Ranked',
        'preset_on': 'tvs',
        'preset_off': 'timeattack',
        'map_count': 1,
    },

}

Might have some issues as only one map is actually is being used like in tm2020 ranked.

Some issues:

In database in TM2020: country for player is World?! weird it might seem eventually.


        <setting name="S_UseClublinks" type="boolean" value="0"/>
        <setting name="S_UseClublinksSponsors" type="boolean" value="0"/>
        <setting name="S_NeutralEmblemUrl" type="text" value=""/>
        <setting name="S_ScriptEnvironment" type="text" value="development"/>
        <setting name="S_IsChannelServer" type="boolean" value="0"/>
        <setting name="S_DelayBeforeNextMap" type="integer" value="2000"/>
        <setting name="S_RespawnBehaviour" type="integer" value="0"/>
        <setting name="S_ForceLapsNb" type="integer" value="-1"/>
        <setting name="S_InfiniteLaps" type="boolean" value="0"/>
        <setting name="S_SeasonIds" type="text" value=""/>
        <setting name="S_IsSplitScreen" type="boolean" value="0"/>
        <setting name="S_DecoImageUrl_Checkpoint" type="text" value="file://Media/Manialinks/Nadeo/TMNext/Modes/Matchmaking/Decal_Matchmaking.dds"/>
        <setting name="S_DecoImageUrl_DecalSponsor4x1" type="text" value=""/>
        <setting name="S_DecoImageUrl_Screen16x9" type="text" value=""/>
        <setting name="S_DecoImageUrl_Screen8x1" type="text" value=""/>
        <setting name="S_DecoImageUrl_Screen16x1" type="text" value=""/>
        <setting name="S_TrustClientSimu" type="boolean" value="1"/>
        <setting name="S_UseCrudeExtrapolation" type="boolean" value="1"/>
        <setting name="S_SynchronizePlayersAtMapStart" type="boolean" value="1"/>
        <setting name="S_DisableGoToMap" type="boolean" value="0"/>
        <setting name="S_PointsRepartition" type="text" value="6, 5, 4, 3, 2, 1"/>
        <setting name="S_SynchronizePlayersAtRoundStart" type="boolean" value="1"/>
        <setting name="S_PointsLimit" type="integer" value="5"/>
        <setting name="S_FinishTimeout" type="integer" value="-1"/>
        <setting name="S_FinishTimeoutDivider" type="integer" value="3"/>
        <setting name="S_MaxPointsPerRound" type="integer" value="6"/>
        <setting name="S_PointsGap" type="integer" value="1"/>
        <setting name="S_UseCustomPointsRepartition" type="boolean" value="1"/>
        <setting name="S_PointsRepartition2VS" type="text" value="4, 3, 2, 1"/>
        <setting name="S_PointsRepartition1VS" type="text" value="2, 1"/>
        <setting name="S_CumulatePoints" type="boolean" value="0"/>
        <setting name="S_RoundsPerMap" type="integer" value="-1"/>
        <setting name="S_MapsPerMatch" type="integer" value="-1"/>
        <setting name="S_UseTieBreak" type="boolean" value="1"/>
        <setting name="S_WarmUpNb" type="integer" value="0"/>
        <setting name="S_WarmUpDuration" type="integer" value="0"/>
        <setting name="S_WarmUpTimeout" type="integer" value="-1"/>
        <setting name="S_UseAlternateRules" type="boolean" value="0"/>
        <setting name="S_NoRoundTie" type="boolean" value="1"/>
        <setting name="S_BalanceScore" type="boolean" value="1"/>
        <setting name="S_EarlyEndMatchCallback" type="boolean" value="1"/>```
 are the settings for TM2020.

```     <!-- Default : <setting name="S_ChatTime" type="integer" value="10"/> -->
        <!-- Default : <setting name="S_UseClublinks" type="boolean" value="0"/> -->
        <!-- Default : <setting name="S_UseClublinksSponsors" type="boolean" value="0"/> -->
        <!-- Default : <setting name="S_NeutralEmblemUrl" type="text" value=""/> -->
        <!-- Default : <setting name="S_ScriptEnvironment" type="text" value="production"/> -->
        <!-- Default : <setting name="S_IsChannelServer" type="boolean" value="0"/> -->
        <!-- Default : <setting name="S_DelayBeforeNextMap" type="integer" value="2000"/> -->
        <!-- Default : <setting name="S_Debug_DisplayChannelProgression" type="boolean" value="0"/> -->
        <!-- Default : <setting name="S_MatchmakingAPIUrl" type="text" value="https://v4.live.maniaplanet.com/ingame/public/matchmaking"/> -->
        <!-- Default : <setting name="S_MatchmakingMatchServers" type="text" value=""/> -->
        <!-- Default : <setting name="S_MatchmakingMode" type="integer" value="0"/> -->
        <!-- Default : <setting name="S_MatchmakingRematchRatio" type="real" value="-1"/> -->
        <!-- Default : <setting name="S_MatchmakingRematchNbMax" type="integer" value="2"/> -->
        <!-- Default : <setting name="S_MatchmakingVoteForMap" type="boolean" value="0"/> -->
        <!-- Default : <setting name="S_MatchmakingProgressive" type="boolean" value="0"/> -->
        <!-- Default : <setting name="S_MatchmakingWaitingTime" type="integer" value="20"/> -->
        <!-- Default : <setting name="S_MatchmakingEnablePenalty" type="boolean" value="1"/> -->
        <!-- Default : <setting name="S_LobbyRoundPerMap" type="integer" value="6"/> -->
        <!-- Default : <setting name="S_LobbyMatchmakerPerRound" type="integer" value="30"/> -->
        <!-- Default : <setting name="S_LobbyMatchmakerWait" type="integer" value="2"/> -->
        <!-- Default : <setting name="S_LobbyMatchmakerTime" type="integer" value="8"/> -->
        <!-- Default : <setting name="S_LobbyDisplayMasters" type="boolean" value="1"/> -->
        <!-- Default : <setting name="S_LobbyDisableUI" type="boolean" value="0"/> -->
        <!-- Default : <setting name="S_LobbyAggressiveTransfer" type="boolean" value="1"/> -->
        <!-- Default : <setting name="S_KickTimedOutPlayers" type="boolean" value="1"/> -->
        <!-- Default : <setting name="S_MatchmakingErrorMessage" type="text" value="’An error occured in the matchmaking API. If the problem persist please try to contact this server administrator."/> -->
        <!-- Default : <setting name="S_MatchmakingLogAPIError" type="boolean" value="0"/> -->
        <!-- Default : <setting name="S_MatchmakingLogAPIDebug" type="boolean" value="0"/> -->
        <!-- Default : <setting name="S_MatchmakingLogMiscDebug" type="boolean" value="0"/> -->
        <!-- Default : <setting name="S_ProgressiveActivation_WaitingTime" type="integer" value="180000"/> -->
        <!-- Default : <setting name="S_ProgressiveActivation_PlayersNbRatio" type="integer" value="1"/> -->
        <!-- Default : <setting name="S_AllowRespawn" type="boolean" value="1"/> -->
        <!-- Default : <setting name="S_RespawnBehaviour" type="integer" value="0"/> -->
        <!-- Default : <setting name="S_HideOpponents" type="boolean" value="0"/> -->
        <!-- Default : <setting name="S_UseLegacyXmlRpcCallbacks" type="boolean" value="1"/> -->
        <!-- Default : <setting name="S_PointsLimit" type="integer" value="5"/> -->
        <!-- Default : <setting name="S_FinishTimeout" type="integer" value="-1"/> -->
        <!-- Default : <setting name="S_UseAlternateRules" type="boolean" value="0"/> -->
        <!-- Default : <setting name="S_ForceLapsNb" type="integer" value="-1"/> -->
        <!-- Default : <setting name="S_DisplayTimeDiff" type="boolean" value="0"/> -->
        <!-- Default : <setting name="S_PointsRepartition" type="text" value=""/> -->
        <!-- Default : <setting name="S_MaxPointsPerRound" type="integer" value="6"/> -->
        <!-- Default : <setting name="S_PointsGap" type="integer" value="1"/> -->
        <!-- Default : <setting name="S_UseCustomPointsRepartition" type="boolean" value="0"/> -->
        <!-- Default : <setting name="S_CumulatePoints" type="boolean" value="0"/> -->
        <!-- Default : <setting name="S_RoundsPerMap" type="integer" value="-1"/> -->
        <!-- Default : <setting name="S_MapsPerMatch" type="integer" value="-1"/> -->
        <!-- Default : <setting name="S_UseTieBreak" type="boolean" value="1"/> -->
        <!-- Default : <setting name="S_WarmUpNb" type="integer" value="0"/> -->
        <!-- Default : <setting name="S_WarmUpDuration" type="integer" value="0"/> -->
        <!-- Default : <setting name="S_NbPlayersPerTeamMax" type="integer" value="3"/> -->
        <!-- Default : <setting name="S_NbPlayersPerTeamMin" type="integer" value="3"/> -->```

Are the settings for ManiaPlanet TeamMode.