Author Topic: Frenchie's MAD!  (Read 6035 times)

0 Members and 1 Guest are viewing this topic.

Offline Frenchie

  • Camper
  • ***
  • Posts: 358
  • SoldatHQ
Frenchie's MAD!
« on: February 17, 2007, 11:37:06 pm »
Hey everyone,
I am happy to announce a new script which I have put together.

MAD...  Map Automation Daemon

Why?

because lately I have been looking around some good maps and most of them have dead links and there creators can't be found. And sometimes when playing Soldat I have problems with some sceneries not downloading.
Can be useself to players missing maps, sceneries.. mappers looking for new textures.. others wanting a  reliable one stop shop for popular and even never before heard of maps.

What?
Basically it's a script which parsses the 2 lobbies every so often and obtains map names and server details. (It will grab 2 unique ip & port details per map. if there are any... <-- Just incase the first has server has downloading disabled)
And then it reads map for scenery list and texture <---And downloads them all.


ATM it's just that... A script which downloads them to my server through php, which then you can view by the directories | maps | scenery-gfx | textures & edges |

And you can download the whole map with scenery and textures in a zip (or tgz) file. Folders named accordingly (/maps, /sceneries, /textures) for quick installation.

Special function prevents duplicate maps from being downloaded.

Requirements for your Map to be added to MAD
  • File Downloading Enabled
  • Registered in a lobby (Selfkill or hypergaming)
  • Map has to be in play, but not necessarily in rotation
-- Downloads every 15 mins

For the Future?

  • I will be putting a on-the-fly archiver for the maps. (Zip and Tar) - ADDED
  • Map details - Maybe


And here it is
http://www.tumler.bendaweb.com/mad/

With a humungous THANKS to Doc - Without him I would of never been able to read maps or get anywhere near finishing this script. (You should see what other map function he has  :P...)

Edit. When I first started typing there were 130 maps now there's 174 and 625+ Sceneries !!

« Last Edit: March 10, 2007, 03:57:07 am by Frenchie »
Soldat Lobby Avec Players -New Release! - Updated AGAIN!


Offline jrgp

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 5037
Re: Frenchie's MAD!
« Reply #1 on: February 17, 2007, 11:45:14 pm »
omfg, this script is ingenious.

please upload the source ;)
There are other worlds than these

Offline Frenchie

  • Camper
  • ***
  • Posts: 358
  • SoldatHQ
Re: Frenchie's MAD!
« Reply #2 on: February 17, 2007, 11:52:47 pm »
ATM I'm not thinking of releasing source. (Doc holds apart of it)

But thanks for comment. :)
Soldat Lobby Avec Players -New Release! - Updated AGAIN!


Offline jrgp

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 5037
Re: Frenchie's MAD!
« Reply #3 on: February 18, 2007, 12:42:12 am »
here's an idea, every time a map gets added, have the script update a zip file containing all the maps and their resources. (or just have it create 1 zip archive per map)
There are other worlds than these

Offline Frenchie

  • Camper
  • ***
  • Posts: 358
  • SoldatHQ
Re: Frenchie's MAD!
« Reply #4 on: February 18, 2007, 05:08:28 am »
here's an idea, every time a map gets added, have the script update a zip file containing all the maps and their resources. (or just have it create 1 zip archive per map)
Yeah I'd like to create zip files on the fly. But Im having trouble finding a script or tutorial about one which can keep folder structure.
eg.
maps/ctf_B2b.PMS
texture/watever.bmp
texture/edges/watever.bmp
scenery-gfx/.....
scenery-gfx/.....

If anyone knows of script which can do this. Please share


Date Posted: February 18, 2007, 05:03:07 PM
Don't worry.
I found an extremely good script.

Works perfectly for zips and tars.

I'll turn down the map updating. It's updating a much faster than I though >.< - Maps 332 Sceneries 874
if you have any problems just post.
Soldat Lobby Avec Players -New Release! - Updated AGAIN!


Offline mar77a

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1295
  • mad
    • random stuffs
Re: Frenchie's MAD!
« Reply #5 on: February 18, 2007, 09:27:52 am »
Nice. Get a script to merge the same maps, it shouldn't be hard. Here's the pseudo code:

