New map rotator

General Stuff about Armagetron, That doesn't belong anywhere else...
Post Reply
User avatar
Lucifer
Project Developer
Posts: 8751
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

New map rotator

Post by Lucifer »

Here's a tarball with the new map rotator

Instructions are thin. :) It might work for WIndows, but you will definitely have to get your elbows dirty. It's pure python, so it doesn't use unix tail command anymore. Also, it'll install an init script and all the creamy goodness that implies.

For some reason, on my Mandriva box, if I start it from the init script, it starts fine, but reports failure. Weird. Not sure why. Someone who knows init scripts (zman - I took the ones from the dedicated server and adapted them) could probably help out a bit there. :)

Anyway, here it is. configure && make && make install. If your armagetronad-dedicated is in a standard location, shouldn't be any problems. The only reference for config directives is the code right now, I guess I should throw something together.
Attachments
aamaprotator-0.2.tar.gz
(92.17 KiB) Downloaded 217 times
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Z-Man
God & Project Admin
Posts: 11717
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

The start script works fine for me, the process seems to be started and I get a success message. How is the failure indicated for you?

The python script that is started exits immediately without message, though. I suppose that's because I did not actually do any special setup apart form changing the owner of the configuration directory to armagetronad-dedicated. What files do I need to create to make it work and how are they supposed to look?
User avatar
Lucifer
Project Developer
Posts: 8751
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

The script starts, but it indicates failure with the "failed!" message. But it starts. :) So if I pass it "restart", it says "failed" to shut down the old process, "failed" to start the new one, and then I have two instances of it running. :) This only happens on my server, which is running Mandrake 10.1 or so. On my laptop in Kubuntu, it works fine.

It should work out of the box, with some caveats. It keeps a log in $prefix/var/log/aamaprotator.log. If it fails to write to the log, then log messages should appear in the terminal instead. Under Mandriva, at least, those messages should be trapped and sent to syslog when started from the init script. Maybe your system is doing something similar?

In the aamaprotator.conf file, there's a section for the mazer script. Um, I think it's there in this version, I may have added it right after posting, though. If it's not there, then disregard this. :) If it is, then it's possible that the script is failing because of it. That section gives as the command a path from the current directory to the script in the tarball, and to make it work after installing you have to remove everything in command up to the part that says "mazer.py", because mazer.py is installed in /usr/local/bin. Of course, /usr/local/bin should be in your path. Um, make that $prefix/bin. So if it's picking the mazer as the first map, it might be starting and then quitting because of it.

Another reason it may start and quit is if you installed arma to a non-default location. It searches /usr/local and /usr, but that's it. If you put it anywhere else, you have to set armaprefix in the config file. It doesn't currently accomodate if you installed without the "games" in the prefix. So if you installed to, say, /home/zman as your prefix, it'll search /home/zman/share/games/armagetronad-dedicated and /home/zman/etc/games/armagetronad-dedicated.

Other than those two things, you should try just running it from the command line. :) You might make sure it *can't* write to the log file just to get those messages in the console instead. Also, if you run it from a virgin source directory, it won't be able to write to the log file because the appropriate directory is missing to do so.

I've attached the latest version which definitely includes mazer. It also changes the config file included to a different name, so it won't overwrite your working config file when you upgrade.
Attachments
aamaprotator-0.3.tar.gz
(101.67 KiB) Downloaded 189 times
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
KamP
Round Winner
Posts: 266
Joined: Sun Oct 09, 2005 4:50 am
Location: Miami, Florida
Contact:

Post by KamP »

hey i was wondering, scope and i were playing, and we saw a maze that (a) sucked and (b) sucked a lot. And we were wondering who made it and blah blah, and i figured it must be made by a script, it was marked as being written by mazer.py, so, lucifer dabbling in the world of automated maps?
User avatar
Lucifer
Project Developer
Posts: 8751
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

mazer.py is the script I wrote that powered the Labyrinth. I'm open to suggestions on how to improve the mazes generated, it's a quite configurable little script.

Yeah, the mazes are kinda boring. I suppose I could have it knock out some barriers. The idea is that I should be able to knock out enough of the walls so that what was a maze early in its life becomes a neat grid that might resemble collapsed ruins, what with all the walls strung around that have no seeming relation to each other unless you're a certified archaeologist that carries a whip and gun and wears a cool hat.

I'm also planning on adding game type options to the script and having it run as a no-trail race that rotates in every now and then, where everyone would spawn together in one corner and have to race to the other corner.
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Phytotron
Formerly Oscilloscope
Posts: 5042
Joined: Thu Jun 09, 2005 10:06 pm
Location: A site or situation, especially considered in regard to its surroundings.
Contact:

Post by Phytotron »

Lucifer wrote:unless you're a certified archaeologist that carries a whip and gun and wears a cool hat.
Damnit, I only have the cool hat.
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6712
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

Lucifer wrote:I'm also planning on adding game type options to the script and having it run as a no-trail race that rotates in every now and then, where everyone would spawn together in one corner and have to race to the other corner.
Sounds really cool.
Image
User avatar
Lucifer
Project Developer
Posts: 8751
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

OK, now I'm just being lazy. Is there a command to write something to the server's console but not the clients'?

(I'd like to make the maprotator rewrite its everytime.cfg after it's been loaded to remove all the settings because it's a real pain when you're trying to tweak settings and then the maprotator resets them for you)
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Z-Man
God & Project Admin
Posts: 11717
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

If it's just for parsing, any invalid command will do, you can grep then for the error message.

Sorry, I did not have time yet to look at the launch problem again.
User avatar
Lucifer
Project Developer
Posts: 8751
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

It's fine. I'm fooling with it a bit. About to go to bed, thought I'd throw my latest up here. Any interest in having this in cvs? It's actually redundant there...

Anyway, the bug I'm too tired to track down right now involves writing defaults. I added some config parsers to read all of the server's config files to determine what the default values are for the map rotator. Default values being "what the server admin wants as defaults", not game defaults. So it should only reset config items that are changed by map config files. It doesn't know about config items changed by maps, presumably the game will restore those when the map changes. If it doesn't, it's a bug. :) Probably can wait until 0.2.8.1, though.

I also extended the readme file quite a bit to document some of the settings, and made it so you can separate with commas setting files for maps. It loads the first listed first, the second second, and so on. So later files listed override earlier files listed.

And I may have fixed the launch problem. :) At the very least, I added more logging to all the errors that are possible during launch. Well, most, anyway.
Attachments
aamaprotator-0.3.1.tar.gz
(105.91 KiB) Downloaded 232 times
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Lucifer
Project Developer
Posts: 8751
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

Ok, updated the map rotations on Swamplords on Crack. Now the two race maps play for 3 rounds, winner take all. :) The maze races are no-trail races, the spiral is still the same 40 meter trail it's always been.

The other maps need some tweaking, I could use some feedback on how. :)
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
Post Reply