Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/28/24 in all areas

  1. 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). - 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... 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. 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: 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: 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. 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: 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... 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... ? 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~ 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! ♥
    1 point
  2. Hi, This is how we can decompile a lub file: Hope it works for you. Regards, Zwei
    1 point
×
×
  • Create New...