UDK多语言初探索

本来是要搞GFx,没想到编译了一下看到多语言解决似乎有点希望?除了Engine下的外,UDKGame打包出现以下内容(节选)

UTGame
Cooking package for Language: CHN
Couldn’t find localized resource EngineFonts_CHN.SmallFont
Couldn’t find localized resource A_Character_CorruptEnigma_CHN.Mean_Efforts.A_Effort_EnigmaMean_LandLarge03
Couldn’t find localized resource A_Character_CorruptEnigma_CHN.Mean_Efforts.A_Effort_EnigmaMean_LandLarge02
Couldn’t find localized resource A_Character_CorruptEnigma_CHN.Mean_Efforts.A_Effort_EnigmaMean_LandLarge01

………………省略一些无关紧要的内容…………

Couldn’t find localized resource UI_Fonts_CHN.MultiFonts.MF_MediumFont
Couldn’t find localized resource UI_Fonts_CHN.MultiFonts.MF_LargeFont
Couldn’t find localized resource UI_Fonts_CHN.MultiFonts.MF_HugeFont
Couldn’t find localized resource UI_Fonts_CHN.MultiFonts.MF_HudSmall
Couldn’t find localized resource UI_Fonts_CHN.MultiFonts.MF_HudMedium
Couldn’t find localized resource UI_Fonts_CHN.MultiFonts.MF_HudLarge
Couldn’t find localized resource UI_Fonts_CHN.MultiFonts.MF_HudHuge
Couldn’t find localized resource UI_Fonts_CHN.Fonts.UI_Fonts_Xbox18
Couldn’t find localized resource UI_Fonts_CHN.Fonts.UI_Fonts_Positec36
Couldn’t find localized resource UI_Fonts_CHN.Fonts.UI_Fonts_Positec18
Couldn’t find localized resource UI_Fonts_CHN.Fonts.UI_Fonts_Positec14
Couldn’t find localized resource UI_Fonts_CHN.Fonts.UI_Fonts_FoldOb36
Couldn’t find localized resource UI_Fonts_CHN.Fonts.UI_Fonts_FoldOb18
Couldn’t find localized resource UI_Fonts_CHN.Fonts.UI_Fonts_FoldOb14
Couldn’t find localized resource UI_Fonts_CHN.Fonts.UI_Fonts_Camo42Glow
Couldn’t find localized resource UI_Fonts_CHN.Fonts.UI_Fonts_Camo42
Couldn’t find localized resource UI_Fonts_CHN.Fonts.UI_Fonts_Camo24Glow
Couldn’t find localized resource UI_Fonts_CHN.Fonts.UI_Fonts_Camo24
Couldn’t find localized resource UI_Fonts_CHN.Fonts.UI_Fonts_AmbexThin18
Couldn’t find localized resource UI_Fonts_CHN.Fonts.UI_Fonts_AmbexHeavyOblique36
Couldn’t find localized resource UI_Fonts_CHN.Fonts.UI_Fonts_AmbexHeavyOblique18
Couldn’t find localized resource UI_Fonts_CHN.Fonts.UI_Fonts_AmbexHeavyOblique14
Couldn’t find localized resource UI_Fonts_CHN.Fonts.UI_Fonts_AmbexHeavy36
Couldn’t find localized resource UI_Fonts_CHN.Fonts.UI_Fonts_AmbexHeavy18
Couldn’t find localized resource UI_Fonts_CHN.Fonts.UI_Fonts_AmbexHeavy14
Couldn’t find localized resource UI_Fonts_CHN.Fonts.UI_FOnts_AmbexHeavy10
Couldn’t find localized resource UI_Fonts_Final_CHN.menus.Fonts_Positec
Couldn’t find localized resource UI_Fonts_Final_CHN.menus.Fonts_AmbexHeavyOblique
Couldn’t find localized resource UI_Fonts_Final_CHN.menus.Fonts_AmbexHeavy
Couldn’t find localized resource UI_Fonts_Final_CHN.HUD.MF_Small
Couldn’t find localized resource UI_Fonts_Final_CHN.HUD.MF_Medium
Couldn’t find localized resource UI_Fonts_Final_CHN.HUD.MF_Large
Couldn’t find localized resource UI_Fonts_Final_CHN.HUD.MF_Huge
Couldn’t find localized resource UI_Fonts_Final_CHN.menus.UI_Fonts_PS3
Couldn’t find localized resource UI_Fonts_Final_CHN.menus.UI_Fonts_Icons
Couldn’t find localized resource UI_Fonts_Final_CHN.HUD.F_GlowSecondary
Couldn’t find localized resource UI_Fonts_Final_CHN.HUD.F_GlowPrimary
Couldn’t find localized resource EngineFonts_CHN.TinyFont
No resources found, not saving ….UDKGameCookedPCStartup_LOC_CHN.upk
TagCookedStartupObjects> Using current PersistentCookerData…

上边一长串表明了几个不存在的文件,似乎给多语言带来了希望。

另外在Localization下建立一个CHN目录不知道会不会读取,GFxUI.CHN读取字体部分更改为:

[FontLib]
FontLib=UDKFonts_CHN.fonts_chn
FontLib=UDKFonts_CHN.gfxfontlib_chn

[Fonts]
NormalFont=Microsoft YaHei
BoldFont=SimHei
SmallFont=Microsoft YaHei
TitleFont=Microsoft YaHei,Bold

把UDKEngine.ini的选项Language修改为CHN后运行游戏后,进入地图界面果然被预料到了!因缺少字符全部显示为口,退出后查看log,显示重点内容如下:

[0016.85] Warning: Warning, Failed to load ‘SwfMovie UDKFonts_CHN.fonts_chn’: Failed to find object ‘SwfMovie UDKFonts_CHN.fonts_chn’
[0016.85] Warning: Warning, Failed to load ‘SwfMovie UDKFonts_CHN.fonts_chn’: Failed to find object ‘SwfMovie UDKFonts_CHN.fonts_chn’
[0016.85] Log: GFx attempted to load missing object [UDKFonts_CHN.fonts_chn]
[0016.85] Log: FGFxEngine::LoadMovieDef Error – failed to get info about / package/UDKFonts_CHN/fonts_chn

[0016.85] Warning: Warning, Failed to load ‘SwfMovie UDKFonts_CHN.gfxfontlib_chn’: Failed to find object ‘SwfMovie UDKFonts_CHN.gfxfontlib_chn’
[0016.85] Warning: Warning, Failed to load ‘SwfMovie UDKFonts_CHN.gfxfontlib_chn’: Failed to find object ‘SwfMovie UDKFonts_CHN.gfxfontlib_chn’
[0016.85] Log: GFx attempted to load missing object [UDKFonts_CHN.gfxfontlib_chn]
[0016.85] Log: FGFxEngine::LoadMovieDef Error – failed to get info about / package/UDKFonts_CHN/gfxfontlib_chn

[0016.86] Warning: Warning, Failed to load ‘Font None.Microsoft YaHei’: Failed to find object ‘Font None.Microsoft YaHei’
[0016.86] Warning: Warning, Failed to load ‘Font None.Microsoft YaHei’: Failed to find object ‘Font None.Microsoft YaHei’

今天一些初步研究就是这些,下一步导入一些字体和建立Gfx界面。
祝自己好运吧!

啊,终于开了个人博客了!

程序是用Wordpress,因为第一次用,暂时还不太熟悉这个程序。主题什么的,先放一放吧,等有小空再制作一个。貌似这个程序的主题可塑性很强,等看了官方文档之后再看如何搞吧。

嗯,放个视频测试一下。

Lene Marlin – Another Day