Zh/Creating a working mini-map: Difference between revisions

From Valve Developer Community
< Zh
Jump to navigation Jump to search
(开始翻译“Creating a working mini-map”)
 
m (obsolete language category)
 
(21 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{otherlang2
{{lang|Creating a working mini-map|title=制作一张可用的小地图}}
|en=Creating a working mini-map
|ru=Creating a working mini-map:ru
}}
 
[[Category:Level Design]] [[Category:Tutorials]]
__TOC__
__TOC__


== 基本介绍 ==
== 基本介绍 ==


部分 [[mod|模组]] (Counter-Strike:Source, Day of Defeat:Source) have a mini-map mode, that shows a level overview and projects players and objects on that map. An ''overview map'' is an image made from in-game [[screenshot]]s and must be created once a new map is finished.
部分{{L|mod|模组}}(反恐精英:起源,胜利之日:起源)拥有一个能显示地图概要,玩家和物体位置的俯视小地图。构建这样一张由游戏内{{L|screenshot|屏幕截图}}所修改的小地图对于制作新关卡来说十分重要。
 
[[Counter-Strike: Global Offensive]] also has a mini-map feature. From the player's point of view, the mini-map behaves the same in game as in previous versions of Counter-Strike. But from a developer point of view quite a few things have changed from creating a level overview in Counter-Strike: Source.
 
The big differences are:
<ol>
<li>In CS:GO the map overview is referred to as the "radar."</li>
<li>CS:GO doesn't use VTFs and VMTs for the radar.</li>
<li>In CS:GO radar files are saved as a ".DDS" file.</li>
<li>There are only two necessary files to get a basic mini-map working the '.DDS" and a ".txt". The ".DDS" serves as the map overview image, and the ".txt" tells the Source engine how to display the overview.
</ol>
 
To compare the differences in finer detail, read: [[Level_Overviews|Level Overviews]] and see how to make a level overview for Counter-Strike: Source.


== Make the raw overview image ==
{{L|Counter-Strike: Global Offensive|反恐精英:全球攻势}}也提供小地图功能,它看上去和前几代反恐精英里的小地图没什么太大区别,但对于开发者来说,小地图的制作过程早已大相径庭。
<ol>
<li>Start the game. Click '''Options''' and switch to the '''Video''' tab. Change '''Resolution''' to "1280x1024" pixels and the '''Aspect Ratio''' to "Normal".If you have problem setting the resolution (small screen),you can add a startup option " -width 1280 -height 1024".</li>
<li>Load the new level with the map <code><mapname></code> [[console command]] and enable <code>"sv_cheats 1"</code>.</li>
<li>Join a team.</li>
<li>Turn off bots in the map.<code>"bot_quota 1"</code> using the [[console]].</li>
<li>Bind the "[[screenshot]]" command to a key, etc. <code>"bind p screenshot"</code> using the [[console]].</li> This is important, as using the default screenshot key (F5) will take a compressed [[JPEG]] rather than a raw [[TGA]].
<li>Remove any HUD elements with console commands <code>"cl_drawhud 0"</code>, <code>"r_drawviewmodel 0"</code> and <code>"hidepanel all"</code>.</li>
<li>Remove disturbing world effects like skyboxes (<code>"r_skybox 0"</code>), fog (<code>"fog_override 1"</code> and <code>"fog_enable 0"</code>), props (''optional:'' <code>"r_drawstaticprops 0"</code>), etc.</li>
<li>Turn off player clipping.<code>"noclip"</code> using the [[console]]. Then move to a position where you can see the whole level from above.</li>
<li>Switch to orthographic mode with the console command <code>"cl_leveloverview ''x''"</code>, where ''x'' is the scale factor.</li>
<li>Set <code>"cl_leveloverviewmarker 1024"</code> to show a red helper line on the right. You will need to briefly toggle <code>cl_drawhud 1</code>, line it up, and then toggle the HUD off again.</li>


[[Image:Dust2_Overview_CSGO.png|200px|thumb|Sample level overview (de_dust2)]]
主要的变动有:
# 在CS:GO里小地图被称为"雷达。"
# CS:GO里的雷达并不使用VTFs和VMTs。
# CS:GO里的雷达图片被保存为".DDS"格式。
# 现在只需要两个文件就能让小地图正常显示,一个'.DDS"文件以及一个".txt"文件。".DDS"文件就是小地图显示的地图图片本身,".txt"文件则是用来设定如何让游戏显示小地图。


<li>You can move around while ''cl_leveloverview'' mode is on. You are still in spectator mode and moving, so move the arrow keys to change the position. Now change scale so the map fits into the square defined by the red line. The right edge of your map should be on the left of the red line, anything to the right of the red line will be chopped off in a later step. Check the attached screenshot  to see how this step looks in <code>de_dust2</code>.</li>
如果你真的想仔细看看有什么具体的改变,又或者你想制作的是反恐精英:起源的小地图,请查阅:{{L|Level_Overviews|关卡俯视图}}
<li>The current projection data (position and scale) will be updated in the console, eg "Overview: <code>scale 6.00, pos_x -2651, pos_y 4027</code>".</li>
<li>Once everything is perfect, take a screenshot (using the key you bound to "screenshot") and '''write down''' the projection data values. You will need them in a later step.</li>
</ol>


== 获取一张无损俯视图 ==
[[File:Dust2_Overview_CSGO.png|200px|thumb|关卡俯视图的一个例子(de_dust2)]]
# 首先开始游戏,接着打开'''选项'''界面''',并切换到'''视频设置''',然后将'''分辨率'''调整为"1280x1024"并把'''纵横比'''切换到"标准"。如果你无法调整分辨率(因为屏幕过小或其他原因),亦可以在启动选项中加上" -width 1280 -height 1024"。
# 用{{L|console command|控制台指令}} map <code><地图名></code> 打开地图并输入 <code>"sv_cheats 1"</code>。
# 随便选择一个队伍加入。
# 在{{L|console|控制台}}输入指令<code>"bot_quota 1"</code>来停用机器人。
# 在{{L|console|控制台}}输入指令<code>"bind p screenshot"</code>来将"{{L|screenshot|屏幕截图}}"指令绑定到一个按键上。这一点真的很重要,因为默认截图方式(F5截图)会产生一张压缩过的{{L|JPEG}}格式图片而不是无损的{{L|TGA}}格式图片。
# 用{{L|console command|控制台指令}}<code>"cl_drawhud 0"</code>,<code>"r_drawviewmodel 0"</code>以及<code>"hidepanel all"</code>来去除HUD。
# 用{{L|console command|控制台指令}}来去除一些无用的效果,例如天空盒(<code>"r_skybox 0"</code>),烟雾(<code>"fog_override 1"</code>和<code>"fog_enable 0"</code>),物体(''optional:'' <code>"r_drawstaticprops 0"</code>)及其他。
# 在{{L|console|控制台}}输入指令<code>"noclip"</code>来停用玩家碰撞,接着移动到一个能俯视全图的完美的位置。
# 用{{L|console command|控制台指令}}<code>"cl_leveloverview ''x''"</code>来切换到俯视模式(指令中的 x 指的是比例大小)。
# 在{{L|console|控制台}}输入指令<code>"cl_leveloverviewmarker 1024"</code>可以显示一条红色的辅助线,不过你需要在{{L|console|控制台}}输入<code>cl_drawhud 1</code>来暂时重启HUD。将视角对好,然后记得关闭HUD
# 你可以在''cl_leveloverview''模式启用时自由移动,不过记住移动方向键将会把你带向与平时不同的方向。适应操作后,仔细调整镜头,注意地图的最右边不应该超出辅助红线,不然你会发现超出的部分在接下来的制作过程中会被整个砍掉。调整时你可以参考右边<code>de_dust2</code>的俯视图。
# 当前的镜头信息(位置和比例)都会在控制台中显示并实时更新,例如:"Overview: <code>scale 6.00, pos_x -2651, pos_y 4027</code>"。
# 当一切都接近完美之时,按下截图键(之前用控制台绑定的)并'''记下'''控制台显示的镜头信息,之后会用到。


Here are all the needed commands as bind:
你需要绑定的按键:
* o => Overview-Mode
* o => 俯视模式
* p => Take [[screenshot]] 
* p => {{L|screenshot|屏幕截图}}


  //Overview-Mode
  //俯视模式
  //Script by The RaZZeR App
  //由The RaZZeR App提供代码
  bind "o" "change_resolution; clear_view; clear_map; clear_game; record_config; radar_image";
  bind "o" "change_resolution; clear_view; clear_map; clear_game; record_config; radar_image";
  bind "p" "screenshot";
  bind "p" "screenshot";
Line 59: Line 47:
  alias "radar_image" "noclip; cl_leveloverviewmarker 1024; cl_leveloverview 5";
  alias "radar_image" "noclip; cl_leveloverviewmarker 1024; cl_leveloverview 5";


{{tip| Create a file like overviewexec.cfg (or something else), paste everything from above into this cfg. Move the file to csgo/cfg/ and run "exec overviewexec" in the [[console]].}}
{{tip| 新建一个名叫overviewexec.cfg的文件(名称不重要)并把以上所有代码都复制黏贴进这个cfg文件,接着把这个文件放入csgo/cfg/ 并在{{L|console|控制台}}输入指令"exec overviewexec"}}


This script dumps the [[console]] output in a log file which is saved at "csgo/overview_info.log".
这些代码会把需要的{{L|console|控制台}}信息输出至"csgo/overview_info.log"
Also the resolution gets changed to 1280x1024 (4:3) windowed.
游戏分辨率也同时会被切换到窗口化的1280x1024 (4:3)


== Create the .DDS ==
== 建立.DDS文件 ==
=== Using Photoshop ===
=== 使用Photoshop ===
<ol>
# 开启Photoshop并打开你在<code>"%STEAMINSTALL%\SteamApps\common\Counter-Strike Global Offensive\csgo\screenshots"</code>建立的.TGA格式文件(<code>"%STEAMINSTALL%"</code>是你安装Steam的路径),默认是<code>"C:\Program Files (x86)\Steam"</code>
<li>Start up Photoshop and open the .TGA file that you created. It should be located at <code>"%STEAMINSTALL%\SteamApps\common\Counter-Strike Global Offensive\csgo\screenshots"</code>. Where <code>"%STEAMINSTALL%"</code> is the directory in which you have steam installed. This is most likely <code>"C:\Program Files (x86)\Steam"</code>.</li>
# 重新设置画布尺寸(图像 -> 画布尺寸),将长宽都设置为1024像素,并将锚点放置在左上角。<br>[[File:PhotoshopScaleImage.PNG]]
<li>Using the Canvas Size tool (Image -> Canvas Size) set the new width of the image to be 1024 pixels. And in the anchor section click the top-left box.</li>
# 在图层界面双击''背景''图层,一个"新建图层"的窗口会出现,点确定。
[[File:PhotoshopScaleImage.PNG]]
# 选中你想要在小地图中透明显示的部分并按下退格键。
<li>In the layers panel double click on the layer labeled ''Background''. A "New Layer" window will pop up, press OK.</li>
# 有些人喜欢精心装饰一番他们的小地图,如果你也想,现在就搞定。
<li>Select areas of the image which you wish to be transparent when on the mini-map, then press the backspace key.</li>
# 将图片另存为文件格式是D3D/DDS的.DDS文件(文件 -> 储存为),文件名应是你的地图名加上<code>"_radar"</code>,例如(de_dust_radar.dds),最后将文件保存到<code>"%STEAMINSTALL%\SteamApps\common\Counter-Strike Global Offensive\csgo\resource\overviews"</code>
<li>Some people like to add different colored features to their mini-maps, if you wish to do so do that now.</li>
# 如图所示,当Intel Texture Works选项框出现后,把“Texture Type”和“Compression”中的选项从<code>"Color"</code>换成<code>"Color + Alpha"</code><code>"BC1 4bpp(Linear)"# 换成<code>"BC3 8bpp(Linear)"</code><br>[[File:ITW_dialog.jpeg]]
<li>Save the image as a .DDS file. (File -> Save As). The file name should be your map name followed by <code>"_radar"</code> ex. (de_dust_radar.dds). The file format should be D3D/DDS. Save the file to <code>"%STEAMINSTALL%\SteamApps\common\Counter-Strike Global Offensive\csgo\resource\overviews"</code> </li>
# 恭喜,属于你自己地图的.DDS文件已经被创建成功了!
<li>When the DDS dialog box opens click the drop down box at the top left, and change the option from <code>"DXT1 RGB 4 bpp | no alpha"</code> to <code>"DXT1 ARGB 4 bpp | 1 bit alpha"</code> As shown in the image below.
</li>
[[File:Photoshop_ddssavedialog.PNG]]
<li>You now have successfully created the .DDS file for your map.
</ol>


