Setting Up Map Resources: Difference between revisions
Solokiller (talk | contribs) (→Step 1) |
Solokiller (talk | contribs) No edit summary |
||
Line 6: | Line 6: | ||
Well, Resources are the scripts and files needed for the Minimap and Objectives for your map. | Well, Resources are the scripts and files needed for the Minimap and Objectives for your map. | ||
How inportant is this? | How inportant is this? '''very'''. | ||
You cannot spawn without the resource.txt file in your Empires/resource/maps directory, and without the minimap VTF file and VMT file in your empires/materials/maps directory | You cannot spawn without the resource.txt file in your Empires/resource/maps directory, and without the minimap VTF file and VMT file in your empires/materials/maps directory. All you will see on your minimap is a black and purple checkerboard (That is if you don't crash). | ||
== Creating the Minimap == | == Creating the Minimap == | ||
Line 15: | Line 15: | ||
Become a spectator by choosing it on the team menu, and hide the HUD by typing "cl_drawhud 0" in the console. If your map has fog, use the command "fog_override 1" to disable it (sv_cheats must be set to 1). Fly up to a decent height and look down. | Become a spectator by choosing it on the team menu, and hide the HUD by typing "cl_drawhud 0" in the console. If your map has fog, use the command "fog_override 1" to disable it (sv_cheats must be set to 1). Fly up to a decent height and look down. | ||
Use the "fov <number>" command in the console to zoom out to fit all of your level on the screen. | Use the "fov <number>" command in the console to zoom out to fit all of your level on the screen. | ||
Use the console command "screenshot" to save as a targa formatted image which has no compression. You can also save to a jpeg (default key F9) if you would like to edit the minimap picture from this format. | Use the console command "screenshot <picturename>" to save as a targa (.tga) formatted image which has no compression. You can also save to a .jpeg (default key F9) if you would like to edit the minimap picture from this format. | ||
You will then need a program such as [http://www.gold-software.com/abc.shtml ABC Converter] to save to .tga for conversion to .VTF | |||
if you are using a large func_precipitation brush in your level, viewing too much of the brush at one time will cause you to crash to desktop. | |||
=== Step 2 === | === Step 2 === | ||
Open your image in Photoshop or any image editing program. | Open your image in Photoshop/ABC or any decent image editing program. | ||
Crop it so that the image's width and height are the same and resize it so that they are a multiple of 2 (ie 256x256, 512x512, 1024x1024). | Crop it so that the image's width and height are the same and resize it so that they are a multiple of 2 (ie 256x256, 512x512, 1024x1024). Note down the pixel coordinates of the top left corner and the bottom right corner of your map as shown on the minimap image. | ||
The coordinates can be found by hovering the mouse cursor over the relevant point in the minimap, and looking at the toolbars in your image editing program. Depending on what program you are using there will be a pair of numbers like this: (232,884) or (75,1024) for example. Those numbers are the pixel coordinates of your cursor position. Write these numbers down as you will be needing them later. | |||
It is very important that you find these coordinates with precision or the minimap will lose accuracy and this can cause all manner of problems. | |||
=== Step 3 === | === Step 3 === | ||
Convert yourt TGA image to HL2's VTF format using VTEX (found in your source SDK directory). | Convert yourt TGA image to HL2's VTF format using VTEX (found in your source SDK directory). | ||
If you are unsure how to do this then follow [http://www.snarkpit.net/editing.php?page=tutorials&game=HL2&id=121 this tutorial] | |||
=== Step 4 === | === Step 4 === | ||
Place the image in your empires/matierials/maps folder | Place the image in your empires/matierials/maps folder |
Revision as of 03:43, 24 April 2006
Home > Setting Up Map Resources
Resources? What are Those?
First off, your asking, "What are Resources?" Well, Resources are the scripts and files needed for the Minimap and Objectives for your map.
How inportant is this? very. You cannot spawn without the resource.txt file in your Empires/resource/maps directory, and without the minimap VTF file and VMT file in your empires/materials/maps directory. All you will see on your minimap is a black and purple checkerboard (That is if you don't crash).
Creating the Minimap
Step 1
Take an overhead screenshot of your level.
Become a spectator by choosing it on the team menu, and hide the HUD by typing "cl_drawhud 0" in the console. If your map has fog, use the command "fog_override 1" to disable it (sv_cheats must be set to 1). Fly up to a decent height and look down. Use the "fov <number>" command in the console to zoom out to fit all of your level on the screen. Use the console command "screenshot <picturename>" to save as a targa (.tga) formatted image which has no compression. You can also save to a .jpeg (default key F9) if you would like to edit the minimap picture from this format.
You will then need a program such as ABC Converter to save to .tga for conversion to .VTF
if you are using a large func_precipitation brush in your level, viewing too much of the brush at one time will cause you to crash to desktop.
Step 2
Open your image in Photoshop/ABC or any decent image editing program. Crop it so that the image's width and height are the same and resize it so that they are a multiple of 2 (ie 256x256, 512x512, 1024x1024). Note down the pixel coordinates of the top left corner and the bottom right corner of your map as shown on the minimap image.
The coordinates can be found by hovering the mouse cursor over the relevant point in the minimap, and looking at the toolbars in your image editing program. Depending on what program you are using there will be a pair of numbers like this: (232,884) or (75,1024) for example. Those numbers are the pixel coordinates of your cursor position. Write these numbers down as you will be needing them later.
It is very important that you find these coordinates with precision or the minimap will lose accuracy and this can cause all manner of problems.
Step 3
Convert yourt TGA image to HL2's VTF format using VTEX (found in your source SDK directory).
If you are unsure how to do this then follow this tutorial
Step 4
Place the image in your empires/matierials/maps folder
Your Minimap has been created and it is ready to use
Setting Up the Script
"How do i set up the script" its very simple.
copy this text into a plain .txt file:
"emp_canyon" { //the location in the 'materials/' dir where the image for the map is "image" "maps/emp_canyon" //the top left corner of the image which equals the top left corner of the map coordinate below "min_image_x" "90" "min_image_y" "45" //the bottom right corner of the image which equals the bottom right corner of the map coordinate below "max_image_x" "990" "max_image_y" "950" //the top left corner of the map "min_bounds_x" "-11150" "min_bounds_y" "14850" //the bottom right corner of the map "max_bounds_x" "14350" "max_bounds_y" "-10250" //the size in map coordinates of each sector of a map (A1,F5, etc), a grid line is draw around each sector on the minimap to visually segregate them "sector_width" "200" "sector_height" "200" //There are four levels of zoom. These are the min and max which corresponds to the amount of the map visible in the minimap panel when at that zoom level. "min_zoom" "1" "max_zoom" "0.25" //Team panel descriptions "nf_description" "The Northern Faction is less equipped and trained than the forces of the Brenodi Empire, but its forces make up for it with genetic manipulation and determination. All members are ex-citizens of Jekotia whose disbanded military's past exploits into genetic manipulation were phased into the general population and provided a counter to Brenodi technology. This gives them the advantage of more versatility in ability enhancement and an unmatchable level of cohesiveness and coordination. They've managed to find support in ex-Jekotians hidden within the Brenodi Empire and among remnants of bunkers and weapon caches left over from the great battle which dissolved the nation of Jekotia." "nf_objective" "Objective: Build refineries to gain resources and build up your army. Then destroy the Brenodi Command Vehicle, or destroy all barracks (removing any place to spawn) and kill all members of the enemy team." "imp_description" "The Brenodi Empire’s forces are equipped with state of the art weaponary and equipment. All members undergo a strict training regiment to establish their combat effectiveness, and they are supported by the very best mechanized armor and air units. All Brenodian citizens are required to receive an extensive set of nanotechnological devices to function, and their military relies on these nanotech enhancements to further enhance the abilities of their soldiers. The Brenodi Empire wages an ongoing campaign to subdue the Northern Faction and eliminate their terrorist actions through force that have become all too common in ex-Jekotian territory." "imp_objective" "Objective: Build refineries to gain resources and build up your army. Then destroy the Northen Faction Command Vehicle, or destroy all barracks (removing any place to spawn) and kill all members of the enemy team." }
This is the resource file from emp_canyon.
we will go step by step into how to set this up by editing the script
Step 1
Fist off, on line one, change "emp_canyon" to your map name. this will help the game know what map your on.
Step 2
The next section is to add the minimap to your map, this will also create a "megamap" for spwaning
//the location in the 'materials/' dir where the image for the map is "image" "maps/<mapname>"
This tells the Game where you look for the minimap you have just created. Change <mapname> to the name of your minimap.
//the top left corner of the image which equals the top left corner of the map coordinate below "min_image_x" "90" "min_image_y" "45" //the bottom right corner of the image which equals the bottom right corner of the map coordinate below "max_image_x" "990" "max_image_y" "950" //the top left corner of the map "min_bounds_x" "-11150" "min_bounds_y" "14850" //the bottom right corner of the map "max_bounds_x" "14350" "max_bounds_y" "-10250"
This is the way the game resizes your map to fit in the little cornor. change the numbers to the size of your map. NOTE: if you dont know how to do this i will add more to this section at a later date
//the size in map coordinates of each sector of a map (A1,F5, etc), a grid line is draw around each sector on the minimap to visually segregate them "sector_width" "200" "sector_height" "200" //There are four levels of zoom. These are the min and max which corresponds to the amount of the map visible in the minimap panel when at that zoom level. "min_zoom" "1" "max_zoom" "0.25"
This is the Games Overlay onto the Minimap. you do not have to change these, as the defualts are good.
Step 3
//Team panel descriptions "nf_description" "The Northern Faction is less equipped and trained than the forces of the Brenodi Empire, but its forces make up for it with genetic manipulation and determination. All members are ex-citizens of Jekotia whose disbanded military's past exploits into genetic manipulation were phased into the general population and provided a counter to Brenodi technology. This gives them the advantage of more versatility in ability enhancement and an unmatchable level of cohesiveness and coordination. They've managed to find support in ex-Jekotians hidden within the Brenodi Empire and among remnants of bunkers and weapon caches left over from the great battle which dissolved the nation of Jekotia." "nf_objective" "Objective: Build refineries to gain resources and build up your army. Then destroy the Brenodi Command Vehicle, or destroy all barracks (removing any place to spawn) and kill all members of the enemy team." "imp_description" "The Brenodi Empire’s forces are equipped with state of the art weaponary and equipment. All members undergo a strict training regiment to establish their combat effectiveness, and they are supported by the very best mechanized armor and air units. All Brenodian citizens are required to receive an extensive set of nanotechnological devices to function, and their military relies on these nanotech enhancements to further enhance the abilities of their soldiers. The Brenodi Empire wages an ongoing campaign to subdue the Northern Faction and eliminate their terrorist actions through force that have become all too common in ex-Jekotian territory." "imp_objective" "Objective: Build refineries to gain resources and build up your army. Then destroy the Northen Faction Command Vehicle, or destroy all barracks (removing any place to spawn) and kill all members of the enemy team." This is the Description of the sides, as well as the map objectives. if you have other objective than the defualt ones, you can change these, otherwise its not necisarry.
Step 4
Save this file in your empirs/resource/maps directory as your map name. Load up the map and the minimap will show up!
Guide Created by Kylegar
TO DO
Add section on editing the corners of the map --Kylegar 19:57, 16 March 2006 (EST)