游戏内更改视角
3.2版本: 3.0的版本教程错误,两个双引号里面包括了另外两个双引号,会导致xml文件语法错误。目前已修复,将双引号改成xml转义字符"。另外,如果你想让文件好看一点,改成单引号' 也是可以的。一句话来说就是双引号里面不能有双引号,单引号里面不能有单引号。
BUG反馈者:Pnёce(QQ156083611)
2.2及之前的版本没有任何问题,因为那个是用word文档自动生成的,但是效果摆在眼前,比手工编写的3.0版本差了10倍左右。
如截图所示,这个修改可以在游戏内自由变换视角。
方法:1.随便找一个UI文件,我选的是uiunitselectionmin.xml(最少化界面)与uiunitselection.xml(普通界面),这两个文件是最合适添加类似截图的按钮,或者在uimainnew.xml添加也可以,然后按照格式添加下列语句:
<gadget name="background1" type="gadget" size1024="620 0 730 27" z="5" background="ui\ingame\ingame_ui_postgame_topbar_ends"/> <gadget name="background3" type="gadget" size1024="730 0 810 27" z="5" background="ui\ingame\ingame_ui_postgame_topbar_ends"/> <gadget name="background2" type="gadget" size1024="810 0 890 27" z="5" background="ui\ingame\ingame_ui_postgame_topbar_ends"/> <!--上面那三个只是背景边框图片-->
<!--下面的是视角高度设定--> <!--中间的configSetInt("minZoom",10) cameraRotate() cameraRotate() 是命令.--> <!-- 命令表的命令:configSetInt(<stringName>,<integerValue>): sets a config var to an integer value--> <!-- configSetInt("minZoom",视角高度) --> <!--视角高度默认值为50,数值大于50能缩小地图增大视角,例如第一张截图为140的视角高度。--> <!--当数值小于50时,视角高度保持在50,但能通过鼠标放大,达到超近距离,甚至能到地面之下。--> <!--最右边的绿色数字是类似图片的显示值--> <gadget name="SetZoomOut1" type="textField" scrollvert="" size1024="622 1 675 25" tooltiptext="Set Zoom." textcolor="0 0 0" textfont="Arial nobold nodrop" textfontsize="12"> <dropdown command="configSetInt("minZoom",0) cameraRotate() cameraRotate()">0 </dropdown> <dropdown command="configSetInt("minZoom",5) cameraRotate() cameraRotate()">5 </dropdown> <dropdown command="configSetInt("minZoom",10) cameraRotate() cameraRotate() ">10 </dropdown> <dropdown command="configSetInt("minZoom",20) cameraRotate() cameraRotate()">20 </dropdown> <dropdown command="configSetInt("minZoom",29) cameraRotate() cameraRotate()">29 </dropdown> <dropdown command="configSetInt("minZoom",40) cameraRotate() cameraRotate()">40</dropdown> <dropdown command="configSetInt("minZoom",50) cameraRotate() cameraRotate()">50</dropdown> <dropdown command="configSetInt("minZoom",65) cameraRotate() cameraRotate()">65</dropdown> <dropdown command="configSetInt("minZoom",70) cameraRotate() cameraRotate()">70</dropdown> <dropdown command="configSetInt("minZoom",80) cameraRotate() cameraRotate()">80</dropdown> <dropdown command="configSetInt("minZoom",90) cameraRotate() cameraRotate()">90</dropdown> <dropdown command="configSetInt("minZoom",100) cameraRotate() cameraRotate()">100</dropdown> <dropdown command="configSetInt("minZoom",110) cameraRotate() cameraRotate()">110</dropdown> <dropdown command="configSetInt("minZoom",120) cameraRotate() cameraRotate()">120</dropdown> <dropdown command="configSetInt("minZoom",130) cameraRotate() cameraRotate()">130</dropdown> <dropdown command="configSetInt("minZoom",140) cameraRotate() cameraRotate()">140</dropdown> </gadget>
<!--
觉得视角高度设定为5还不够,想多设定几个?
某人:大神,在吗?能不能多设定几个视角高度,只是放大到5还不够,能不能增加4,3,2,1的视角?
大佬:这是方法!@#$%^$#@#$%^%$#$%^&%$#$%^&
某人:不会,能不能帮我改一下
大佬:这么简单,照着方法、截图做就行了。
某人:太难了,你就帮帮我呗。
大佬:请问你是猪吗?这么简单还不会,修改的重点在截图全部都有。
某人:你以为人人都像你那样是大神啊?
大佬:是啊,你以为人人都像你那样是猪啊?直接复制几个语句保存就完事了。
请问复制粘贴几个语句改几个数字很困难吗?我想问你是真不懂还是假不懂,还是不想自己做。 <dropdown command="configSetInt("minZoom",1) cameraRotate() cameraRotate()">1</dropdown> <dropdown command="configSetInt("minZoom",2) cameraRotate() cameraRotate()">2</dropdown> <dropdown command="configSetInt("minZoom",3) cameraRotate() cameraRotate()">3</dropdown> <dropdown command="configSetInt("minZoom",4) cameraRotate() cameraRotate()">4</dropdown> -->
<!--configSetInt("limitPitch",视角角度)--> <!--视角高度1-15为第一视角,47为游戏默认视角,90垂直视角 -->
<gadget name="andPitch1" type="textField" scrollvert="" size1024="675 1 728 25" tooltiptext="Set Pitch." textcolor="0 0 0" textfont="Arial nobold nodrop" textfontsize="12"> <dropdown command="configSetInt("limitPitch",1) cameraRotate() cameraRotate()">1</dropdown> <dropdown command="configSetInt("limitPitch",2) cameraRotate() cameraRotate()">2</dropdown> <dropdown command="configSetInt("limitPitch",3) cameraRotate() cameraRotate()">3</dropdown> <dropdown command="configSetInt("limitPitch",4) cameraRotate() cameraRotate()">4</dropdown> <dropdown command="configSetInt("limitPitch",5) cameraRotate() cameraRotate()">5</dropdown> <dropdown command="configSetInt("limitPitch",6) cameraRotate() cameraRotate()">6</dropdown> <dropdown command="configSetInt("limitPitch",7) configSetInt("minZoom",40) cameraRotate() cameraRotate()">7</dropdown> <dropdown command="configSetInt("limitPitch",8) configSetInt("minZoom",40) cameraRotate() cameraRotate()">8</dropdown> <dropdown command="configSetInt("limitPitch",10) configSetInt("minZoom",30) cameraRotate() cameraRotate()">10</dropdown> <dropdown command="configSetInt("limitPitch",12) configSetInt("minZoom",30) cameraRotate() cameraRotate()">12</dropdown> <dropdown command="configSetInt("limitPitch",15) configSetInt("minZoom",30) cameraRotate() cameraRotate()">15</dropdown> <dropdown command="configSetInt("limitPitch",20) configSetInt("minZoom",30) cameraRotate() cameraRotate()">20</dropdown> <dropdown command="configSetInt("limitPitch",25) cameraRotate() cameraRotate()">25</dropdown> <dropdown command="configSetInt("limitPitch",30) cameraRotate() cameraRotate()">30</dropdown> <dropdown command="configSetInt("limitPitch",35) cameraRotate() cameraRotate()">35</dropdown> <dropdown command="configSetInt("limitPitch",40) cameraRotate() cameraRotate()">40</dropdown> <dropdown command="configSetInt("limitPitch",47) cameraRotate() cameraRotate()">47</dropdown> <dropdown command="configSetInt("limitPitch",50) cameraRotate() cameraRotate()">50</dropdown> <dropdown command="configSetInt("limitPitch",55) cameraRotate() cameraRotate()">55</dropdown> <dropdown command="configSetInt("limitPitch",60) cameraRotate() cameraRotate()">60</dropdown> <dropdown command="configSetInt("limitPitch",70) cameraRotate() cameraRotate()">70</dropdown> <dropdown command="configSetInt("limitPitch",80) cameraRotate() cameraRotate()">80</dropdown> <dropdown command="configSetInt("limitPitch",90) cameraRotate() cameraRotate()">90</dropdown> <dropdown command="configSetInt("limitPitch",100) cameraRotate() cameraRotate()">100</dropdown> <dropdown command="configSetInt("limitPitch",120) cameraRotate() cameraRotate()">120</dropdown> <dropdown command="configSetInt("limitPitch",135) cameraRotate() cameraRotate()">135</dropdown> <dropdown command="configSetInt("limitPitch",150) cameraRotate() cameraRotate()">150</dropdown> <dropdown command="configSetInt("limitPitch",175) cameraRotate() cameraRotate()">175</dropdown> </gadget>
<!--恢复默认视角的按钮:--> <!--textfont="字体设定"--> <!--textcolor="255 255 255"【文字RGB颜色】--> <!--textfontsize="10"【字体大小,不能随意设定,实际上是调用FONTS文件夹里面的fonts3.xml设定的字体大小】--> <!--mouseovertext="$$"-->
<gadget name="normalPitch1" type="stateButton" size1024="730 0 810 26" bevelbutton="" z="10" statebuttonuseinternalstates="" textfont="SmallButtonFont" textfontsize="10" textcolor="255 255 255" texturecoords="0 0 0.826771653543307 0.67741935483871" textcenterhoriz="" mouseovertext="Set Normal Pitch"> $$ Pitch <command>configSetInt("limitPitch",47) configSetInt("minZoom",29) cameraRotate() cameraRotate()</command> <stateentry background="ui\ingame\button"/> <stateentry background="ui\ingame\button_clicked"/> <stateentry background="ui\ingame\button_rollover"/> <stateentry background="ui\ingame\button_disable"/> </gadget>
如果要复制语句,直接复制下面的红色语句吧
uiunitselectionmin.xml - 记事本
____
□
X
文件(F) 编辑(E) 格式(O) 查看(V) 帮助(H)
<!-- converted from XMB to XML -->
<layout> <gadget name="unitselectionpanel" type="unitselectionpanel" size1024="342 629 700 768" z="105"> <gadget name="unitselectionpanel-showCommands" type="button" size1024="674 641 701 696" z="125" foreground="" mouseovertext="$$42185$ Commands"> <command>uiShowCommandPanel()</command> </gadget> <gadget name="unitselectionpanel-showStats" type="button" size1024="674 702 701 757" z="125" foreground="" mouseovertext="$$42184$ Information"> <command>uiShowStatPanel()</command> </gadget> <gadget name="unitselectionpanel-unit" type="gadget" background="ui\ingame\ingame_ui_small_02_ypack" size1024="342 628 700 768" z="105" texturecoords="0 0 0.6875 0.26953125"> <gadget name="unitselectionpanel-unitPortrait" type="button" background="" size1024="342 698 412 768" z="106"/> <gadget name="unitselectionpanel-unitTypeName" type="formatText" textwrapon="" textcenterhoriz="" texttruecentervert="" background="" transparent="" textcolor="255 255 255" textfont="SmallIngame" textfontsize="12" size1024="348 650 516 714" z="107"/> <gadget name="unitselectionpanel-unitPlayerName" type="formatText" textwrapon="" textcenterhoriz="" texttruecentervert="" background="" transparent="" textcolor="255 255 255" textfont="ScoreFont" textfontsize="12" size1024="520 650 700 714" z="107"/> <gadget name="unitselectionpanel-unitHitPointsLabel" type="formatText" textwrapon="" texttruecentervert="" background="" transparent="" textcolor="255 255 255" textfont="StatText" textfontsize="10" size1024="410 680 578 734" z="107"/> <gadget name="unitselectionpanel-unitHitPointsValue" type="formatText" textwrapon="" texttruecentervert="" background="" transparent="" textcolor="255 255 255" textfont="StatText" textfontsize="10" size1024="507 680 580 734" z="107"/> <gadget name="unitselectionpanel-unitResistsLabel" type="formatText" texttruecentervert="" textcolor="255 255 255" textfont="StatText" textfontsize="10" size1024="583 700 695 714" z="107"/> <gadget name="unitselectionpanel-unitResistsValue" type="formatText" texttruecentervert="" textmarkup="" formattextusedatareplace="" textcolor="255 255 255" textfont="StatText" textfontsize="10" size1024="638 700 695 714" z="107"/> <gadget name="unitselectionpanel-unitResourceLabel" type="formatText" size1024="410 714 543 734" texttruecentervert="" textmarkup="" formattextusedatareplace="" textwrapon="" textfont="StatText" textfontsize="10" z="107"/> <gadget name="unitselectionpanel-unitResourceValue" type="formatText" size1024="507 714 695 734" texttruecentervert="" textmarkup="" formattextusedatareplace="" textwrapon="" textfont="StatText" textfontsize="10" z="107"/> <gadget name="unitselectionpanel-unitResourceRateLabel" type="formatText" size1024="583 714 700 734" texttruecentervert="" textmarkup="" formattextusedatareplace="" textwrapon="" textfont="StatText" textfontsize="10" z="107"/> <gadget name="unitselectionpanel-unitResourceRateValue" type="formatText" size1024="653 714 700 734" texttruecentervert="" textmarkup="" formattextusedatareplace="" textwrapon="" textfont="StatText" textfontsize="10" z="107"/> <gadget name="unitselectionpanel-StackLabel0" type="formatText" size1024="410 714 703 734" texttruecentervert="" textmarkup="" formattextusedatareplace="" textwrapon="" textfont="StatText" textfontsize="10" z="107"/> <gadget name="unitselectionpanel-StackLabel1" type="formatText" size1024="410 731 703 751" texttruecentervert="" textmarkup="" formattextusedatareplace="" textcentervert="" textfont="StatText" textfontsize="10" z="107"/> <gadget name="unitselectionpanel-StackLabel2" type="formatText" size1024="410 747 703 767" texttruecentervert="" textmarkup="" formattextusedatareplace="" textcentervert="" textfont="StatText" textfontsize="10" z="107"/> <gadget name="unitselectionpanel-unitPortraitCountBackground" type="gadget" background="ui\ingame\ingame_ui_small_02_ypack" transparent="" size1024="429 727 461 759" z="107" texturecoords="0.861328125 0.62890625 0.923828125 0.69140625"/> <gadget name="unitselectionpanel-unitPortraitCount" textfont="TimerDisplays" textfontsize="16" type="formatText" formattextbottomfill="" textjustifyright="" transparent="" textcolor="255 255 255" size1024="430 737 460 757" z="108"/> </gadget> <gadget name="unitselectionpanel-stackQueue" type="gadget" size1024="361 631 615 665" z="107"> <gadget name="unitselectionpanel-buttonArea" type="gadget" size1024="369 632 607 666" z="107"/> <gadget name="unitselectionpanel-unitStackButton0" textfont="TimerDisplays" textfontsize="12" type="button" size1024="371 641 395 665" z="108" activateondown=""/> <gadget name="unitselectionpanel-unitStackButton1" textfont="TimerDisplays" textfontsize="12" type="button" size1024="371 641 395 665" z="108" activateondown=""/> <gadget name="unitselectionpanel-unitStackButton2" textfont="TimerDisplays" textfontsize="12" type="button" size1024="371 641 395 665" z="108" activateondown=""/> <gadget name="unitselectionpanel-unitStackButton3" textfont="TimerDisplays" textfontsize="12" type="button" size1024="371 641 395 665" z="108" activateondown=""/> <gadget name="unitselectionpanel-unitStackButton4" textfont="TimerDisplays" textfontsize="12" type="button" size1024="371 641 395 665" z="108" activateondown=""/> <gadget name="unitselectionpanel-unitStackButton5" textfont="TimerDisplays" textfontsize="12" type="button" size1024="371 641 395 665" z="108" activateondown=""/> <gadget name="unitselectionpanel-unitStackButton6" textfont="TimerDisplays" textfontsize="12" type="button" size1024="371 641 395 665" z="108" activateondown=""/> <gadget name="unitselectionpanel-unitStackButton7" textfont="TimerDisplays" textfontsize="12" type="button" size1024="371 641 395 665" z="108" activateondown=""/> <gadget name="unitselectionpanel-unitStackButton8" textfont="TimerDisplays" textfontsize="12" type="button" size1024="371 641 395 665" z="108" activateondown=""/> <gadget name="unitselectionpanel-unitStackButtonBig0" textfont="TimerDisplays" textfontsize="12" type="button" size1024="371 633 403 665" z="108" activateondown=""/> <gadget name="unitselectionpanel-unitStackButtonBigBackground" type="gadget" size1024="369 631 405 667" z="107" activateondown="" background="ui\ingame\ingame_ui_small_02_ypack" texturecoords="0.857421875 0.72265625 0.927734375 0.79296875"/> </gadget> <gadget name="background1" type="gadget" size1024="620 0 730 27" z="5" background="ui\ingame\ingame_ui_postgame_topbar_ends"/> <gadget name="background3" type="gadget" size1024="730 0 810 27" z="5" background="ui\ingame\ingame_ui_postgame_topbar_ends"/> <gadget name="background2" type="gadget" size1024="810 0 890 27" z="5" background="ui\ingame\ingame_ui_postgame_topbar_ends"/> <gadget name="SetZoomOut1" type="textField" scrollvert="" size1024="622 1 675 25" tooltiptext="Set Zoom." textcolor="0 0 0" textfont="Arial nobold nodrop" textfontsize="12"> <dropdown command="configSetInt("minZoom",0) cameraRotate() cameraRotate()">0</dropdown> <dropdown command="configSetInt("minZoom",1) cameraRotate() cameraRotate()">1</dropdown> <dropdown command="configSetInt("minZoom",2) cameraRotate() cameraRotate()">2</dropdown> <dropdown command="configSetInt("minZoom",3) cameraRotate() cameraRotate()">3</dropdown> <dropdown command="configSetInt("minZoom",4) cameraRotate() cameraRotate()">4</dropdown> <dropdown command="configSetInt("minZoom",5) cameraRotate() cameraRotate()">5</dropdown> <dropdown command="configSetInt("minZoom",10) cameraRotate() cameraRotate()">10</dropdown> <dropdown command="configSetInt("minZoom",20) cameraRotate() cameraRotate()">20</dropdown> <dropdown command="configSetInt("minZoom",29) cameraRotate() cameraRotate()">29</dropdown> <dropdown command="configSetInt("minZoom",40) cameraRotate() cameraRotate()">40</dropdown> <dropdown command="configSetInt("minZoom",50) cameraRotate() cameraRotate()">50</dropdown> <dropdown command="configSetInt("minZoom",65) cameraRotate() cameraRotate()">65</dropdown> <dropdown command="configSetInt("minZoom",70) cameraRotate() cameraRotate()">70</dropdown> <dropdown command="configSetInt("minZoom",80) cameraRotate() cameraRotate()">80</dropdown> <dropdown command="configSetInt("minZoom",90) cameraRotate() cameraRotate()">90</dropdown> <dropdown command="configSetInt("minZoom",100) cameraRotate() cameraRotate()">100</dropdown> <dropdown command="configSetInt("minZoom",110) cameraRotate() cameraRotate()">110</dropdown> <dropdown command="configSetInt("minZoom",120) cameraRotate() cameraRotate()">120</dropdown> <dropdown command="configSetInt("minZoom",130) cameraRotate() cameraRotate()">130</dropdown> <dropdown command="configSetInt("minZoom",140) cameraRotate() cameraRotate()">140</dropdown> </gadget> <gadget name="andPitch1" type="textField" scrollvert="" size1024="675 1 728 25" tooltiptext="Set Pitch." textcolor="0 0 0" textfont="Arial nobold nodrop" textfontsize="12"> <dropdown command="configSetInt("limitPitch",1) cameraRotate() cameraRotate()">1</dropdown> <dropdown command="configSetInt("limitPitch",2) cameraRotate() cameraRotate()">2</dropdown> <dropdown command="configSetInt("limitPitch",3) cameraRotate() cameraRotate()">3</dropdown> <dropdown command="configSetInt("limitPitch",4) cameraRotate() cameraRotate()">4</dropdown> <dropdown command="configSetInt("limitPitch",5) cameraRotate() cameraRotate()">5</dropdown> <dropdown command="configSetInt("limitPitch",6) cameraRotate() cameraRotate()">6</dropdown> <dropdown command="configSetInt("limitPitch",7) configSetInt("minZoom",40) cameraRotate() cameraRotate()">7</dropdown> <dropdown command="configSetInt("limitPitch",8) configSetInt("minZoom",40) cameraRotate() cameraRotate()">8</dropdown> <dropdown command="configSetInt("limitPitch",10) configSetInt("minZoom",30) cameraRotate() cameraRotate()">10</dropdown> <dropdown command="configSetInt("limitPitch",12) configSetInt("minZoom",30) cameraRotate() cameraRotate()">12</dropdown> <dropdown command="configSetInt("limitPitch",15) configSetInt("minZoom",30) cameraRotate() cameraRotate()">15</dropdown> <dropdown command="configSetInt("limitPitch",20) configSetInt("minZoom",30) cameraRotate() cameraRotate()">20</dropdown> <dropdown command="configSetInt("limitPitch",25) cameraRotate() cameraRotate()">25</dropdown> <dropdown command="configSetInt("limitPitch",30) cameraRotate() cameraRotate()">30</dropdown> <dropdown command="configSetInt("limitPitch",35) cameraRotate() cameraRotate()">35</dropdown> <dropdown command="configSetInt("limitPitch",40) cameraRotate() cameraRotate()">40</dropdown> <dropdown command="configSetInt("limitPitch",47) cameraRotate() cameraRotate()">47</dropdown> <dropdown command="configSetInt("limitPitch",50) cameraRotate() cameraRotate()">50</dropdown> <dropdown command="configSetInt("limitPitch",55) cameraRotate() cameraRotate()">55</dropdown> <dropdown command="configSetInt("limitPitch",60) cameraRotate() cameraRotate()">60</dropdown> <dropdown command="configSetInt("limitPitch",70) cameraRotate() cameraRotate()">70</dropdown> <dropdown command="configSetInt("limitPitch",80) cameraRotate() cameraRotate()">80</dropdown> <dropdown command="configSetInt("limitPitch",90) cameraRotate() cameraRotate()">90</dropdown> <dropdown command="configSetInt("limitPitch",100) cameraRotate() cameraRotate()">100</dropdown> <dropdown command="configSetInt("limitPitch",120) cameraRotate() cameraRotate()">120</dropdown> <dropdown command="configSetInt("limitPitch",135) cameraRotate() cameraRotate()">135</dropdown> <dropdown command="configSetInt("limitPitch",150) cameraRotate() cameraRotate()">150</dropdown> <dropdown command="configSetInt("limitPitch",175) cameraRotate() cameraRotate()">175</dropdown> </gadget> <gadget name="normalPitch1" type="stateButton" size1024="730 0 810 26" bevelbutton="" z="10" statebuttonuseinternalstates="" textfont="SmallButtonFont" textfontsize="10" textcolor="255 255 255" texturecoords="0 0 0.826771653543307 0.67741935483871" textcenterhoriz="" mouseovertext="Set Normal Pitch"> Normal Pitch <command>configSetInt("limitPitch",47) configSetInt("minZoom",29) cameraRotate() cameraRotate()</command> <stateentry background="ui\ingame\button"/> <stateentry background="ui\ingame\button_clicked"/> <stateentry background="ui\ingame\button_rollover"/> <stateentry background="ui\ingame\button_disable"/> </gadget> </gadget> </layout>