Jump to content

[Guide] Fresh all-in-one guide to implementing maps - with worldmap


Shinsei

Recommended Posts


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   22
  • Joined:  02/21/17
  • Last Seen:  

Adding custom maps to RO server - Part 1.

In this Part you will learn how to add your custom maps to your Ragnarok server.

·       Clientside:

  •  Download/create the map you want to add to your Ragnarok Server.

a.   You should have 3 files of the map.

            i.     [mapname].gat

            ii.    [mapname].rsw

            iii.    [mapname].bmp

 

  • Place your .gat and .rsw files inside your GRF within data\ as well as your .bmp file inside your data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\map\ directory.
  • Go to your data\mapnametable.txt and add the Area display name of your map in the following format “[mapname].rsw#Map Display Name#”, without the quotation marks.

 

·        Serverside:

  • Now go to your server directory and do the following:

a.   Go to your db\import\ directory and open map_index.txt - (!) Do not confuse it with db\map_index.txt

             i.     In the text file add at the bottom of the file [mapname]<tab>{index(1250+)} - Once done, Save and close the file.

b.   Now go to your conf\import\ directory and open map_conf.txt:

             i.    Once there - add your maps like so: map: [mapname] - Once done, Save and close the file.

  •  Once the above steps are done. Download either WeeMapCache or MapCacheEditor in order to add your [map].gat file to your map_cache.dat

a.   Open your server Project and recompile it.

Congratulations, you have now successfully added a new map to your server.

In part 2 of the guide, we will be adding the custom map to your world map view.

 

Adding custom maps to your RO server - Part 2.

In Part 2 of the guide, you will be learning how to add your custom map to World map view and Kafra move animations - The good news is: It's all client-side.

  • Go to data\mappostable.txt

a)   At the top of the file you should see #@ (probably 12@), change that to 13@ (That is the array size of the mappostable)

b)   Scroll down to the bottom of the file and add the the map you want to add (as well as its coordinates on the map where it should appear) in the following format [index]#[mapname].rsw#x¹#y¹#x²#y²#

i)     **x¹, y¹, x², y² stand for the start and end coordinates of the map box which gets drawn on the world map.

 

  • Navigate to data\luafiles514\lua files\worldviewdata\

a)   Find files worldviewdata_table.lub as well as worldviewdata_language.lub (if your files are inside a GRF, extract them).

i)     Open your worldviewdata_language.lub and add the following line: MSI_###_[MAPNAME] = "Map Display Name", (if you’re adding it at the end of the array, don’t forget to remove the comma, as it’s the last element of the array.

ii)    Now open your worldviewdata_table.lub and add the following line: {###, "[mapname].rsw", x¹, y¹, x², y², WORLD_MSGID.MSI_###_[MAPNAME], ""}

(!) IMPORTANT - the ### number at the start of this array appears to be corresponding to a general “block” location on the map. e.g.: If you’re adding a map somewhere in the Payon area, you would want this number to be “111”, however if you’re adding it in the area of Rachel, you’d want the number to be “105”. – In short, whenever you’re adding maps, always take a look at the numbers of the maps close to your new map, use those numbers.

If your map doesnt appear on the worldmap, this is more than often the culprit behind it!

 

  • Go to data\luafiles514\lua files\datainfo\  - (Optional)

This is where you will be adding the kafra teleporting service animations.

b)   Open the file kaframovemapservicelist.lub and add Kafra teleport service information to your map as well as KafraMinimapPos  I am not certain what the parameters in this array do, if anyone has any idea, please let me know ?

 

 

Adding custom maps to your RO server - Part 3.

In Part 3 of this guide, you will be learning how to add links between your maps and/or NPCs within the maps for your navigation system!

(!) Important - Before you can start with Part 3, you will be required to know how to: *navigate through your GRF, **Implement your custom maps, ***Add your custom maps to the Ragnarok world map!

 

  • Firstly, what you want to do, is go to your data\luafiles514\lua files\ and extract your entire \navigation\ folder. Naturally - remember  to make a backup of it before you start working on it.
    • Once you have the folder extracted, what you want to do first of all is to add your custom map to the navi_map_krpri.lub.
      • To do that, open up the file, scroll all the way down the list and add your map in the following format: { "[mapname]", "Display name", ID, xSize, ySize }
        • (!) Important things to note -

(!) The "Display name" is going to be name displayed over your map like so: 

Spoiler

image.png.fb6711a14ea256060271896ad9951da4.png

(!)There are 3 values for the IDs (I am not 100% certain about what they are exactly, will need to research it more -  then I will update the information here)

5001 is used for standard maps, such as Towns, Fields, Dungeons. 5002 appears to be used for maps which have clone counterparts? Lastly 5003 is used for indoor maps.

(!) xSize and ySize correspond to thevalues of gat.Width as well as gat.Height

Spoiler

