Need a way to start rotation script when the new match begin

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
User avatar
Al's Used Cars
On Lightcycle Grid
Posts: 45
Joined: Sun Dec 03, 2006 3:22 pm
Location: Baltimore, MD

Need a way to start rotation script when the new match begin

Post by Al's Used Cars »

Currently, it runs 2 rounds past the match end...

I have 10 rnd cfg files which the config_rotation correctly runs through. In the first rnd file, start_new_match is the first line.

After the end of the 10-round match, the game keeps going for two additional rounds using the same settings as rnd 10 before coming back to round one and beginning new match.

how can i get it to recognize that the match is over and the rotation should start over?

puzzling...
User avatar
Z-Man
God & Project Admin
Posts: 11589
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Need a way to start rotation script when the new match b

Post by Z-Man »

Al's Used Cars wrote:After the end of the 10-round match, the game keeps going for two additional rounds
Any idea why it does that? Is it intended? I'm no expert on config rotation, just asking questions :)
User avatar
Al's Used Cars
On Lightcycle Grid
Posts: 45
Joined: Sun Dec 03, 2006 3:22 pm
Location: Baltimore, MD

Post by Al's Used Cars »

Have no clue. I've limited the rounds to 10, set match at 10 rounds, put start new match in the first round cfg file, and it still offsets by 2... even reducing the number of rnd files to 8 didnt affect that.

To fully see the extent, you could play through a match. The server is "|FA| Clan Server - Shrinkin - Angels!".

For some other incomphrensible reason, the arena size will not change during SP play, only during MP. :x

Once another live player joins and the rotation is finally restarted, you will see an offset between match end and rotation restart.

hate to ask in this thread, but is there ANY way to enable ladder in 0.3.0? People keep asking for it: "No ladder?!"
User avatar
Z-Man
God & Project Admin
Posts: 11589
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Hmm, there are no "extra" two rounds. The server restarts the match on its own, and then your first configuration file starts it again. (I saw only one "extra" round). Why do you put the match restart command into the first rotation file anyway? If the file is read, a match should just have been started.
User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

Al's Used Cars wrote:For some other incomphrensible reason, the arena size will not change during SP play, only during MP. :x
These are 2 different settings. One of them start with SP_ or MP_. That half-bit of info should help you find which one.

A test for you to perform:
a) make a rotation of 1 round/match, 1 map. See that it works
b) make a rotation of 2 round/match, 2 maps. See that it works
c) -- same -- 5 round/match
d) -- same -- 8 round/match
e) -- same -- 10 round/match

If after that you still have not found the issue, I guess maybe posting the setting you use?

-ph
Canis meus id comedit.
User avatar
Al's Used Cars
On Lightcycle Grid
Posts: 45
Joined: Sun Dec 03, 2006 3:22 pm
Location: Baltimore, MD

Post by Al's Used Cars »

I've tried various combinations of the above. Still have these questions:


1. Explain, please: there is no ladder in 0.3.0- the display is not there, although the log file is still being written on the server.

2. I've narrowed down the match/rotation sync problem to the script trigger. It goes to the next round.cfg file when the ctr msg says "WINNER". If there is no winner, the rounds do not change, and the sync remains off through the rest of the match.
So, if I can find a way to trigger on number of live players instead of winner, it won't matter if the round was a tie.

As far as restarting rotation to rnd one on match end, there seems to be no trigger for that- but there should be. "Match" would work.

How can I adjust the script triggers as above?

btw, Phillipe, SP_size_factor has no effect... is there another cmd?

note: when starting new SP game (first player in server) the game begins in the round rotation wherever the last player to play left it. Then the rotation is REALLY messed up. I've added a round_console msg with the rnd # to each round so you can see the difference between match round and rotation round. I dont have any ideas on how to solve this other than the script recognizing when there are no live players present and quitting. Same question as above I guess.
User avatar
wrtlprnft
Reverse Outside Corner Grinder
Posts: 1679
Joined: Wed Jan 04, 2006 4:42 am
Location: 0x08048000
Contact:

Post by wrtlprnft »

The ladder has been removed from 0.3.0 and all later versions because guru3 wanted to write a new ladder, and I think this is supposed to happen after we have scripting, where lately one of the main guys working on it has vanished. Bus factor too low I guess.

As for rotation: That's been removed in versions after 0.3.0 to be replaced by scripting, and it IS buggy.

I suggest you write a little script in PHP or python or shellscript or wharever language you prefer that parses the output of armagetronad or ladderlog.txt (pipe tail -f ladderlog.txt into it) and then writes appropiate INCLUDE commands to everytime.cfg. It gives you much more control and flexibility, too.
All map/config rotating servers I know of are using such a script.

