View topic - Dear lobby devs: please read validmaps.lua from games



All times are UTC + 1 hour


Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: 18 Jan 2012, 15:00 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
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:
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)


Top
 Offline Profile  
 
PostPosted: 18 Jan 2012, 15:43 
Lobby Developer
User avatar

Joined: 08 Feb 2010, 22:21
Location: Saint-Petersburg, Russia
Let Satirik tell us more about how he implemented that


Top
 Offline Profile  
 
PostPosted: 18 Jan 2012, 17:01 
User avatar

Joined: 07 Feb 2005, 21:30
Location: Cheese factory
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?


Top
 Offline Profile  
 
PostPosted: 18 Jan 2012, 17:15 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
I just wanted to say that such feature exists in unitsync and that it would be cool if lobbies include it.

Quote:
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.


Top
 Offline Profile  
 
PostPosted: 18 Jan 2012, 17:17 
User avatar

Joined: 07 Feb 2005, 21:30
Location: Cheese factory
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.


Top
 Offline Profile  
 
PostPosted: 18 Jan 2012, 17:30 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
Quote:
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.

Quote:
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.


Top
 Offline Profile  
 
PostPosted: 18 Jan 2012, 17:41 
User avatar

Joined: 07 Feb 2005, 21:30
Location: Cheese factory
Okey, added this to my todo list.


Top
 Offline Profile  
 
PostPosted: 18 Jan 2012, 17:44 
Lobby Developer

Joined: 16 Mar 2007, 18:27
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


Top
 Offline Profile  
 
PostPosted: 18 Jan 2012, 17:52 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
Cheesecan wrote:
Okey, added this to my todo list.
nice, thanks.


Top
 Offline Profile  
 
PostPosted: 18 Jan 2012, 17:57 
Lobby Developer
User avatar

Joined: 14 Aug 2007, 15:15
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?


Top
 Offline Profile  
 
PostPosted: 18 Jan 2012, 17:59 
Lobby Developer
User avatar

Joined: 08 Feb 2010, 22:21
Location: Saint-Petersburg, Russia
thanks


Top
 Offline Profile  
 
PostPosted: 18 Jan 2012, 18:11 
Lobby Developer

Joined: 16 Mar 2007, 18:27
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


Top
 Offline Profile  
 
PostPosted: 18 Jan 2012, 18:17 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
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.


Top
 Offline Profile  
 
PostPosted: 18 Jan 2012, 18:46 
Kernel Panic Co-Developer
User avatar

Joined: 16 Nov 2004, 13:08
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.


Top
 Offline Profile  
 
PostPosted: 18 Jan 2012, 19:15 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
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?"


Top
 Offline Profile  
 
PostPosted: 18 Jan 2012, 19:30 
Kernel Panic Co-Developer
User avatar

Joined: 16 Nov 2004, 13:08
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!


Top
 Offline Profile  
 
PostPosted: 18 Jan 2012, 21:22 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
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


Top
 Offline Profile  
 
PostPosted: 19 Jan 2012, 20:13 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
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*


Top
 Offline Profile  
 
PostPosted: 03 Mar 2012, 13:38 
Lobby Developer
User avatar

Joined: 08 Feb 2010, 22:21
Location: Saint-Petersburg, Russia
This code below is for validmaps.lua ?
Code:
/**
 * @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);


Top
 Offline Profile  
 
PostPosted: 03 Mar 2012, 13:45 
Lobby Developer
User avatar

Joined: 14 Aug 2007, 15:15
yes


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.