Puppet for tournaments
featurescommandsconfigurationFAQ
 
• home 
• forum 
• guestbook 
• deutsch 
   
 
 

What to do in order to transfer the game results into the chart?

I want to organise a tournament with the puppet, what must I do? - Short manual

I want to organise a league in group mode and a cup tournament in KO mode with the puppet, what is to consider there?

I want to change the look of the chart, what should I do?

The puppet forgot its admin, what should I do?

The puppet's name was changed - how do I get the chart display to show the data of the new puppet?

Help, the data is gone

How can I view data of a past tournament?

 


What to do in order to transfer the game results into the chart?

Normally you only have to make sure, that the results of your games are reported in the results channel of the puppet. You can find out its name with

/tell puppetname @showresultchannel
So, before the game starts, just type into your main chat
/option result nameofchannel
The result is then reported in this channel, the puppet processes this and provides it via its PUBLIC-variables to the PHP-script for the chart overview. By selecting the chart (you should be able to find out the link to it with /tell puppetname @homepage , if not, please tell the tournament official to insert the link, respectively), you can see your result - it is reported immediately. You only have to report the result manually to the puppet if you somehow forgot to activate the score reporting to the channel. The necessary commands can be found in the command overview for players.

back to top

 


I want to organise a tournament with the puppet, what must I do?

In order to organise a tournament via the tournament puppet, you need two thins: One Puppet and the PHP-script for the chart:

  1. The puppet
  2. In order to be allowed to have a puppet in the BSW, you need to be at least at the rank of W9. Who is below this rank should play more games or ask somebody with this kind of rank to register a puppet. For administration there's the command /puppetdef With /help puppetdef you can get the BSW-help page to this command. This way you can register a puppet, change the puppet's registration or also delete it. When you registered a puppet, you can start it with /puppet start puppetname In order to register a puppet, you need a name for it and the URL on where to find the puppet's code. The same rules as to normal user names apply to puppet names as well. The complete command reads:
    /puppetdef CommandPuppet puppetname http://www.bloodymary-bsw.de/puppet/source/version3/turnier.prog
    You should then immediately start it, as the puppet reacts like a newborn chick and recognises its first starter as its admin. All the tasks required for tournament organisation are only allowed to puppetadmins, so it is important for you to have that status. You can look up the commands at your disposal in the overview commands for admins.
    You should now conduct the settings for your tournament. These settings can be altered anytime, even during a running tournament. In the overview about all sorts of settings you can find information about all possible and present values of all settings, what they stand for and how to look up and change the current values. In the beginning the general settings are the most important.

    There is only the problem with puppets only being online until they are kicked by somebody, it logs out itself or the server is rebooted. After one of these occasions the puppet needs to be restarted in order to process the tournament results.
    There are 2 solutions to this problem:

    1. Your puppet becames an autostartpuppet (ASP)

    2. Your puppet will be looked after by Puppetier

    3. Please be aware that you have to decide for one of the two options, because no ASP should be started by another puppet.

    Just a little something in conclusion: The registration of a puppet can only be changed by an authorised user. The first one to register a puppet is automatically an authorised user. But in order to guarantee to always have someone with access to the registration, you should let SLC enter one or two additional people as authorised users for your puppet.

  3. The PHP-script
  4. PHP is a scripting language, that interprets files on the webserver, generates HTML-codes from it and sends this to the browser. So you will need PHP compatible webspace. As many webspace providers either ask for money or a money equivalent service such as banner advertisments or other Popup-windows, you may upload your script chart on my web server if you don't have a PHP compatible webspace at your disposal.
    As a file with a PHP extention would be interpreted by the server, the file is available for download with the extention zip. You have to rename it to .php after downloading and copy them to your server next.
    Please note: Do not unzip the file, just renaming is sufficient.
    Now the PHP-script has to verify which puppet in the BSW is processing the results for your tournament. Therefore you need to start the script with a parameter telling the script the name of your puppet. You need to type the following into your browser:
    http://pathtothecopyofyourscript/turnier.php?puppet=puppetname
    This is enough for now, after that you can access it with
    http://pathtothecopyofyourscript/turnier.php
    and take a look at the charts. You should also provide this link to your tournament participants.

back to top

 


