Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Editing .gfx (.ozg) with JPEX

Newbie Spellweaver
Joined
Apr 9, 2019
Messages
11
Reaction score
1
Hi

I have located the function that sets the map name on the top menu, just before the coordinates.

I'd like to extract this data to capture it from another process. Maybe to a file, shared memory object, or even change the window title with this data.

I know it seems to be a security restriction to access the filesystem. Maybe, any of you have some experience working on these files.

Thanks!
 
Joined
May 26, 2009
Messages
17,308
Reaction score
3,219
not quite sure i understand what u are saying.

do u have trouble convert gfx to ozg or trouble editing .ozg with jpex? or trouble converting it back to mu file ?

 
Upvote 0
Newbie Spellweaver
Joined
Apr 9, 2019
Messages
11
Reaction score
1
not quite sure i understand what u are saying.

do u have trouble convert gfx to ozg or trouble editing .ozg with jpex? or trouble converting it back to mu file ?

Hi!

Thanks for your reply.

I have converted TopMenu.ozg to TopMenu.gfx with and edited TopMenu.gfx with .

For example, I can change the size and alignment of the map name to whatever I want

Screen Shot 2024-02-13 at 4.50.13 PM - Editing .gfx (.ozg) with JPEX - RaGEZONE Forums


Finally, I've converted TopMenu.gfx back to TopMenu.ozg and it works as expected.

However, I'd like to store the string "Lorencia" to a file, or shared memory, or even send it to a specific port or whatever IPC mechanism is available to read it from another process.

With jpexs I located this function:
Code:
function setMapName(mapName)
{
  this._txtMapName.text = mapName
}

And this is what I want

Code:
function setMapName(mapName)
{
  this._txtMapName.text = mapName
  storeTofile("C:\map", mapName)
}

Some alternatives are also valid, like exporting an environment variable

Code:
function setMapName(mapName)
{
  this._txtMapName.text = mapName
  exportEnvVariable("MAPNAME", mapName)
}

It seems ActionScript has limited access to the system, for security reasons, I think.

Is it possible to export this?

The working (but slow) solution that I'm using right now is using OCR to read that specific portion of the screen.
 

Attachments

You must be registered for see attachments list
Upvote 0
Joined
May 26, 2009
Messages
17,308
Reaction score
3,219
Hi!

Thanks for your reply.

I have converted TopMenu.ozg to TopMenu.gfx with and edited TopMenu.gfx with .

For example, I can change the size and alignment of the map name to whatever I want

View attachment 256436

Finally, I've converted TopMenu.gfx back to TopMenu.ozg and it works as expected.

However, I'd like to store the string "Lorencia" to a file, or shared memory, or even send it to a specific port or whatever IPC mechanism is available to read it from another process.

With jpexs I located this function:
Code:
function setMapName(mapName)
{
  this._txtMapName.text = mapName
}

And this is what I want

Code:
function setMapName(mapName)
{
  this._txtMapName.text = mapName
  storeTofile("C:\map", mapName)
}

Some alternatives are also valid, like exporting an environment variable

Code:
function setMapName(mapName)
{
  this._txtMapName.text = mapName
  exportEnvVariable("MAPNAME", mapName)
}

It seems ActionScript has limited access to the system, for security reasons, I think.

Is it possible to export this?

The working (but slow) solution that I'm using right now is using OCR to read that specific portion of the screen.
i see, well thats something i havent worked with yet to be honest i wouldn't know how that works since its a kind of 'coding' that must be readable by main.exe so work, i hope someone can give u a better solution.

ps: what means store lorencia to a file or shared memory? what must happen after click it?
 
Upvote 0
Joined
Oct 8, 2006
Messages
740
Reaction score
289
Hi!

Thanks for your reply.

I have converted TopMenu.ozg to TopMenu.gfx with and edited TopMenu.gfx with .

For example, I can change the size and alignment of the map name to whatever I want

View attachment 256436

Finally, I've converted TopMenu.gfx back to TopMenu.ozg and it works as expected.

However, I'd like to store the string "Lorencia" to a file, or shared memory, or even send it to a specific port or whatever IPC mechanism is available to read it from another process.

With jpexs I located this function:
Code:
function setMapName(mapName)
{
  this._txtMapName.text = mapName
}

And this is what I want

Code:
function setMapName(mapName)
{
  this._txtMapName.text = mapName
  storeTofile("C:\map", mapName)
}

Some alternatives are also valid, like exporting an environment variable

Code:
function setMapName(mapName)
{
  this._txtMapName.text = mapName
  exportEnvVariable("MAPNAME", mapName)
}

It seems ActionScript has limited access to the system, for security reasons, I think.

Is it possible to export this?

The working (but slow) solution that I'm using right now is using OCR to read that specific portion of the screen.
True, one way of doing that is by using OCR systems.
You have to hook your own DLL into main.exe and get the offset for reading the map name string variable.
Then you can store it however and wherever you want.
 
Upvote 0
Newbie Spellweaver
Joined
Apr 9, 2019
Messages
11
Reaction score
1
i see, well thats something i havent worked with yet to be honest i wouldn't know how that works since its a kind of 'coding' that must be readable by main.exe so work, i hope someone can give u a better solution.

ps: what means store lorencia to a file or shared memory? what must happen after click it?
Hi KarLi

I don't understand the question about "click it". Nothing happens if you click the map name and I don't want anything to happen either.

I just want to be able to read, on a real time basis, the map name.

True, one way of doing that is by using OCR systems.
You have to hook your own DLL into main.exe and get the offset for reading the map name string variable.
Then you can store it however and wherever you want.

Hi zipper20032

Thaks! The confirmation from more experienced people is enough.

Do you know any guide or tool (besides jpexs) about ozg/gfx. Is it pure ActionScript? What version? What about the system access restrictions?

Thanks!
 
Upvote 0
Joined
Oct 8, 2006
Messages
740
Reaction score
289
Hi KarLi

I don't understand the question about "click it". Nothing happens if you click the map name and I don't want anything to happen either.

I just want to be able to read, on a real time basis, the map name.



Hi zipper20032

Thaks! The confirmation from more experienced people is enough.

Do you know any guide or tool (besides jpexs) about ozg/gfx. Is it pure ActionScript? What version? What about the system access restrictions?

Thanks!
When it comes to system access restrictions, without knowledge of hooking a DLL and assembly language and also C++ or C#, system restrictions will exists cause you are doing it by 3rd party software which can't acces internal game functions.
Look for DLL hooking and how to decompile the main.exe tutorials. There are a few here on RZ.
If not, OCR is the solution for this which is a bit of resource consuming for doing that at an interval.
 
Upvote 0
Back
Top