Dear lobby devs: please read validmaps.lua from games

Dear lobby devs: please read validmaps.lua from games

Discuss development of lobby clients, server, autohosts and auto-download software.

Moderators: Moderators, Lobby Developers

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Dear lobby devs: please read validmaps.lua from games

Post by knorke » 18 Jan 2012, 15:00

Games can include a file validmaps.lua that tells lobbies/players what maps the game should be played on.
At the moment, no game includes such file but I guess one reason is that currently all but one lobby ignore it anyway.
That lobby is TASClient.

validmaps.lua simply looks like:

Code: Select all

return {
   "DesertCliffsV1",
   "Eye_Of_Horus_v2",
}
and I guess that information can somehow be returned from unitsync.dll but I don't even.
(if an example mod is needed for testing I can upload something but just putting above example in some unzipped mod should work too)
0 x

User avatar
danil_kalina
Posts: 505
Joined: 08 Feb 2010, 22:21

Re: Dear lobby devs: please read validmaps.lua from games

Post by danil_kalina » 18 Jan 2012, 15:43

Let Satirik tell us more about how he implemented that
0 x

User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Re: Dear lobby devs: please read validmaps.lua from games

Post by Cheesecan » 18 Jan 2012, 17:01

knorke wrote: At the moment, no game includes such file but I guess one reason is that currently all but one lobby ignore it anyway.
Yes lobby devs have tuesday night meetings to discuss gnosis.

edit: Also are you going to update the game each time a new map is released?
0 x

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Dear lobby devs: please read validmaps.lua from games

Post by knorke » 18 Jan 2012, 17:15

I just wanted to say that such feature exists in unitsync and that it would be cool if lobbies include it.
edit: Also are you going to update the game each time a new map is released?
If by "the game" you mean "your game", then yes. (due to certain lua blabla i added, i need to do that anyway but that is ot)
But see the linked wiki entry, validmaps is not just a static list of map names.
You can also "return playable" for all mapnames with a certain prefix ("CT_RoundhouseCanyon") and stuff like that.
And of course as we currently see, games do not need to include the file.
0 x

User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Re: Dear lobby devs: please read validmaps.lua from games

Post by Cheesecan » 18 Jan 2012, 17:17

And you don't see a problem in having to do that?

Would be a lot better if you fetched an always up-to-date validmaps from the intertubes.
0 x

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Dear lobby devs: please read validmaps.lua from games

Post by knorke » 18 Jan 2012, 17:30

And you don't see a problem in having to do that?
Nope.
I do not expect anybody to make maps especially for my game (though that would be nice but I am realistic) so no mapper will be disappointed by having his map not playable with my game.
Would be a lot better if you fetched an always up-to-date validmaps from the intertubes.
well if you want to add that to your lobby, would work too. Though not for LAN or offline play.
For a map to be playable with my game it also needs a config file to be included with the game. (to spawn certain stuff like captureable oil pumps, minerals and stuff) So just getting a maplist from intertubes would not be enough.
0 x

User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Re: Dear lobby devs: please read validmaps.lua from games

Post by Cheesecan » 18 Jan 2012, 17:41

Okey, added this to my todo list.
0 x

Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: Dear lobby devs: please read validmaps.lua from games

Post by Satirik » 18 Jan 2012, 17:44

http://springrts.com/dl/docs/unitsync/g ... __api.html
Cheesecan wrote:Also are you going to update the game each time a new map is released?
It's lua, and lua can retreive your map list and make either a white or black list
0 x

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Dear lobby devs: please read validmaps.lua from games

Post by knorke » 18 Jan 2012, 17:52

Cheesecan wrote:Okey, added this to my todo list.
nice, thanks.
0 x

User avatar
koshi
Lobby Developer
Posts: 1058
Joined: 14 Aug 2007, 16:15

Re: Dear lobby devs: please read validmaps.lua from games

Post by koshi » 18 Jan 2012, 17:57

Apparently I started on this a while back but abandoned it swiftly
http://cgit.springlobby.info/cgit/koshi ... 67d43e30d2
Prolly because no one had any interest in it? Does any game dev but knorke have use for this?
0 x

User avatar
danil_kalina
Posts: 505
Joined: 08 Feb 2010, 22:21

Re: Dear lobby devs: please read validmaps.lua from games

Post by danil_kalina » 18 Jan 2012, 17:59

thanks
0 x

Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: Dear lobby devs: please read validmaps.lua from games

