请选择 进入手机版 | 继续访问电脑版

 找回密码
 点一下
查看: 1488|回复: 8

单位自定义边框 - 汇一下总

[复制链接]
发表于 2015-4-14 07:13:56 | 显示全部楼层 |阅读模式
本帖最后由 东方油瓶 于 2015-4-17 14:35 编辑

原文太乱,整理了一下
请新建依赖项为"虫群之心 - 战役"的地图

UI编辑器搜索 "UnitStatus"

以官方做法为例结合下文编辑出属于自己的单位状态条

状态条编辑好后使用方法:布局/框架名称   内容填到单位演算体的自定义框架之中
并在单位演算体状态条标旗中将除自定义外的勾选去掉即可。

2L - 常用模板

3L - 基本语法
 楼主| 发表于 2015-4-14 07:56:31 | 显示全部楼层
本帖最后由 东方油瓶 于 2015-4-14 09:44 编辑

  1. <?xml version="1.0" encoding="utf-8" standalone="yes"?>
  2. <Desc>
  3. *炮弹面板图片模板
  4. <!--  UnitStateBase  Ammo  -->
  5.     <!-- Ammo Image -->
  6.     <Frame type="Image" name="BaseImage_Ammo">
  7.         <Width val="48"/>
  8.         <Height val="48"/>
  9.         <RenderType val="HDR"/>
  10.         <LayerCount val="2"/>
  11.         <!--Texture val="@UI/PushUnitOff"/-->
  12.         <LayerColor val="255,255,255"/>
  13.         <!--Texture val="@UI/PushUnitOn" layer="1"/-->
  14.         <LayerColor val="255,255,255" layer="1"/>
  15.     </Frame>
  16. *炮弹面板模板
  17.     <!-- Ammo State(bar) -->
  18.     <Frame type="UnitStatusAmmo" name="BaseStatus_Ammo">
  19.         <Height val="48"/>
  20.         <Width val="192"/>
  21.         <Frame type="Image" name="AmmoImage1" template="MyUnitStatus/BaseImage_Ammo">
  22.             <Anchor side="Top" relative="$parent" pos="Min" offset="0"/>
  23.             <Anchor side="Left" relative="$parent" pos="Min" offset="0"/>
  24.         </Frame>
  25.         <Frame type="Image" name="AmmoImage2" template="MyUnitStatus/BaseImage_Ammo">
  26.             <Anchor side="Top" relative="$parent/AmmoImage1" pos="Min" offset="0"/>
  27.             <Anchor side="Left" relative="$parent/AmmoImage1" pos="Max" offset="0"/>
  28.         </Frame>
  29.         <Frame type="Image" name="AmmoImage3" template="MyUnitStatus/BaseImage_Ammo">
  30.             <Anchor side="Top" relative="$parent/AmmoImage2" pos="Min" offset="0"/>
  31.             <Anchor side="Left" relative="$parent/AmmoImage2" pos="Max" offset="0"/>
  32.         </Frame>
  33.         <Frame type="Image" name="AmmoImage4" template="MyUnitStatus/BaseImage_Ammo">
  34.             <Anchor side="Top" relative="$parent/AmmoImage3" pos="Min" offset="0"/>
  35.             <Anchor side="Left" relative="$parent/AmmoImage3" pos="Max" offset="0"/>
  36.         </Frame>
  37.     </Frame>

  38. <!--  UnitStateBase All (State Bar) Template  -->
  39. *总基础模板、供给单位生命、护盾、能量状态使用
  40.     <Frame type="UnitStatusBar" name="BaseStatusBar_All">
  41.         <Height val="12"/>
  42.         <Width val="80"/>
  43.         <BackgroundShown val="true"/>
  44.         <BackgroundColor val="64,64,64"/>
  45.         <BarInsetRect top="2" left="2" bottom="2" right="2"/>
  46.         <BackgroundInsetRect top="1" left="1" bottom="1" right="1"/>
  47.         <RenderType val="HDR"/>
  48.     </Frame>

  49. <!--  Health and Shields require Bar Template  -->
  50. *生命模板、生命护盾模板 所使用的基础模板
  51.     <Frame type="UnitStatusBar" name="BaseStatusBar_HealthBase" template="MyUnitStatus/BaseStatusBar_All">
  52.         <Texture val="ui_ingame_hotscampaign_unitstatus_healthbar.dds"/>
  53.         <OwnerColor val="0,255,0" index="0"/>
  54.         <AllyColor val="11,105,1" index="0"/>
  55.         <EnemyColor val="150,15,50" index="0"/>
  56.         <ReductionColor val="255,0,0" index="0"/>
  57.         <ReductionShown val="true" index="0"/>
  58.         <IncreaseDuration val="0" index="0"/>
  59.         <DecreaseDuration val="1000" index="0"/>
  60.     </Frame>

  61. <!--  UnitStateBase  Apply (State Bar) Template  -->
  62. *纯护盾模板
  63.     <!-- Shields Bar Templates -->
  64.     <Frame type="UnitStatusShieldsBar" name="BaseStatusBar_Shields" template="MyUnitStatus/BaseStatusBar_All">
  65.         <Texture val="ui_ingame_hotscampaign_unitstatus_healthbar.dds"/>
  66.         <OwnerColor val="34,90,194" index="0"/>
  67.         <AllyColor val="34,90,194" index="0"/>
  68.         <EnemyColor val="34,90,194" index="0"/>
  69.         <ReductionColor val="255,0,0" index="0"/>
  70.         <ReductionShown val="true" index="0"/>
  71.         <IncreaseDuration val="0" index="0"/>
  72.         <DecreaseDuration val="1000" index="0"/>
  73.     </Frame>
  74. *纯能量模板
  75.     <!-- Energy Bar Templates -->
  76.     <Frame type="UnitStatusEnergyBar" name="BaseStatusBar_Energy" template="MyUnitStatus/BaseStatusBar_All">
  77.         <Texture val="ui_ingame_hotscampaign_unitstatus_healthbar.dds"/>
  78.         <Height val="8"/>
  79.         <BarCount val="2"/>
  80.         <OwnerColor val="35,91,253" index="0"/>
  81.         <AllyColor val="35,91,253" index="0"/>
  82.         <EnemyColor val="35,91,253" index="0"/>
  83.     </Frame>
  84. *纯生命模板
  85.     <!-- Health Bar Templates -->
  86.     <Frame type="UnitStatusHealthBar" name="BaseStatusBar_Health" template="MyUnitStatus/BaseStatusBar_HealthBase">
  87.     </Frame>
  88. *生命包含护盾模板
  89.     <!-- ShieldHealth Bar Templates -->
  90.     <Frame type="UnitStatusShieldedHealthBar" name="BaseStatusBar_ShieldHealth" template="MyUnitStatus/BaseStatusBar_HealthBase">
  91.         <BarCount val="2"/>
  92.         <OwnerColor val="34,90,194" index="1"/>
  93.         <AllyColor val="34,90,194" index="1"/>
  94.         <EnemyColor val="34,90,194" index="1"/>
  95.         <ReductionColor val="34,90,194" index="1"/>
  96.         <ReductionShown val="true" index="1"/>
  97.         <IncreaseDuration val="0" index="1"/>
  98.         <DecreaseDuration val="1000" index="1"/>
  99.     </Frame>
  100. *训练、建造、施法等进度模板
  101.     <!-- Progress Bar Templates -->
  102.     <Frame type="UnitStatusProgressBar" name="BaseStatusBar_Progress" template="MyUnitStatus/BaseStatusBar_All">
  103.         <Height val="9"/>
  104.         <OwnerColor val="140,140,140" index="0"/>
  105.         <AllyColor val="140,140,140" index="0"/>
  106.         <EnemyColor val="140,140,140" index="0"/>
  107.     </Frame>
  108. *行为持续时间模板
  109.     <!-- Duration Bar Templates -->
  110.     <Frame type="UnitStatusDurationBar" name="BaseStatusBar_Duration" template="MyUnitStatus/BaseStatusBar_All">
  111.         <Height val="9"/>
  112.         <OwnerColor val="140,140,140" index="0"/>
  113.         <AllyColor val="140,140,140" index="0"/>
  114.         <EnemyColor val="140,140,140" index="0"/>
  115.     </Frame>
  116. *单位等级模板
  117.     <!-- Level Templates -->
  118.     <Frame type="UnitStatusLevel" name="BaseStatusBar_Level">
  119.         <Frame type="Label" name="Label">
  120.             <Anchor side="Top" relative="$parent" pos="Min" offset="0"/>
  121.             <Anchor side="Left" relative="$parent" pos="Min" offset="0"/>
  122.             <Anchor side="Bottom" relative="$parent" pos="Max" offset="0"/>
  123.             <Anchor side="Right" relative="$parent" pos="Max" offset="0"/>
  124.             <Style val="War3UnitStatusLevelLabel"/>
  125.             <RenderType val="HDR"/>
  126.             <RenderPriority val="600"/>
  127.         </Frame>
  128.     </Frame>
  129. *单位等级模板 - 拓展背景版本
  130.     <!-- Add background Image -->
  131.     <Frame type="UnitStatusLevel" name="BaseStatusBar_Level_Image" template="MyUnitStatus/BaseStatusBar_Level">
  132.         <Frame type="Image" name="LevelBackgroundImage">
  133.             <Anchor side="Top" relative="$parent" pos="Min" offset="10"/>
  134.             <Anchor side="Left" relative="$parent" pos="Min" offset="10"/>
  135.             <Height val="30"/>
  136.             <Width val="30"/>
  137.             <Texture val="Assets\Textures\ui_multiplayerload_avatarborder_levelbg.dds"/>
  138.             <RenderType val="HDR"/>
  139.         </Frame>
  140.     </Frame>
  141. *单位名称模板
  142.     <!-- Unit Name Templates -->
  143.     <Frame type="UnitStatusUnitName" name="BaseStatusBar_NameUnit">
  144.         <Frame type="Label" name="Label">
  145.             <Anchor side="Top" relative="$parent" pos="Min" offset="0"/>
  146.             <Anchor side="Left" relative="$parent" pos="Min" offset="0"/>
  147.             <Anchor side="Bottom" relative="$parent" pos="Max" offset="0"/>
  148.             <Anchor side="Right" relative="$parent" pos="Max" offset="0"/>
  149.             <Style val="War3UnitStatusNameLabel"/>
  150.             <RenderType val="HDR"/>
  151.         </Frame>
  152.     </Frame>
  153. *玩家名称模板
  154.     <!-- Player Name Templates -->
  155.     <Frame type="UnitStatusPlayerName" name="BaseStatusBar_NamePlayer">
  156.         <Frame type="Label" name="Label">
  157.             <Anchor side="Top" relative="$parent" pos="Min" offset="0"/>
  158.             <Anchor side="Left" relative="$parent" pos="Min" offset="0"/>
  159.             <Anchor side="Bottom" relative="$parent" pos="Max" offset="0"/>
  160.             <Anchor side="Right" relative="$parent" pos="Max" offset="0"/>
  161.             <Style val="War3PlayerStatusNameLabel"/>
  162.             <RenderType val="HDR"/>
  163.         </Frame>
  164.     </Frame>
  165. *记得把*以及后面的中文删掉
  166. </Desc>