image.png.1f7861a2375dbf2f31f52213e6c47ebc.png

  • Secondly, we will be adding connections between neighbouring maps.
    • To do that, you want to open navi_link.lub and add connections to; as well as from the neighbouring maps in the following format:

{ "[yourmap]" , [index], 200, 99999, "[yourmapname]_[destmapname]_[index]", "", xCoord, yCoord, "payo2", destCoord_x, destCoord_y}, 

e.g.: { "pay_arche", 14056, 200, 99999, "pay_arche_payon_706", "", 81, 17, "payon",  228, 327 }, 

{ "payon", 15327, 200, 99999, "payon_pay_arche_1977", "", 228, 329, "pay_arche", 81, 22 },

(i) - Because of the way the navi_link.lub is built I decided to write a small program which will make adding connections between new custom maps and old ones cleaner and hopefully easier ? - Perhaps I will also expand it to also editing the other navi files. 

P.S: If you believe that guide is useful, but could be improved upon, please do drop your suggestion. - You can also contact me either via PM on the forums or adding me on Discord - Shinsei#3451

I will be adding further parts of the navigation guide over the next couple of days. Hope it helps!

Edited by Shinsei
Made couple of corrections in the guide.
  • Upvote 4
  • Love 7
  • MVP 1
  • Like 2
Link to comment
Share on other sites


  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3122
  • Reputation:   1614
  • Joined:  03/26/12
  • Last Seen:  

This is a good effort, though I would recommend users make full use of the import directory in /conf/ rather than using the .conf files themselves.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   22
  • Joined:  02/21/17
  • Last Seen:  

4 minutes ago, Akkarin said:

This is a good effort, though I would recommend users make full use of the import directory in /conf/ rather than using the .conf files themselves.

Thank you - Also, could you possibly clarify what do you mean exactly by "full use" of the directory? I'm not certain I understand what you mean there.

Link to comment
Share on other sites


  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3122
  • Reputation:   1614
  • Joined:  03/26/12
  • Last Seen:  

2 minutes ago, Shinsei said:

could you possibly clarify what do you mean

Sure thing - here's a file i prepared a few years ago ? https://github.com/rathena/rathena/blob/master/conf/readme.md

  • MVP 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   22
  • Joined:  02/21/17
  • Last Seen:  

12 minutes ago, Akkarin said:

Sure thing - here's a file i prepared a few years ago ? https://github.com/rathena/rathena/blob/master/conf/readme.md

Ah yes, I got it. I'll edit the guide so that people don't continue doing it that way ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  116
  • Reputation:   18
  • Joined:  09/08/17
  • Last Seen:  

This is massive, considering my project revolves around custom maps! Much appreciated!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  416
  • Reputation:   73
  • Joined:  05/16/19
  • Last Seen:  

1 look at this guide and i dont even know what your talking about

 

 

 

 

 

 

Navigate to data\luafiles514\lua files\worldviewdata\
a)   Find files worldviewdata_table.lub as well as worldviewdata_language.lub (if your files are inside a GRF, extract them).

i)     Open your worldviewdata_language.lub and add the following line: MSI_###_[MAPNAME] = "Map Display Name", (if you’re adding it at the end of the array, don’t forget to remove the comma, as it’s the last element of the array.

ii)    Now open your worldviewdata_table.lub and add the following line: {###, "[mapname].rsw", x¹, y¹, x², y², WORLD_MSGID.MSI_###_[MAPNAME], ""}

 

Oh cool lemme just point this part out ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   22
  • Joined:  02/21/17
  • Last Seen:  

12 hours ago, Naruto said:

1 look at this guide and i dont even know what your talking about


Navigate to data\luafiles514\lua files\worldviewdata\
a)   Find files worldviewdata_table.lub as well as worldviewdata_language.lub (if your files are inside a GRF, extract them).

i)     Open your worldviewdata_language.lub and add the following line: MSI_###_[MAPNAME] = "Map Display Name", (if you’re adding it at the end of the array, don’t forget to remove the comma, as it’s the last element of the array.

ii)    Now open your worldviewdata_table.lub and add the following line: {###, "[mapname].rsw", x¹, y¹, x², y², WORLD_MSGID.MSI_###_[MAPNAME], ""}

Oh cool lemme just point this part out ?

What is it that you don't understand here exactly? If you can clarify, I can try to put it in different words.... Maybe with images?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.01
  • Content Count:  134
  • Reputation:   115
  • Joined:  10/20/17
  • Last Seen:  

Hi Shinsei! First, thank you very much for this guide! It seems to be really well explained!

I just have some questions :3
Well, I haven't tested much when adding le maps, because (at least so far) I've only added my custom maps to test them.
So far I've done it like this instead:
1. Add maps to map_index and maps_athena.conf
2. Add the map to a grf, so that I add the grf itself in weemapcache. (Because if you simply add the gat file, the gat cells aren't read properly, as in you can make Holy Water anywhere and other similar problems. But if you add the GRF containing the map, this problem is avoided)

So since I'm still learning about this, do you recommend me to use this method instead? (Because it seems a little more complicated than the usual, but if it's better I should do it like you say!)
If I do this, can I avoid having to add the map to a GRF for the cells to be read properly?
Worldmap can't be used with my old method, am I correct?
And, if I use your method, will it conflict somehow with how I've been doing it?

Thank you in advance, have a good day! /no1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   22
  • Joined:  02/21/17
  • Last Seen:  

@Mina-chan  I believe there shouldn't be any problem with the method which you are using to add your custom maps. (I just personally have been doing it as I've described)

 

