Event trigger.png The wiki's contest has ended. Thanks to all who have participated and congratulations to the winners! Event trigger.png

User talk:Lillebror

From Europa Universalis 4 Wiki
Revision as of 12:38, 15 October 2016 by Romaoplays (talk | contribs) (Weekend points: new section)
Jump to navigation Jump to search

Render times

As you may be aware, I've moved my wikis to a new server. For the most part this new server is a significant improvement, as I have root access and therefore can install all the relevant caching tools.

However, its single-thread performance is actually quite a bit lower (slightly hunder half) than the old server's, though since it has two cores while my old server to my knowledge only had one, this makes essentially no difference for most purposes. However, you might have noticed that especially large pages, such as list of provinces take a long while to load. This is due to pages only being cached for logged-out users, so when logged-in users access them they have to be re-rendered by Mediawiki, which for large pages takes a long time. An especially dire example was the policies page before I reduced its reliance on the icon template; it took over 30 seconds to render and would thus simply time out and never even get cached. After my updates it is down to 18s, and after the updates at User:Meneth/Sandbox it'll be down to 6.5s.

To get to my point, it'd be great if you'd either alert me when you see pages that take long to render due to complexity rather than size, or personally try to address it, so that those pages can be improved upon so that editors don't have to spend as long waiting, and and reducing server load. The icon template is generally the main reason for extreme complexity, as due to the way templates work it will import all ~630 lines of the template every single time it is used. ~ Meneth (talk) 13:24, 13 September 2014 (CEST)

List of provinces
I’ve noticed especially that it take a long time to preview or save, but I have attributed this to my slow Internet connection.
List of provinces is simply huge. The only complexity reduction that'd be possible would be removing/reducing the use of color, or making the table unsortable. Alternatively the table could be split into parts, but that would sacrifice an important part of why the page is so popular; being able to search for any province in the game. ~ Meneth (talk) 11:37, 16 September 2014 (CEST)
It does seem the render time of the page is only 4-5s though, so it isn't that dire. ~ Meneth (talk) 11:45, 16 September 2014 (CEST)
List of regions, {{RTR}}
During creation I avoided the icons template. Your idea for the icons of the religions (file redirects instead of a switch) is teriffic. But there is still the ‘#ifeq’ parser clause in every of the 1976 table lines to avoid the display of the Flag of Natives Natives flag. Looking ahead to the Art of War expansion with more provinces the performance of this page could become problematic.
I don't think "ifeq" is that intensive; big lookup tables are a bigger issue. Though if it could be eliminated somehow that'd probably still be a good idea.
Current render time is 26 seconds which is quite bad. Might be more to do with using RTR so many times than anything else though. ~ Meneth (talk) 11:45, 16 September 2014 (CEST)
I rebuild the page without the use of the RTR template on my ‘sandbox/List of regions’. Now it’s faster, but much bigger, too big? Personally I don’t want to lose too much of the formatting or the images. Perhaps it’s better to split the page. – Lillebror (talk) 10:03, 24 September 2014 (CEST)
Perhaps split it by continent? Any regions that overlap with more than one continent could simply be listed on the one where they're largest, and be linked on the other. In that case RTR could probably be used without it making render times too long. ~ Meneth (talk) 13:48, 24 September 2014 (CEST)
From over 850 via ca. 250 to 0 uses of the icons template. Good job.
Yeah, that page is entirely manageable. 6-7 seconds to render is still quite a bit of time, but since only editing the page, or one's first load of it as a logged-in user, incurs that loading time that's not a big issue. ~ Meneth (talk) 11:37, 16 September 2014 (CEST)
I see the main problem of the icon template not so much in its lenghts but in the lenghts of the switch. Perhaps we could split off some less used icons like building icons, advisor icons or the icons for the religions, so that the template contains only the icons of modifiers. For the previously removed icons we can create similar templates again: Bldicon, Advicon …
The length of the template itself is a big issue; every time it is transcluded, that's over 600 lines transcluded. Virtually all those lines are the switch table though, yeah. One way to fix it might be a tree-structure. E.G., having a sub-page for every 50 icons or so, and then having a switch table in the icon template itself that purely calls the appropriate sub-page based on the first letter of the input. That way only 60 or so lines would have to be loaded each time the template is invoked, rather than 600. ~ Meneth (talk) 11:37, 16 September 2014 (CEST)
Lillebror (talk) 11:13, 16 September 2014 (CEST)
National ideas
This page is also slow, at ~8s render time. I've updated the "green" template to use classes instead of styling directly though, and that seems to've reduced it slightly. I'm also going to see if replacing the Green template entirely on the page helps at all. ~ Meneth (talk) 12:12, 16 September 2014 (CEST)
Seems replacing the template with the actual text reduces render time from 7.5s to 6.5s. Not worth the loss of readability, I'd say. ~ Meneth (talk) 12:31, 16 September 2014 (CEST)