复制代码
回复

使用道具 举报

 楼主| 发表于 2015-4-14 07:58:20 | 显示全部楼层
阿西吧,我终于会传代码了

那个一键生成真是坑啊...
回复

使用道具 举报

 楼主| 发表于 2015-4-14 08:16:21 | 显示全部楼层
本帖最后由 东方油瓶 于 2015-4-14 08:40 编辑


  1.         <!-- this is a very very long list -->
  2.         以下是一些语法列表, 目前我知道的所有用法了,如有不足多谢提醒.!
复制代码

       
        *对自己颜色、对盟友、对敌人、格式(红 绿 蓝)

  1.         <OwnerColor val="128,99,0" index="0"/>
  2.         <AllyColor val="128,99,0" index="0"/>
  3.         <EnemyColor val="128,99,0" index="0"/>
复制代码


        *值变化属性
        *值变化 - 变化颜色
        *值变化 - 开关
        *增值变化 - 持续时间
        *负值变化 - 持续时间

  1.         <ReductionColor val="255,0,0" index="0"/>
  2.         <ReductionShown val="true" index="0"/>
  3.         <IncreaseDuration val="0" index="0"/>
  4.         <DecreaseDuration val="1000" index="0"/>
复制代码
                  
                                                            
        *指定他的引索为2个
        *设置引索1的属性(相对于生命护盾共存条,这就是护盾部分)
        *设置引索0的属性(相对于生命护盾共存条,这就是生命部分)

  1.         <BarCount val="2"/>
  2.         <OwnerColor val="34,90,194" index="1"/>
  3.         <OwnerColor val="34,90,194" index="0"/>
