Mapping: Difference between revisions

From PZwiki
m (typo fix)
(Removed Legacy Support. No point.)
Line 1: Line 1:
== Mapping for current versions ==
== Mapping ==
=== Tools ===
=== Tools ===
The freshly released mapping tools are currently available on [http://theindiestone.com/forums/index.php/topic/4674-map-tools/| The Indie Stone forums].
The freshly released mapping tools are currently available on [http://theindiestone.com/forums/index.php/topic/4674-map-tools/| The Indie Stone forums].


For creating terrain bitmaps you can use [http://theindiestone.com/forums/index.php/topic/4684-random-mapzoid-random-bitmap-terrain-generator-python-win-exe/| Random Mapzoid] by mendonca.
For creating terrain bitmaps you can use [http://theindiestone.com/forums/index.php/topic/4684-random-mapzoid-random-bitmap-terrain-generator-python-win-exe/| Random Mapzoid] by mendonca.
== Mapping for legacy versions ==
This tutorial concerns mapping for the legacy 0.2.0 versions of the game.
=== ''Tools'' ===
To begin mapping there are several things you need to download:
;Mapping Tools
:Link Also contains 300x300 blank map.
:http://theindiestone.com/community/viewtopic.php?f=27&t=7406"
;TileZed Map Editor fantastic version of Tiled "Created by EasyPickins"
:Map Editor
:http://theindiestone.com/community/viewtopic.php?f=34&t=7521
=== ''Setting Up Maptools & TileZed'' ===
[[File:Tilezed.jpg|thumb|right]]
Unzip the contents of the downloaded files somewhere, and make sure you put the TileZed maptools files (.xml) into the maptools folder. So you will end up with two folders:
* maptools (as well as the .xml files)
* TileZed
Once you have set up the folders, run TileZed. Once you've opened it up it will look like the picture on the right.
=== ''TileZed'' ===
Let's open the map suburbs1.tmx to see all the functions of Project Zomboid in TileZed. Go to File --> Open and navigate to your maptools folder where you will find suburbs1.tmx which you should be familiar with from the game itself.
==== ''Navigating in TileZed'' ====
Navigating in TileZed can be done by using the arrow keys or the scroll wheel. Rolling the scroll wheel moves you up and down, clicking and holding the scroll wheel allows you to move freely in any direction. ''This is especially useful later when you are copying parts of your architecture.''
Zooming can be done by using the button in the bottom right corner, which by default is set at 100%. Setting it at 6% allows you to see the entire map. Alternatively you can use ctrl + (+) and ctrl + (-). Ctrl+0 puts you back at 100%.
==== ''Toolbar'' ====
The toolbar contains the tools you use in TileZed. From left to right these tools are:
* New
* Open
* Save
:* Undo
:* Redo
* Execute (?)
* Random Mode (?)
The following set is used for the actual mapping process and work much like the tools in paint.
:* Stamp
:* Fill
:* Erase
:* Select
The following are used for zoning:
* Select Objects
* Edit Polygons
* Add Object (seems to be the only one used in the official map)
* Add Tile
* Add Polygon
* Add Polyline
Using the polygon tool it is possible to define more detailed zones, but whether the game supports this or not is unclear.
==== ''TileZed Windows'' ====
On the right hand side you have two windows; the bottom one with the tiles you use to construct your map called Tilesets, and the top one that says Maps. You can change this window to navigate all the content in the curretly loaded .tmx file. On the bottom of the Maps window you see several tabs:
* Maps
* Objects
* History
* Layers
* Levels
===== ''Objects'' =====
The tab ''Objects'' shows the zoning of your map, where zombies will spawn and where objects might appear.
In suburbs1.tmx this contains info for two levels:
* 0_ItemZoning
* 0_objects
* 0_zoning
* 1_objects
===== ''History'' =====
The tab ''History'' shows recent edits to the map you've made. You can undo a set of changes by moving above the selected action and then perform another action. Pressing ctrl-Z will move you up one action at a time. It is not necessary to use this window too much, but it can be useful when you want to see if you've inadvertently made any adjustments, allowing you to scroll through your last actions.
===== ''Layers'' =====
The tab ''Layers'' shows the layers on the map. This is the tab where you'll be spending most of your time, since this tab contains the layers on which you "draw" the map. The number in front indicates the level the layer is on. So for example 0_Walls is the layer for walls on ground level. On suburbs1.tmx these range from 0_xxx to 7_xxx. You can add a layer by clicking ''New Layer'' and then naming it according to your needs. For example, if you're building a skyscraper and want to add walls on floor 8 you should name the layer 8_Walls.
===== ''Levels'' =====
The tab ''Levels'' shows the levels on the map. These are linked to the layers in the previous tab, so you can only toggle visibility but not make any adjustments. If you have created 8_Walls, it will now show up as level 8 with one box to tick for visibility, namely ''Walls''.
==== ''Tilesets'' ====
In the window with ''Tilesets'' you can find all the building stones for your maps:
* TileFloorExt (grass, pavement, street, dirt)
* TileFloorInt (carpet, tiles, wood)
* TileWalls (white tutorial house, brick, wood, solids)
* TileWalls2 (bathroom, store walls, wooden fence, white fence, grey walls)
* TileWallsBurnt (burnt walls)
* TileFrames (door frames, window frames, in white and wood color)
* TileObjects (ovens, vending machines, counters, fridge, shelves, furniture)
* TileTrees (trees, long grass, park bench, flowers)
* TileStairs (stairs in three colors from dark brown to light brown)
* TileDoors (various doors)
* TileBarricade (door and window barricades)
* BloodWalls
* BloodFloor
* TileFloorBurnt (burnt floor)
* TileWalls3 (walls in solid colors)
* TileWalls4 (walls with different top and bottom half)
* TileBar (pool table, bar chairs, table, shelves, tap)
* TileBank (walls, doors, sign, floor plant)
* TileObjectsExt (outdoor objects: stop sign, fire hydrant, chainlink fence, green trash container, tent)
* TileObjects2 (crates, trash can, packages, jukebox, sanitary objects, beds, mirrors, table-top lamps, wardrobes)
* TileObjects3 (curtains)
* TileRoadMarkings
* TileFloorGrime
* TilesStreetLights
* TileWallDecoration
* TileWallsGarage
* Spiffo (café tiles, signs for toilets, huge blue trash bins)
* TileCoffee ('''sinks''', fence, shelves, round wooden table)
* TileOffice (full glass walls, dividers, stairs, desks, desk chairs, '''microwave''')
* TileGasStation
* TileWallsOverlay
* TileRoof
==== ''Zones'' ====
Several zones can be discovered from the official map:
* foodItems
* shopShelvesFood
* HardwareStoreShelves
* HarwareStoreFloor
* BarShelves
* StoreShelves
* StoreFloor
* ZombieSpawn
To set up a zone select the ''Objects'' tab, click the layer you want the zone to be on. Then click ''Add Object'' in the toolbar or press O (the letter, not the number). Then just drag over an area, for example a kitchen floor. Click ''Select Object'' or press S, and then right-click on the rectangle you have drawn. Click ''Object Properties'' and name it '''zone'''. Under ''type'' fill in '''foodItems'''.
=== ''Tips and Tricks'' ===
* When in ''Stamp''-mode (S) click and hold your right mouse button while dragging over an area of the map to copy it. Left click to paste it somewhere else. You can keep pasting after you've pasted it once. This way you can quickly draw roads, copy intersections, or even entire blocks of housing.
* Using the ''Fill''-tool (F) and the previous trick you can easily create entire neighborhoods that do not have identical houses. For example, if the walls are all red, go to the tileset with walls, select a different color, press F and click the wall section that has to be changed. (The corner pieces still have to be done manually, since technically they're a different tile.) For the interior of an empty room you'd have to use the trick three times. Once for the walls facing SE and once for the walls facing SW, and one more time to replace the section where the two walls intersect.
=== ''Importing New Tilesets'' ===
In order to import / create your own tilesets for use within PZ, please refer to [[New_Tiles|this tutorial]].
=== ''Working with Lots'' ===
Lots are defined by .lot files, generated either by exporting .tmx files from TileZed, or by utilising The Indie Stone's MappingTools.exe program to generate lots directly from .tmx files.
Lots can be placed within other lots using TileZed, which allows for some very useful mapping tricks and shortcuts.
A mapper should consider defining the main buildings and key areas within a map via external .lot files, rather than defining them directly within the main 300x300 map sector he/she is working in, as this allows for several potential benefits e.g. easy duplication of identical buildings within the area, and the potential for script-based activities to (e.g.) redefine the .lots in-play.
[[File:Lot_definition.png|thumb|right]]
Lots are placed within main map sections by defining a zone, and setting the zone properties accordingly.
As can be seen from the example dialog box to the right, the zone name should be 'lot', with type as per the actual file name of the lot in question (in this case 'Lot_HouseGarage_30x36').
Width and height should match the dimensions of the lot file to allow the lot to be placed as accurately as possible.
Any information contained within the .lot file will overwrite the base mapping information within the main map section. Undefined areas of the .lot file will not overwrite the main map file in which the .lot is referenced.
Each .lot file which is referenced by the main game scripts will need to be placed within the main Project Zomboid \media\lots\. directory in order for the game to be able to find the necessary data.


[[Category:Modding]][[Category:Maps]]
[[Category:Modding]][[Category:Maps]]

Revision as of 02:31, 31 January 2014

Mapping

Tools

The freshly released mapping tools are currently available on The Indie Stone forums.

For creating terrain bitmaps you can use Random Mapzoid by mendonca.