Post by Satirik » 18 Jan 2012, 18:11

Maybe it should be renamed (in the lobby not in unitsync) to "Recommended maps" with an option to display all maps or just recommended ones
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6080
Joined: 29 Apr 2005, 01:14

Re: Dear lobby devs: please read validmaps.lua from games

Post by FLOZi » 18 Jan 2012, 18:17

koshi wrote:Apparently I started on this a while back but abandoned it swiftly
http://cgit.springlobby.info/cgit/koshi ... 67d43e30d2
Prolly because no one had any interest in it? Does any game dev but knorke have use for this?
Yup.
0 x

User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7008
Joined: 16 Nov 2004, 13:08

Re: Dear lobby devs: please read validmaps.lua from games

Post by zwzsg » 18 Jan 2012, 18:46

Satirik wrote:Maybe it should be renamed (in the lobby not in unitsync) to "Recommended maps" with an option to display all maps or just recommended ones
I'd like that too.
0 x

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Dear lobby devs: please read validmaps.lua from games

Post by knorke » 18 Jan 2012, 19:15

Satirik wrote:Maybe it should be renamed (in the lobby not in unitsync) to "Recommended maps" with an option to display all maps or just recommended ones
"Recommended maps" seems a bit "soft", as if those maps are "maps of the week" or something like that.
Maybe a checkbox:
[x] only show maps known to be compatible
(which you have to manually uncheck (every time? or at least for each game, because noobs.))
Basically it should be an option a player would never ever want to use and mostly be for devs or mappers.
---
I guess all games that use unique maps or rely on per-map configs would have a use for it. (so atm s44, kp, ct)

Btw, similiar to this, ValidAIs.lua would be nice to have, because an important question is "How do I make sure that a noobs first SP skirmish is not on speedmetal vs NullAI?"
0 x

User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7008
Joined: 16 Nov 2004, 13:08

Re: Dear lobby devs: please read validmaps.lua from games

Post by zwzsg » 18 Jan 2012, 19:30

Whatever the exact wording lobby use:
- If ValidMaps.lua was strictly enforced I wouldn't use it KP
- If ValidMaps.lua was ON by default and recommended but still easily overridable I would use it for KP.

Then I understand why other mod(ders) would have a stronger stance.

As for ValidAIs.lua, yeah, need it too!
0 x

User avatar
smoth
Posts: 22295
Joined: 13 Jan 2005, 00:46

Re: Dear lobby devs: please read validmaps.lua from games

Post by smoth » 18 Jan 2012, 21:22

knorke wrote:Btw, similiar to this, ValidAIs.lua would be nice to have, because an important question is "How do I make sure that a noobs first SP skirmish is not on speedmetal vs NullAI?"
do want
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14524
Joined: 17 Nov 2005, 02:43

Re: Dear lobby devs: please read validmaps.lua from games

Post by Forboding Angel » 19 Jan 2012, 20:13

koshi wrote:Apparently I started on this a while back but abandoned it swiftly
http://cgit.springlobby.info/cgit/koshi ... 67d43e30d2
Prolly because no one had any interest in it? Does any game dev but knorke have use for this?
I do *shrug*
0 x

User avatar
danil_kalina
Posts: 505
Joined: 08 Feb 2010, 22:21

Re: Dear lobby devs: please read validmaps.lua from games

Post by danil_kalina » 03 Mar 2012, 13:38

This code below is for validmaps.lua ?

Code: Select all

/**
 * @brief Retrieve the number of valid maps for the current mod
 * @return negative integer (< 0) on error;
 *    the number of valid maps (>= 0) on success
 *
 * A return value of 0 means that any map can be selected.
 * Be sure to map the mod into the VFS using AddArchive() or AddAllArchives()
 * prior to using this function.
 */
EXPORT(int         ) GetModValidMapCount();
/**
 * @brief Retrieve the name of a map valid for the current mod
 * @return NULL on error; the name of the map on success
 *
 * Map names should be complete  (including the .smf or .sm3 extension.)
 * Be sure you have made a call to GetModValidMapCount() prior to using this.
 */
EXPORT(const char* ) GetModValidMap(int index);
0 x

User avatar
koshi
Lobby Developer
Posts: 1058
Joined: 14 Aug 2007, 16:15

Re: Dear lobby devs: please read validmaps.lua from games

Post by koshi » 03 Mar 2012, 13:45

yes
0 x

Post Reply

Return to “Lobby Clients & Server”