if string[3] == "_";
   tolower(string[0-2]);
   toupper(string[4]);
   tolower(string[5-...sizeof(string));
else
   toupper(string[0]);
   tolower(string[1-...sizeof(string));
end


beeing:
string[] = "ctf_Arena";
string[0] = 'c' ;
string[1] = 't';

working it should make:

"ctf_tower" => "ctf_Tower"
"Ctf_tower" => "ctf_Tower"
"CTF_TOWER" => "ctf_Tower"
(same for inf_ & htf_)
"arena" => "Arena"


EDIT: this should be used to convert the name of map WHEN saving it.

Offline Frenchie

  • Camper
  • ***
  • Posts: 358
  • SoldatHQ
Re: Frenchie's MAD!
« Reply #6 on: February 19, 2007, 05:02:34 am »
Thanks alot mar77a.
It's just what I needed.

I'll look into editing your code so it can detect sub-gamemodes (tw,kz,db) even when they have ctf_tw at the front.



Date Posted: February 19, 2007, 05:43:08 AM
Ok did some updates to MAD.

  • Fixed a scenery bug (which affected most map downloads)
  • Maxed out the zip compression (Smaller Files)
  • Added naming convention. (Stop duplicate maps)

Map naming works very well. eg:
cTF_YoWza -> ctf_Yowza
cTF_DB_kik -> ctf_db_Kik
TW_ehhhh -> tw_Ehhhh
ArEnA -> Arena
Soldat Lobby Avec Players -New Release! - Updated AGAIN!


Offline mar77a

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1295
  • mad
    • random stuffs
Re: Frenchie's MAD!
« Reply #7 on: February 19, 2007, 10:22:01 am »
Now add some filtering options, gamemode, name, custom sceneries/textures :)

Offline Frenchie

  • Camper
  • ***
  • Posts: 358
  • SoldatHQ
Re: Frenchie's MAD!
« Reply #8 on: February 19, 2007, 02:58:38 pm »
Now add some filtering options, gamemode, name, custom sceneries/textures :)
Means Ill probably have to implement a database. Ill see what I can do ;)
Soldat Lobby Avec Players -New Release! - Updated AGAIN!


Offline jrgp

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 5037
Re: Frenchie's MAD!
« Reply #9 on: February 19, 2007, 03:16:34 pm »
Could you possibly have it leave the default sceneries and textures out of the zip files since everyone already has them?
There are other worlds than these

Offline Frenchie

  • Camper
  • ***
  • Posts: 358
  • SoldatHQ
Re: Frenchie's MAD!
« Reply #10 on: February 20, 2007, 05:12:50 am »
Could you possibly have it leave the default sceneries and textures out of the zip files since everyone already has them?
Yes I will be doing this hopefully soon. :)

Date Posted: February 20, 2007, 07:08:52 AM
Small update....
Now runs with a db backend
Soldat Lobby Avec Players -New Release! - Updated AGAIN!


Offline Mr. Domino

  • Flagrunner
  • ****
  • Posts: 969
  • Don't just sit there and waste your precious time.
    • XBLIG.co
Re: Frenchie's MAD!
« Reply #11 on: February 20, 2007, 08:55:40 am »
Map naming works very well. eg:
cTF_YoWza -> ctf_Yowza
cTF_DB_kik -> ctf_db_Kik
TW_ehhhh -> tw_Ehhhh
ArEnA -> Arena

Maybe it's me, but isn't this a bad idea? Maybe I'm not following it correctly, but you're risking merging two totally separate maps as well as changing the name of the one for the end user so that it will be unusable when he attempts to join another server with the same map.

I'll still wait for the new version which I hope fixes this bug and makes your script obsolete. :) Still, it's a great idea and hopefully it'll be a success.

Offline Frenchie

  • Camper
  • ***
  • Posts: 358
  • SoldatHQ
Re: Frenchie's MAD!
« Reply #12 on: February 25, 2007, 06:46:17 am »
Maybe it's me, but isn't this a bad idea? Maybe I'm not following it correctly, but you're risking merging two totally separate maps as well as changing the name of the one for the end user so that it will be unusable when he attempts to join another server with the same map.

I'll still wait for the new version which I hope fixes this bug and makes your script obsolete. :) Still, it's a great idea and hopefully it'll be a success.
Don't think this is a problem at all, as I still haven't seen a map with the same name as another but are completely different on a server.
--The naming thing will not make the map unusable at all considering windows is not case-sensitive. BTW many servers I was downloading from sent the same map but in different case eg. ctf_B2B, CTF_B2B, ctf_B2b, <-- If you had any of those you would be able to join any server hosting CtF_b2B cause case is irrelevant.