复制代码


        *使用的图片
        *使用图片格式

  1.         <Texture val=""/>
  2.         <TextureType val=""/>
复制代码
  

        *渲染类型
        *渲染优先级

  1.         <RenderType val="HDR"/>
  2.         <RenderPriority val="520"/>
  3.   
  4.         *尺寸
  5. [code]
  6.         <Height val="50"/>
  7.         <Width val="224"/>
复制代码


        *whosyourdaddy

  1.         <CollapseLayout val="true"/>
复制代码


        *段值 - 是否开启
        *段值 - 多少数量为一段, 100血一段填100

  1.         <Segmented val="true" index="0"/>
  2.         <SegmentValue val="50" index="0"/>
复制代码


        *文本类框架使用的字体样式

  1.         <Style val="War3UnitStatusLevelLabel"/>
复制代码

                              
        * 自己优先级
        * 盟友
        * 敌人
        *作用表述:如果不同的血条撞一起,血条覆盖方式

  1.         <OwnerRenderPriority val="812"/>
  2.         <AllyRenderPriority val="712"/>
  3.         <EnemyRenderPriority val="612">
  4.         *以上表述:自己盖盟友,盟友盖敌人
复制代码
回复

使用道具 举报

发表于 2015-12-21 15:20:20 | 显示全部楼层
好复杂
回复

