How to test live game commentary

Topics about translating Bygfoot

Moderator: romihaitza

Locked
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

How to test live game commentary

Post by gyboth »

i've written a short summary on commentary testing. it can be found on the live game commentary howto page.

gyözö
This, too, is outdated wrote:since vector didn't stop bugging me, i've tried to implement his ideas about commentary file testing.

this is how it works:
  1. write a commentary file
  2. write a tokens file. this means, you have to specify the values of the live game commentary tokens since no real live game is played (if you don't know what tokens are, read the commentary howto).

    here's a token file to begin with so that you don't have to write it all by yourself.
  3. now you can test your file:
    • to test a specific event call bygfoot -t -c your_xml_commentary_file -t your_token_file -e event_name -n num_passes.

      'event_name' is the name of the event tag as given in the xml file (e.g. 'general', or 'style_change'); 'num_passes' is the number of commentaries printed per event; default is 1.

      the two files may be in a support dir (e.g. in a subdir of ./support_files; you may create a new one, if you want); in that case you don't need to give full paths.
    • if you want to have a quick output of all commentaries, you can leave out the 'event_name' option. however, it's likely some events won't get processed correctly (one set of tokens just doesn't fit all events)
in case you've forgotten the command line switches, just call bygfoot -? or --help to see a command line options summary.

gyözö
This is outdated wrote:it's not very sophistacated but it's a lot simpler than writing an extra app for the testing (which would have to be updated each time the lg system in Bygfoot changes).

here's how to do it.

1. find the number of the event you want to see the commentaries of in the file 'live_game_struct.h':

Code: Select all

enum LiveGameEventType
{
    /** This is the 'main' event, nothing in
	particular is happening; one of the teams
	is in possession of the ball. */
    LIVE_GAME_EVENT_GENERAL = 0, /* 0 */
    LIVE_GAME_EVENT_START_MATCH, /* 1 */
    LIVE_GAME_EVENT_HALF_TIME, /* 2 */
    LIVE_GAME_EVENT_EXTRA_TIME, /* 3 */
    LIVE_GAME_EVENT_END_MATCH, /* 4 */
as you can see it's just a standard enumeration, first event has number 0, second 1 and so on.

2. start the game, choose the language you want to test the file of, and open the debug window by right-clicking on the EXIT/CLOSE button in the toolbar (next to the SAVE button) and middle-clicking on it afterwards.

3. enter 'testcomNUMBER' or 'tcNUMBER' into the debug window to tell the program to display the commentaries for the event with number NUMBER (e.g. 0 for the general event).

4. OPTIONAL: enter 'deb50' to set the debug level to 50 so that your players don't get injured/banned.

5a. first possibility: close the debug window and play away. each time a commentary of the given type is generated it gets printed to the console you started Bygfoot from (so, obviously, you have to start the game from a console to test commentary).

5b. second possibility: to make things a bit faster entery 'gotoNUMBER' into the debug window which will lead to all results automatically calculated and new weeks skipped until the week with the given number. something like 4 or 6 should suffice.

good luck :-)

gyözö
Last edited by gyboth on Thu Oct 27, 2005 10:56 am, edited 2 times in total.
Press any key to continue or any other key to quit.
Locked