Jump to content
Sign in to follow this  
xRazor

Change format of coordinates in UI.

Recommended Posts

I'm currently trying to edit my game UI. I'd like to change the format of coordinates below the minimap. For now they are in format - xxxx,xxxx (2092,2810), but I would like to change it to, for example - X: 2092, Y: 2810.

 

I found that font, color etc can be changed in minimap.clu, but I don't think i can change the display format from there. 

Some help would be appreciated, thank you!

Share this post


Link to post
Share on other sites

Hi @xRazor, I don't think you will be able to edit this using the .CLU file. The format is defined in C++ code, in CMiniMapMgr::RefreshChaPos:

_snprintf_s(buf, _countof(buf), _TRUNCATE, "%d,%d", x / 100, y / 100);


I do not know enough assembly to help you out, but it seems the compiler is inlining the function inside CWorldScene::_FrameMove:


image.png.1231c89cf1344868231112c3290731ba.png

In the debug version, the function is not inlined and we can see the format:

image.png.ad72fb78bc5c8bec5d30e175b003d45f.png


So you will need to either change the source code or patch/detour your Game.exe







 

  • Like 1

"Beware of bugs in the above code; I have only proved it correct, not tried it."

- Donald E. Knuth

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...