使用道具 举报

发表于 2015-12-21 20:14:22 | 显示全部楼层
呦,这东西好呀。省很多事呀。
回复

使用道具 举报

发表于 2015-12-25 23:44:17 | 显示全部楼层
这个显示玩家名 怎么没效果?怎么使用?
*玩家名称模板
    <!-- Player Name Templates -->
    <Frame type="UnitStatusPlayerName" name="BaseStatusBar_NamePlayer">
        <Frame type="Label" name="Label">
            <Anchor side="Top" relative="$parent" pos="Min" offset="0"/>
            <Anchor side="Left" relative="$parent" pos="Min" offset="0"/>
            <Anchor side="Bottom" relative="$parent" pos="Max" offset="0"/>
            <Anchor side="Right" relative="$parent" pos="Max" offset="0"/>
            <Style val="War3PlayerStatusNameLabel"/>
            <RenderType val="HDR"/>
        </Frame>
    </Frame>
回复

使用道具 举报

发表于 2015-12-25 23:44:41 | 显示全部楼层
这个显示玩家名怎么没效果?
*玩家名称模板
    <!-- Player Name Templates -->
    <Frame type="UnitStatusPlayerName" name="BaseStatusBar_NamePlayer">
        <Frame type="Label" name="Label">
            <Anchor side="Top" relative="$parent" pos="Min" offset="0"/>
            <Anchor side="Left" relative="$parent" pos="Min" offset="0"/>
            <Anchor side="Bottom" relative="$parent" pos="Max" offset="0"/>
            <Anchor side="Right" relative="$parent" pos="Max" offset="0"/>
            <Style val="War3PlayerStatusNameLabel"/>
            <RenderType val="HDR"/>
        </Frame>
    </Frame>
回复

使用道具 举报

发表于 2015-12-25 23:46:22 | 显示全部楼层
这个怎么显示玩家名?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-3-29 14:18 , Processed in 0.124285 second(s), 23 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表