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

 找回密码
 点一下
查看: 1073|回复: 4

war3 mod那样更改默认字体样式该怎么做?

[复制链接]
发表于 2020-4-1 10:28:09 | 显示全部楼层 |阅读模式
一个个改很烦。war3 mod里应该是一起改的怎么做到的呢?

 楼主| 发表于 2020-5-6 23:49:33 | 显示全部楼层
现在自己解决了。在物编的游戏UI数据里有个字体样式文件的字段。可以填自己导入的自定义的FontStyles.SC2Style的字体文件。

点评

大佬,字体文件怎么制作啊?  详情 回复 发表于 2020-5-17 15:03
回复

使用道具 举报

发表于 2020-5-17 15:03:27 | 显示全部楼层
Nostalie 发表于 2020-5-6 23:49
现在自己解决了。在物编的游戏UI数据里有个字体样式文件的字段。可以填自己导入的自定义的FontStyles.SC2St ...

大佬,字体文件怎么制作啊?
回复

使用道具 举报

 楼主| 发表于 2020-5-17 22:43:55 | 显示全部楼层
文件格式是XML。直接把core.mod(要用CascView查看)里的默认字体样式文件里想改的地方复制一下。然后改就行了。
比如像我这样(AllMaterials NEW\MapUI\HP.ttf是我自己导入的字体文件):
  1. <StyleFile>
  2.     <Constant name="BlizzardGlobal" val="AllMaterials NEW\MapUI\HP.ttf"/>
  3. <!-- Region: Font Groups -->
  4.     <FontGroup name="HeaderFontGroup">
  5.         <CodepointRange font="#BlizzardGlobal"/>
  6.         <CodepointRange font="AllMaterials NEW\MapUI\HP.ttf"/>
  7.     </FontGroup>

  8.     <FontGroup name="ExtHeaderFontGroup">
  9.         <CodepointRange font="#BlizzardGlobal"/>
  10.         <CodepointRange font="AllMaterials NEW\MapUI\HP.ttf"/>
  11.     </FontGroup>

  12.     <FontGroup name="StandardFontGroup">
  13.         <CodepointRange font="#BlizzardGlobal"/>
  14.         <CodepointRange font="AllMaterials NEW\MapUI\HP.ttf"/>
  15.     </FontGroup>

  16.     <FontGroup name="ExtStandardFontGroup">
  17.         <CodepointRange font="#BlizzardGlobal"/>
  18.         <CodepointRange font="AllMaterials NEW\MapUI\HP.ttf"/>
  19.     </FontGroup>
  20.     <FontGroup name="MonospaceFontGroup">
  21.         <CodepointRange font="#BlizzardGlobal"/>
  22.         <CodepointRange font="Courier.dfont"/>
  23.         <CodepointRange font="AllMaterials NEW\MapUI\HP.ttf"/>
  24.     </FontGroup>
  25.     <FontGroup name="WarcraftStandardFontGroup">
  26.         <CodepointRange font="#BlizzardGlobal"/>
  27.         <CodepointRange font="AllMaterials NEW\MapUI\HP.ttf"/>
  28.     </FontGroup>

  29.     <FontGroup name="WarcraftHeaderFontGroup">
  30.         <CodepointRange font="#BlizzardGlobal"/>
  31.         <CodepointRange font="AllMaterials NEW\MapUI\HP.ttf"/>
  32.     </FontGroup>
  33.     <Constant name="WarcraftHeader" val="WarcraftHeaderFontGroup"/>

  34.     <FontGroup name="DebugGlyphTypeFontGroup" requiredtoload="DEBUG">
  35.         <CodepointRange font="AllMaterials NEW\MapUI\HP.ttf" comment="Primary Font"/>
  36.     </FontGroup>
  37. <!-- EndRegion: Font Groups -->

  38. <!-- Region: Styles -->
  39.     <Style name="ResourcePanel" height="22"/>
  40.     <Style name="InternationalTemplate" font="AllMaterials NEW\MapUI\HP.ttf" styleflags="Shadow" shadowoffset="#ShadowOffsetNormal" height="24"/>
  41.     <Style name="CreditsLabel" template="InternationalTemplate"/>
  42.     <Style name="CreditsHeading" template="InternationalTemplate"/>
  43.     <Style name="LoadingCampaignText" template="StandardExtendedTemplate" font="AllMaterials NEW\MapUI\HP.ttf" height="30" vjustify="Top" hjustify="Left"/>
  44.     <Style name="LoadingHelpLabel" template="HeaderExtendedTemplate" height="30" vjustify="Bottom" hjustify="Center" textcolor="b7e3ff" styleflags="Shadow" shadowoffset="1"/>
  45.     <Style name="LoadingScreenBody" template="StandardTemplate" font="AllMaterials NEW\MapUI\HP.ttf" height="42" hjustify="Left" vjustify="Middle" textcolor="ffffff"/>
  46.     <Style name="ChatDisplay" template="InternationalTemplate" height="30" textcolor="#ColorWhite" hyperlinkcolor="#ColorChatHyperlink" vjustify="Middle" hjustify="Left"/>
  47. <!-- EndRegion: Styles -->


  48.     <Constant name="FontSizeTiny" val="15"/>
  49.     <Constant name="FontSizeSmall" val="24"/>
  50.     <Constant name="FontSizeMedium" val="32"/>
  51.     <Constant name="FontSizeLarge" val="48"/>
  52.     <Constant name="FontSizeVeryLarge" val="60"/>

  53. </StyleFile>
复制代码

回复

使用道具 举报

 楼主| 发表于 2020-5-17 22:53:56 | 显示全部楼层
本帖最后由 Nostalie 于 2020-5-17 23:25 编辑

效果就是。。。所有的字体都默认变成你导入的字体。甚至菜单,报错和UI查看器本身。都会。只有加载界面的文字不会。可能是因为还没读取。 2020-05-17.png
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-17 02:40 , Processed in 0.254488 second(s), 26 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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