Request for help!

Joined
Apr 29, 2023
Messages
493
Reaction score
612
So we've managed to progress alot in the last few weeks with the Mir 4 Source however we're still stuck with the NavMesh. So here's a break down of the situation:

The navmesh is required server side, we've found that it's being used for Monster Respawning and Movement, We've managed to remove a un-needed nav check for Monster Attacks which has allowed us to have monsters that attack the player but we can't & shouldn't remove such checks elsewhere.

So, we've spent a long time and many different methods have been used to try and obtain the navmesh for the server, however obtaining the correct meshs is proving more difficult then we exspected.

I've put together a download which contains: NavMesh Server Code / Umaps (Extracted from client) / Navmesh JSON (handles the navmesh.bin files) / the navmesh we have been able to extract so far.

It looks like the source is wanting 2 navmesh.bin files per map. one if MAIN and the other is SUB01.

We're not sure if the filenames we've got on our current navmeshs are correct and we're not sure if they are the correct Magic Version.

This also applies to the structure of the NAVIMESH.JSON file which looks to be the middleman between the Server and the bin files. We know the correct format for the json but again, without the correct navmesh we can't check.

I'm hoping that someone alot smarter than me can try and extract the correct navmesh using everything i've provided. I've held back on releasing server files/source in fear of scammers but this is really the last option we have.



I've included a read me with roughly the same info that's i've posted here but might be worth a read.

Best of luck nerds and thank you for reading.
 
Very little information

A couple of questions
1)NavMesh - Mir 4\Data\NaviMesh are there working server files or are they with errors?
2)Do I need to convert from UMaps to bin? And do I need two files?
 
Upvote 0
Very little information

A couple of questions
1)NavMesh - Mir 4\Data\NaviMesh are there working server files or are they with errors?
2)Do I need to convert from UMaps to bin? And do I need two files?
1: I’ve only provided files that are needed to carry out the task, if more is needed then someone can let me know where they get stuck.
2: We know you can extract navmesh bins from the umaps but we need the correct format/type/file name.
The source points at each map having 2 separate navmesh, one for MAIN and another for SUB01.
 
Upvote 0
1: I’ve only provided files that are needed to carry out the task, if more is needed then someone can let me know where they get stuck.
2: We know you can extract navmesh bins from the umaps but we need the correct format/type/file name.
The source points at each map having 2 separate navmesh, one for MAIN and another for SUB01.
I assume that this is unrealistic with the information you gave

In the files that you gave there is not a word about these files of yours (main and sub)
So only a partial analysis of the client file
Which is easy to analyze anyway
But what exactly the server needs and what we should put in the files is not clear
 
Upvote 0
I assume that this is unrealistic with the information you gave

In the files that you gave there is not a word about these files of yours (main and sub)
So only a partial analysis of the client file
Which is easy to analyze anyway
But what exactly the server needs and what we should put in the files is not clear
The lack of info is because we only know so much which hasn’t helped us. Hence why we’re reaching out.

I’ll take a look over the code I’ve provided above and see if I’ve missed some relevant code.
 
Upvote 0
So, what's exactly the problem is?. Doesn't know if the bin files are correct or the magic word is correct?. That seems pretty easy to check..

Add a breakpoint and get the $CALLSTACK here:
bool NaviMeshManager::LoadNaviMesh(uint32_t par_navimesh_id, const std::string& par_base_path, const std::string& par_file_name)

Get the current position of:
auto fp = std::shared_ptr<FILE>(tempfile, fclose);

// Check which position of the file it is reading the header.
NavMeshSetHeader header;
size_t readLen = fread(&header, sizeof(NavMeshSetHeader), 1, fp.get());

Then, create a script that extracts the MAGIC and VERSION of each file..
 
Upvote 0
Maybe... the NavMesh is only containing waypoint data. And the Monster Attacks logic actually is inside server program code?

Update1:
After a liitle study, it says "navigation meshes are the evolution of waypoints networks." so they are different!
 
Last edited:
Upvote 0
Maybe... the NavMesh is only containing waypoint data. And the Monster Attacks logic actually is inside server program code?
You are right, the files contain calls for textures, effects, coordinates and colors
But I still don't understand what is required


