HOWTO: Customize TASClient for your own mod
Posted: 30 May 2009, 03:39
I've done quite a few things to allow mod makers to customize their TASClient for their installer, here are the things you can do :
TASClient parameters :
I know TASClient is not crossplatform and it uses IE and it sucks blabla no need to post to say that :)
TASClient parameters :
- -server url:port
- -inifile tasclient.ini
- -menu
- -menumod "mod name" (directly shows the mod's menu)
- -menudev (get SP skin files from Spring\Interface instead of *.ssk)
- -debug
- -ignoreversion (ignore server version incompatibility)
- -ignoreredirects (ignore lobby server redirections)
- -log
- -no3d (no 3d map preview)
- you can make your own skin using the skin editor
- you can customize the splashscreen picture, labels pos/color, news urls, registry path etc by adding a TASClient.ini next to the TASClient.exe. TASClient.ini example:
[General]
RegistryKey=\Software\TASClient
AutoUpdateURL=http://tasclient.no-ip.org/TASClient_update_v5.txt
[News]
NewsURL=http://www.google.fr
ScrollingNewsRSSFeed=http://news.google.com/?ned=fr&output=rss
[SplashScreen]
DisableFadeIn=1
Image=springlobby5.jpg
InfoLabelX=10
InfoLabelY=230
InfoLabelColor=0000FF
VersionLabelX=360
VersionLabelY=230
VersionLabelColor=00FF00
[WidgetDB]
ManagerURL=http://spring.vsync.de/luaManager/lua_manager.php
[SpringDownloader]
ServiceURL=http://zero-k.info/ContentService.asmx
RapidURL=http://packages.springrts.com
[Spring]
RelayHostManagerName=RelayHostManagerList - you can change the scrolling news design, it's just html and css, check : Lobby\ScrollingNews\*.* the page.html is the generated one with the news item don't edit it (unless you like working for nothing)
- you can change/set every options to a default value by registering a .reg file when installing tasclient, like not displaying the news, or highlighting words, or not joining main or auto join a special channel
- you can add default groups to your installer you just need to change the groups.ini
- you can add/change the filter presets and quick join options so new players will quick join your mod or only stable version of a mod or whatever you want
- you can edit the tips, the first value of each tip line is the window where it will be shown, there are default tips, battle form tips and replay form tips
- you can change the default selected server with the -server serverurl.com:port to the lobby
- you can actually make your own lobby as default ... just by copying config files and registry to your installer or whatever (wow that's the biggest news ever ... I know I know).
- the TASClient SP supports a campaign and mission system with full html briefing, it allows you to make something that looks like a real SP game, but you're limited by html and css and IE. You can install the flash plugin for IE in your installer too and add flash to it ... never done that but it's an option. If you want to know more about it, just ask.
- the whole SP skins are full html/css/javascript, you can extract them : lobby\SPTheme\*.ssk (it's 7-zip). If you want to make a nice interface with dynamic size it won't be easy but you can do it ... i did it for the default one. It has functions to play music and sounds (not using javascript but tasclient). It can store settings from one session to another.
- you can include a special skin in you mod file. You just have to put the html/css/javascript files in the SPTheme/IE dir of the mod
- i can provide a simple basic skin example
- if you need help to make your own skin, or if you need new tags ... just ask
- to launch TASClient in SP mode directly, just add the -menu parameter
- to help you developping your skin, you can use the -menudev parameter. It will load the skin from the Spring\Interface dir instead of the skin files. And it will allow the F5 refresh key to easily check the new changes
- if you need something to make your script that doesn't exist ... just ask me i'll see what i can do
- you can make powerful script with only few lines thanks to aegis' handlers, like adding a new command just by making a cmd_COMMANDNAME(parameters) function for example
- you can hide battles to the user using script (there is an example in the subf dir hidding the autohosts battles). You can use it to only show the battles with your mod or whatever. User filters will apply uppon it but even if disabled, the hidden battles from script won't be visible. Of course they will still be able to join hidden battles using the player context menu (play with), but you can block that by intercepting the outgoing join and canceling it.
- you can change the server list
- you can sniff every incoming command, and change or cancel it before the lobby handles it. you can also add action after the lobby has handled it.
- you can sniff every outgoing command and change or cancel it
- you can make the lobby download a map or a mod and get the progress
- you can get lot of info from the lobby like players, maps, mods, replays etc, in dictionnary like users['username']['Battle']['Players']['username2']['country'] (pretty easy to use)
- you can add your own commands like /downloadbestmap
- you can change the interface, move controls, hide them, add new ones, put events on them, delete them, change their properties etc
- to easily edit the control properties, or make a new form, or touch the interface, you can use the "poweruser window" : CTRL+SHIFT+F8 and save what you've done to a python script, and then edit it to add code. WARNING : the poweruser window is for powerusers ... don't expect it to handle all the crap you can make with it
- you can add a webbrowser whereever you want and use it to improve the interface. For example, you could add a map with planets for planetwars, then add an event on the "onnavigate" event, put special keywords in the <a> url tags of the pages so it automaticaly loads the map corresponding to the selected planet
- you can easily add a timer just by making a timer_NBOFSECONDSINTERVAL() function
- you can add your own icons to players like your own ranking system with rank icons
- you can call TASClient published methods, like a OnClick event on any button or menu item
- you can change all pictures used in the lobby (ranks, connection states, bot icon etc)
- to know more about the scripting possibilities read the lobby\python\api.txt file
- you can edit the sound files using reshack
I know TASClient is not crossplatform and it uses IE and it sucks blabla no need to post to say that :)