Live game commentary improvements

The developers will post here to let you peek into future versions and announce new releases.

Moderator: idcarlos

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

Live game commentary improvements

Post by gyboth »

still not done :-?

after i added the token for yellow cards of a player and yellow card limit of the cup/league it occurred to me that a priority level should be added, too. when a player receives a yellow card that leads to a ban the next match, the commentary should almost always state it, so uniform distribution on the commentaries isn't the best thing here.

i imagined we'd have something like

Code: Select all

<commentary cond="_PLYELLOWS_=_YELLOWLIMIT_" pri="5">_PL1_ will be banned in the next _LEAGUECUPNAME_ match</commentary>
the highter the priority (relative to the rest of the commentaries) the higher the probability that the commentary gets picked (if all tokens are available); default priority is 1 (so that we still have uniform distribution if none of the commentaries contain a priority attribute).

gyözö
Press any key to continue or any other key to quit.
vector
Posts: 449
Joined: Sat Dec 18, 2004 11:26 pm
Location: Australia, Victoria

Post by vector »

aghh yes didnt see that one coming.. well spotted.
trixy
"There are two ways to score. Dribble it over the line or smash it into the back of the net."
What type are you?
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

ok, commentary system's done. probably still buggy, so it'd be great if anyone could try to exhaust the possibilities ;-)

here's the howto:
http://bygfoot.sourceforge.net/doc/1.9/ ... ntary.html

post if you have suggestions for new tokens.

gyözö
Press any key to continue or any other key to quit.
vector
Posts: 449
Joined: Sat Dec 18, 2004 11:26 pm
Location: Australia, Victoria

Post by vector »

im reading reading :) Ill do the flags to day first then have a go at the commentary.

the first thing that came to mind is "how do you test your commentary" once you have made one.

loading it into a game and waiting for those events to happen could take ages and lead to buggy commentary.

im sure you must have .either some way of forcing the game conditions or a separate way to test these comments.
I can think of for example setting up a game condition file and then running the whole commentary file against it. So you end up with a text file full of "completed" commentary strings.

Ill do the flags and then have a play and see what i come up with by "doing" rather than just thiunking out loud :)

BTW the "how to" seemed logical and easy to follow on my first parsing of it so we will see what happens when i actually try to implement.. well done.
"There are two ways to score. Dribble it over the line or smash it into the back of the net."
What type are you?
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

i can think of two ways to test the commentaries: either you tweak the constants file so that the event you wrote commentaries for comes often, or you remove all but one commentary for an event to test that one.

gyözö
Press any key to continue or any other key to quit.
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

i've updated and extended the german commentary. if you'd like to have a look at how conditions can be used (atd might even understand the commentary text a bit), get the following archive:
http://bygfoot.sf.net/misc/bygfoot-1.9- ... es.tar.bz2

if you want to change the commentary please use the files from the archive because those are the latest ones.

the live game commentary howto is still here:
http://bygfoot.sourceforge.net/doc/1.9/ ... ntary.html

gyözö
Press any key to continue or any other key to quit.
vector
Posts: 449
Joined: Sat Dec 18, 2004 11:26 pm
Location: Australia, Victoria

Post by vector »

this is more about me showing that im trying,
than asking for a real feature.. ;)

is it possible to know the stadium capacity?
i can get the attendance _AT_ but can i find out the capacity :)
"There are two ways to score. Dribble it over the line or smash it into the back of the net."
What type are you?
vector
Posts: 449
Joined: Sat Dec 18, 2004 11:26 pm
Location: Australia, Victoria

Post by vector »

for anyone interested in testing my en commentaries
I have started posting the file here
http://mec-symonds.eng.monash.edu.au/cg ... taryVer190
it will of course change from time to time so keep an eye on the date and status
"There are two ways to score. Dribble it over the line or smash it into the back of the net."
What type are you?
vector
Posts: 449
Joined: Sat Dec 18, 2004 11:26 pm
Location: Australia, Victoria

Post by vector »

fouls and injuries
I was working on a conditional and really wanted the foul dif or inj diference.

Code: Select all

<commentary cond="_FOULS0_ + _FOULS1_ >= 4">There are two teams out there and only one of them is playing football</commentary>
is not what i want. what i want to know is if one of the sides has many more fouls than the other.

Code: Select all

<commentary cond="_FD_ >= 4">There are two teams out there and only one of them is playing football</commentary>
so [_FOULS0_ - _FOULS1_] you say.but what if that equates to 0-5.. which it cant calculate

so how in your wonderfull system should i solve this.

BTW its very difficult testing such comments when its hard to produce the required situation. it would be alot easier and quicker if there was a stand alone app that allowed me to fill in the variables (say in an xml or text file) to create a specific condition and then run that on a single comment .
it could be a command line thing

testbygtry <commentary cond="_FD_ >= 4">There are two teams out there and only one of them is playing football</commentary>

testbygtry first reads in the variables from the bygtryvar file then runs the comments against it. and prints it out.

