mustyoshi
|
  |
 |
| Joined: 27 Dec 2007 |
| Total Posts: 41651 |
|
|
| 30 Nov 2012 06:46 PM |
All I know for sure is that "(& #255;@& #0;& #17;& #255;@& #0;" is a blank cell. I think that each cell starts with "(&"... Nothing else makes sense when I fiddle with the cell types. I can't even figure out how roblox determines which empty cells to include... Because adding random cells at huge distances only adds a single cell to the file. Has anybody tried to figure it out before?
~Monica mustyoshi mustyoshi mustyoshi mustyoshi |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2012 06:52 PM |
| Why don't you just use Lua? Isn't it simpler to fiddle with it inside of roblox? |
|
|
| Report Abuse |
|
|
| |
|
mustyoshi
|
  |
 |
| Joined: 27 Dec 2007 |
| Total Posts: 41651 |
|
|
| 30 Nov 2012 06:55 PM |
@arceus Because I want to write a thing to load terrain from scripts, in the form of a table saved as a string. And iterating through all the cells required to get the entire thing (because you have to iterate through each one an call :GetCell() each time just to make sure its an empty cell and skip the rest of the loop takes soooooooo long.
~Monica mustyoshi mustyoshi mustyoshi mustyoshi |
|
|
| Report Abuse |
|
|
Anaminus
|
  |
 |
| Joined: 29 Nov 2006 |
| Total Posts: 5945 |
|
|
| 30 Nov 2012 07:04 PM |
Well first off, decode the XML character entities. You can figure out what is what easily by saving to file a StringValue with each character in the string (except for null), then looking at it's XML data.
s = Instance.new("StringValue",Workspace) for i=1,255 do s.Value = s.Value .. string.char(i) end
Most characters are encoded as "&" then "#" then "000;" where 000 is the character's decimal number. A few are encoded with named entities, and the rest (including newlines and carriage returns) aren't encoded at all. |
|
|
| Report Abuse |
|
|
mustyoshi
|
  |
 |
| Joined: 27 Dec 2007 |
| Total Posts: 41651 |
|
|
| 30 Nov 2012 07:07 PM |
I thought that; but most of them when they aren't blank cells are well below any readable text. Plus after adding more random cells, it started adding +Z, which I can only assume somehow relates to positioning, since there doesn't seem to be any other way of determining position.
~Monica mustyoshi mustyoshi mustyoshi mustyoshi |
|
|
| Report Abuse |
|
|
mustyoshi
|
  |
 |
| Joined: 27 Dec 2007 |
| Total Posts: 41651 |
|
|
| 30 Nov 2012 07:15 PM |
It's so frustrating, the worst part is I can't figure out how it knows where the block goes!
~Monica mustyoshi mustyoshi mustyoshi mustyoshi |
|
|
| Report Abuse |
|
|
mustyoshi
|
  |
 |
| Joined: 27 Dec 2007 |
| Total Posts: 41651 |
|
|
| 30 Nov 2012 07:23 PM |
Okay, so the mass of "empty blocks" seems to be the entire possible range. Perhaps each one is actually a subchunk of 64 blocks...
~Monica mustyoshi mustyoshi mustyoshi mustyoshi |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2012 08:49 PM |
| I thought it was compressed using binary RLE? :o |
|
|
| Report Abuse |
|
|
mustyoshi
|
  |
 |
| Joined: 27 Dec 2007 |
| Total Posts: 41651 |
|
|
| 30 Nov 2012 09:20 PM |
Hmm, maybe...
~Monica mustyoshi mustyoshi mustyoshi mustyoshi |
|
|
| Report Abuse |
|
|
Anaminus
|
  |
 |
| Joined: 29 Nov 2006 |
| Total Posts: 5945 |
|
|
| 30 Nov 2012 10:15 PM |
I'm pretty certain that terrain is divided into 32x16x32 chunks. If you lower your quality settings, you'll notice that terrain is loaded in chunks of this size.
If you try checking the data for cleared terrain, you'll notice that there's 1024 repetitions of the same 8 character string. You can fit that many 32x16x32 chunks in a 512x64x512 area (the size of the terrain). So I'd say that each of those 8 character strings represents one completely empty chunk. Here's that string in a decimal form:
|040|255|064|000|017|255|064|000
|
|
|
| Report Abuse |
|
|
mustyoshi
|
  |
 |
| Joined: 27 Dec 2007 |
| Total Posts: 41651 |
|
|
| 30 Nov 2012 10:56 PM |
Placing a grass at -256,0,-256 produces & #0;& #1;(& #255;?& #255;& #1;& #1;& #17;& #255;?& #255; 000|001|255|255|001|001|017|255|255
But then placing a grass at -256,1,-256 (with the previous one still there at 0) & #0;& #1;(& #255;& #3;& #255;& #0;& #1;(& #255;;& #255;& #1;& #1;& #17;& #255;& #3;& #255;& #1;& #1;& #17;& #255;;& #255;
|000||001|255|003|255|000|001|255|255|001|001|017|255|003|255|001|001|017|255|255
And another on top of it.
& #0;& #1;(& #255;& #3;& #255;& #0;& #1;(& #255;& #3;& #255;& #0;& #1;(& #255;7& #255;& #1;& #1;& #17;& #255;& #3;& #255;& #1;& #1;& #17;& #255;& #3;& #255;& #1;& #1;& #17; |000|001|255|003|255|000|001|255|003|000|001|255|7 255|001|017|255|003|001|001|017|255|003|255|001|001|017
I want to say that maybe the 255,3,255,0,1 is some sort of "same as next". But then the wierd 7& #255 part throws me off...
~Monica mustyoshi mustyoshi mustyoshi mustyoshi |
|
|
| Report Abuse |
|
|
mustyoshi
|
  |
 |
| Joined: 27 Dec 2007 |
| Total Posts: 41651 |
|
|
| 01 Dec 2012 11:31 AM |
Please can an admin shed light on this, or make the API calls faster?
~Monica mustyoshi mustyoshi mustyoshi mustyoshi |
|
|
| Report Abuse |
|
|