About the SIZE_FACTOR thing: There's three settings affecting this:
  • REAL_ARENA_SIZE_FACTOR (or somesuch): This is updated every round to the actual size factor. DO NOT CHANGE it as it'll be overwritten.
  • SIZE_FACTOR: This is used if there's more than one connected client. At the beginning of every round (I think after everytime.cfg is parsed, certainly before the map is loaded), REAL_ARENA_SIZE_FACTOR is set to 2^(SIZE_FACTOR/2) or some similar formula, I forget.
  • SP_SIZE_FACTOR: Same as SIZE_FACTOR, just that it's used if there's only one client connected.
Oh, and don't put either command in the <Settings> section of a map file. It'll screw up the first round the map is used. The server will use it, the client will not (or the other way around, it will be an interesting round, anyways).

EDIT for ph below: you may want to remove that trailing / so the page can actually be found
Last edited by wrtlprnft on Wed May 23, 2007 9:16 pm, edited 1 time in total.
There's no place like ::1
User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

for more info about all the settings, check http://wiki.armagetronad.net/index.php/ ... _Commands/

-ph
Canis meus id comedit.
User avatar
Al's Used Cars
On Lightcycle Grid
Posts: 45
Joined: Sun Dec 03, 2006 3:22 pm
Location: Baltimore, MD

Post by Al's Used Cars »

Wrtl, thanks for your reply.
I actually don't know anything about scripting, other than keyboard maestro (for mac, a gui for type shortcuts). But I would like to learn. Can you recommend a good resource that I could learn enough from to accomplish what you suggested?
User avatar
wrtlprnft
Reverse Outside Corner Grinder
Posts: 1679
Joined: Wed Jan 04, 2006 4:42 am
Location: 0x08048000
Contact:

Post by wrtlprnft »

I don't know any good tutorials that would help you, sorry. You could try to get Lucifer's map rotator to work, though it's written in python (so you need that installed) and needs some configuration. I've never really used it myself, but I trust Lucifer that it's usable :)

If you really want to learn scripting you need to choose a scripting language that's easy to use on a mac. Maybe Jonathan can help you with that.
There's no place like ::1
User avatar
Al's Used Cars
On Lightcycle Grid
Posts: 45
Joined: Sun Dec 03, 2006 3:22 pm
Location: Baltimore, MD

Post by Al's Used Cars »

If you would be so kind, please direct Jonathan to this thread. I would like to wrap up this project and move on to the next, and this rotation problem is the final obstacle.
I have several more server ideas that I would like to implement, and have learned enough from Shrinkin-Angels to get started on them. Those ideas are (sort of) documented in FA's forums (fallin-angels.net), in the non-clan area, thread named "Server suggestions".

Many thanks to you all for your fast replies and valuable info.

EDIT: maybe i should have mentioned Fallin-Angels runs an Ubuntu server host. I'm on mac, so where I might have probs with install, FA may not. I read the post thread re tha aaprorotator thingy... *rubs head, takes aspirin* not that easy to understand.
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Post by Jonathan »

I am reading this thread. :) Sane scripting options are basically the same as with Linux, AFAIK. There's the somewhat English-like AppleScript with a nice GUI editor, but I wouldn't try to get it to do this. I'm not a scripting expert, or an Armagetron expert in this area, so I can't be much more specific. I might be able to help with PHP though, as I had some fun scripting in that for Google Earth recently, including I/O (it's currently the only scripting I can use on a webserver that's reachable from the internet, but before you ask, it wasn't meant to be used by everyone).
ˌɑrməˈɡɛˌtrɑn
User avatar
Al's Used Cars
On Lightcycle Grid
Posts: 45
Joined: Sun Dec 03, 2006 3:22 pm
Location: Baltimore, MD

Post by Al's Used Cars »

ok.

Jonathan, what do you need from me to be able to help with this?

I have a restricted schedule: usa EST, 5-7 AM: thats my only uninterrupted time, due to my business and other pressures.
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Post by Jonathan »

I suggest that you just read the docs at http://www.php.net/ to get started if you go with PHP. Keep in mind that you won't be embedding it in a web page (the main use of PHP and what all standard examples are targeted at), but instead running from the command line. Once you have some feel for the well-explained basics I can help with this specific problem.

It should also be reasonable for me or anyone else with expertise to write the script; it can't be a huge task. Of course it's still useful to understand and be able to modify the script.
ˌɑrməˈɡɛˌtrɑn
User avatar
Al's Used Cars
On Lightcycle Grid
Posts: 45
Joined: Sun Dec 03, 2006 3:22 pm
Location: Baltimore, MD

Post by Al's Used Cars »

TY, I'll do that, and get back to this tomorrow.
Post Reply