or better still
testbygtry mycomnts.xml
where it reads in the vars as b4 but runs it aginst all the comments in the mycomnts.xml printing out as required.

just a thought :)
"There are two ways to score. Dribble it over the line or smash it into the back of the net."
What type are you?
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

vector wrote:

Code: Select all

<commentary cond="_FD_ >= 4">There are two teams out there and only one of them is playing football</commentary>
so [_FOULS0_ - _FOULS1_] you say.but what if that equates to 0-5.. which it cant calculate
how about

Code: Select all

_FOULS0_ - _FOULS1_ >= 4 or _FOULS1_ - _FOULS0_ >=4
? (here you don't need the square brackets). to refer to the team with a lot of fouls (or the other team) in the commentary you then write

Code: Select all

... there are two teams out there but only _T[_FOULS0_ GE _FOULS1_]_ plays football
maybe it'd be better with >, not >=.
BTW its very difficult testing such comments when its hard to produce the required situation. it would be alot easier and quicker if there was a stand alone app that allowed me to fill in the variables (say in an xml or text file) to create a specific condition and then run that on a single comment .
it could be a command line thing
vector dreaming again... ;-) i rather suggest you remove all other commentaries (except for a nondescript one) from 'general' and lower the difference in the foul commentary to 1, and assign high priority. then it should come often.

gyözö
Press any key to continue or any other key to quit.
vector
Posts: 449
Joined: Sat Dec 18, 2004 11:26 pm
Location: Australia, Victoria

Post by vector »

vector dreaming again... Wink i rather suggest you remove all other commentaries (except for a nondescript one) from 'general' and lower the difference in the foul commentary to 1, and assign high priority. then it should come often.
A mans allowed his dreams :)
Yes i have been doing as you say but its very inefficient to have to load the game and run a match and wait for it to come up. No doubt when I get used to your syntax I will be able to type and get99% of it right but Im currently learning the syntax.
I was concerned that others of a non mathematical or programming background would not attempt this and figured that many would like to make their own commentaries.
Its a wonderfull system you have spent alot of time on it, I think it deserves more credit and accesability to the masses. :)

Ill have a look myself mind you it will end up written in python ;(
all i have to do is work out your engine
"There are two ways to score. Dribble it over the line or smash it into the back of the net."
What type are you?
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

vector wrote:I was concerned that others of a non mathematical or programming background would not attempt this and figured that many would like to make their own commentaries.
true. you've got a point there.
Ill have a look myself mind you it will end up written in python ;(
all i have to do is work out your engine
:-) don't bother, i'm going to do it when i have the time. but i'm not sure it'll be before 1.9.1.

gyözö
Press any key to continue or any other key to quit.
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

live game commentaries can be tested a bit simpler now. see this post:

http://bygfoot.sourceforge.net/forum/vi ... .php?t=442

it's still a bit circumstantial but writing an extra app would be a major annoyance because things are quite intertwined with the live game and commentary generation.

gyözö
Press any key to continue or any other key to quit.
vector
Posts: 449
Joined: Sat Dec 18, 2004 11:26 pm
Location: Australia, Victoria

Post by vector »

yeah like this
how do you test this commentary

Code: Select all

    <commentary cond="_TLAYER0_ - _TLAYER1_ > 1 or _TLAYER1_ - _TLAYER0_ >1 and _TLAYER_TLN__ > _TLAYER_TWN__">What an amazing win for _TW_</commentary>
    
the chances of or the required fiddling needed to produce a result that would test this line, are remote or hard..unless you know how to tweak the constants.

the above commentry is it correct?
first i make sure the two teams are in a different league layer.
then if the loosing team was the higher layer.. Wow what a great victory for the lower layer side.
"There are two ways to score. Dribble it over the line or smash it into the back of the net."
What type are you?
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

vector wrote:

Code: Select all

    <commentary cond="_TLAYER0_ - _TLAYER1_ > 1 or _TLAYER1_ - _TLAYER0_ >1 and _TLAYER_TLN__ > _TLAYER_TWN__">What an amazing win for _TW_</commentary>
    
the chances of or the required fiddling needed to produce a result that would test this line, are remote or hard..unless you know how to tweak the constants.
i know... but i doubt i'll have the time to come up with something simpler before the release.
the above commentry is it correct?
the syntax is correct.
first i make sure the two teams are in a different league layer.
your condition makes sure they are at least two layers apart. i think you rather mean '>=1' or '>0'. but since you have the third condition (that the 'winning' layer is different from the 'losing' layer) the first two aren't needed, actually; they're covered by the third one.
then if the loosing team was the higher layer.. Wow what a great victory for the lower layer side.
er... lower layer means a better team. premiership -> layer 1, division 1 -> layer 2 ... nat.conf -> layer5. writing '_TLAYER_TLN__ < _TLAYER_TWN__' would be better ;-)

but the syntax is correct.

gyözö
Press any key to continue or any other key to quit.
Post Reply