Jump to content
Sign in to follow this  
Najara

[Guide] Mapping Through Hexing

Recommended Posts

Hey all! 

It's been too long, hasn't it? I guess you could say I've been quite busy lately. However the other day I realized wanted to do something for the community once again (because honestly it's been forever since I contributed), hence why I'm here now.

But then I wondered, what can I do? Of course there was the possibility of doing a free release, but I've done many of those already in the past. What else? Creating yet another guide how to develop maps in browedit from the ground up? Hm, we already have several amazing ones that effectively cover everything.  What if I give you something different? Something - more like a neat little trick - that I've figured out through sheer exploration about two years ago.

And what's that, precisely? As the title implies: Mapping through hexing. Over-hauling existing maps, without having to touch browedit.

Also- This post might seem long, but rest assured it is super easy. The screenshots simply take up a lot of space.

Before we start.....

What is hexing?

I could go the extra mile and explain it in my own words, but rAthena's GitHub gives an informative description what hexing is. As most of you may know, experts have developed tools with an user-friendly interface to make client hexing - AKA 'diffing' - even easier for us, however what the majority does not know is that hexing isn't specifically limited to .exe modifications and can be applied to many different file extensions- RO map files and models among them. Having that said, I think you have an idea in which direction I'll be heading.

Okay, before anything else... I need to state that this method is recommendable to set the base design. You can in theory over-haul your entire map this way, but I highly encourage it to only be done with the repetitive textures and models (such as trees, bushes, buildings). Preferably, your map uses custom textures/models, they're easier to memorize (and thus replace) than the official gibberish components.

What are the pros and cons?

Pros:

  • Once you get the hang of this, you could save yourself a lot of valuable time and make fresh layouts rapidly.
  • No need to generate (custom textured) models through the build-in browedit RSM editor tool. We'll take a different approach.
  • Gats remain unaltered and models will remain facing the same way.
  • Lastly - probably the main reason what I like about this - texture and model files from your previous design will be preserved and not over-written. New ones are created which are fetched from a different texture/model directory. After implementation the only thing that will be over-written are the map files themselves (which also means less heavy patches).

Cons:

  • While you don't have to, you will likely still want to open browedit for some finishing touches.
  • You can easily slip up and corrupt your map with a single typo. Back things up and be focused when you get to step 3!

What will we need?

  • GRF Tool (i.e GRF Editor).
  • Hex Editor (i.e XVI32).
  • Image Editing Software (i.e Photoshop).
  • A custom map - seasonal/holiday themed is preferred, but not necessary.
  • Basic ~ moderate client-side & browedit knowledge.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Now, since we've got all that covered...

Let's begin!

For this guide, we're going to use my Christmas Prontera (screenshot below) map as sample, and turn it into a Spring Prontera (screenshot at the bottom of the post).

BeginMap.thumb.png.38b776c83dff226440149b1460e4d650.png

- Files -

We're going to need to locate the map and its contents that we're going to edit. So let's do that, here are the resources...

Files.png.5032d0f84bfc57d8b1339cc28a7a4328.png




Step #1 - Copying & Renaming

What you need to do first, is go back to the main directory and copy the entire 'Christmas Pront' directory. Paste it and rename it - in this case - 'Spring Pront'. If you've done this correctly, you should now have two directories. Spring Pront and Christmas Pront, both containing files of Christmas Pront.

CopyRename.png.22fe676cd4dc50d87cfa5b8bfffcf99b.png


Open the 'Spring Pront' folder and begin re-naming all the files that still contain an abbreviation of the Christmas Prontera layout. Keep it simple for yourself. For example, I recommend replacing the 'chr' and make it 'spr', like this:

RenameContent.png.7558d099057ee7fca34a08ff96958048.png

Note: If there's a lot to edit, consider pulling up a notepad and writing down the old texture/model/directory names and the new ones next to it. I'm telling you this, because you're going to need to check back to the old names later. Better safe than sorry.

"Why does a snow texture display 'spr_gras?" - I know, it doesn't make sense yet. Disregard, you'll understand in step #2.
"Can the abbreviations I choose exceed the amount of characters that the original files use? (i.e spring_grass instead of spr_gras)" - It probably could with additional steps but...Let's not for now, okay?

If you've done everything as per tutorial, you will have no texture, model or directory left anymore including 'chr' or 'Christ'. Double-check in order to confirm.


Step #2 - The Artsy Stuff

Got a graphic artist on your team? Lucky you- because then you can simply skip this (most time-consuming) step and instruct your artist to present you with something appealing. But we're not going to do that, are we? No, we're going to pretend you're a solo developer.

Go to google images and look for a square texture that you wish to replace the snow texture with. Since this is a spring themed map, I went with something green and flowery. Admittedly though, I wasn't too fond of the original image I chose because it seemed a little too crowed/clustered(?) and the borders didn't align, so I decided to look for a plain grass image and combine it with the initial flowery tile of my choice. Still a lil clustered but better. Here's the result:

Photoshop.png.685f0bf7adeed5db9b65a58b0864be32.png


Okay so clearly this isn't a Photoshop guide - my Photoshop skills are far from perfect - but I think you get the idea. ;-;

