View topic - How do I register maps on plasma server?



All times are UTC + 1 hour


Post new topic Reply to topic  [ 32 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: 08 Mar 2012, 02:22 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
It's quite irritating that plasma server doesn't automagically register maps uploaded and updated on springfiles, but in the interest of building a bridge and getting over it, how do I register maps on plasma server?


Top
 Offline Profile  
 
PostPosted: 08 Mar 2012, 05:09 
Zero-K Developer
User avatar

Joined: 10 Sep 2008, 02:11
Location: In search for TheTruth (TM)
I thought it grabbed maps from whoever's using zklobby and uploaded them from there. Dunno for sure, though.


Top
 Offline Profile  
 
PostPosted: 08 Mar 2012, 05:26 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
Start zklobby or upload to springfiles. Both methods work. ZKL is faster to do it.


Top
 Offline Profile  
 
PostPosted: 08 Mar 2012, 06:43 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
But they are on springfiles and have been for quite some time now!

http://springfiles.com/spring/spring-ma ... red-divide
http://springfiles.com/spring/spring-ma ... ng-grounds
http://springfiles.com/spring/spring-ma ... aggy-creek
http://springfiles.com/spring/spring-ma ... red-divide
http://springfiles.com/spring/spring-ma ... ark-valley
http://springfiles.com/spring/spring-ma ... riverglade
http://springfiles.com/spring/spring-ma ... new-iammas
http://springfiles.com/spring/spring-ma ... division-0

I have recently updated the above maps, but when I ask for them on the autohost, it cannot find them!

I will give zkl a shot. Does it just cycle through my maps and basically register them if they aren't already there?


Top
 Offline Profile  
 
PostPosted: 08 Mar 2012, 07:36 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
I have run zkl several times and it is not picking up these maps.


Top
 Offline Profile  
 
PostPosted: 08 Mar 2012, 13:38 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
Move them out of maps, then move copy them (must copy not move) back to maps while ZKL is running, it will scan them, go to settings->show log to see the outcome.

Sometimes faulty lua prevents maps from being processed.


Top
 Offline Profile  
 
PostPosted: 08 Mar 2012, 13:50 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
Well, they are blueprint:

http://pastebin.com/g6wJs45Q

Basically when parsing mapoptions your checker wizbang thingy is crapping itself because mapoptions is empty (because I'm not using any of the mapoptions stuff). It should see a nil value and move on, not shit the bed.


Top
 Offline Profile  
 
PostPosted: 08 Mar 2012, 14:52 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
It actually appears to be map/unitsync issue..
unitsync returns error code..

Exact call is this

if (!NativeMethods.GetMapInfoEx(mapName, ref mapInfo, mapInfoVersion)) throw new UnitSyncException("Error getting map information.");

Simply put, no map information can be extracted from your maps.


Top
 Offline Profile  
 
PostPosted: 08 Mar 2012, 14:57 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
Its one unitsync call that extracts all this information from the map:

Code:
    [Serializable]
    [StructLayout(LayoutKind.Sequential)]
    public struct MapInfo
    {
        [MarshalAs(UnmanagedType.LPStr)]
        public string description;
        public int tidalStrength;
        public int gravity;
        public float maxMetal;
        public int extractorRadius;
        public int minWind;
        public int maxWind;
        public int width;
        public int height;
        public int posCount;

        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.Struct)]
        public StartPos[] positions;

        [MarshalAs(UnmanagedType.LPStr)]
        public string author;
    }


And it fails. So I cannot work around it i need other fields too like author, description etc..


Top
 Offline Profile  
 
PostPosted: 08 Mar 2012, 15:00 
Lobby Developer
User avatar

Joined: 14 Aug 2007, 15:15
Just fyi: GetMapInfoEx has been deprecated for a while now


Top
 Offline Profile  
 
PostPosted: 08 Mar 2012, 18:07 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
It meansits not guaranteed to work or what? What should be used instead?
GetMapInfoExEx ?


Top
 Offline Profile  
 
PostPosted: 08 Mar 2012, 21:00 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
Licho, this is using vanilla blueprint. It is most definitely an issue on whatever is being used to scan the maps.

Come on man! I just had a huge release and none of the included maps can be played on the host ! :? Please tell me you can understand my frustration :evil:


Top
 Offline Profile  
 
PostPosted: 08 Mar 2012, 22:33 
Spring Developer

Joined: 31 May 2009, 23:08
@Licho:

the plan is to add GetMapInfoCount.. but this isn't implemented yet. (currently there are the GetMap* functions like GetMapGravity), see http://springrts.com/mantis/view.php?id=2315

edit: docstring for GetInfoMapSize seems to be wrong:
http://springrts.com/mantis/view.php?id=2996


Top
 Offline Profile  
 
PostPosted: 09 Mar 2012, 00:23 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
FA out of 6 000 registered maps or so only your recent ones have problem.

Problem clearly is not in the ZKL code i can control - its problem directly in unitsync function, which in turn uses lua.

The message unitsync sends is

Code:
Unitsync error: internal_GetMapInfo: error = 2, mapconfig/mapinfo/10_dawn.lua, [string "mapconfig/mapinfo/10_dawn.lua"]:5: attempt to call field 'GetMapOptions' (a nil value)


Check the line 5 in 10_dawn.lua and fix it for this calls to work.


Top
 Offline Profile  
 
PostPosted: 09 Mar 2012, 01:36 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
Licho, out of your 6000 registered maps, NONE of them are blueprint maps.

The problem is in the code registering the maps.

Code:
if (Spring.GetMapOptions().timeofday ~= "dawn") then
   return
end


That is line 5.

Moreover, mapoptions is empty, so none of this shit is even being called (tested with the mapoptions in and same error results).

Apparently you don't know what blueprint is. Soon, most if not all new maps will be using it: https://github.com/jk3064/Map-Blueprint


Top
 Offline Profile  
 
PostPosted: 09 Mar 2012, 01:39 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
viewtopic.php?f=12&t=27788


Top
 Offline Profile  
 
PostPosted: 09 Mar 2012, 01:51 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
gante uses it IIRC, does it have problems in zkl?


Top
 Offline Profile  
 
PostPosted: 09 Mar 2012, 02:07 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
No, but yours is quite modified. What I'm using is straight up blueprint.


Top
 Offline Profile  
 
PostPosted: 09 Mar 2012, 08:05 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
*I'm annoyed.*


Top
 Offline Profile  
 
PostPosted: 09 Mar 2012, 12:33 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
So what is this blueprint and where is this code?

Code:
if (Spring.GetMapOptions().timeofday ~= "dawn") then
   return
end


Looks its lua so it should be easilyl modifiable..


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: Funkencool, zwzsg 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.