How do I register maps on plasma server?

How do I register maps on plasma server?

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

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

How do I register maps on plasma server?

Post 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?
User avatar
MidKnight
Posts: 2652
Joined: 10 Sep 2008, 03:11

Re: How do I register maps on plasma server?

Post by MidKnight »

I thought it grabbed maps from whoever's using zklobby and uploaded them from there. Dunno for sure, though.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: How do I register maps on plasma server?

Post by Licho »

Start zklobby or upload to springfiles. Both methods work. ZKL is faster to do it.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: How do I register maps on plasma server?

Post 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?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: How do I register maps on plasma server?

Post by Forboding Angel »

I have run zkl several times and it is not picking up these maps.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: How do I register maps on plasma server?

Post 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.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: How do I register maps on plasma server?

Post 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.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: How do I register maps on plasma server?

Post 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.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: How do I register maps on plasma server?

Post 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..
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Re: How do I register maps on plasma server?

Post by koshi »

Just fyi: GetMapInfoEx has been deprecated for a while now
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: How do I register maps on plasma server?

Post by Licho »

It meansits not guaranteed to work or what? What should be used instead?
GetMapInfoExEx ?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: How do I register maps on plasma server?

Post 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:
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: How do I register maps on plasma server?

Post 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
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: How do I register maps on plasma server?

Post 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.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: How do I register maps on plasma server?

Post 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
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: How do I register maps on plasma server?

Post by smoth »

gante uses it IIRC, does it have problems in zkl?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: How do I register maps on plasma server?

Post by Forboding Angel »

No, but yours is quite modified. What I'm using is straight up blueprint.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: How do I register maps on plasma server?

Post by Forboding Angel »

*I'm annoyed.*
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: How do I register maps on plasma server?

Post 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..
Post Reply

Return to “General Discussion”