2 bonus table needs full info.

  • vassal forcelimit. policy influence+offensive +20%
  • naval leader maneuver. policy maritime+innovative +1

--kongzheng (talk) 08:58, 7 October 2014 (CEST)

done, added policies for: Naval leader maneuver and Vassal forcelimit bonus – Lillebror (talk) 09:20, 7 October 2014 (CEST)
btw, How to add font color to a word?--kongzheng (talk) 12:49, 7 October 2014 (CEST)
Why do you need to add color? If you want to highlight positive/negative effects, use the red and green templates: {{green|positive text/number to highlight}} or {{red|negative text/number to highlight}}. ~ Meneth (talk) 12:58, 7 October 2014 (CEST)

Region lists: autogenerated or not?

Hi Lillebror, Are the region lists script-generated or did you do this by hand? In the latter case, I could probably have them generated by the same script I made for the province list. --Silver Wizard (talk) 17:18, 3 November 2014 (CET)

No. They were made out of the List of provinces. I would like to expand them with a trade node column. – Lillebror (talk) 17:21, 3 November 2014 (CET)
Do you want to update them, Silver Wizard? – Lillebror (talk) 17:28, 3 November 2014 (CET)

Deleting REDIRECT Teutonic

Why? It's a common thing to redirect half names to their total counterpart, and no more than 1 contributor is needed. Docteur, there to serve. (talk) 19:04, 20 November 2014 (CET)

The bit about only one contributor is auto-generated by Mediawiki when deleting a page with only one contributor.
As to whether the redirect should exist, I don't know. Probably? ~ Meneth (talk) 19:05, 20 November 2014 (CET)
Why not? The redirect is not used in the wiki. It had the wrong destination. If you write ‘teutonic’ in the search mask ... don’t you get the destination you want? – Lillebror (talk) 19:07, 20 November 2014 (CET)
It leading to the wrong place is an argument for updating, not deleting. IIRC I made that redirect at some point because a decent number of people were searching for it. ~ Meneth (talk) 19:09, 20 November 2014 (CET)
I think it should be present; even with the search mask, a quick searcher might just press Enter without looking. Docteur, there to serve. (talk) 19:10, 20 November 2014 (CET)
… gets a list of pages with ‘teutonic’ in its titles. I haven't seen ‘Teutonic’ as the first part of the name. It could also link to Teutonic national ideas, Teutonic events, Teutonic decisions, Teutonic missions, etc. – Lillebror (talk) 19:17, 20 November 2014 (CET)
Okay, 2:1 – Lillebror (talk) 19:20, 20 November 2014 (CET)


Explain why you keep reverting the change to mark Lebanon as Catholic. Sidon is its de-jure capital province and it's Catholic in all starts. Historically, Lebanon had a Catholic majority. Load up a game as a non-Sunni country and use cheats to force Lebanon to be released. It will be Catholic every time. Marking Lebanon as a Sunni country is ahistorical and completely unjustified. Please study some history and stop blindly reverting changes. And yes, I'm butthurt as fuck.