Short manual for puppet and PHP-script

  • define puppet in BSW:
    /puppetdef CommandPuppet nameofyourpuppet http://www.bloodymary-bsw.de/puppet/source/version3/turnier.prog
  • start puppet
    /puppet start nameofyourpuppet
  • set puppet to public
    /puppetdef set nameofyourpuppet public
  • set puppet as autostart puppet at SLC (optional)
  • request additional users for the puppet at SLC (optional but recommended)
  • post puppet at Puppetier (optional):
    /hook Puppetier
    @padd nameofyourpuppet
  • download and rename PHP-script (just rename, don't unzip!)
  • assign puppet to the PHP-script:
    call http://pathtothecopyofyourscript/turnier.php?puppet=nameofyourpuppet

back to top

 


I want to organise a league in group mode and a cup tournament in KO mode with the puppet, what is to consider there?

Generally a puppet can only supervise one tournament at a time. So if you want to organise a league and a cup game simultaneaously, you will need 2 puppets.

The PHP-script can also display old tournaments in the chartview but in the course of a running tournament's data update the script is bound to a single puppet. The file in which the script remembers the name of its 'own' puppet is in the same directory as the PHP-file. So if you want to parent 2 tournaments, you also need 2 copies of the PHP-script located in 2 seperate directories.

In order to let the puppet know, which results are meant for it, allocating different result channels (_channelresult) to the puppets is suggestive. However, if a pairing in two tournaments is not possible you could also take the same for both if you really want to.
If you choose two different result channels, but you want the result of both tournaments reported to another channel, you can assign this additional reporting channel with the help of option _channelmeld.

back to top

 


I want to change the look of the chart, what should I do?

Each element of the chart has an id and its appearance thus can be altered by making respective settings in a css-file (also called stylesheet). The css-file may be located on any (even not PHP-compatible) webspace. It is included when you set the option _cssfile to the URL of the css-file. If you enter a false URL or nothing at all, the standard-css-file is loaded. If this doesn't work the script will access the styles.css in its own directory. And if this file isn't available the result ist mostly black text on white ground without chartedges.

The standard-css-file is also a good initial point to adjust the chart to your wishes. Save the file on your webspace and give its name to your puppet. Now you can make changes to the postings in your css-file and see what effect it has on your chart. In order to make your first steps in building your stylesheet (css-file) the selfhtml site is recommended. If you want to know which id may fit to which elements of your chart, let your browser show you the html-text. In most cases you can look this up in a menupoint under 'View' and then something like 'view sourcecode', but this depends on the browser you use. Another possibility is to simply change the colour for a certain id and to see which element is displayed in this colour afterwards.

See a few examples for different colour sets here:

back to top

 


The puppet forgot its admin, what should I do?

Sometimes the puppets lose the content of one or every SAVe-variables. The reason for this nobody knows but it has not happened in a longer time. But if this were to happen or if the admin authorisation was lost somehow each person who is set as an authorised user for the puppet can get the admin authorisation as follows:

  • assign emergency code to puppet:
    /puppetdef set nameofyourpuppet url=http://www.bloodymary-bsw.de/puppets/MakeMeAdmin.prog
  • kick puppet:
    /hook nameofyourpuppet
    /kick nameofyourpuppet
  • start puppet (only necessary if it is not posted in Puppetier):
    /puppet start nameofyourpuppet
  • You should now receive a message about your admin status. The puppet afterwards shuts itself down immediately.
  • assign the normal code to the puppet:
    /puppetdef set nameofyourpuppet url=http://www.bloodymary-bsw.de/puppet/source/version3/turnier.prog
  • start puppet again:
    /puppet start nameofyourpuppet
The puppet's URL can only be changed by an authorised user, usually the one who started it. But there can also be additional users posted by SLC (see the Short manual for puppet and PHP-script).

back to top

 


The puppet's name was changed - how do I get the chart display to show the data of the new puppet?

The PHP-script for the chart display is coined with the parameter 'puppet' on this particular puppet when it is first executed (see short manual for puppet and PHP-script). Further invocations with the parameter 'puppet' will then be ignored. This is important to prevent people from assigning different puppets to your script by calling a simple link.

So if you want to assign a new script to your puppet you have to delete the file puppet.def in the directory of your copy of the script. If you don't have access to this file you will have to ask the person who is having access to do this for you. Then you can assign a new puppet to the script by calling it up again with the parameter 'puppet'. You should do this fast though because any internet user could coin the script to a puppet during that time.

back to top

 


Help, the data is gone

All settings and tournament results are saved in a local file after the beginning of the tournament, but they are also (to a certain scale) saved at the puppet's PUBLICS (see @data).

  • The data on the webserver is gone
  • In this case you don't actually have to do anything because the PHP-script can reconstruct it from the puppet data.
    The only thing that needs to be considered here is that the puppet data may not be infinitely big. If the puppet's space is full it begins overwriting the oldest data. So when organising big tournaments it is recommended to save the local file once in a while in order to make sure that the old data is available again even after the puppet has overwritten parts of it.

  • The puppet's data is gone
  • Now it depends on the extent of data loss. Depending on your personal case you might be able to skip some of the subsequently described points.
    • The puppet does not know its admin anymore
    • If you are the puppet's registered user you can ask for the admin status. This is necessary because all the following commands are only available to puppet admins.
    • Restoring the tournament settings
    • With the command @getconfigfromphp you can advise the PHP-script to write the tournament settings in the restore.def file. This file is in the same directory as the PHP-script for the chart display. You can then open this file with your browser and copy and paste every single line in the puppet's tell window. Each line contains the entire command so you don't need to type anything else. The settings should fit in one line so normally you ought to just have to copy one line.
    • Closing the tournament
    • After that you should close the tournament with the command @closetur so the puppet can no longer accept game results while you are busy restoring the data.
    • Restoring the tournament's game families
    • By using the command @getgamefamiliesfromphp you are advising the PHP-script to write the settings for the game families in the file restore.def. The remaining part of the procedure is described under "Restoring settings".
    • Restoring a tournament's group information
    • By using the command @getgroupinfofromphp you are advising the PHP-script to write the group information in the file restore.def. The remaining part of the procedure is described under "Restoring settings". One line should be enough here, too, you should normally only have to copy one line.
    • Restoring the puppet's match information
    • This is the most time consuming step because all game results have to be transferred to the puppet. In order to do that you must first delete all existing game result data. You can do this with @deleteallmatches. After that you can advise the PHP-script with @getmatchesfromphp to write all matches into the file restore.def. The remaining part of the procedure is described under "Restoring settings".
      Now it might easily be possible that several lines have to be copied depending on the size of your data. In case of a tournament in KO-system it's always at least 4 lines, because not only the match information has to be transferred, but also the data concerning the rounds to be played, the eliminated players and the players for the small finale.
    • Re-opening a tournament
    • The puppet now should have all the data and you should be able to re-open the tournament with @reopentur.
      Important:
      Please run the data backup in the order described above, because some data is building on one another and may be stored erroneously otherwise.

back to top

 


How can I view data of a past tournament?

You specified the file for the data of a tournament in the configuration item _turfile
If you want to view the data of a past tournament, simply call the PHP-script with the parameter file and mention the name of the file. For example:

http://pahttoyourcopyofthescript/turnier.php?file=NameDerDatei