I'll still wait for the new version which I hope fixes this bug and makes your script obsolete. :) Still, it's a great idea and hopefully it'll be a success.
This script is not also for those having problems downloading whole maps from servers.
For eg. I join a server which has map-downloading disabled(even though the new version of soldat will come out, many servers will still disallow map-downloading) and I join and it's playable but I get messages at the top saying --Missing scenery blahblah.bmp,
Missing scenery blahblah2.bmp. And I have big white squares showing while trying to play,
Instead of searching all over the internet and downloading whole maps just to get that scenery, I could search straight for the scenery at tumler.namepad.net/mad/scenery-gfx


Date Posted: February 21, 2007, 06:26:18 AM
Ok did much work on MAD.

While in the change between hosts, I improved the code by
  • Allowing textures without edges to be downloaded
  • Fixed all known problems I had with scenery/textures downloads
  • Deleted and cleaned alot of the code (Runs much smoother)
(Doesn't sound like much, but trust me it was  :))

Probably gonna change tar archives to gzip for greater compression.

Now give it time to grow the map list by itself. :D
Soldat Lobby Avec Players -New Release! - Updated AGAIN!


Offline mar77a

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1295
  • mad
    • random stuffs
Re: Frenchie's MAD!
« Reply #13 on: February 25, 2007, 10:12:17 am »
Nice sorting  ;D

Offline Frenchie

  • Camper
  • ***
  • Posts: 358
  • SoldatHQ
Re: Frenchie's MAD!
« Reply #14 on: February 26, 2007, 05:42:04 am »
Nice sorting  ;D
Sorting will be easy, now it's using a database. (also records downloads)

But I think now I'll do some more work on SOAP ;)

Date Posted: February 26, 2007, 06:51:13 AM
Ok -update-
Soldat Lobby Avec Players -New Release! - Updated AGAIN!


Offline jrgp

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 5037
Re: Frenchie's MAD!
« Reply #15 on: March 04, 2007, 02:59:47 am »
Here's a idea:

 - Could you have the site give you a list of the most downloaded maps or the ones that are hosted / played the most?
There are other worlds than these

Offline Frenchie

  • Camper
  • ***
  • Posts: 358
  • SoldatHQ
Re: Frenchie's MAD!
« Reply #16 on: March 04, 2007, 04:38:10 am »
Here's a idea:

 - Could you have the site give you a list of the most downloaded maps or the ones that are hosted / played the most?
I will be adding sorting by most downloaded (and maybe.. maybe sorting by votes) I hope shortly.

But for the most played or hosted, Lucky my Lobby already does that ;)
http://www.tumler.bendaweb.com/lobby/stats/

Edit. Plus also hoping to get a search function, for names and titles.
(Which will allow to easily list certain people's maps)
« Last Edit: March 04, 2007, 04:51:53 am by Frenchie »
Soldat Lobby Avec Players -New Release! - Updated AGAIN!


Offline jrgp

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 5037
Re: Frenchie's MAD!
« Reply #17 on: March 04, 2007, 04:58:23 am »
Edit. Plus also hoping to get a search function, for names and titles.
(Which will allow to easily list certain people's maps)

That will be useful. When I was looking for Ivel's maps, I was searching the source of the page with firefox for his name, glad you use the title attribute of the links otherwise I wouldn't of been able to find them.
« Last Edit: March 04, 2007, 04:59:57 am by jrgp »
There are other worlds than these

Offline Thomas

  • Major
  • *
  • Posts: 76
    • mnus.de
Re: Frenchie's MAD!
« Reply #18 on: March 11, 2007, 11:39:17 am »
Would you mind posting the part of the code where you get the texture and scenery names from the map?
I did a php-script for it but it's very buggy (using regex)

Offline Doc

  • Soldier
  • **
  • Posts: 128
    • Soldat Files Directory
Re: Frenchie's MAD!
« Reply #19 on: March 12, 2007, 07:12:22 pm »
That is done by my map rendering code that I originaly wrote with php.

I will NOT share my map rendering code with any one!

Only Frenchie has my permission to use it for his MAD project.