TMModeTemplate
Gamemode starter template for Trackmania2020
Install / Use
/learn @reaby/TMModeTemplateREADME
Gamemode Starter Template
Development
Preparations
- Copy the contents of
Dedicated/Mapsfolder into your dedicated server'sUserData/Mapsfolder. - Setup a symlink to this project
Scripts-folder: Windows:
Linux:D:\trackmania\server\UserData> mklink /D Scripts D:\trackmania\TMModeTemplate\Dedicated\Scriptsln -s <path from> <path to>When you wish to change between project, just rename the
Scriptsfolder toScripts_modenameand do the opposite for the other script. - Install
vscodefrom https://code.visualstudio.com/Download - Open the
workspace-file, install suggested extensions:maniascript-supportby reabymslintby aessixmlby redhat
- Install
node.jsandnpmto your platform from https://nodejs.org- Copy
Tools\config.default.jstoTools\config.jsand set the appropriate values. - Run
npm installat theTools-folder - Done
- Copy
Start local dedicated server
Windows:
TrackmaniaServer.exe /game_settings=MatchSettings/ModeTemplate.txt /dedicated_cfg=dedicated_cfg.txt
Linux:
./TrackmaniaServer /game_settings=MatchSettings/ModeTemplate.txt /dedicated_cfg=dedicated_cfg.txt /NoDaemon
Helpers
Deployment
The workspace is set to deploy the updated script at local dedicated server when you press F5 at vscode.
Alternative you can start a minicontroller at Tools-folder, by running npm start, then you can do as well F5 to reload the mode at ingame.
The default chat commands for minicontroller are:
/reloadto reload mode/addadd bot/removeremove bot
Feel free to implement more, if you need to.
Ingame debugging tools
You can find a debug button at bottom left above chat. Clicking it will open debug tools for adding and controlling bots.
Dedicated Server How-To for Production
- Place the contents of
Dedicatedfolder into your dedicated server'sUserDatafolder. - Start the server:
Linux:
./TrackmaniaServer /game_settings=MatchSettings/ModeTemplate.txt /dedicated_cfg=dedicated_cfg.txt
Windows:
TrackmaniaServer.exe /game_settings=MatchSettings/ModeTemplate.txt /dedicated_cfg=dedicated_cfg.txt
Thanks
- Beu for debug modebase script
- Ze-Rax for simplified and improved Modebase
