1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Tutorial: Modifying Terrain Pathability (No extra programs needed)

Discussion in 'Map Making' started by Woodenplank, Nov 29, 2017.

  1. Woodenplank
    Offline

    Woodenplank Brigand Map Maker

    Messages:
    1,041
    Trophy Points:
    129
    A lot of people here on Brigandshaven - a lot of editors, any way - probably use an older Warcraft 3 update because they want the JNPG editor to work. Partly, or perhaps mostly, because it has a built-in tool to modify the pathing of tilsets (useful for covering mountains with unpathable an "-Rocks tile").

    You don't need actually need JNPG or any other third party software to do this, however.
    You can modify your Warcraft 3 installation a bit, and when you save a map it will have whatever pathing specifications you want!
    I'll show you how.

    Step 1 - Making sure Local Files are enabled
    NOTE You may be able to entirely skip this step, you can either go ahead with step 2 and hope you're good, or you can do this immediately to make sure you're golden!
    First of all, to get this started, you will need to edit Warcraft's registry, in order to allow your files to be applied. To do this, simply follow these steps:
    1. Find the "regedit" (registry editor) program on your PC.
      (Type in "regedit" (Without punctuation) in the Windows search function)
    2. When the Registry Editor opens, find the Main Folder called "HKEY_CURRENT_USER", and open it.
    3. Open the "Software" sub-folder.
    4. Search for "Blizzard Entertainment" sub-folder, and open it.
    5. Click only once on "Warcraft III" sub-folder.
    6. Now, you will see a list on the right side of the screen. Find the registry that says "Allow Local Files", and open it (Double click).
    7. In the field of "Value Data", replace the zero (0) with number one (1). Make sure that the "Hexadecimal" flag is checked.
    8. Hit okay. The registry you edited should now display this in Data category: 0.00000001 (1).
    Good, now we're ready to edit our Warcraft 3 Installation.

    Part 2 - Modifying the Terrain.slk
    The War3.mpq has a basic file called "Terrain.slk" - this file essentially tells your Warcraft 3 map the settings for every tile in the game.
    You can extract one from your own MPQ with appropiate software - or you can download the one I attached at the end of this file - you're welcome :-)

    Open the Terrain.txt (once you downloaded it from me, or extracted it yourself) with a text editor, such as notepad.
    You'll see very, very many lines of text. The first 17 lines are essentially a "tutorial" on how to edit the file.
    Code:
    ID;PWXL;N;E
    B;X14;Y178;D0
    C;X1;Y1;K"tileID"
    C;X2;K"cliffSet"
    C;X3;K"dir"
    C;X4;K"file"
    C;X5;K"comment"
    C;X6;K"name"
    C;X7;K"buildable"   <---------------- This is important
    C;X8;K"footprints"
    C;X9;K"walkable"   <---------------- This is important
    C;X10;K"flyable"    <---------------- This is important
    C;X11;K"blightPri"
    C;X12;K"convertTo"
    C;X13;K"InBeta"
    C;X14;K"version"
    C;X1;Y2;K"Ldrt"
    
    These lines mostly refer to World editor Strings to help allocate the tile. For example the value of "C;X3;K" - tile directory - is used to find the appropiate skin/texture file.
    This value is useful if you want to import custom tilesets. Find a skin of your choice, and change it's import path to the C;X3;K code of the tile, and it'll be replaced in your map!

    What we're looking for are C;X7;K, C;X9;K, and C;X10;K. The values of these settings (either 0 or 1) determine whether a tile is buildable, walkable, and/or flyable.
    (Ignore C;X8;K - this value just modifies whether models leave footprints when crossing the tile)

    If you scroll down through the Terrain textfile you should come to this segment:
    (Protip just search the file for "Rock")
    Code:
    C;X2;K-1
    C;X3;K"TerrainArt\LordaeronSummer"
    C;X4;K"Lords_Rock"
    C;X5;K"Rock"
    C;X6;K"WESTRING_TILE_ROCK"
    C;X7;K0
    C;X8;K0
    C;X9;K1
    C;X10;K1
    C;X11;K6
    C;X12;K"Frok,Wrok,Bflr,Arck,Crck,Nrck,Ybtl,Vrck,Qrck,Xbtl,Ddkr,Gdkr,Zbkl,Irbk,Ofst"
    C;X13;K1
    C;X14;K0
    
    This is the section for the "Lordaeron Summer Rocks" tile.
    As you can see by the lines:
    Code:
    C;X7;K0     C;X9;K1      and     C;X10;K1
    
    its standard configuration is: unbuildable, walkable, flyable.
    To edit the pathability, simply change 1's to 0's for the appropiate values. For example we change:
    Code:
    C;X9;K1    ---> C;X9;K0
    
    And there! Lordaeron Rocks are now programmed to be unwalkable.

    Step 3 - Adding the file to Warcraft 3 Directory
    Once you've made the tileset changes you want, save the file as "Terrain.slk" - the extension of ".slk" is very important, as War3 won't recognize it otherwise.

    In your Warcraft 3 folder (typically C:\\Program Files\Warcraft III) make a new folder called "TerrainArt".
    Simply put your new, modified "Terrain.slk" file into this folder.
    ------------------------------------
    Update: "TerrainArt" must be put into the folder "war3.mpq" in order to work with the most recent Warcraft III patch!
    [​IMG]

    ------------------------------------------

    You're done! Next time you start your world editor and save your map, it will take directions from your Warcratings!r, and change tile pathing to your new settings!

    BONUS: Download the MiscData.txt attached to this post an put it in C:\\Program Files\Warcraft III\UI (or wherever your WC3 is installed) - just create a new UI folder, if you don't have one already. This will allow you to use the Raise/Lower terraining tool infinitely, allowing you to make very steep mountains or very deep holes in the ground.

    Attached Files:

    • Like Like x 5
    • Informative Informative x 2
    Last edited: Apr 14, 2018
  2. Yousef
    Offline

    Yousef Paladin of the Alliance Brigand Map Maker

    Messages:
    1,907
    Trophy Points:
    125
    Very very helpful, but now I got a question, if you can modify terrain pathability without any 3rd party programs, does that mean we can make 480x480 maps without a custom map editor?
    • Like Like x 1
  3. Woodenplank
    Offline

    Woodenplank Brigand Map Maker

    Messages:
    1,041
    Trophy Points:
    129
    Technically yes. But I don't exactly know which files and directories govern the min/max settings of the World Editor.

    The thing to remember about programs such as JNPG or Sharpcraft is that they're mostly not programs in their own right - they're hacks that insert themsleves into the script of Warcraft 3's World Editor program.
    This behaviour is also what causes several anti-virus programs to react to Sharpcraft or JNPG - one .exe inserting script into another program is a typical virus operation.

    So what happens is that the 3rd party software changes your MPQ directory for you - all these changes can, however, be made with your own installation (although only the .slks and .txt are easily edited). I recently had a spot of trouble because I had to insert extra trigger functions into my Warcraft 3 installation to be capable of opening LTF.
    Sadly I can't tell you where the map size and other editor limits are programmed. I don't know just yet.
    You could also create your own profanity filter by messing with the MPQ files :p

    EDIT: Recently found this bit of code in my mpq archieve. I guess you could modify the max camera bounds. I'm not going to tangle with it right now though... I only just got my Warcraft 3 working with LTF editing, and I don't want to mess with it.
    Code:
    [MapSizes]
    NumSizes=6
    Size00=7500,WESTRING_MAPSIZE_TINY
    Size01=13500,WESTRING_MAPSIZE_SMALL
    Size02=22000,WESTRING_MAPSIZE_MEDIUM
    Size03=99999,WESTRING_MAPSIZE_LARGE
    
    // If larger map sizes are enabled in the future
    // Size03=32500, WESTRING_MAPSIZE_LARGE
    // Size04=45000, WESTRING_MAPSIZE_HUGE
    // Size05=99999, WESTRING_MAPSIZE_EPIC
    

    EXTRA: Download the MiscData.txt attached to original post and put it in C:\\Program Files\Warcraft III\UI (or wherever your WC3 is installed) - just create a new UI folder, if you don't have one already. This will allow you to use the Raise/lower terrain tool infinitely, allowing you to make very steep mountains or holes in the ground.
    • Like Like x 2
    Last edited: Feb 12, 2018
  4. Yousef
    Offline

    Yousef Paladin of the Alliance Brigand Map Maker

    Messages:
    1,907
    Trophy Points:
    125
    Interesting, I already have the MiscData file, and I already have a slightly edited MPQ! It's very fun to have some of the cool skins from Hive in AW or just battle.net melee.
  5. Elbadruhel
    Offline

    Elbadruhel

    Messages:
    972
    Trophy Points:
    52
    U cant make tiles unwalkable with Sharpcraft right? U need to do this.

    Btw, the vanilla "red" tile can be removed from a set doing something? I use imported textures to tileset replacing cost 1 tiles, but if i have 2 red tiles there i can have 2 less custom tiles, cause they cant be replaced for 2 cost 1.
  6. Smyl
    Offline

    Smyl The Last Crusade shall visit even you! Brigand Map Maker

    Messages:
    1,183
    Trophy Points:
    127
    I have a problem that when I click once on the Warcraft III subfolder it does not show the Allow thingy. Anyone help? :/
  7. B-Roy7
    Offline

    B-Roy7 Nostalgic

    Messages:
    34
    Trophy Points:
    8
    upload_2018-4-20_19-13-18.png
    having some trouble enabling local files. Does this look correct?
  8. Woodenplank
    Offline

    Woodenplank Brigand Map Maker

    Messages:
    1,041
    Trophy Points:
    129
    Yeah looks alright - go ahead and try it, if you keep having issues just PM me.

    And use Chrome instead of internet explorer, you monster!
    • Funny Funny x 2
  9. B-Roy7
    Offline

    B-Roy7 Nostalgic

    Messages:
    34
    Trophy Points:
    8
    Does anyone know how this works?
    Im trying to make my cities so you can build in them and the mountains unwalkable. I got the numbers switched on the right tiles, but I don't think the warcraft program is picking up the new terrain.slk folder.
    yes I made sure local files were enabled.
    Anyone have any ideas?
  10. EmperorFawful
    Offline

    EmperorFawful Burn it! Website Admin

    Messages:
    3,955
    Trophy Points:
    153
    By the way does anyone know if the folder structure has been changed on world editor?
    Updated recently to newest version, opened up my map project, but it doesn't utilize the data from TerrainArt folder.
    Anyone knows the answer?