So, what's exactly the problem is?. Doesn't know if the bin files are correct or the magic word is correct?. That seems pretty easy to check..

Add a breakpoint and get the $CALLSTACK here:
bool NaviMeshManager::LoadNaviMesh(uint32_t par_navimesh_id, const std::string& par_base_path, const std::string& par_file_name)

Get the current position of:
auto fp = std::shared_ptr<FILE>(tempfile, fclose);

// Check which position of the file it is reading the header.
NavMeshSetHeader header;
size_t readLen = fread(&header, sizeof(NavMeshSetHeader), 1, fp.get());

Then, create a script that extracts the MAGIC and VERSION of each file..
If you only need to update this information
Then why write about main and sub01?
 
Upvote 0
You are right, the files contain calls for textures, effects, coordinates and colors
But I still don't understand what is required


If you only need to update this information
Then why write about main and sub01?
He clearly stated that the source want's to load 2 navmesh.bin files.. adding a breakpoint to that function allows you to debug it better.

2: We know you can extract navmesh bins from the umaps but we need the correct format/type/file name.
As he said, they need the correct format/type/file name. So, creating a simple script to get the header of the navmesh.bin isn't that hard.

Code:
   std::ifstream file("lloopedfilesnavmesxh.bin", std::ios::binary);
    if (!file) {
        std::cerr << "Error opening file!" << std::endl;
        return -1;
    }

    NavMeshSetHeader header;
    file.read(reinterpret_cast<char*>(&header), sizeof(NavMeshSetHeader));

// debug header.magic, version
 
Upvote 0
You will likely find out that the server side data for nav meshes is generated by an external/ue plugin tool - .bin as an extension just indicates it is binary data.

Still waiting on the download to complete (A repo would've been far easier) - but you'll want to look over how the .bin is parsed on the server to get an idea of the data structure it is looking for then piece together either a tool to generate this data using the map or see if it relates to an already existing filetype

Do you have any single examples of these .bin files? or are these just completely missing
 
Upvote 0
You will likely find out that the server side data for nav meshes is generated by an external/ue plugin tool - .bin as an extension just indicates it is binary data.

Still waiting on the download to complete (A repo would've been far easier) - but you'll want to look over how the .bin is parsed on the server to get an idea of the data structure it is looking for then piece together either a tool to generate this data using the map or see if it relates to an already existing filetype

Do you have any single examples of these .bin files? or are these just completely missing
Looking at the .bin file and how they parse the .bin seems a little bit off. They might be skipping a few bytes to read the header of the navmesh or, it is a wrong .bin file, or, I might be wrong. who knows.
 

Attachments

  • chrome_OPtODsiawL - Request for help! - RaGEZONE Forums
    chrome_OPtODsiawL.webp
    51.3 KB · Views: 108
  • Like
Reactions: Ron
Upvote 0
You will likely find out that the server side data for nav meshes is generated by an external/ue plugin tool - .bin as an extension just indicates it is binary data.

Still waiting on the download to complete (A repo would've been far easier) - but you'll want to look over how the .bin is parsed on the server to get an idea of the data structure it is looking for then piece together either a tool to generate this data using the map or see if it relates to an already existing filetype

Do you have any single examples of these .bin files? or are these just completely missing
I have included the navmesh.bins we did extract but we can’t be sure if they’re correct.

He clearly stated that the source want's to load 2 navmesh.bin files.. adding a breakpoint to that function allows you to debug it better.


As he said, they need the correct format/type/file name. So, creating a simple script to get the header of the navmesh.bin isn't that hard.

Code:
   std::ifstream file("lloopedfilesnavmesxh.bin", std::ios::binary);
    if (!file) {
        std::cerr << "Error opening file!" << std::endl;
        return -1;
    }

    NavMeshSetHeader header;
    file.read(reinterpret_cast<char*>(&header), sizeof(NavMeshSetHeader));

// debug header.magic, version
I’ll add the breakpoint and post my findings

You are right, the files contain calls for textures, effects, coordinates and colors
But I still don't understand what is required


If you only need to update this information
Then why write about main and sub01?
The info in already in the read me and the post regarding the MAIN & SUB01, that’s all we know.
 
Upvote 0
Looking at the .bin file and how they parse the .bin seems a little bit off. They might be skipping a few bytes to read the header of the navmesh or, it is a wrong .bin file, or, I might be wrong. who knows.
This size string value

I didn't notice any skipped bytes, but the data structure is strange
It comes in blocks that are combined by index, I think
At least that's what it looks like at first glance
 
Upvote 0
I’ll add the breakpoint and post my findings
Do you have any .bin file that is for sure correct?. can you get the value of the magic, version, numtiles, params before checking it?. so we can verify if the other .bin files have the same values.

This size string value

I didn't notice any skipped bytes, but the data structure is strange
It comes in blocks that are combined by index, I think
At least that's what it looks like at first glance
Right, since it's std::string, so, the first 4 bytes is the length of the string.
 
Upvote 0
Do you have any .bin file that is for sure correct?. can you get the value of the magic, version, numtiles, params before checking it?. so we can verify if the other .bin files have the same values.


Right, since it's std::string, so, the first 4 bytes is the length of the string.
We do have a bin file that has the correct magic version as we used it to get into game, I’ll upload it shortly.

But it’s basically a “template”

I've attached a template navmesh, we know this to be the correct MAGIC vesion. You'll see that the template navmesh uses the map ID and not the map name, we're not sure which one should be used.

So, what's exactly the problem is?. Doesn't know if the bin files are correct or the magic word is correct?. That seems pretty easy to check..

Add a breakpoint and get the $CALLSTACK here:
bool NaviMeshManager::LoadNaviMesh(uint32_t par_navimesh_id, const std::string& par_base_path, const std::string& par_file_name)

Get the current position of:
auto fp = std::shared_ptr<FILE>(tempfile, fclose);

// Check which position of the file it is reading the header.
NavMeshSetHeader header;
size_t readLen = fread(&header, sizeof(NavMeshSetHeader), 1, fp.get());

Then, create a script that extracts the MAGIC and VERSION of each file..
Added some breakpoints like you suggested by they don't get triggered at all.

1725987852001 - Request for help! - RaGEZONE Forums
 

Attachments

Last edited:
Upvote 0
Had a brief look at both the code and the data.. nothing close to the navmesh data itself - but appears to be a collection file to link multiple data files into one nav mesh group/set

This data matches the data found in `NavMeshSetHeader`

Definition for `dtNavMeshParams` of struct `NavMeshSetHeader`
is missing

likely the remainder of this .bin

You'll find this in the NaviMeshManager

NVIDIA_Share_CHPkjGWWGx - Request for help! - RaGEZONE Forums
 
Upvote 0
Small update:

Okay so _res_trigger.h is mostly commented out, same goes for TriggerDefine.h, both are used to respawn monsters.

MONSTER.FSM needs redoing, I'm pretty sure the format is wrong based off AIDefine.h & _res_monsterfsm.h this handles monster states.

Looks like the navmesh files we need are infact umaps, the confusion of "bin" is likely due to the code reading the binary data of the umap file. These umaps are inside Client Export > MirMobile\Content\Maps and each folder will have a NAV folder. Funny enough most maps have 2 umaps which would indicate the MAIN & SUB01.
so NAVIMESH.json needs redoing but i'm not sure what NavimeshID is or where it's found, so ordering the navimesh is unclear.

This is a test NAVIMESH.json

[
{
"NaviMeshId": 2021,
"Navimesh": "NAV_FG_Bicheon.umap"
}
]

I've used NaviMeshID as 2021 in this example as it could be linked directly to the Map ID but i'm unsure

When uncommenting some of the trigger code, I find that the server spits out:

[0910 231428][warning] Process::Cheat(). CharacterUID: 1 AccountGrade Cheat Command gen Cheat size: 3[0910 231428][ error] GenerateZoneMonster:NaviMesh Find Fail Map ID 2021 [G:\Mir4\mir4-private-main\mir4-private\Code\Cplusplus\Servers\Game\Contents\Npc\ContentsNpc.cpp][CONTENTS::NPC:: Process::SpawnNpc-103][0910 231428][ error] failed To SpawnNpc

I've attached what I believe to be the correct navmesh
 

Attachments

Last edited:
Upvote 0
Back