Seamless images are the best, however it isn't always possible to find them. Fear not, young grasshopper- You need not be an expert in Photoshop but at the very least try to edit the texture sufficiently (with the eraser tool on the top layer) for the borders to have a relatively smooth over-flow. Needless to say, if flowers are being cut off at the border of a texture, it does not exactly look attractive.

Done? Resize the image(s) to 256x256 and save as 24 bit bmp. Do this with all the textures you've redesigned, your texture directory should somewhat look like this:

Again, this might take a while if you're doing everything alone and aren't that familiar with Photoshop.

TexturesDone.png.f3bcb2bc7541786f2914dcd1b79d8b4e.png

Note: spr_tree3~5 are tga files, but they have been adjusted as well.

 

Step #3 - Hex It!

This step is the most technical one and you'll need to look back every now and then to your other layout's textures and models - in this case my Christmas Pront - as name replacement reference.

Please be aware that you can screw up easily here! Yes, it's easy but you've gotta pay attention! Double check everything you do and make sure you don't typo anything or miss anything out. 

Map Files
Let's do these first. Boot your Hex Editor software and locate 'prontera.gnd' in your 'Spring Prontera' directory. Access the replacement feature, in XVI32's case: Search > Replace...
What we're going to do is ensure the .gnd file reads the new textures, alright? We don't want the map files looking for the Christmas Pront textures/models anymore because this isn't going to be a Christmas Pront. 😜 

Replaced them all? Great. Do the exact same for the models with the .rsw file:

MapModelHex.thumb.png.ffefe5f6000ca4ab1802d35f3be4e5cc.png

158 entries. Pretty sweet, right? 

Model Files
We're almost done! The last step will be hexing the models. Open them 1 by 1 in your Hex Editor software like you did with the map files and adjust the entries accordingly so the models are no longer searching for the incorrect texture files.

Like this...

ModelHex.thumb.png.068df5f81ff0c899a9982d79d9d3eed1.png

 

And that's.... basically it. To see if you err'd anywhere, just open GRF Editor and put all the resources into it. If done correctly you'll see that your map and model files have adapted to your edits made through hexing.

What was previously snow-covered, now returns something else entirely.

Take this lovely flowery tree for example... 😍

ModelResult.thumb.png.171c6be24b2ab4ca7656f8c6c5189dbd.png

 

Some of you may wonder- "How is this different than just regular (existent) texture replacement/recoloring? The answer is, exactly that.  You're not replacing or changing the original texture/model resources at all.  Quite the contrary- You're preserving your previous theme, all while generating an entire new theme with separate contents and directories that are being read.

Convenient to server owners, too. No more messing around with different texture and model directories, worrying about if you might've missed something out when adding/removing files with the patcher.  Using this methods, when the time comes where you want/need to switch theme, simply patch in the new map files (prontera.rsw and prontera.gnd) and you're good to go (unless if you've made gat edits of course- in which case you'll need to add the prontera.gat as well!). Needless to say, for the first-time implementation, you do need to include all the texture/model components. But that's obvious.

And now, the final result? This is how Prontera will look like~ We went from winter wonderland to a refreshing and colorful spring design~

FinalResult.thumb.png.f38bdb45108832c4b2e0b418f182a8c8.png
 

Fair enough- you'll still see the occasional wintry lantern, and the center higher up still has a giant pine tree, fine. Light-maps intensity need to be re-considered, too. But for the most part? Your map is about 3/4 done. What's left is just the small details that will likely only take you an hour or two at most to wrap up. 🙂 

Well, I hope this makes the life easier for some of you! ♥

Edited by Najara
  • Upvote 4
  • Love 4
  • MVP 4

Share this post


Link to post
Share on other sites

One thing i do often is if im placing a bunch of the same "advertisement" ill place a blank one copy paste and just hex them all in... very valuable save of time 

  • Upvote 1

Share this post


Link to post
Share on other sites

Thank you for this guide

It has save time so much.

  • Love 1

Share this post


Link to post
Share on other sites
8 hours ago, Naruto said:

One thing i do often is if im placing a bunch of the same "advertisement" ill place a blank one copy paste and just hex them all in... very valuable save of time 

Clever as well! 🙂 

Share this post


Link to post
Share on other sites

OMG!! ;w; I was precisely looking for something like this, thank you! /lv
I'm going to add this to the Browedit discord's links section /ok

  • Love 1

Share this post


Link to post
Share on other sites

awasome knowledge maping RO u have here

but i still wandering how to fix the bright object in browedit after planting light and calculating light all of object became bright as golden treasure and this is weird as hell in game 😞

Share this post


Link to post
Share on other sites
On 1/4/2020 at 1:33 AM, Digosok said:

awasome knowledge maping RO u have here

but i still wandering how to fix the bright object in browedit after planting light and calculating light all of object became bright as golden treasure and this is weird as hell in game 😞

Hi Digosok! Please make a new thread about your problem (nvm, I found your post!). Or join the Browedit discord server https://discord.gg/cy4uKQ and post your issue there so we can help you /ok 

Edited by Mina-chan

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.   Paste as plain text instead

  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...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.