群星
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
阅读
编辑
编辑源代码
查看历史
讨论
编辑“
Flag modding
”
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
{{version|3.1}} == Editing empire flags == In a new game screen, using graphical interface, editing flag of an empire is easy, but to code this flag in .txt files – using default Paradox flag emblems, patterns and colors – you need to know code names for all those elements. This guide should make this task considerably easier. === Code from 00_prescripted_countries.txt === <syntaxhighlight lang="PHP"> empire_flag = { icon = { category = "spherical" file = "flag_spherical_21.dds" } background = { category = "backgrounds" file = "pattern_01.dds" } colors = { "turquoise" "indigo" "null" "null" } } </syntaxhighlight> That’s the question: how are you supposed to know what emblems is <code>"spherical_21"</code> or, if you are like the creator of this guide, how turquoise color looks like? This page lists code for all those things. All following flag symbols are encoded as <code>"flag_category_number.dds"</code> except Domination emblems which are simply coded as <code>"domination_number.dds"</code>. === Flag colors === [[File:Flag colors reference.png|frameless|center]] : An actual list of colours can be found at: <code>./flags/colors.txt</code> === Flag backgrounds and emblems === <gallery> Reference - backgrounds.png|Flag backgrounds Reference - blocky.png|Emblems – Blocky category Reference - human.png|Emblems – Human category Reference - ornate.png|Emblems – Ornate category Reference - pirate.png|Emblems – Pirate category Reference - pointy.png|Emblems – Pointy category Reference - spherical.png|Emblems – Spherical category Reference - zoological.png|Emblems – Zoological category Reference - domination.png|Emblems – Domination category </gallery> == Creating your own emblems == Emblems are simply squared images that the game sticks on top of a background to create a flag.<ref>[http://i.imgur.com/OuTdXkN.png Custom Flag Example]</ref> For each emblem 3 texture files in the [[wikipedia:DirectDraw Surface|Direct Draw Texture]] format (.dds) are required: a default, medium-sized one; a big one, usually white and displayed only on the galactic map; and a small one displayed next to units. It is recommended to add the emblems using mods instead of placing them directly in the game folder to avoid any possible problems. More information on how to create them and where are they can be found are under [[Mods]]. The textures should follow these specifications: * All textures must be located in a subfolder of <code><mod_root>\flags\</code> * All three textures should have the same file name, for example <code>emblem.dds</code> * The default texture should have a size of 128x128 pixels and should be in the folder <code><mod_root>\flags\<folder>\</code> * The map texture should have a size of 256x256 pixels and should be in the folder <code><mod_root>\flags\<folder>\map\</code> * The small texture should have a size of 24x24 pixels and should be in the folder <code><mod_root>\flags\<folder>\small\</code> There are a myriad of tools that can help you creating the textures for the emblems, among which there is: * [[wikipedia:GIMP|GIMP]]: useful for editing images, as well as saving them in .dds format (with plugin). * [[wikipedia:Paint.NET|Paint.NET]]: simple image editor with .dds format compatibility. * [[wikipedia:Krita|Krita]]: useful for editing images. * [[wikipedia:Inkscape|Inkscape]]: useful for editing vector images. * [[wikipedia:ImageMagick|ImageMagick]]: useful for processing and converting images to .dds in batches. * [[wikipedia:Adobe Photoshop|Adobe Photoshop]]: useful for editing images, as well as saving them in .dds format (with the NVIDIA plugin). * [[wikipedia:Microsoft Visual Studio|Microsoft Visual Studio]]: useful for saving images in .dds. === Guide === * Create a mod using the Stellaris Launcher. * Create a folder named 'flags’ in the root folder, and a subfolder that you can name however you want in it, this folder is where all the textures files will be placed. * Create 'usage.txt’ in the subfolder with the following contents, it will prevent AI empires from using the emblem in their flags (savegames will still work once you remove the mod): random = no show_in_designer = yes * Create a folder named <code>'localisation'</code> in the root folder. You must place there localisation (.yml) files, otherwise the category you made for the emblem won't have a name! This is an example for the English translation, the name after <code>'FLAG_CATEGORY'</code> must match the name of the new folder you created under flags: l_english: FLAG_CATEGORY_new_flags:0 "New Flags!" * Create your emblem! Remember that it should be a square image and that it is best to create out your image with a transparent backdrop. * Now you need to generate the 3 texture files out of the image: the medium, large and small ones. Remember that they have to be .dds files and have to have determinate size each one. You can use GIMP with the .dds plugin, Photoshop with the NVIDIA plugin, ImageMagick, Paint.NET with the .dds plugin and others to convert your images to textures. * Now place the medium texture in the folder you created under <code>flags</code>, create the folders <code>map</code> and <code>small</code> and place the big and small textures in each one, respectively, the folder structure should be like this now: new_mod/ ├─── flags │ └─── new_flags │ ├─── emblem.dds │ ├─── usage.txt │ ├─── map │ │ └─── emblem.dds │ └─── small │ └─── emblem.dds └─── localisation ├─── new_mod_l_braz_por.yml ├─── new_mod_l_english.yml ├─── new_mod_l_french.yml ├─── new_mod_l_german.yml ├─── new_mod_l_polish.yml ├─── new_mod_l_russian.yml └─── new_mod_l_spanish.yml 5 directories, 11 files Special considerations: * Texture compression: Using [[wikipedia:S3 Texture Compression|DXT1 or DXT5]] compression may introduce artifacts in the textures, use uncompressed textures (ARGB 8888) if this happens. * Remember that the game recolors your image when showing it. Some colors may be distorted when you view your flags from the galaxy map. <!--A tutorial video on emblem creation can be found here [https://www.youtube.com/watch?v=BRIiIRTql6U&feature=youtu.be Custom Flag Video Tutorial]--> <div class="thumb center"> {{#evt: | service=youtube | id=BRIiIRTql6U | alignment=center | dimensions=400 | container=frame | description=A video tutorial on emblem creation. }}</div> === ImageMagick Helper Script === This [[wikipedia:batch script|batch script]] (.bat, Windows only) can help you generate the required textures to make emblems, it needs to have ImageMagick installed and its folder the PATH variable (enabled by default during install). The script expects the images in PNG format under the folder "source", then creates the folder "textures", resizes the images and stores all three types of textures in the correct subfolders. Additionally it also whitens the map textures so you don't have to. For creating the small emblems, the scripts uses [http://www.imagemagick.org/Usage/blur/#blur_args blurring] parameters picked for blurring a 512x512 image, pick one according to the size of yours. <syntaxhighlight lang="batch"> FOR %%a in (source\*.png) DO ( ::default emblems magick convert "%%a" -resize 128x128 ^ -define dds:compression=dxt5 -define dds:cluster-fit=true -define dds:weight-by-alpha=true "textures\%%~na.dds" ::small emblems magick convert "%%a" -fill black -colorize 100%% -background black -alpha background -channel RGBA -blur 32x32 -level 0,97%% ^ "%%a" -composite ^ -resize 24x24 ^ -define dds:compression=none ^ "textures\small\%%~na.dds" ::map emblems magick convert "%%a" -fill white -colorize 100%% ^ -resize 256x256 ^ -define dds:compression=dxt5 -define dds:cluster-fit=true -define dds:weight-by-alpha=true ^ "textures\map\%%~na.dds" ) </syntaxhighlight> * More complex scripts: https://gitlab.com/unduthegun/stellaris-emblem-lab/ (by Pau Ruiz Safont aka Undu) * Web implementation (of this): https://9kenm.github.io/stellaris-emblem-maker/ (by MrKen) == References == <references /> {{ModdingNavbox}} [[Category:模组制作]]
摘要:
请注意您对群星百科的所有贡献都被认为是在知识共享署名-非商业性使用-相同方式共享下发布,请查看在
群星百科:版权
的细节。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源。
未经许可,请勿提交受版权保护的作品!
为防止机器编辑,请完成下方验证
取消
编辑帮助
(在新窗口中打开)
本页使用的模板:
Template:Clear
(
编辑
)
Template:ModdingNavbox
(
编辑
)
Template:Navbox
(
编辑
)
Template:Navboxgroup
(
编辑
)
Template:Version
(
编辑
)
×
登录
密码
记住登录
加入群星百科
忘记密码?
其他方式登录