not very important but, if you know nothing maybe this might help you.
Attachment 155295
if i have made mistakes (i know i have a lot of mistakes) feel free to make it right.
not very important but, if you know nothing maybe this might help you.
Attachment 155295
if i have made mistakes (i know i have a lot of mistakes) feel free to make it right.
Last edited by Future; 04-01-16 at 11:22 AM. Reason: Tagged properly / added descriptive title (feel free to change that but do say what you're talking about)
Your structure is fucked up, the order isnt right, some values does not exist, the method that you're using isnt right in all code languages because you're reading all value by value.
You should go better using the MSS mapeditor (Screenshot by Lightshot) or use a custom one (as i see, better dont made by you) (Screenshot by Lightshot).
Cheerz, Aesir.
how can i get this program or what should i do ?
Last edited by Murat Yereseren; 03-01-16 at 04:20 PM.
I have to agree with Aesir, try to write your own one.
As a tip: Here are some basic structs for the .dat files
I started my own one in Unity, but got stuck on model positioning, rotation etc.
![]()
Last edited by St34lth4ng3l; 03-01-16 at 05:02 PM.
what is MSS Mapeditor and how can i get it is there a link to download or buy it please help me mate...
thnx St34lth4ng3l
MSS = MasangSoft
So it's the official Mapeditor, but it sucks, so it's better to write your own one
I got just one question. If you have the source code of the game, why do you still use a Hex Editor for visualizing the structure? You could write something very simple for only showing the objectinfo entries in the .dat files, without any map editor or any kind of rendering:
This can give you a basic idea of how things work. @St34lth4ng3l posted the structs in the source already. This is an easy start for making an editor of any kind you want even if you don't know what happens in the Scene Data initialization
i know bro, you are right but the truth is i am too lazy to write a program for that, even its too easy
Then stop right there. If you're too lazy to do something properly, don't do it at all. You say ".. even if it's too easy", but I am confident you mean because you do not know how.
It's great that you provided some information for others to use if and when needed, but seriously consider and think about what others like Aesir, Future and Stealth have said. Otherwise, you'll make it difficult for yourself, you might not learn anything of value, and you might not make any real progress regarding Ace development.
Well xDD
If you act a bit more intelligent than I did, I hope... I tend to waste too much time on the most simple stuff (like setting up that grid view with a combobox and the parsing between) xD
The main thing with this, also related to the posts by @burgers and @Aesir, is to keep trying. You might fail. You might get a serious laughing attack from the shit you produce. But at the end you've got something of value to be proud of
Anyw. If I fixed some more displaying bugs and went over my code again, I might share that simple objectinfo viewer for .dat files and try my luck on one of these map editors.
Last edited by Future; 05-01-16 at 03:21 AM. Reason: GRAMMAR :<
Hello, I'm trying to make a tool like FutureAR did but i need help understanding the data on .dat
I modified the Field Server logs showing the offset and the ObjNum in order to understand the .dat structure.
This is the Field Server Logs
The Header Data Offset (0x0020) shows me where is the mapId (Hex Values: 32 30 30 32 ASCII: 2002)Code:01-05 13:03:36|################## Load Map(2002) : Map Size(256, 256) ################## 01-05 13:03:36|CVMem::AllocVMem VirtualAlloc() success, TypeSize[ 36] PoolCnt[ 1592] CommitSize[ 57344] vectorSize[2] Address Range(0x7CF50000 ~ 0x7CF5E000) Load Monster Info ==> # of MonsterInfo: 0 Tatal Monster Count : [ 0] 01-05 13:03:36|[MAPOBJECT] Header Data Offset: 0X06680020 01-05 13:03:36|[MAPOBJECT] Reading OFFSET : 0X0698305C 01-05 13:03:36|[MAPOBJECT] Reading OBJECTNUM : 3083300 01-05 13:03:36|[MAPOBJECT] Reading OFFSET : 0X069830CC 01-05 13:03:36|[MAPOBJECT] Reading OBJECTNUM : 3082700 01-05 13:03:36|[MAPOBJECT] Reading OFFSET : 0X0698313C 01-05 13:03:36|[MAPOBJECT] Reading OBJECTNUM : 3079500 01-05 13:03:36|[MAPOBJECT] Reading OFFSET : 0X069831AC 01-05 13:03:36|[MAPOBJECT] Reading OBJECTNUM : 3185000 01-05 13:03:36|[MAPOBJECT] Reading OFFSET : 0X0698321C 01-05 13:03:36|[MAPOBJECT] Reading OBJECTNUM : 3185200 01-05 13:03:36|[MAPOBJECT] Reading OFFSET : 0X0698328C 01-05 13:03:36|[MAPOBJECT] Reading OBJECTNUM : 3083400 01-05 13:03:36|[MAPOBJECT] Reading OFFSET : 0X069832FC 01-05 13:03:36|[MAPOBJECT] Reading OBJECTNUM : 3080000
The problem is when i go to the next Address (305C).
According to the structure DAT_STRUCT_MAPOBJECTS I think the first 4 Bytes are the ObjectNum(hex) but when i go there are no values as you will see on the image.
Just in case i checked the Address 305C0 but the values 00 00 A0 42 in decimal, are not the same as the ObjNum said in Field Server.
The prints are located in
Thank you in advance :)PHP Code:for(int i = 0; i < tmMapInfo.nObjectNumber; i++)
{
----> sprintf(szOffset, "[MAPOBJECT] Reading OFFSET : %#p\r\n", pOffset);
g_pGlobal->WriteSystemLog(szOffset);
memset(&ObjInfo, 0x00, sizeof(OBJECTINFOSERVER));
memcpy(&tmObjClient, pOffset, sizeof(OBJECTINFOCLIENT));
pOffset += sizeof(OBJECTINFOCLIENT);
DBObjectInfo = m_pMapWorkspace->m_mapMapObjectInfo.findEZ(tmObjClient.dwObjType);
-----> sprintf(szOffset, "[MAPOBJECT] Reading OBJECTNUM : %d\r\n", (DWORD)tmObjClient.dwObjType);
g_pGlobal->WriteSystemLog(szOffset);[/B]
if (DBObjectInfo.Code != tmObjClient.dwObjType)
{
char szError[1024];
sprintf(szError, "[Error] CMapProject::LoadMFile_ SearchObjectInfoError error, MapProject[%04d] m_dwObjType[%10d]\r\n"
, m_nMapIndex, tmObjClient.dwObjType);
g_pGlobal->WriteSystemLog(szError);
DBGOUT(szError);
continue;
}
PD: References:https://en.wikipedia.org/wiki/C_data_types and all images you posted.
This is getting really sad at this point.
You guys have the source available and you're making all this enormous mess and pointless threads.
Every .dat file is essentially an .obj container.
By default, the first entry of a .dat file is the map info itself, and it consists of the following:
MAP_DATA, followed by VERTEXINFO * nVertexNumber, followed by TILEINFOCLIENT * nTileInfoNumber, and finally OBJECTINFOCLIENT * nObjectNumber.Code:struct MAP_DATA { float fTileSize; int nVertexNumber; int nTileInfoNumber; int nObjectNumber; }; struct VERTEXINFO { float[3] pos; float[3] nor; }; struct TILEINFOCLIENT { int useTexNumber; unsigned int dwWaterType; int waterHeight; short waterTexNumber; unsigned char bMove; int bEnableLand; unsigned char bEventType; } struct OBJECTINFOCLIENT { unsigned int dwObjType; int nObjCount; float[3] vPos; float[3] vVel; float[3] vUp; unsigned int dwObjectMonsterUniqueNumber; unsigned char bObjectTexIndex; unsigned int nObjectSrcIndex; unsigned char bBodyCondition; int bIsEvent; unsigned char bEventType; short sEventIndexFrom; short sEventIndexTo; short sEventIndex3; char strEventParam[40]; }
Was it really so hard to gather all this information from the source?