Nostalie 发表于 2020-4-1 10:28:09

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

一个个改很烦。war3 mod里应该是一起改的怎么做到的呢?

Nostalie 发表于 2020-5-6 23:49:33

现在自己解决了。在物编的游戏UI数据里有个字体样式文件的字段。可以填自己导入的自定义的FontStyles.SC2Style的字体文件。

lettle 发表于 2020-5-17 15:03:27

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

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

Nostalie 发表于 2020-5-17 22:43:55

文件格式是XML。直接把core.mod(要用CascView查看)里的默认字体样式文件里想改的地方复制一下。然后改就行了。
比如像我这样(AllMaterials NEW\MapUI\HP.ttf是我自己导入的字体文件):
<StyleFile>
    <Constant name="BlizzardGlobal" val="AllMaterials NEW\MapUI\HP.ttf"/>
<!-- Region: Font Groups -->
    <FontGroup name="HeaderFontGroup">
      <CodepointRange font="#BlizzardGlobal"/>
      <CodepointRange font="AllMaterials NEW\MapUI\HP.ttf"/>
    </FontGroup>

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

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

    <FontGroup name="ExtStandardFontGroup">
      <CodepointRange font="#BlizzardGlobal"/>
      <CodepointRange font="AllMaterials NEW\MapUI\HP.ttf"/>
    </FontGroup>
    <FontGroup name="MonospaceFontGroup">
      <CodepointRange font="#BlizzardGlobal"/>
      <CodepointRange font="Courier.dfont"/>
      <CodepointRange font="AllMaterials NEW\MapUI\HP.ttf"/>
    </FontGroup>
    <FontGroup name="WarcraftStandardFontGroup">
      <CodepointRange font="#BlizzardGlobal"/>
      <CodepointRange font="AllMaterials NEW\MapUI\HP.ttf"/>
    </FontGroup>

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

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

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


    <Constant name="FontSizeTiny" val="15"/>
    <Constant name="FontSizeSmall" val="24"/>
    <Constant name="FontSizeMedium" val="32"/>
    <Constant name="FontSizeLarge" val="48"/>
    <Constant name="FontSizeVeryLarge" val="60"/>

</StyleFile>

Nostalie 发表于 2020-5-17 22:53:56

本帖最后由 Nostalie 于 2020-5-17 23:25 编辑

效果就是。。。所有的字体都默认变成你导入的字体。甚至菜单,报错和UI查看器本身。都会。只有加载界面的文字不会。可能是因为还没读取。https://imgchr.com/i/YRRKaV
页: [1]
查看完整版本: war3 mod那样更改默认字体样式该怎么做?