The world map files are also within your GRF, the only thing is that the files from worldviewdata are .lub files, which can't be edited within GRF (at least as far as I'm aware) therefore in order to edit them, you need to first extract, and then when you're done - import them back into GRF.

In short - no there should be no conflicts. 

 

Edit:

Quote

 So far I've done it like this instead:
1. Add maps to map_index and maps_athena.conf

As Akkarin mentioned above, it is better to use the imports, to avoid unnecessary conflicts. I've edited the part of the guide to fit that convention of doing things on the server-side

Edited by Shinsei
Additional information
  • Love 1
Link to comment
Share on other sites


  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3122
  • Reputation:   1614
  • Joined:  03/26/12
  • Last Seen:  

On 2/16/2020 at 3:34 PM, Shinsei said:

 Now up directory (Into db\map_index.txt) and add  the following line: import: db/import/map_index.txt

The files and imports are generated automatically after you've compiled rAthena for the first time. You don't need to create any extra files or add in the import: lines manually. It's already done for you ? 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   22
  • Joined:  02/21/17
  • Last Seen:  

14 hours ago, Akkarin said:

The files and imports are generated automatically after you've compiled rAthena for the first time. You don't need to create any extra files or add in the import: lines manually. It's already done for you ? 

That's weird.

True that map_index.txt file did already exist in the \import\ folder. However there was no "import:" pointer to it in \db\ file - Also I personally didn't have the maps_athena.txt file or the "import:" pointer to it in the \conf\ directory.

That's also the reason why I described that part like I did in the guide.

Edited by Shinsei
Link to comment
Share on other sites


  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3122
  • Reputation:   1614
  • Joined:  03/26/12
  • Last Seen:  

38 minutes ago, Shinsei said:

However there was no "import:" pointer to it in \db\ file

The "import:" functionality already exists in the /src/ folder for things in /db/, that's why you wouldn't have seen those lines there.

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  3
  • Reputation:   0
  • Joined:  01/24/14
  • Last Seen:  

My map was already added, but I can't add NAVIGATE, follow the steps.
Featured map: new_zone01

can you help me please ?

 

../worldviewdata/worldviewdata_language.lub:

Spoiler

image.png.a881c8d24a7a30b1074384da2ce2d7b1.png

 

../worldviewdata/worldviewdata_table.lub:

Spoiler

image.png.2f4d70b110930e2e2cde40d65f1bbceb.png

 

../navigation/navi_map_krpri.lub:

Spoiler

image.png.ce60d749b2cc434ab196a53adfe5dfe8.png

../navigation/navi_link_krpri.lub:

Spoiler

image.png.5dd74ef9d2aeb3bb23cfdde81d41da09.png

 

 

in game:  /navi new_zone01 124 124

Results:

Navigation >: "You are looking for an unknown place."

Spoiler

image.png.b89f3251cf7fadc63a5656167b844a4e.png

 

AT NPC: 

image.png.82723af32607df62f2171250bc56a719.png

nothing happens either.

image.png

Edited by evolutionbr
Link to comment
Share on other sites

  • 5 months later...

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.02
  • Content Count:  911
  • Reputation:   166
  • Joined:  11/27/14
  • Last Seen:  

Thx for this guide !

Link to comment
Share on other sites

  • 2 years later...

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  6
  • Reputation:   0
  • Joined:  03/12/23
  • Last Seen:  

Good tutorial but change the black font you are using because it's impossible to read with dark theme enabled.

Link to comment
Share on other sites

  • 7 months later...

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  01/24/18
  • Last Seen:  

Help i already done it but the welcome message(like: Capital of Rune Midgard Prontera) after entering new map didnt appear 

Link to comment
Share on other sites

  • 3 months later...

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  58
  • Reputation:   5
  • Joined:  12/12/11
  • Last Seen:  

How to edit yellow text?image.thumb.png.4542c77c6c8325f9ad325b34a6078c7b.png

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  58
  • Reputation:   5
  • Joined:  12/12/11
  • Last Seen:  

20 hours ago, kadze said:

How to edit yellow text?image.thumb.png.4542c77c6c8325f9ad325b34a6078c7b.png

mapInfo_true in system

Link to comment
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.

×
×
  • Create New...