The image shows where the coordinates you put would be in the map (supposing the first byte is for the x axis and the second for the y axis, otherwise the image should be rotated 90 degrees rigth). S stands for starting point and E stands for ending point. About the sma editor inability to load your ep3 files, its probably because they arent in the right format.
The editor must read these:
20 bytes fixed header (look in any ep2 .sma, the first 20 bytes are the header it looks for).
65536 (or 16384 if its for 128x128 map) times the 76 byte long pattern repeated pattern (which is 4980736 bytes for 256x256 or 1245184 bytes for 128x128 maps).
4 bytes which indicate how many spawns are following
60 bytes long spawns (how many spawns it wants depends on the 4 bytes it read before)
I dont know whether the server checks all this stuff but my editor does. If you know c# here is the class deciding whether the file is sma:
Code:
/// <summary>
/// A class obtaining and containing info concerning sma files.
/// </summary>
public class SMAInfo
{
public readonly bool isSMA;
public readonly FileStream fs;
public readonly int mSize;
public readonly byte[] Pattern;
public string fFullPath
{
get;
private set;
}
public string fExtension
{
get
{
return Path.GetExtension(fFullPath);
}
}
public string fName
{
get
{
return Path.GetFileNameWithoutExtension(fFullPath);
}
}
private int _sCount;
public int sCount
{
get
{
return _sCount;
}
set
{
fs.Lock(mSize - 4, mSize + (value * Default.smaSpawnLength));
fs.Position = mSize - 4;
Tools.WriteBigEndian(fs, value);
_sCount = value;
fs.SetLength(mSize + (value * Default.smaSpawnLength));
fs.Unlock(mSize - 4, mSize + (value * Default.smaSpawnLength));
}
}
public SMAInfo(string FilePath)
{
isSMA = false;
if (!FilePath.EndsWith(".sma")) return;
fFullPath = Path.GetFullPath(FilePath);
try { fs = File.Open(FilePath, FileMode.Open, FileAccess.ReadWrite); }
catch (Exception) { return; }
fs.Lock(0, fs.Length);
if (fs.Length < ((128 * 128 * Default.smaPatternLength) + Default.smaHeaderLength + 4)) goto Return; //Default.smaPatternLength is 76 in this case
fs.Position = 0;
byte[] header = new byte[Default.smaHeaderLength]; //HeaderLength is 20
fs.Read(header, 0, Default.smaHeaderLength);
//Removed: if (!header.SequenceEqual<byte>(Default.smaHeader)) goto Return; // Default sma header is the first 20 bytes which can be found in any ep2 .sma file (try the 1001.sma)
//Pattern = new byte[Default.smaPatternLength];
//fs.Read(Pattern, 0, Default.smaPatternLength);
if (fs.Length >= ((256 * 256 * Default.smaPatternLength) + Default.smaHeaderLength + 4)) mSize = ((256 * 256 * Default.smaPatternLength) + Default.smaHeaderLength + 4);
else if (fs.Length >= ((128 * 128 * Default.smaPatternLength) + Default.smaHeaderLength + 4)) mSize = ((128 * 128 * Default.smaPatternLength) + Default.smaHeaderLength + 4);
else goto Return;
fs.Position = mSize - 4;
_sCount = Tools.ReadBigEndian32(fs);
if (((_sCount * Default.smaSpawnLength) + mSize) != fs.Length) goto Return;
isSMA = true; //Only if this command is executed will the sma file be loaded
Return: // Return Code
fs.Unlock(0, fs.Length);
return;
}
}
Would you mind sending me the files to examine them ? If they are made by a masangish tool or are from a masangish server then ill edit the editor to read them. I just supposed ep2 and ep3 sma files have the same format (and thats how it should be like).
I hope this helps.