Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • ASDss: where do u download source and clients now
      August 18, 2017, 10:39:31 PM
    • ASDss: yo
      August 18, 2017, 10:39:20 PM
    • dan v jad: click me 4 da fun ;)[link]
      August 18, 2017, 04:39:58 PM
    • stCky: Palidinho is your OpenGL (was it OpenGL?) stuff open source anywhere?
      August 16, 2017, 09:07:22 PM
    • Travas:BUILD THE WALL
      August 15, 2017, 09:28:49 PM
    • Travas: i have ass cancer
      August 15, 2017, 09:23:29 PM
    • stCky: what are the fudge are you tryna ask?
      August 15, 2017, 08:21:35 PM
    • bader: what are the rsps community alive ?
      August 15, 2017, 05:46:16 PM
    • bader: yo guys
      August 15, 2017, 05:46:08 PM
    • Spacehost:[link] Updated our thread :)
      August 15, 2017, 09:40:34 AM
    • Adaro: The client is in Download section at Homepage
      August 15, 2017, 01:09:20 AM
    • FaTe_Of_GoDs: where do i get the client?????????????
      August 14, 2017, 05:23:14 PM
    • stCky: can anyone help me? I cant login to the shoutbox
      August 13, 2017, 05:45:15 PM
    • drubrkletern: appeal denied
      August 13, 2017, 02:35:27 PM
    • King_Trout:[link]
      August 13, 2017, 11:17:12 AM
    • Cole1497: no sorry
      August 13, 2017, 10:27:14 AM
    • ayz: yo can anyone explain something to me
      August 13, 2017, 08:08:51 AM
    • coolking12: Hi
      August 13, 2017, 04:16:06 AM
    • stCky: n+1
      August 11, 2017, 06:09:24 PM
    • PalidinoDH: How many more pages are going to show errors before this dude gets on and fixes shit
      August 11, 2017, 04:57:00 PM

    Author Topic: 317/377 MapFloorEditor download/tut  (Read 2247 times)

    0 Members and 1 Guest are viewing this topic.

    Offlinehadlich4

    • Member
    • ****
    • *
    • Posts: 587
    • Thanks: +0/-0
      • View Profile
    317/377 MapFloorEditor download/tut
    « on: September 03, 2015, 08:19:22 AM »
    This tutorial will contain a few sections, coloring the floors, editing the terrain, and clipping.

    DOWNLOAD: /file/zj4duw0y96x5d2s/MapFloorEditor.rar

    make sure to read the following info it has some details that will really assist you.

    okay first lets discuss the code. first when opening the project within eclipse you will go to the following directory MapEditr->src->org->fabian->rsmt->RsMapTool.java. Open this then search for "if (isHoldingRMB) {" under that you'll see some code that your going to be editing probably often I did a cheap hax I guess but hey it works I dont have time to make additional interfaces etc lol, feel free to though.

    So there are 3 different tabs within the editor 1.Paint 2.Sculpt 3.Object. The Paint tab is for painting the floors, Sculpt tab is for editing the terrain, and Object is for clipping I know this sounds stupid why does it say object.. well it came that way but if someone else wants to edit it further feel free.

    Terrain:

    So lets start off with terrain which would be when your using the sculpt tab. you should see some code that looks like this..

                currentMap.heightmap[currentFloor][(int)point.z][(int)point.x] += 100;
                   currentMap.heightmap[currentFloor][(int)point.z + 1][(int)point.x + 1] += 100;
                   currentMap.heightmap[currentFloor][(int)point.z + 1][(int)point.x] += 100;
                   currentMap.heightmap[currentFloor][(int)point.z][(int)point.x + 1] += 100;




    what this says here is we are going to get the current map then find the height of that floor(which is autoed at floor 0) then find the Z coordinate (this is basically X value on the map) then find the X coordinate (this is basically Y) and add 100 units or I am guessing pixels upward to that position. the reason I am making it add 100 to 3 other positions is so that it will pull up a full square so its not so choppy if you want you can make it pull up more to make a more rounded and not blocky look if you need help just pm me. but yea when your in the editor you will just click the sculpt tab then right click on the map to edit the height.



    Clipping:

    Alright this part is a little tricky. I suggest going ahead and painting the map what you want it to look like first and making sure everything looks good then save a copy of the map and edit the clipping for testing incase any issues arise because sometimes and i will explain later some of the colors dont go through right and cause it just to make the map area black you'll have to experience it for yourself to know what I mean.

    first heres the code that you will be editing for clipping changes:

                //0 for walkable 1 for clipped
                if (currentTab.equals("object_tab")) {

                   currentMap.renderRuleFlag[currentFloor][(int)point.z][(int)point.x] = 1;
                   currentMap.overlayFloorId[currentFloor][(int)point.z][(int)point.x] = selectedOverFloId + 1;
                   currentMap.underlayFloorId[currentFloor][(int)point.z][(int)point.x] = selectedUnderFloId + 1;
                   currentMap.overlayRotation[currentFloor][(int)point.z][(int)point.x] = currentShapeRotation;
                   currentMap.overlayClippingPath[currentFloor][(int)point.z][(int)point.x] = currentShape-1;
                   currentMap.updateCachedTile(currentFloor, (int)point.z, (int)point.x);



    okay so the way the object tab or we are going to call it clipping tab works is youll see where it says "currentMap.renderRuleFlag[currentFloor][(int)point.z][(int)point.x] = 1;" this is where you decide wether you want it to make the tiles walkable or unwalkable. like it says in the code 0 is walkable and 1 is unwalkable. now the rest of the code paints the tile a new color, the reason we are doing this is so that we know what tile we are making clipped or unclipped. so what you need to do first though is when you open the editor for editing clipping you will stay in the paint tab and change the chosen overlay and underlay colors to something way off what you want your map to look like then you will go over to the Object Tab and start clicking on the map editing the clipping, then once your done you will close it out test it on your server and make sure it all works fine, then you will open it back up in your map editor and edit the colors back to what you want them to be.


    PAINTING:

    alright painting..

    the painting code will be under this line of code:

    "if (currentTab.equals("paint_tab") || currentTab.equals("shape_tab")) {"


    So I have already added the clipping code to the paint code you can take it out of you want its just there if you want to go ahead and make the whole area you are editing walkable then just make like a border for the areas you dont want walkable. I also made it print out to the console what the current values are of the edited tiles and the new values. this stuff just helped me when I was doing testing so it may help you so I am keeping this in there.

    Alright so lets start off with the shapes. when you click the box that views the shapes the first plain black default shape is what you would use if you want the tiles to be blended or shaded with other colors around it, the next shape is the plain white square this is a solid shape it will not shade in with colors around it, this is used for adding roads, wooden floors, water, lava etc. then of course there are all the other shapes within the editor and you can mess with all those. what I need to tell you though is with some colors for some reason if you try to make them shade it wont work as in the normal grass color if you put that tile color into your overlay and underlay options and chose the default shape it will not go through correctly and will make the map black. what I did to resolve this issue is I got toms cache editor pulled up floor configs and changed the color of a tile color that will shade correctly with other shapes to the same color as the grass one and it worked fine I just made sure to edit a tile that I know my players wil not be walking or seeing throughout the gameplay. if you need help with this as well just let me know.


    ADDITIONAL NOTES:

    So i recommend saving often reason being that if you are painting multiple tiles and you attempt to paint the black space around the map you are viewing you will get an error that will freeze the editor and your unsaved progress will be deleted. I think I have covered everything pretty thoroughly. unfortunately if you want an object map editor then you'll have to talk to mige5 on rserver idk if hes on mopar because this only edits the floor.
    once you have your map finished and how you like it just add it to your maps/ folder in your cache. if you have the object map editor then use galkons index repacking method and add the map object file into index4.

    also know that you can adjust the amount the terrain goes up by changing the 100 to whatever you would like, also never make it lower than 0 or make it say -100 because if you do that it makes the terrain shoot super high in the air once you save it and reopen the map.
    what I do if I need to make the terrain lower and dont want to screw up is I just make the tile I am editings height = to 0 by changing the code to:

                currentMap.heightmap[currentFloor][(int)point.z][(int)point.x] = 0;
                   currentMap.heightmap[currentFloor][(int)point.z + 1][(int)point.x + 1] = 0;
                   currentMap.heightmap[currentFloor][(int)point.z + 1][(int)point.x] = 0;
                   currentMap.heightmap[currentFloor][(int)point.z][(int)point.x + 1] = 0;


    then you can edit it back to what you like 0 is the lowest you can go


    also make sure you add your cache into the "cache" folder in eclipse by the way lol.

    OPENING THE EDITOR IN ECLIPSE:

    you'll unpack the MapFloorEditor.rar then to import the project you will do the following in eclipse:

    file->import->general->existing projects into workspace->next, then..
    click browse and find the MapFloorEditor folder and click finish.


    Well that's it I hope this is a benefit to RSPS 317/377 servers.

    Credits to runebeam for the base btw!
    « Last Edit: September 03, 2015, 09:05:52 AM by hadlich4 »

    OfflineWarTusk-RSPS

    • Member
    • ***
    • Posts: 186
    • Thanks: +0/-0
      • View Profile
    Re: 317/377 MapFloorEditor download/tut
    « Reply #1 on: September 03, 2015, 01:49:26 PM »
    Thank you for this hadlich! You rock!
    « Last Edit: September 03, 2015, 01:53:26 PM by WarTusk-RSPS »
    "Speaking of if you want me to stop flooding your server and want a solution on how to prevent it, I'll start the negotiations at 500$. A drop in the bucket for you I suppose. And I'll help fix the XSS vulnerabilities for 100$ each."

    -Sini


    Offlinehadlich4

    • Member
    • ****
    • *
    • Posts: 587
    • Thanks: +0/-0
      • View Profile
    Re: 317/377 MapFloorEditor download/tut
    « Reply #2 on: September 03, 2015, 02:55:42 PM »
    Thank you for this hadlich! You rock!

    No problem hope it helps everyone out and if anyone wants me to make custom maps/items/npcs/objects just let me know.


    Onlinedrubrkletern

    • Absolute Legend
    • Member
    • ****
    • Posts: 9,374
    • Thanks: +0/-0
      • View Profile
    Re: 317/377 MapFloorEditor download/tut
    « Reply #3 on: September 03, 2015, 05:04:47 PM »
    looks cool might mess around with this later
    Quote
    "Moparscape is the oldest Runescape private server community. We have been active since 2007.

    - Mitb, Founder"
    ez   infraction king

    Offlinehadlich4

    • Member
    • ****
    • *
    • Posts: 587
    • Thanks: +0/-0
      • View Profile
    Re: 317/377 MapFloorEditor download/tut
    « Reply #4 on: September 03, 2015, 05:21:29 PM »
    looks cool might mess around with this later
    Yea you should let me know how it goes and post some maps I wanna see other people's creativity

    OfflineChassy13

    • R.I.P. Jimmy "The Rev" Sullivan.
    • Member
    • ****
    • Posts: 7,779
    • Thanks: +0/-0
      • View Profile
    Re: 317/377 MapFloorEditor download/tut
    « Reply #5 on: September 03, 2015, 09:40:56 PM »
    Everything went well for me in terms of saving the maps / loading the maps. I am using a very old cache from a non-renamed client, if anyone else is doing this just take the .dat files from the maps folder in the tool, gzip them, and replace them in index4 using Tom's Cache Suite.

    The only thing I noticed is the depth of the colors are usually much lighter in-game than they are on the editor, but it could have been the way I was setting my underlay/overlay and/or the tiles I was using.

    I'll keep experimenting.
    I'm far more mature than to steal a notebook

    Offlinehadlich4

    • Member
    • ****
    • *
    • Posts: 587
    • Thanks: +0/-0
      • View Profile
    Re: 317/377 MapFloorEditor download/tut
    « Reply #6 on: September 04, 2015, 02:47:12 AM »
    Everything went well for me in terms of saving the maps / loading the maps. I am using a very old cache from a non-renamed client, if anyone else is doing this just take the .dat files from the maps folder in the tool, gzip them, and replace them in index4 using Tom's Cache Suite.

    The only thing I noticed is the depth of the colors are usually much lighter in-game than they are on the editor, but it could have been the way I was setting my underlay/overlay and/or the tiles I was using.

    I'll keep experimenting.

    What do you mean color depth is much lighter

    OfflineChassy13

    • R.I.P. Jimmy "The Rev" Sullivan.
    • Member
    • ****
    • Posts: 7,779
    • Thanks: +0/-0
      • View Profile
    Re: 317/377 MapFloorEditor download/tut
    « Reply #7 on: September 04, 2015, 01:41:00 PM »
    I just meant the shades are kind of hard to distinguish between the editor and the actual game. For example, here's an area (that I did not create) in the map editor versus the actual in-game tiles.

    In the editor:


    In-game:


    As you can see, it's much different. You can slightly see how the light gray in the editor puts the lighter shading on the map, but you wouldn't be able to tell how dark it actually is via the editor. How do you distinguish how dark a certain shade is? It could be just not understanding the tool. What is the difference between overlay/underlay as well?
    I'm far more mature than to steal a notebook

    Onlinedrubrkletern

    • Absolute Legend
    • Member
    • ****
    • Posts: 9,374
    • Thanks: +0/-0
      • View Profile
    Re: 317/377 MapFloorEditor download/tut
    « Reply #8 on: September 04, 2015, 01:46:13 PM »
    it looks like that darker part is the area that could be occupied by the walls of the room
    Quote
    "Moparscape is the oldest Runescape private server community. We have been active since 2007.

    - Mitb, Founder"
    ez   infraction king

    OfflineChassy13

    • R.I.P. Jimmy "The Rev" Sullivan.
    • Member
    • ****
    • Posts: 7,779
    • Thanks: +0/-0
      • View Profile
    Re: 317/377 MapFloorEditor download/tut
    « Reply #9 on: September 04, 2015, 02:50:59 PM »
    it looks like that darker part is the area that could be occupied by the walls of the room

    Not sure what you mean by this. I think the shading just matches the floor, if you look in the second picture closely you can see the tiles around my character are lighter than the ones closer to the sloped ground. The walls of this room are the whiteline and extend over the black area of the map to the next rooms. I might just be misinterpreting what you mean though, so can you clarify if that's the case?

    If you want to take a look on a server, the coordinates are (3248, 9365)
    « Last Edit: September 04, 2015, 02:54:52 PM by Chassy13 »
    I'm far more mature than to steal a notebook

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: 317/377 MapFloorEditor download/tut
    « Reply #10 on: September 04, 2015, 05:23:14 PM »
    Client adjusts the intensity of the color you use, probably a mismatch.

    Onlinedrubrkletern

    • Absolute Legend
    • Member
    • ****
    • Posts: 9,374
    • Thanks: +0/-0
      • View Profile
    Re: 317/377 MapFloorEditor download/tut
    « Reply #11 on: September 04, 2015, 06:52:15 PM »
    it looks like that darker part is the area that could be occupied by the walls of the room

    Not sure what you mean by this. I think the shading just matches the floor, if you look in the second picture closely you can see the tiles around my character are lighter than the ones closer to the sloped ground. The walls of this room are the whiteline and extend over the black area of the map to the next rooms. I might just be misinterpreting what you mean though, so can you clarify if that's the case?

    If you want to take a look on a server, the coordinates are (3248, 9365)
    oh i see what you mean i just looked at it for a second at first and thought that color difference was the walls but then i remembered too that they usually dont put tiles under those walls
    Quote
    "Moparscape is the oldest Runescape private server community. We have been active since 2007.

    - Mitb, Founder"
    ez   infraction king

    Offlinehadlich4

    • Member
    • ****
    • *
    • Posts: 587
    • Thanks: +0/-0
      • View Profile
    Re: 317/377 MapFloorEditor download/tut
    « Reply #12 on: September 04, 2015, 07:19:10 PM »
    I just meant the shades are kind of hard to distinguish between the editor and the actual game. For example, here's an area (that I did not create) in the map editor versus the actual in-game tiles.

    In the editor:


    In-game:


    As you can see, it's much different. You can slightly see how the light gray in the editor puts the lighter shading on the map, but you wouldn't be able to tell how dark it actually is via the editor. How do you distinguish how dark a certain shade is? It could be just not understanding the tool. What is the difference between overlay/underlay as well?

    What's going on is there's so much of the lighter tile and it over powers the darker tiles if you want the darker tiles to show make the center circle of lighter tiles smaller that should be the fix and overlay shows over the underlay this is for shaped tiles

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal