Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 Before February 2015

SOUBR
Guest

How to get the map Data

Hello, i've   seen this function :http://pastebin.com/ML22YLF2 (wich returns the Map Data in   a 2d Array.) But i would like to know how is this array organized: What do the 1st and the 2nd dimensions of the array indicates and what is the Message object should i use as an argument.

Another function or way to get the Room data is also welcome.

#2 Before February 2015

4649
Guest

Re: How to get the map Data

http://pastebin.com/9uFrYtYp
Capasha's code is good.

I think.

#3 Before February 2015

lrussell
Member
From: Saturn's Titan
Joined: 2015-02-15
Posts: 843
Website

Re: How to get the map Data

If the saved level data is okay (not the live level), you can just use my web tool API.
http://api.everybodyedits.info/WorldDat … dt06vvya0I (just replace the ID with your own).

You'll need Json.Net to deserialize it to a "World" object, just use WebClient's DownloadString to get the data.
Also, you'll need to reference System.Drawing to get "Point" and "Color".

My API isn't finalized, but it overall works. If something goes wrong it'll return HTTP 400.

Here's the classes (should work):

public class World         {             public string Id, Name = "Untitled World", OwnerId, Owner;             public int Plays, Width = 200, Height = 200, Woots, TotalWoots;             public bool AllowPotions, Visible;             public Color BackgroundColor;             public List<WorldData> WorldData = new List<WorldData>();         }          public class WorldData         {             public int type, layer, rotation, id, goal;             public string target, text;             public List<Point> locs = new List<Point>();         }

Offline

#4 Before February 2015

SOUBR
Guest

Re: How to get the map Data

4649 wrote:

http://pastebin.com/9uFrYtYp
Capasha's code is good.

I think.

K but how do i use it.

lrussell wrote:

If the saved level data is okay (not the live level), you can just use my web tool API.
http://api.everybodyedits.info/WorldDat … dt06vvya0I (just replace the ID with your own).

You'll need Json.Net to deserialize it to a "World" object, just use WebClient's DownloadString to get the data.
Also, you'll need to reference System.Drawing to get "Point" and "Color".

My API isn't finalized, but it overall works. If something goes wrong it'll return HTTP 400.

Here's the classes (should work):

public class World         {             public string Id, Name = "Untitled World", OwnerId, Owner;             public int Plays, Width = 200, Height = 200, Woots, TotalWoots;             public bool AllowPotions, Visible;             public Color BackgroundColor;             public List<WorldData> WorldData = new List<WorldData>();         }          public class WorldData         {             public int type, layer, rotation, id, goal;             public string target, text;             public List<Point> locs = new List<Point>();         }

I guess i need the live level data :/

EDIT: A friend has told me how to use the function. But i would like to know capasha's one anyway
EDIT2: Yeah the first function seems outdated plz, how can i use capasha's one.

Last edited by SOUBR (Dec 15 2014 12:55:03 pm)

#5 Before February 2015

SOUBR
Guest

Re: How to get the map Data

Not even the capasha function is working for me:
byte[] loc6 = m.GetByteArray(loc4 + 2);
Value at index:20 is not System.Byte[]. It's a System.UInt32. Value is: 9.

lrussell: Does your api return the id 0 to every location in the map?

Last edited by SOUBR (Dec 15 2014 2:30:26 pm)

#6 Before February 2015

ewoke
Member
Joined: 2015-02-20
Posts: 412

Re: How to get the map Data

try changing the offset
also filter some new blocks(blue coin door/gate etc)

Last edited by ewoke (Dec 16 2014 6:49:14 am)


if you can read this....good for you

Offline

#7 Before February 2015

SOUBR
Guest

Re: How to get the map Data

got the aswer in this topic https://eeforumify.com/viewtopic.php?id=32418

SOUBR 1423758870202562

Board footer

Powered by FluxBB

[ Started around 1713546832.5661 - Generated in 0.035 seconds, 10 queries executed - Memory usage: 1.48 MiB (Peak: 1.62 MiB) ]