Template talk:Event

From Europa Universalis 4 Wiki
Jump to navigation Jump to search


Meneth‎, if events should be now uncollapsed, perhaps make it a default state, as it would require far less work. Majority of them are on the lists, and those on the country pages are limited to 4 anyway, so can be uncollapsed as well without messing with article readability. Puchacz (talk) 13:14, 9 October 2015 (CEST)

Funnily enough, I'm discussing that very idea with Dauth at the moment. ~ Meneth (talk) 13:26, 9 October 2015 (CEST)
And it has been done. ~ Meneth (talk) 14:00, 9 October 2015 (CEST)

mtth with triggered-only events[edit]

Some events have both is_triggered_only = yes and an MTTH clause. There are several such on Estates events and at the moment, it only shows "Triggered only by five year pulse" without showing the modifiers to MTTH. Clearly MTTH is not meaningless in this situation but what does it mean? Hairy Dude (talk) 20:04, 9 December 2015 (CET)

Some are as well in idea groups events. I thought that perhaps in the past they were not a pulse events and it is a not cleaned leftover. But estates are a new mechanism, so I don't know. Only logical explanation would be a factor to the value in 00_on_actions, but then they should be reversed to make sense, and it would be very bad, ais it would require to check all events in order to see which one to pick. Puchacz (talk) 22:57, 9 December 2015 (CET)
AFAIK your thoughts are right Puchacz - the 2 values are multiplied. – Lillebror (talk) 23:27, 9 December 2015 (CET)

Template text breaking container boundaries[edit]

It often happens, especially with really long/heavily indented text, that some words are displayed outside of the container div's boundaries (there are many examples around, see for instance the first event of Consort events).
The problem can be easily fixed by adding "word-break: break-word;" to the .eu4box CSS class. Of course, this causes very long words (which are almost always game-related variables inside event/options text, such as the one in Consort_events#Matters_of_State) to be broken to allow the text to go to a newline, but these are borderline cases and seeing them broken up is better, in my opinion, then seeing the text float outside of the box's boundaries. --Tre3qwerty (talk) 22:46, 22 October 2016 (CEST)

Adding this page to the list of templates[edit]

Would this page make sense to include in the list of templates (http://www.eu4wiki.com/Category:Templates)? I went looking for it there and only stumbled upon it by chance from a link in the Option template. Philadelphus (talk) 07:07, 24 November 2016 (CET)


Should we change the id-parameter from optional to required? And if the parameter is missing then display 'missing event-id' or 'please add the missing event-id'? – Lillebror (talk) 10:34, 27 November 2017 (CET)

Even before HD's preview - which is a nice bonus - I found them to make updating events easier since you can find them with ease [along with the mention of the event file]. The problem with EU4 is that it already has a huge chunk of event pages requiring doing this so you'll see it almost everywhere. That's the only con I can think of. Other than that, I'm all for making them a must. ~ SolSys (talk) 11:15, 27 November 2017 (CET)
It makes a lot of sense to require them, even if some old uses don't have them. I suggest that if it's not present, the article is added to a category "Articles containing events without IDs" (in a meta-noinclude block if possible, like with Wikipedia's noinclude template) so we can easily find and fix them. Hairy Dude (talk) 03:55, 6 September 2018 (CEST)

Style guide[edit]

Several events pages have a notice that they were computer generated and need further formatting or rewriting. Further, I have sought to update several of the pages linked from Generic events that had not been touched since 1.17. When performing the updates and then formatting other pages, I sought to have consistency in formatting between them and settled on the style seen in the majority of those linked from that page and which is close to the styling of the computer-generated pages (which would reduce the amount of editing required to them to maintain consistency). However I noticed that edits were subsequently made to some to alter the styling. I need to know which is preferred to ensure I don't create more work or cause frustration.

Please compare the two events below. Should links to concepts in the top section be done through in-line links or linked images in Template:Icon? Are items that modify the likelihood of an event "modifiers" or "weight modifiers"? Should items be specified as applicable to "the country" or is that implied? That also affects whether the effects are present or future tense ("gains" versus "gain").


Msg event.pngBuild a Great Palace

Trigger conditions
  • Government is a Government monarchy.png monarchy.
  • Is not a lesser partner in a Personal union.png personal union.
Is triggered only by

Bi-yearly pulse

  • Has a level 3 Advisor Artist.png artist advisor: ×2
  • Is a lucky nation: ×0.5
  • Does not have an Advisor Artist.png artist advisor: ×0.66

Event button 547.png
Build the palace.
  • Gain Yearly prestige.png 10 prestige.
  • Gain Legitimacy.png 20 legitimacy.
  • Gain Horde unity 20 horde unity.
  • Gain Mandate.png 5 mandate (if Emperor of China).
  • Lose Gold Icon.png ducats equal to 0.25 years of income.

Msg event.pngBuild a Great Palace

Trigger conditions

The country:

Is triggered only by

Bi-yearly pulse

Weight modifiers

The country:

  • has a level 3 artist advisor: ×2
  • is a lucky nation: ×0.5
  • does not have an artist advisor: ×0.66

Event button 547.png
Build the palace.

The country:

  • gains Yearly prestige.png10 prestige.
  • gains Legitimacy.png20 legitimacy.
  • gains Horde unity 20 horde unity.
  • loses Gold Icon.pngducats equal to 0.25 years of income.

If this country is the Emperor of China,

  • then it gains Mandate.png5 mandate.

Unfortunately, this template's documentation is lacking in this regard. Arablue99 (talk) 03:51, 1 December 2017 (CET)

The former is generally what my parser generates, or edited from there (often by me), while the latter is more Meneth's style. I'm not dogmatic, it's just that there is no standardization so people do what they like. My style just looks reasonable as auto-generated text and it's easiest to keep that style when editing, whereas Meneth's style looks nicer but would be a bit of a pain to auto-generate since the part of the program that actually generates text doesn't know where in the document it is. Honestly, if you have the patience to hammer the text into a prettier form, as long as it's accurate, I say go for it.
The one aspect of Meneth's style I don't like is the top-level lists without bullets, that don't actually use any sort of list markup but instead separate items with <br> tags. I don't know if anyone reads this wiki via a screen reader, but if so, we owe it to them to at least use proper semantic markup so the screen reader says the right things.
To address your specific points:
  • "Weight modifiers" is probably better. {{event}} ought to have a dedicated parameter for that purpose, really.
  • "The country" or not: Now I think about it, this is probably technically necessary to distinguish between country and province events. But I can't split out "If this country is the Emperor of China" when autogenerating, because "if" clauses in general can be too complex to automatically format that way.
  • In this specific case I think that conditional effect is add_mandate_small_effect or something like that, i.e. a scripted effect. Some of those we've handled with templates, e.g. {{Add estate loyalty effect}}, but recently there've been much more complex, such as one to choose a random culture and religion for an advisor based on state religion, culture and location, which would be unreasonably tedious to spell out in full. I think it'd be best to handle these by expanding them in simple cases like this, or describing them briefly with a footnote giving the name of the scripted effect in more complex cases. Hairy Dude (talk) 03:43, 6 September 2018 (CEST)