Europa Universalis IV

Europa Universalis IV

修改世界
您可以通过尝试由社区成员创作并分享的自定义内容修改您的《欧陆风云 4》游戏体验,这些内容几乎涵盖了对游戏各个方面的些微调整。看一看标签并想一想从何处开始。当您准备好创作您自己的自定义内容时,浏览简易指南来帮助您起步。
Firemight 10 月 20 日 上午 5:14
How to edit date visuals?
In a mod I'm working on, I want to switch the year to the Islamic calendar (date start 846) but keep everything effectively the same. I know I could change the actual start date, but this would require re-coding everything else to fit.

I've been looking through the interface code to find a way to edit the year in the container but haven't found it yet. Does anyone have any experience or knowledge in this area?
< >
正在显示第 1 - 2 条,共 2 条留言
grotaclas 1 10 月 20 日 上午 7:08 
I don't think that this is feasible. Too much of the date stuff is hardcoded.

There are some things which you can change in various ways, but it will be difficult for your players if some parts of the UI use one calendar and other parts use a different calendar.

The date which is displayed in the top-right corner is set up in interface/speed_controls.gui as:
instantTextBoxType = { name = "DateText" position = { x = -227 y = 13 } textureFile = "" font = "vic_18" borderSize = {x = 0 y = 4} text = "NO DATE!!!" maxWidth = 140 maxHeight = 32 format = centre Orientation = "UPPER_RIGHT" }
But what is displayed there is created by eu4.exe in some way, but eu4 does not allow code mods which could change the code in eu4.exe.

But you can probably use a scripted UI to put some other text box above the normal DateText and/or move the DateText to a position outside of the screen. You can probably somehow calculated the date which you want and store it in some kind of variable which you can show in that scripted UI. But that won't change dates in other places of the UI. Some places which show a date in a specific text box could be changed in similar ways.

But dates in tooltips are problematic. You can change some of the date formatting with the following localisation strings(LONG_EU3_DATE_STRING is definitely used in some tooltips), but I don't think that it affects the date on the top right of the screen:
LONG_EU3_DATE_STRING:0 "$DD$ $MONTH$ $YYYY$" EU3_DATE_STRING:0 "$YYYY$.$MM$.$DD$" DASH_EU3_DATE_STRING:0 "$YYYY$_$MM$_$DD$" SI_DATE_YEAR:0 "$VAL$y" SI_DATE_MONTH:0 "$VAL$m" SI_DATE_DAY:0 "$VAL$d"
Maybe one of them supports customizable localisations and can be changed dynamically, but I doubt that.
I would suggest making a scripted gui below (where the points are displayed) to show the alternative year. That way players can see both and won’t be confused by potential triggers or effects (that would print the actual game year).
< >
正在显示第 1 - 2 条,共 2 条留言
每页显示数: 1530 50