thanks man, your like a goddess.
|
|
After messing up like 10 times by carelessly forgetting things, I finally got the dumper to work right. I compressed all the xml files into dat files using Graham's method. The total size of all the files are 21.8mbs. These files contain 918 regions of valid mapdata that I compiled from different revisions using dragonkk's [Only registered and activated users can see links. ].
EDIT: If you want the xml dump you can download [Only registered and activated users can see links. ] or [Only registered and activated users can see links. ]. I compressed the rar with the best compression. The size of the rar is about 5.6mbs, unpacked its about 497mbs.
XML Format:
Compress Code:Code:<region> <id>6234</id> <objects> <entry> <worldObject> <id>28127</id> <type>22</type> <face>1</face> <location> <x>1536</x> <y>5760</y> <z>0</z> </location> </worldObject> <int>28127</int> </entry> </objects> </region>
[Only registered and activated users can see links. ]Code:public static void compress(int region) { try { int i = 0; int size = regions.get(region).getObjects().size(); RandomAccessFile raf = new RandomAccessFile(new File("./dump/compressed/"+ region + ".dat"), "rw"); raf.writeInt(region); raf.writeInt(size); for(WorldObject object : regions.get(region).getObjects().keySet()) { raf.writeShort(object.getId()); raf.writeShort(object.getType()); raf.writeShort(object.getFace()); raf.writeShort(object.getLocation().getX()); raf.writeShort(object.getLocation().getY()); raf.writeShort(object.getLocation().getZ()); i++; } raf.close(); System.out.println("Saved " + i); System.out.println("Done."); } catch (Exception e) { e.printStackTrace(); } }




raf.writeShort(object.getType());
raf.writeShort(object.getFace());
Should be
raf.writeByte((object.getType() << 2) | (object.getFace() & 3));
Btw, why save this on a xml file, if you have an average or below computer, fucking XStream will rape your cpu and the memory will throught the roof lol.
Anyways good job tho(altho I won't use since I have my own dump
)
thanks lol

Awesome, could you please dump this in text files as well in this format?:
Those spaces are actually tabs, not spaces. Tabs as in you press TAB key in a text editor and it does this bigger space.objectId type face height objectX objectY objectZ
obj = 559 22 0 0 2061 3906 0
obj = 559 22 1 0 2062 3917 0
obj = 559 22 1 0 2063 3925 0
obj = 559 22 3 0 2064 3910 0
obj = 559 22 2 0 2072 3935 0
obj = 559 22 1 0 2076 3937 0
obj = 559 22 2 0 2078 3936 0
Or if you're not bothered running around the regions to dump again, you could borrow me the dumper. I'd love to dump some more maps to test my 3d map editor
Thanks![]()

wtf is this shit?
your client will not be able to normally read that.Code:raf.writeShort(object.getId()); raf.writeShort(object.getType()); raf.writeShort(object.getFace()); raf.writeShort(object.getLocation().getX()); raf.writeShort(object.getLocation().getY()); raf.writeShort(object.getLocation().getZ());
That's wrong.raf.writeByte((object.getType() << 2) | (object.getFace() & 3));
its
Code:raf.writeByte((object.getType << 2) | object.getFace());

All the coordinates in the dump are wrong =/
They're all the same depending what mapregion.

| « [617] Deob (Safe Mode, OpenGL, Software Mode working) | For People Needing the [613][614] server+ client they couldnt fix » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |