王国风云2
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
帮助
译名手册
字词转换
编辑指南
编辑规范
练手沙盒
资助我们
ParaTranz
资助我们
×
欢迎访问王国风云2百科!
注册一个账号
,一起参与编写吧!这里是
当前的工程
。
全站已采用新UI,任何使用上的问题请点击
这里
。欢迎所有对百科感兴趣的同学加入QQ群:
497888338
。
阅读
查看源代码
查看历史
讨论
查看“小地图模组制作”的源代码
←
小地图模组制作
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{version|2.8}}[[File:Minimap.png|400px|thumb|right|The minimap and map modes]] You can mod the minimap, as well as all surrounding buttons. If your custom map is not the same size as the vanilla map, and as a result your minimap will have a different shape as well, then you may want to do some minimap modding. == minimap_area.dds == This file, located in Crusader Kings II\gfx\interface, is the image you see in the bottom right. Make your own. There are three other relevant files: * minimap_area_bg.dds - this is located behind the minimap image. You can make the image completely transparent, and ignore it. Otherwise it might just get in the way. * minimap_bg - this is the background (the "window") that appears around your minimap whenever you have the mapmode buttons hidden. If you mod your minimap menu so that it is no longer possible to hide the mapmode buttons, then you can ignore this file. * minimap_bg_big - this is the background you usually see. == main.gui == Located in Crusader Kings II\interface, this is the relevant file to position the minimap and everything around it. Copy the entire file to your mod directory. At the very top of your copied file you will find the following code: iconType = { name ="minimap_pic" spriteType = "GFX_minimap_area" position = { x=-259 y=-199 } Orientation = "LOWER_RIGHT" } # TODO: we should use a button instead for minimap... # or its own type, this is a ahck to deal with transparency # in the minimap icon positionType = { name = "minimap_size" position = { x=183 y=120 } } The iconType block does not matter at all! Any changes are ignored by the game, however that does not mean it is wise to remove it. Just let it be as it is. The positionType block however affects your viewbox. If you change the position to match the size of your custom minimap image, then the viewbox will be able to go everywhere inside your minimap. If your image would be 183 by 180, it would be: position = { x=183 y=180 } Once that is done, the actual interface modding comes up. First scroll down to this part: ######################################## ######## MINIMAP AREA ############# ######################################## windowType = { name = "minimap" backGround ="" position = { x=-280 y=-248 } size = { x=256 y=125 } moveable = 0 dontRender = "" horizontalBorder = "" verticalBorder = "" fullScreen = no Orientation = "LOWER_RIGHT" The way the minimap window works is that everything around the minimap_area.dds image moves according to that image. So if you have a square minimap as opposed to the vanilla rectangle minimap, and want to move your minimap slightly up so that it fits within the background frame, then that means everything else needs to be rearranged as well. First off, change the size to match your image. For example, my image was 183 by 180, so I now have: size = { x=183 y=180 } You can move the minimap image itself around by changing the position. My 183 by 180 image had to be moved up 30 pixels. Thus the new y would be <small>-248 - 30 = -278</small>, which results in the following line: position = { x=-280 y=-278 } But if you load your game, everything around the minimap will be out of position! In addition to the background image (and the background image if the mapmode buttons are hidden), there are three buttons, five custom mapmode buttons and a window with all regular mapmode buttons. They all have code similar to the following: iconType = { name = "minimap_bg_big" spriteType = "GFX_minimap_bg_big" position = { x=0 y=-38 } Orientation = "UPPER_LEFT" } Adjust the position of this iconType, as well as the other ones, to match your new map position. The three buttons (toggle_mapmodes, minimap_lock, and minimap_toggle) can be "removed" by moving them out of the way. If you want to disable the hiding of the mapmode buttons, you can simply set the position of that button to be off screen, using some huge value for x or y: guiButtonType = { name = "toggle_mapmodes" position = { x = 3000 y = -100 } quadTextureSprite ="GFX_minimap_toggle_mapmodes" Orientation = "LOWER_RIGHT" pdx_tooltip = "SHOW_MAPMODES_TOGGLE" } You can also do the same with the custom mapmode buttons. Finally, the regular mapmode buttons themselves are located within a windowType block. If you want to keep the vanilla layout (two horizontal lines of buttons), you can simply change the position of the windowType to move all of the buttons. If you want to change the layout (for example, to two vertical lines), the position of the individual buttons must be adjusted. Once all this is done, your minimap and its surrounding buttons are ready! ==See also== * [[Interface modding]] * [[Map modding]], for making custom maps {{ModdingNavbox}} [[Category:Map modding|#]] [[Category:Modding]]
本页使用的模板:
Template:Clear
(
查看源代码
)
Template:ModdingNavbox
(
查看源代码
)
Template:Navbox
(
查看源代码
)
Template:Navboxgroup
(
查看源代码
)
Template:Version
(
查看源代码
)
返回
小地图模组制作
。
×
登录
密码
记住登录
加入王国风云2百科
忘记密码?
其他方式登录