NOTE: If the "Save As..." .DDS file option is not available to you, then you might need to download a photoshop plug-in. You can get it off of the NVIDA website here: [https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop NVIDA .DDS Plug-In]
{{note|如果"储存为..." .DDS文件的选项并不可用或者没有出现,就说明你还没有下载对应的Photoshop插件。你可以在Intel的网站下载:[https://software.intel.com/en-us/articles/intel-texture-works-plugin Intel® Texture Works Plugin for Photoshop](NVIDIA的Photoshop插件已经很久没有更新了。)}}


=== Using GIMP ===
=== 使用GIMP ===
''(this tutorial was written using GIMP 2.6, but should work for all GIMP 2.x)''
''(本教程使用GIMP 2.6,但对GIMP 2.x应该也适用)''


# Download and install the [http://registry.gimp.org/node/70/ GIMP DDS Plugin 2.0.2].
# [http://registry.gimp.org/node/70/ GIMP DDS Plugin 2.0.2]下载并安装GIMP。
# Start up GIMP and open the .TGA file that you created. It should be located at "%STEAMINSTALL%\SteamApps\common\Counter-Strike Global Offensive\csgo\screenshots". Where "%STEAMINSTALL%" is the directory in which you have steam installed. This is most likely "C:\Program Files (x86)\Steam".
# 启动GIMP并打开你在<code>"%STEAMINSTALL%\SteamApps\common\Counter-Strike Global Offensive\csgo\screenshots"</code>建立的.TGA格式文件(<code>"%STEAMINSTALL%"</code>是你安装Steam的路径),默认是<code>"C:\Program Files (x86)\Steam"</code>。
# Using the Canvas Size tool (Image -> Canvas Size) set the new width of the image to be 1024 pixels. keep the Height at 1024.
# 重新设置画布尺寸(图像 -> 画布尺寸),将长宽都设置为1024像素。
# Select areas of the image which you wish to be transparent when on the mini-map, then press the delete key.
# 选中你想要在小地图中透明显示的部分并按下删除键。
# Some people like to add different colored features to their mini-maps, if you wish to do so do that now.
# 有些人喜欢精心装饰一番他们的小地图,如果你也想,现在就搞定。
# Save the image as a .DDS file. (File -> Save As). The file name should be your map name followed by "_radar" ex. (de_dust_radar.dds). The file format should be D3D/DDS. Save the file to "%STEAMINSTALL%\SteamApps\common\Counter-Strike Global Offensive\csgo\resource\overviews".
# 将图片另存为文件格式是D3D/DDS的.DDS文件(文件 -> 储存为),文件名应是你的地图名加上<code>"_radar"</code>,例如(de_dust_radar.dds),最后将文件保存到<code>"%STEAMINSTALL%\SteamApps\common\Counter-Strike Global Offensive\csgo\resource\overviews"</code>。
# When the DDS dialog box opens click the drop down box at the top left, and change the compression drop down from "None", to "BC1/DXT1". Click "OK".
# 当DDS设置窗口出现时打开左上角的下拉菜单,把压缩设置从""设置成"BC1/DXT1"并点选"OK"
# You now have successfully created the .DDS file for your map.
# 恭喜,属于你自己地图的.DDS文件已经被创建成功了!


== Create the overview script ==
== 建立俯视图代码文件 ==


Finally, create a text file called <code><mapname>.txt</code> in <code><game dir>\resource\overviews\</code>. This file will define the precise numbers needed to align the overview. The following is an example taken from de_vertigo:
最后一步,在<code><game dir>\resource\overviews\</code>创建一个名叫<code><你的地图名>.txt</code>.txt文件。此文件将用来定义俯视图所需要的种种数据,以下用地图de_vertigo作为例子:


For your map's script use the projection data that you wrote down in step 12 of [[#Make_the_raw_overview_image|Make the raw overview image]]
需要输入的内容来自你在[[#Make_the_raw_overview_image|获取一张无损俯视图]]中第12步所获得的数据。


  // HLTV overview description file for de_vertigo.bsp
  // HLTV overview description file for de_vertigo.bsp
Line 107: Line 90:
  "pos_y" "1762" // Y coordinate
  "pos_y" "1762" // Y coordinate
  "scale" "4.0" // scale used when taking the screenshot
  "scale" "4.0" // scale used when taking the screenshot
  "rotate" "0" // map was rotated by 90 degrees in [[image editor]]
  "rotate" "0" // map was rotated by 90 degrees in {{L|image editor}}
  "zoom" "1.3" // optimal zoom factor if map is shown in full size
  "zoom" "1.3" // optimal zoom factor if map is shown in full size
   
   
Line 133: Line 116:
  }
  }


"pos_x" (red line) and "pos_y" (green line) correspond to the top view of Hammer where X is left/right and Y is down/up. Lowering the scale makes the radar bigger.
"pos_x"(红线)以及"pos_y"(绿线)符合Hammer中的X(左右)和Y(上下),降低比例会让雷达图看上去更大。


To get the correct positions of all loading screen icons you have to open up your finished radar file in Photoshop.
要搞清楚你需要在哪里放置载入界面中的标识图标(出生点和爆破区),你需要打开Photoshop并按下{{key|Ctrl+R}}以使用标尺工具(记住要使用百分比模式)得到准确坐标。
Then press {{key|Ctrl+R}} to get the Ruler-Tool (make sure it's set to percent). You get the correct value by dragging the top and left ruler. Note that for example 31.12% are written like 0.31.


== Adding Multiple Heights ==
在文件中不要使用百分比符号,举个例子,31.12%应被写成0.31。


After the Wildfire update to CSGO you can now have multiple height images added to your radar. This is done by creating multiple radar files with your different paths highlighted depending on the player's height in the world. You can reference the new de_nuke for examples inside your game's files.
== 不同高度 ==
 
* mapname_lower_radar
自从野火行动更新后,雷达已可以显示多个高度。你需要截取多个不同高度的雷达图,并根据玩家所在高度来设置它们,参考新的de_nuke地图文件。
* mapname_radar (This is the ground floor)
* 你的地图名_lower_radar
* mapname_higher_radar
* 你的地图名_radar(这是普通高度)
* 你的地图名_higher_radar


Then add the following to your overview text file.
接着建立新的俯视图.txt文件。


  "verticalsections"
  "verticalsections"
Line 167: Line 150:
  }
  }


* Type "cl_showpos 1" in game console check the Altitude.
* 在控制台输入"cl_showpos 1"来检查当前高度。


* The higher/lower .dds files will not be included by the Workshop publishing tool, and must be packed manually to be used on the Steam Workshop.
* /.dds文件将不会被在上传到创意工坊时被自动上传,你需要手动打包它们。


== Conclusion ==
== 总结 ==
<p>
<p>
Below is a screen capture of the radar in game. If you followed all the steps correctly, then the finished product should look something like this:
下面是一张游戏内的雷达截图,如果没出什么差错,你的成品就应该和下图差不多。
</p>
</p>
[[File:CSGO_Example_Radar.png]]
[[File:CSGO_Example_Radar.png]]
== Resource ==
== 资源 ==
Bombsite Clear[[File:Bombsite_clear.png]]
无标识爆破区[[File:Bombsite_clear.png]]
Bombsite A [[File:Bombsite_a.png]]
爆破区 A [[File:Bombsite_a.png]]
Bombsite B [[File:Bombsite_b.png]]
爆破区 B [[File:Bombsite_b.png]]
 
CT Icon [[File:Ct.png]]
T Icon [[File:T.png]]
Hostage Icon [[File:Hostage.png]]
 
New T spawn Icon [[File:T_spawn_icon_NEW.png]]
 
== Introducing: CS-GO Minimap Icon Placer beta 2.0 ==
 
CS:GO-MIP is a ONLINE tool that facilitates the creation minimaps for Counter-Strike: Global Offensive's maps. While the user is still required to perform the basic tradition steps of the minimap making, CS:GO-MIP makes it easy to place the minimap icons (Spawn areas, Hostages and Bombsites) without needing the user to manually edit the text file for the same. You can access it at http://www.minimap.ga.
 
OBS: The site let you edit and convert your images to dds, look at tools sections. It is still under construction, but works already!


[[File:Csgomipface.png|1106x509px|frameless|center]]
CT重生区标志 [[File:Ct.png]]
T重生区标志 [[File:T.png]]
人质标志 [[File:Hostage.png]]


新T重生区标志 [[File:T_spawn_icon_NEW.png]]


== Other Tutorials ==
== 其他教程 ==
[https://www.youtube.com/watch?v=SSheuw9ASuM TopHATTwaffle's CSGO Radar / Overview Creation Tutorial]
* [https://www.youtube.com/watch?v=SSheuw9ASuM TopHATTwaffle's CSGO Radar / Overview Creation Tutorial]
* [http://csgo.gamebanana.com/tuts/11983 How to use CS:GO Radar Maker]


[http://csgo.gamebanana.com/tuts/11983 How to use CS:GO Radar Maker]
{{ACategory|Level Design}}
{{ACategory|Tutorials}}

Latest revision as of 04:13, 22 August 2024

English (en)Deutsch (de)Русский (ru)中文 (zh)Translate (Translate)

基本介绍

部分模组(en)(反恐精英:起源,胜利之日:起源)拥有一个能显示地图概要,玩家和物体位置的俯视小地图。构建这样一张由游戏内屏幕截图(en)所修改的小地图对于制作新关卡来说十分重要。

反恐精英:全球攻势(en)也提供小地图功能,它看上去和前几代反恐精英里的小地图没什么太大区别,但对于开发者来说,小地图的制作过程早已大相径庭。

主要的变动有:

  1. 在CS:GO里小地图被称为"雷达。"
  2. CS:GO里的雷达并不使用VTFs和VMTs。
  3. CS:GO里的雷达图片被保存为".DDS"格式。
  4. 现在只需要两个文件就能让小地图正常显示,一个'.DDS"文件以及一个".txt"文件。".DDS"文件就是小地图显示的地图图片本身,".txt"文件则是用来设定如何让游戏显示小地图。

如果你真的想仔细看看有什么具体的改变,又或者你想制作的是反恐精英:起源的小地图,请查阅:关卡俯视图(en)

获取一张无损俯视图

关卡俯视图的一个例子(de_dust2)
  1. 首先开始游戏,接着打开选项界面,并切换到视频设置,然后将分辨率调整为"1280x1024"并把纵横比切换到"标准"。如果你无法调整分辨率(因为屏幕过小或其他原因),亦可以在启动选项中加上" -width 1280 -height 1024"。
  2. 控制台指令(en) map <地图名> 打开地图并输入 "sv_cheats 1"
  3. 随便选择一个队伍加入。
  4. 控制台(en)输入指令"bot_quota 1"来停用机器人。
  5. 控制台(en)输入指令"bind p screenshot"来将"屏幕截图(en)"指令绑定到一个按键上。这一点真的很重要,因为默认截图方式(F5截图)会产生一张压缩过的JPEG(en)格式图片而不是无损的TGA(en)格式图片。
  6. 控制台指令(en)"cl_drawhud 0""r_drawviewmodel 0"以及"hidepanel all"来去除HUD。
  7. 控制台指令(en)来去除一些无用的效果,例如天空盒("r_skybox 0"),烟雾("fog_override 1""fog_enable 0"),物体(optional: "r_drawstaticprops 0")及其他。
  8. 控制台(en)输入指令"noclip"来停用玩家碰撞,接着移动到一个能俯视全图的完美的位置。
  9. 控制台指令(en)"cl_leveloverview x"来切换到俯视模式(指令中的 x 指的是比例大小)。
  10. 控制台(en)输入指令"cl_leveloverviewmarker 1024"可以显示一条红色的辅助线,不过你需要在控制台(en)输入cl_drawhud 1来暂时重启HUD。将视角对好,然后记得关闭HUD
  11. 你可以在cl_leveloverview模式启用时自由移动,不过记住移动方向键将会把你带向与平时不同的方向。适应操作后,仔细调整镜头,注意地图的最右边不应该超出辅助红线,不然你会发现超出的部分在接下来的制作过程中会被整个砍掉。调整时你可以参考右边de_dust2的俯视图。
  12. 当前的镜头信息(位置和比例)都会在控制台中显示并实时更新,例如:"Overview: scale 6.00, pos_x -2651, pos_y 4027"。
  13. 当一切都接近完美之时,按下截图键(之前用控制台绑定的)并记下控制台显示的镜头信息,之后会用到。

你需要绑定的按键:

//俯视模式
//由The RaZZeR App提供代码
bind "o" "change_resolution; clear_view; clear_map; clear_game; record_config; radar_image";
bind "p" "screenshot";
alias "change_resolution" " mat_setvideomode 1280 1024 1;";
alias "clear_view" "sv_cheats 1; cl_drawhud 0; r_drawviewmodel 0; hidepanel all; net_graph 0;";
alias "clear_map" "bot_quota 1; bot_kick all; r_skybox 0; fog_override 1; fog_enable 0";
alias "clear_game" "mp_freezetime 0; mp_roundtime 9999; mp_roundtime_defuse 9999; mp_roundtime_hostage 9999; mp_roundtime_deployment 9999; mp_warmup_end;";
alias "record_config" "con_logfile overview_info.log;";
alias "radar_image" "noclip; cl_leveloverviewmarker 1024; cl_leveloverview 5";
Tip.png提示: 新建一个名叫overviewexec.cfg的文件(名称不重要)并把以上所有代码都复制黏贴进这个cfg文件,接着把这个文件放入csgo/cfg/ 并在控制台(en)输入指令"exec overviewexec"。

这些代码会把需要的控制台(en)信息输出至"csgo/overview_info.log"。 游戏分辨率也同时会被切换到窗口化的1280x1024 (4:3)。

建立.DDS文件

使用Photoshop

  1. 开启Photoshop并打开你在"%STEAMINSTALL%\SteamApps\common\Counter-Strike Global Offensive\csgo\screenshots"建立的.TGA格式文件("%STEAMINSTALL%"是你安装Steam的路径),默认是"C:\Program Files (x86)\Steam"
  2. 重新设置画布尺寸(图像 -> 画布尺寸),将长宽都设置为1024像素,并将锚点放置在左上角。
    PhotoshopScaleImage.PNG
  3. 在图层界面双击背景图层,一个"新建图层"的窗口会出现,点确定。
  4. 选中你想要在小地图中透明显示的部分并按下退格键。
  5. 有些人喜欢精心装饰一番他们的小地图,如果你也想,现在就搞定。
  6. 将图片另存为文件格式是D3D/DDS的.DDS文件(文件 -> 储存为),文件名应是你的地图名加上"_radar",例如(de_dust_radar.dds),最后将文件保存到"%STEAMINSTALL%\SteamApps\common\Counter-Strike Global Offensive\csgo\resource\overviews"
  7. 如图所示,当Intel Texture Works选项框出现后,把“Texture Type”和“Compression”中的选项从"Color"换成"Color + Alpha""BC1 4bpp(Linear)"# 换成"BC3 8bpp(Linear)"
    ITW dialog.jpeg
  8. 恭喜,属于你自己地图的.DDS文件已经被创建成功了!
Note.png注意:如果"储存为..." .DDS文件的选项并不可用或者没有出现,就说明你还没有下载对应的Photoshop插件。你可以在Intel的网站下载:Intel® Texture Works Plugin for Photoshop(NVIDIA的Photoshop插件已经很久没有更新了。)

使用GIMP

(本教程使用GIMP 2.6,但对GIMP 2.x应该也适用)

  1. GIMP DDS Plugin 2.0.2下载并安装GIMP。
  2. 启动GIMP并打开你在"%STEAMINSTALL%\SteamApps\common\Counter-Strike Global Offensive\csgo\screenshots"建立的.TGA格式文件("%STEAMINSTALL%"是你安装Steam的路径),默认是"C:\Program Files (x86)\Steam"
  3. 重新设置画布尺寸(图像 -> 画布尺寸),将长宽都设置为1024像素。
  4. 选中你想要在小地图中透明显示的部分并按下删除键。
  5. 有些人喜欢精心装饰一番他们的小地图,如果你也想,现在就搞定。
  6. 将图片另存为文件格式是D3D/DDS的.DDS文件(文件 -> 储存为),文件名应是你的地图名加上"_radar",例如(de_dust_radar.dds),最后将文件保存到"%STEAMINSTALL%\SteamApps\common\Counter-Strike Global Offensive\csgo\resource\overviews"
  7. 当DDS设置窗口出现时打开左上角的下拉菜单,把压缩设置从"无"设置成"BC1/DXT1"并点选"OK"
  8. 恭喜,属于你自己地图的.DDS文件已经被创建成功了!

建立俯视图代码文件

最后一步,在<game dir>\resource\overviews\创建一个名叫<你的地图名>.txt的.txt文件。此文件将用来定义俯视图所需要的种种数据,以下用地图de_vertigo作为例子:

需要输入的内容来自你在获取一张无损俯视图中第12步所获得的数据。

// HLTV overview description file for de_vertigo.bsp
"de_vertigo"
{
	"material"	"overviews/de_vertigo_radar"	// texture file
	"pos_x"		"-3168"				// X coordinate
	"pos_y"		"1762"				// Y coordinate
	"scale"		"4.0" 				// scale used when taking the screenshot
	"rotate"	"0"				// map was rotated by 90 degrees in image editor(en)
	"zoom"		"1.3"				// optimal zoom factor if map is shown in full size

	//loading screen icons and positions
	"CTSpawn_x"	"0.22"
 	"CTSpawn_y"	"0.73"
	"TSpawn_x"	"0.63"
	"TSpawn_y"	"0.10"

	"bombA_x"	"0.17"
	"bombA_y"	"0.78"
	"bombB_x"	"0.73"
	"bombB_y"	"0.68"

	"Hostage1_x"	"0.56"
	"Hostage1_y"	"0.83"
	"Hostage2_x"	"0.48"
	"Hostage2_y"	"0.64"
	"Hostage3_x"	"0.47"
	"Hostage3_y"	"0.78"
	"Hostage4_x"	"0.30"
	"Hostage4_y"	"0.88"
	"Hostage5_x"	"0.42"
	"Hostage5_y"	"0.86"
}

"pos_x"(红线)以及"pos_y"(绿线)符合Hammer中的X(左右)和Y(上下),降低比例会让雷达图看上去更大。

要搞清楚你需要在哪里放置载入界面中的标识图标(出生点和爆破区),你需要打开Photoshop并按下Ctrl+R以使用标尺工具(记住要使用百分比模式)得到准确坐标。

在文件中不要使用百分比符号,举个例子,31.12%应被写成0.31。

不同高度

自从野火行动更新后,雷达已可以显示多个高度。你需要截取多个不同高度的雷达图,并根据玩家所在高度来设置它们,参考新的de_nuke地图文件。

  • 你的地图名_lower_radar
  • 你的地图名_radar(这是普通高度)
  • 你的地图名_higher_radar

接着建立新的俯视图.txt文件。

"verticalsections"
{
	"default" // use the primary radar image
	{
		"AltitudeMax" "600"
		"AltitudeMin" "-500"
	}
	"lower" // lower radar file
	{
		"AltitudeMax" "-500"
		"AltitudeMin" "-10000"
	}
	"higher" // higher radar file
	{
		"AltitudeMax" "10000"
		"AltitudeMin" "600"
	}
}
  • 在控制台输入"cl_showpos 1"来检查当前高度。
  • 高/低.dds文件将不会被在上传到创意工坊时被自动上传,你需要手动打包它们。

总结

下面是一张游戏内的雷达截图,如果没出什么差错,你的成品就应该和下图差不多。

CSGO Example Radar.png

资源

无标识爆破区Bombsite clear.png 爆破区 A Bombsite a.png 爆破区 B Bombsite b.png

CT重生区标志 Ct.png T重生区标志 T.png 人质标志 Hostage.png

新T重生区标志 T spawn icon NEW.png

其他教程