I agree with you, but no need to be angry! Let's all be calm and happy. Docteur, there to serve. (talk) 22:08, 26 November 2014 (CET)
He reverts those edits because the game history files assign Lebanon as Sunni. As such, it is essentially accurate to consider it Sunni, despite its assigned capital being a different religion. ~ Meneth (talk) 22:14, 26 November 2014 (CET)
The religion of a country is set by the history files. The entry there is: ‘religion = sunni’. (I'm too slow ;-))– Lillebror (talk) 22:18, 26 November 2014 (CET)

Old Prussian culture

I checked in the game files as well (common/Europa Universalis IV/common/cultures/00_cultures.txt), and Old Prussian culture does not have Kurland as its primary nation. Where are you seeing this, exactly? Thanks in advance. Mapleyy (talk) 20:34, 1 March 2015 (CET)

For reference:
	old_prussian = {
		male_names = {
			Alvydas Arelis Auctune Bajoras Beidras Budo Dagonis Ekkelis Galindas Galindo Gauronas Gerdautas Glande Golding 
			Jauguttis Karatas Klukis Kugis Milzas Nomedas Prusas Sergonis Ulinniks Ulitis
		female_names = {
			Betten Dagas Gelennis Gerkus Grasus Gulbis Mila Milyuns Weslikan Ziedas

Mapleyy (talk) 20:34, 1 March 2015 (CET)

Sorry – I’ve misread the changes, you and Dicentis have right of course. – Lillebror (talk) 22:28, 1 March 2015 (CET)


I saw that Increased Centralization is changed, we can create a page with all the modifier. Stigni (talk) 10:26, 6 March 2015 (CET)

Of course you can create a list of all event modifiers and also one for the opinion modifiers. But I would advise against it if you have no script for this work. Also - at least for me - such a list has only a limited value, since most modifiers are only used by a single event (decision or mission). If you want to, do it. – Lillebror (talk) 13:02, 6 March 2015 (CET)
Making one of modifiers that are used by more than one event/decision might make some sense though. ~ Meneth (talk) 13:05, 6 March 2015 (CET)
I asked because now I have only the decisions' list (some problems with the PC), so I fix that without check the modifiers' list. Do you know how to find all the modifiers? Stigni (talk) 13:43, 6 March 2015 (CET)
There's two types of modifiers: event modifiers and opinion modifiers; you can find their respective folders and text files in Europa Universalis IV/common/{event,opinion}_modifiers. Mapleyy (talk) 18:38, 6 March 2015 (CET)

Question on revolt risk/unrest on wiki

Shouldn't File:National revolt risk.png redirect to File:National unrest.png, and File:Global unrest.png to that, instead of the other way around (i.e., shouldn't File:National revolt risk.png be moved to File:National unrest.png? {{idea group}} uses the icon name, not the icon provided in {{icon}}, after all. Mapleyy (talk) 15:49, 7 March 2015 (CET)

There is only one icon on the Wiki. I agree that it would be better if the 'real' icon would be named … unrest. The {{idea group}} template doesn't use the {{icon}} template for a better performance. – Lillebror (talk) 16:06, 7 March 2015 (CET)

Flanking Range

- Why did you change the "Unit strength" table, removing 0-249 range (and changing the order from smallest to highest)? I took the data from the game, where it goes down by 25% with unit strength going down by 25%, but you limited it to -50%.

- Why did you remove the actual flanking data for each level of relevant military tech for each regiment type? I consider this info quite useful, without the need to multiply each time or keep the numbers in mind.

- Why did you change the more specific "It is only affected by "Improved Flanking Range" upgraded by Military technology and is shown as "Flanking Range" in the battle screen." to a vague "There are military technologies which increase the flanking range of units as the game progresses."?

Gendalf (talk) 21:44, 12 April 2015 (CEST)

My intention was to eliminate the errors in your text. As I don’t want to write a new text; I just took the old. To the three points mentioned.
  • I could not verify the information (for 0-249) in the time available to me. Changed to descending order again.
  • Added the value in a seperate table.
  • I don’t think that the old wording is vague.
Please, make further improving changes. – Lillebror (talk) 08:29, 13 April 2015 (CEST)

Also idk why do you fancy 2 bigger tables of relative to each other stats, to 1 smaller with sorting Gendalf (talk) 20:51, 21 April 2015 (CEST)

One can sort much in this table. I prefer two tables. If you like a single table better then just change it. – Lillebror (talk) 09:06, 22 April 2015 (CEST)

Flagged country navbox

I think the latest version would work well but I don't think I'm good enough at templates to get it right without getting it wrong a few dozen times first. If you're willing to build the version then I'll happily place it on the pages. Dauth (talk) 18:50, 13 June 2015 (CEST)

At the moment I'm busy with the update of the {{Bonus table}}. I'm sure, you can copy the template from my sandbox if you really want. – Lillebror (talk) 20:24, 13 June 2015 (CEST)

Table anchors

Hi, great idea about the anchors, can we have these for other important tables as well? (trade goods, buildings, etc.)? --Lateralus (talk) 14:27, 14 July 2015 (CEST)

Of course. Feel free to implement them where appropriate. ~ Meneth (talk) 14:32, 14 July 2015 (CEST)
I've gone ahead and implemented it for trade goods and buildings. ~ Meneth (talk) 14:39, 14 July 2015 (CEST)


Could you create Template:Decision/doc? Stigni (talk) 09:40, 16 July 2015 (CEST)

If I ever take my time for that. ;-) – Lillebror (talk) 09:55, 16 July 2015 (CEST)

Transclusion and Box wrapper

I notice that there this some problem if a decision is in a box wrapper as you can see {{#lst:List of decision lists|Institute the Societas Jesu}} do:


Execute decision.pngInstitute the Societas Jesu

His Holiness has approved a new missionary order called the Society of Jesus. However without royal support it will not thrive, shall we support the Jesuits?

Potential requirements

The country:

  • is CatholicismCatholic.
  • is Flag of Portugal Portugal or Flag of Spain Spain.
  • does not have the modifier ‘The Societas Jesu’.
  • does not have the modifier ‘Jesuits Expelled’.

The country:


The country gets the modifier ‘The Societas Jesu’ until the country:

with the following effects:

  • Missionary strength.png +1% missionary strength,
  • Papal influence.png +0.5 yearly papal influence.

Catholicism loses Reform desire.png2% reform desire.

Nothing... Stigni (talk) 13:39, 27 July 2015 (CEST)

The actual issue is that it is inside a template. The only real way around it would be substituting the template around it.
From the documentation "As of 2014, section tags don't have any effect when used inside a template parameter. If page A contains a text {{B|X}}, there's no way {{#lst:A|...}} can access X." ~ Meneth (talk) 13:46, 27 July 2015 (CEST)
I substituted Box wrapper with is code and now it works. Stigni (talk) 14:17, 27 July 2015 (CEST)

File names

You don't need to include the underscores when linking a file; they're equivalent to spaces. ~ Meneth (talk) 15:04, 29 July 2015 (CEST)

The files were renamed some time ago. I want to use the current names, not the file redirects. – Lillebror (talk) 15:16, 29 July 2015 (CEST)
Using a space rather than an underscore doesn't cause a redirect, but does look slightly better. E.G., Mayan rebels.png rather than Mayan_rebels.png. ~ Meneth (talk) 12:53, 30 July 2015 (CEST)
I have a question concerning file redirects. Why are they often listed twice in the file usage section? E.g: File:Mayan rebels.png. – Lillebror (talk) 15:22, 29 July 2015 (CEST)
No idea. ~ Meneth (talk) 12:53, 30 July 2015 (CEST)


What is the reason of this edit (I mean adding section)? Does it help in any way, or should it be done in some different cases? Puchacz (talk) 18:44, 22 September 2015 (CEST)

That's so it can be transcluded to other pages like this:
~ Meneth (talk) 19:13, 22 September 2015 (CEST)
The section mark are for the section transclusion with the mediawiki expansion Labeled Section Transclusion. See also User_talk:Meneth#Extensions_requests. (to late) – Lillebror (talk) 19:18, 22 September 2015 (CEST)


Could you come on IRC sometime today? Got a couple of things I'd like to talk to you about. ~ Meneth (talk) 16:10, 10 October 2015 (CEST)

Today? Perhaps late afternoon or on early evening. – Lillebror (talk) 09:32, 11 October 2015 (CEST)
I'll be out of the house between 14:30 and 18:30, roughly. Before or after that works. ~ Meneth (talk) 11:41, 11 October 2015 (CEST)

Upcoming contest

For 1.14 and its expansion the wiki will run another contest. The rules have been drafted here.

If you've got any tasks you'd like to see done, feel free to add them to the task list. Dauth added a number of tasks, and I've added quite a few related to the known features of the expansion/patch.

As usual, if you've got any comments on the rules themselves I'm happy to hear them. ~ Meneth (talk) 15:47, 14 October 2015 (CEST)

Of course! – Lillebror (talk) 07:37, 15 October 2015 (CEST)

Infobox versions

Excellent work mate. Dauth (talk) 18:39, 18 October 2015 (CEST)

The idea group events page is now too big, I think we must split it. – Lillebror (talk) 18:41, 18 October 2015 (CEST)
Split to Adm/Dip/Mil ideas? Save us having to make too many new pages and change too many redirects. Dauth (talk) 18:44, 18 October 2015 (CEST)
I would prefer one page for one idea group. 9-22 events per page are also not small pages. – Lillebror (talk) 19:04, 18 October 2015 (CEST)
I just checked the pages which link in, should be fine, leave idea group events as a disambig? Dauth (talk) 19:25, 18 October 2015 (CEST)

Bonus table bug

Not sure which index it needs changing to in Trade#Trade_income_and_trade_efficiency. Could you fix? No rush. Dauth (talk) 19:28, 27 October 2015 (CET)

Bug? I don’t think so. As the modifier “national trade income modifier” was removed with patch 1.13 I just removed it in the template, too. Now I added a hint about this issue. – Lillebror (talk) 20:22, 27 October 2015 (CET)
OK thanks. Dauth (talk) 20:33, 27 October 2015 (CET)


I created a draft for a Template:Modifiers, because for example we have Increased Centralization in almost every formation decision. I think it is a good base, but we need at least a where parameter because we have mission like Conquer Smyrna that give the modifier only on some provinces. Stigni (talk) 10:16, 8 January 2016 (CET)

I think the template is a good idea.
A parameter to specify the scope of the modifier is not necessary if you write for example:
  • Every target province:
    • gets the modifier “Efficient Integration” for 10 years:
      • Local autonomy.png -0.05 Monthly autonomy change
or something similar. – Lillebror (talk) 10:32, 8 January 2016 (CET)
I had some problem with indentation but I think now it is fixed.
  • Every target province:
  • Gain “Efficient Integration” modifier for 10 years:
    • −0.05 Local autonomy.png Monthly autonomy change
If it is ok, we can move the page. Stigni (talk) 11:16, 8 January 2016 (CET)
I have now not the time to test it, sorry. (The {{plainlist}} template uses 1.6 em as indent.) What is the behaviour if a list is continued after the template? – Lillebror (talk) 11:31, 8 January 2016 (CET)
I changed the indent to 1.6em. If you continue the list with ** it create a double dots, but if you continue the list with :* you don't have any problem; it is not perfect but not a big deal. Stigni (talk) 12:09, 8 January 2016 (CET)

Nestled #If

It would be much more convenient to deal with #if sentences if we had more variety such as {{if either}}, {{ifeqany}} and etc. It would make templates easier to handle, especially in cases where Nestled #Ifs come into play. There's more info here [1] .

Example from the Template:Idea group:

  • Current: {{#ifeq:{{FULLPAGENAME}}|National ideas|left|{{#ifeq:{{FULLPAGENAME}}|Idea groups|left|right}}}}
  • Alternative: {{ifeqany|{{FULLPAGENAME}}|National ideas|Idea groups|y=left|n=right}}

~ SolSys (talk) 20:25, 27 January 2016 (CET)

I had no problem with the syntax. I thought my additions extent the page size to much ... but it was already to big caused by the versioning. – Lillebror (talk) 20:29, 27 January 2016 (CET)
I didn't bring it up because I thought you had a problem. I figured its a good point to consider for future work/templates. ~ SolSys (talk) 20:49, 27 January 2016 (CET)

Update Republican Tradition Bonus Table

The Republican Tradition bonus table lists 3 country's ambitions as providing the bonus: American, Canadian, and Italian. However, only American and Canadian ambitions still provide that bonus. Much to the chagrine of my Italian nation. — Preceding unsigned comment added by Marnues (Talk) 13:34, 17 May 2016‎ (CEST)

The table is correct. There are two Italian ideas/traditions/ambitions in the game. The Italian ideas without an additional mark are the group ideas of countries out of the Latin culture group which have their capital in Italy (region). The Italian ideas of the county Italy are maked with “(cU)”. – Lillebror (talk) 20:45, 17 May 2016 (CEST)
Yes, you are correct. Wish we had a better names than Italian and Italian (cU). But I get that these are accepted. Another problem I found is that Americans list Republican Tradition while Canadians list Legitimacy (likely as these are the most relevant to AI gameplay). But it can be Republican Tradition, Legitimacy, or Devotion. Why is it that only 1 is listed rather than all 3? — Preceding unsigned comment added by Marnues (Talk) 00:28, 22 May 2016‎ (CEST)
The naming is from a time as Italy was the cultural union. Do you have a better alternative to destinguish the two Italian ideas?
The template should reproduce what is in the game files. American ambitions only modifies republican tradition. Canadian ambitions modifies both republican tradition and legitimacy. Devotion is not affected by both national ideas. – Lillebror (talk) 09:12, 22 May 2016 (CEST)

Lithuania & duchy

Hello, I just re-checked and Flag of Lithuania Lithuania is kingdom rank in 1444 (screenshot). Maybe it's changed to duchy by some DLC? Edwardspec (talk) 17:05, 3 August 2016 (CEST)

I think it is common sense. I have just checked on my version of the game with all DLC and Lithuania is a Duchy. As wiki policy is to work assuming players have all DLC and all patches the correct value is Duchy. Dauth (talk) 17:35, 3 August 2016 (CEST)
Without Common Sense.png Common Sense the government rank is kingdom. We are both right, Edwardspec. But it applies what Dauth already said ... – Lillebror (talk) 17:52, 3 August 2016 (CEST)

Newcomer who wants to help

Hi Lillebror,

As you have seen on estates or taxation articles, I tried to begin to help on this wiki. I'm just discovering all the wiki things in general and have plenty ideas. I see for example we can do transclusion etc... I wonder if it is possible to have a solid database easy to update to have all the articles in consistence when the game gets upgrading (I notice some articles where two information where different for the same thing).

I don't know if it already exists but I can do parsing on all of the text files in the game folders to keep track of all interesting modifiers for example.

Hope I'll be able to help much ! --FrogCrusher (talk) 12:25, 25 August 2016 (CEST)

Welcome FrogCrusher,
every helping hand is gladly seen. It's not easy to keep the wiki(s) up to date.
Several people have written parser for the events, the lists of provinces, the countries list or many maps. I'm not up to date to say who is still maintaining his scripts.
Feel free to help as much as you can. – Lillebror (talk) 18:32, 25 August 2016 (CEST)

A quick question

Hello, I'm working on Coptic events and it bothers me that there are a lot of events that doesn't give you any effect or whatever. For example if a coptic country invades Alexandria, you, as another country , will get the same event but with no effects , just like news on hoi4. Do I need to make them? because they are a bit of a pain in the... Thanks! 123e55 (talk) 17:38, 13 October 2016 (CEST)

I think you are right. This are only news/message events to Coptic player controller countries. They are in the game - for the sake of completeness the wiki should also have. – Lillebror (talk) 18:54, 13 October 2016 (CEST)

Error with list

I eddited the stability page for the contest, but I don't know how to fix the Missing Icon on 2 of the lists ( For jacobins influence ), any help?

EDIT: And for monthly militarized society — Preceding unsigned comment added by Romaoplays (talk) 00:16, 14 October 2016‎ (CEST)

I've added the missing icons to the template. Page should be alright now. – Lillebror (talk) 09:24, 14 October 2016 (CEST)

Weekend points

Hey! Sorry to be bothering: Tickets earned in the weekend will be account on the following day, or just on monday? --Romaoplays (talk) 14:38, 15 October 2016 (CEST)