Page 1 of 2

How do I register maps on plasma server?

Posted: 08 Mar 2012, 02:22
by Forboding Angel
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?

Re: How do I register maps on plasma server?

Posted: 08 Mar 2012, 05:09
by MidKnight
I thought it grabbed maps from whoever's using zklobby and uploaded them from there. Dunno for sure, though.

Re: How do I register maps on plasma server?

Posted: 08 Mar 2012, 05:26
by Licho
Start zklobby or upload to springfiles. Both methods work. ZKL is faster to do it.

Re: How do I register maps on plasma server?

Posted: 08 Mar 2012, 06:43
by Forboding Angel
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?

Re: How do I register maps on plasma server?

Posted: 08 Mar 2012, 07:36
by Forboding Angel
I have run zkl several times and it is not picking up these maps.

Re: How do I register maps on plasma server?

Posted: 08 Mar 2012, 13:38
by Licho
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.

Re: How do I register maps on plasma server?

Posted: 08 Mar 2012, 13:50
by Forboding Angel
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.

Re: How do I register maps on plasma server?

Posted: 08 Mar 2012, 14:52
by Licho
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.

Re: How do I register maps on plasma server?

Posted: 08 Mar 2012, 14:57
by Licho
Its one unitsync call that extracts all this information from the map:

Code: Select all

    [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..

Re: How do I register maps on plasma server?

Posted: 08 Mar 2012, 15:00
by koshi
Just fyi: GetMapInfoEx has been deprecated for a while now

Re: How do I register maps on plasma server?

Posted: 08 Mar 2012, 18:07
by Licho
It meansits not guaranteed to work or what? What should be used instead?
GetMapInfoExEx ?

Re: How do I register maps on plasma server?

Posted: 08 Mar 2012, 21:00
by Forboding Angel
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:

Re: How do I register maps on plasma server?

Posted: 08 Mar 2012, 22:33
by abma
@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

Re: How do I register maps on plasma server?

Posted: 09 Mar 2012, 00:23
by Licho
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: Select all

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.

Re: How do I register maps on plasma server?

Posted: 09 Mar 2012, 01:36
by Forboding Angel
Licho, out of your 6000 registered maps, NONE of them are blueprint maps.

The problem is in the code registering the maps.

Code: Select all

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

Re: How do I register maps on plasma server?

Posted: 09 Mar 2012, 01:39
by Forboding Angel

Re: How do I register maps on plasma server?

Posted: 09 Mar 2012, 01:51
by smoth
gante uses it IIRC, does it have problems in zkl?

Re: How do I register maps on plasma server?

Posted: 09 Mar 2012, 02:07
by Forboding Angel
No, but yours is quite modified. What I'm using is straight up blueprint.

Re: How do I register maps on plasma server?

Posted: 09 Mar 2012, 08:05
by Forboding Angel
*I'm annoyed.*

Re: How do I register maps on plasma server?

Posted: 09 Mar 2012, 12:33
by Licho
So what is this blueprint and where is this code?

Code: Select all

if (Spring.GetMapOptions().timeofday ~= "dawn") then
   return
end
Looks its lua so it should be easilyl modifiable..