User talk:Hairy Dude

From Europa Universalis 4 Wiki
Jump to navigation Jump to search


How does one compile your parser script? I downloaded GHCi, but compiling is a black magic to me. Puchacz (talk) 11:13, 3 December 2015 (CET)

The way you're supposed to do it is to use Cabal to install the dependencies, but I didn't get around to properly Cabalising it yet. I'll do that today if I have time. Hairy Dude (talk) 14:33, 3 December 2015 (CET)
I have to say I'm interested in the results of this. If it can go from localisation + events files to event templates. Is it worth me trying to get it running now or should I wait for you to update it? Also I won't step on your toes during the contest, anything this useful should get a chance to be rewarded. Dauth (talk) 15:01, 4 December 2015 (CET)
Indeed that is good. Today I did something similar for my next event list in MS Excel, but it required a lot of manual work. Would be nice to have something like this automated, perhaps after the contest. Puchacz (talk) 17:42, 4 December 2015 (CET)
@Dauth It's worth doing if the event files you're interested in converting happen to use only those effects, conditions and scopes I happen to have implemented so far, or if you can implement whatever ones are missing. Anything that isn't implemented just gets pretty-printed back, so you can do those manually (there may be some small information loss in the process since all numbers are currently parsed as Double). If you're interested in doing that, feel free to fork and submit a pull request. Hairy Dude (talk) 18:30, 4 December 2015 (CET)
Github version should be properly packaged now. Build instructions are in README, but I haven't tried it on Windows, so you'll have to find out for yourself where the settings file is if you need to edit it. Hairy Dude (talk) 16:36, 5 December 2015 (CET)
And this may explain my issues, when you say settings file, is this the one for the Haskell compiler or for EU4 or for your script? Dauth (talk) 10:57, 8 December 2015 (CET)
I mean the script's configuration file. Hairy Dude (talk) 12:53, 8 December 2015 (CET)

(Unindent) I think I'll wait until I've got a handy linux box with EU4 installed on it to have another go. Not having much luck in Windows. Dauth (talk) 20:28, 8 December 2015 (CET)

I'm still having compilation issues, have you got any suggestions?
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: pdxparse-
rejecting: base- (conflict: pdxparse => base>=4.7 &&
rejecting: base-,,,,,,,,,,,,,,,,,,, (global constraint requires
installed instance)

Dauth (talk) 18:34, 22 December 2015 (CET)

Looks like the Cabal dependencies are too strict. Try editing pdxparse.cabal and changing base >=4.7 && <4.8 to base >=4.6 && <4.8.
You could also try upgrading to the latest Haskell Platform and removing the upper constraint, but there are some huge changes in 4.8 that might cause compilation to fail if you use it. I'm currently installing the latest Platform so I can make sure it works. Hairy Dude (talk) 15:31, 23 December 2015 (CET)
I made a new branch that should solve compatibility issues with base-4.8. If you want to try it, do git checkout newprelude before starting the build. Hairy Dude (talk) 17:33, 23 December 2015 (CET)
Incidentally, if you get other issues like this, please open new tickets on github and discuss them there. Hairy Dude (talk) 17:37, 23 December 2015 (CET)
I've not had any luck and since we're interested in the output, if you can post a zip of the files for me to download and use then that will be less effort than continuing trying to duplicate your compilation. Dauth (talk) 12:31, 29 December 2015 (CET)
Here's the output of the script as it stands.[1] Note that I haven't implemented all statements, so a lot of things are just unformatted script (as regurgitated by the parser, so there are a few differences to what's in the game files). Hairy Dude (talk) 14:15, 4 January 2016 (CET)

Generic events[edit]

As you marked the generic events as computer generated I comment your changes here. These events are not mtth events (They don't have a mtth of 1 day.) They are triggered only (is_triggered_only = yes) by the bi-yearly pulse. – Lillebror (talk) 08:39, 14 January 2016 (CET)

I have another question: how Modifiers on MTTH work with is_triggered_only = yes and MTTH=1 day? Stigni (talk) 09:01, 14 January 2016 (CET)
I don't know how they interact, but that's what the files have. The code doesn't insert a default mtth - it only goes in if it's actually present. Note that the template markup it produces has both mtth and triggered only clauses; but only the mtth shows up because the template allows only mtth if both are present. Hairy Dude (talk) 13:01, 14 January 2016 (CET)
It's only either mtth or triggered only possible, never both. The mtth value of triggered only events is one part of the weight of the event. The second part is located in the file /Europa Universalis IV/common/on_actions/00_on_actions.txt. – Lillebror (talk) 13:12, 14 January 2016 (CET)
Right. So if triggered only I should put mtth modifiers in the triggered only field and still say "please describe trigger"? (Automatically finding the trigger is too much for now.) Hairy Dude (talk) 13:28, 14 January 2016 (CET)

Future request[edit]

Regarding the following point on Dauth's list:

  • Strategy guides which show events/decisions/missions should have them set up to transcude and transcluded (setting up every event/decision/mission is too much work for too little gain)

Is it possible for you to incorporate transclution sections into the parser? - unfortunately it seems we can't bake this into the template.

Something along the lines of <section begin= NAME /> and <section end= NAME /> before and after the infobox, while the NAME can be the infoxbox name or code. ~ SolSys (talk) 17:05, 27 January 2016 (CET)

It would be pretty easy to do, but the question is what name to use for the sections. Would the event/decision/mission ID be appropriate? Hairy Dude (talk) 17:10, 27 January 2016 (CET)
That seems fine to me. Dauth (talk) 17:37, 27 January 2016 (CET)
Agreed. It would be consistent and should make searching while editing easier. ~ SolSys (talk) 17:40, 27 January 2016 (CET)
And done. Fresh output uploaded. Additionally, I ran it before and after updating my EU4 installation for patch 1.15, so I was able to produce a diff for the new versions - you can see everything that changed between 1.14.4 and 1.15.0, at least as far as events, decisions and ideas go. (Actually I fixed a bug in between, so you may see "Horde unity is at least <blah>" where it should say "Yearly horde unity", but besides that everything is a change in EU4.) Hairy Dude (talk) 18:50, 27 January 2016 (CET)
Just fixed the same bug in war exhaustion and religious unity. New output and diff uploaded. Hairy Dude (talk) 19:26, 27 January 2016 (CET)
And bumped the version number, because I'm a numpty and forgot how to do that. Hairy Dude (talk) 19:55, 27 January 2016 (CET)

Feature request[edit]

Since the files tend to be used in full it would be useful to have the pre matter saying the version in the template, the computer generated template and a TOC listing, also a post matter of category:events would be nice. I think that for the events pages its also best to not have them collapsed. Thanks, Dauth (talk) 21:25, 30 March 2016 (CEST)

Subsequent to SolSys' edits, also the box wrapper start and end would be good. Dauth (talk) 21:42, 30 March 2016 (CEST)
None of this really makes sense since I switched to putting each template in its own file, in order to get better diffs. Hairy Dude (talk) 13:15, 31 March 2016 (CEST)


I was just in the middle of submitting the 2nd half of the edit when you beat me to it :(. Anyway, I incorporated your changes since you already done them (some were nicely detailed). I listed the maps in alphabetic order (in their respective tabs). I think it makes it easier to find the right one. What's your opinion? SolSys (talk) 20:45, 8 December 2015 (CET)

Ah, I didn't realise they were already in a sensible order. I listed them in the same order as they appear in game. Alphabetical order probably makes more sense tbh. Hairy Dude (talk) 23:06, 8 December 2015 (CET)
Then I'll sort them in part 3. I want to remove the wall of text and replace them with simple legends. That is, unless you already started and I don't need to invest time in that ~hopefully~? SolSys (talk) 23:25, 8 December 2015 (CET)
Nah, I stopped editing it a while ago. It's all yours. Hairy Dude (talk) 00:40, 9 December 2015 (CET)

Anchors in headings[edit]

Could you please explain me why you are adding anchors (of the same name) to headings with icons? – Lillebror (talk) 08:02, 11 March 2016 (CET)

Hrm, well it was supposed to be so that when you edit the section, the anchor that MediaWiki adds to the URL it returns you to actually exists (see Phabricator bug T4831), since that worked at one point (possibly on a different wiki). But it doesn't work here. Hairy Dude (talk) 13:28, 11 March 2016 (CET)
I noticed this behavior on the history pages, but it did not bother me too much. The additional anchor templates break the linking of the section headings with icons in the mobile version. Proposal: Remove the icons from the headings and instead combine the icons with the ingame description directly below the headings. – Lillebror (talk) 17:54, 12 March 2016 (CET)
I'm not convinced the anchor templates have anything to do with links on images not being followable on mobile. I haven't used mobile here, but on Wikipedia you can't follow a text link in a heading by tapping it because opening or closing the section takes priority. The solution to that problem is to discourage links in headings in the style guide. Are you sure the image-link breakage isn't just this issue? (Having said that, the anchors don't fix the problem they were supposed to fix, so they can be removed.) Hairy Dude (talk) 13:51, 14 March 2016 (CET)


Good afternoon. 5 days ago I sent an email to the email address you use on the wikis. As I've received no response, I was wondering if the email got to you? ~ Meneth (talk) 14:45, 15 May 2016 (CEST)

states in trade company regions[edit]

Hi, I noticed that you made several edits to the States and territories page which say or at least imply that it is not possible to have trade company provinces while having states in the same trade company region. I have never seen this limitation in the game and I have had states in trade company regions in which I also had trade company provinces(but of course not in the same area). Why do you think that this is not possible? One test case is for example Portugal in 1444 where you can unstate Ceuta and assign it to a trade company even though it is in the same trade company region(iberian charter) as the rest of the country. --Grotaclas (talk) 14:56, 19 January 2021 (UTC)

Good catch. I think my analysis was based on dev diaries but if this was ever correct, the rules have changed. I've done some testing and it looks like trade companies don't actually interact with states at all. Rather, you can't create them on the same subcontinent as your capital:
  • As Qara Qoyunlu, make a trade company in Basra or Iraq Arabi and the other states in the Levant remain.
  • As Uzbek, unstate Ural (only area in Eastern Europe) and you can make a trade company out of it, even though it's right next to their capital (in Tartar).
  • As Lithuania, unstate (for example) Zaporizhia (in the Pontic Steppe) and you can't make a trade company, even though it's in a different region from the capital (Baltic). Hairy Dude (talk) 18:41, 19 January 2021 (UTC)
Yes, you can't create them on the same subcontinent/superregion as the capital. This is mentioned in the patchnotes ("Trade Companies can now be created anywhere as long as it's now your super region", I think the second "now" should be a "not") and in Trade company (Trade companies may be formed by any nation in any of the 63 trade company regions throughout the old world, provided they are not on the same superregion as the nation's capital."). States and territories#Choosing_territories_to_promote_to_states still contains the sentence "Territories where you want to have trade companies', because you can't have a trade company in a trade company region where you have any states." and I think that this should be changed as well. --Grotaclas (talk) 19:07, 19 January 2021 (UTC)
Fixed. Thanks. Hairy Dude (talk) 00:09, 20 January 2021 (UTC)

country formation decisions[edit]

Hi, I noticed your edit to the Formation decisions page and I have a few questions about it:

  • now that end-game tags are optional, shouldn't end-game tags which prevent the formation of a country(e.g. Germany can't be formed by the Roman Empire) be mentioned in the decision?
  • if they should not be mentioned, why is the Papal states still mentioned which is also an end-game tag?
  • why did you write "end-game nation" instead of "end-game tag"? "end-game tag" seems to be the common wording. I only ever saw end-game nation here on the wiki. But the wiki section which describes the feature is still called end-game tag. And the forum search finds more than 200 results for "end-game tag" in the eu4 forums, but only two results for "end-game nation" and these two are from 2016 and predate the feature(2 relevant results for "endgame nation"). The tooltip for the Limited Country Forming option calls them "endgame country", but there is no result on the forum for that term (one relevant result when using a space). Maybe a discussion about this topic on Talk:Formation_decisions or Talk:Formable countries would be more appropriate, because others have used "end-game nation" occasionally on the wiki.
  • what is the wiki policy on province ids? Most mentions of province names on the wiki are followed by the province id in parenthesis, but you removed them from the decisions which you edited. I personally find them helpful occasionally, because I can enter the province id in the ingame search and find it no matter how it is called in my current game.

--Grotaclas (talk) 04:08, 14 February 2021 (UTC)

‘End-game tag’ is a creation of the players and not used by the game. The description of the new option uses ‘endgame country’. The wiki should adopt this formulation.
Do we then, for the sake of consistency, also need a new name for ‘German regional tags’?
In my opinion the province ids should always be added to the name. There are many reasons for it(, but none against it).
– Lillebror (talk) 09:02, 14 February 2021 (UTC)
The arguments against province ids are 1) there's no context to them: they are never shown in game unless you have debug mode on so they are just meaningless numbers unless you happen to already know what they mean, and 2) they're ugly (IMO).
'End game nation' was an arbitrary choice, I'm not married to it. But I don't like 'tag' in this text because it's a very gamey term.
Re end game tags being an optional rule, I wasn't aware of that (the description of the term on the wiki doesn't mention the rule and I haven't read all the dev diaries). I have no objection to re-adding them for this reason. The Papal State is still mentioned because I thought it was not an end game tag, but it looks like I was wrong on that point. Hairy Dude (talk) 13:57, 14 February 2021 (UTC)
The term end game tag was not really invented by the players. It was already used by DDRjake in the dev diary which introduced the feature. And the game code also calls it end_game_tag. While I think that "Endgame country" would be better than "End game nation"(because it used by the game) and they both are nicer terms than "tag", I'm afraid that they are not widely understood and few people would recognize them. I also searched reddit and for the term "endgame country"(also with space and dash) and the only eu4 related use which I found was one mod. It would be something else if the term would be displayed prominently in the game, but the tooltip in the options is not something which gets looked at very often. But I don't want to force my view on anybody.
Would it be possible to introduce a new template for provinces which just shows the name in the text, but adds a tooltip(or maybe link) which contains further information? That way the ugly numbers would not be visible directly, but the information is not lost. The tooltip could contain the province id, all alternative names and maybe even a map which shows the location of the province. It would be relatively easy to write a script which could extract the alternative province names(except renames by game effects like events) and output it in whichever format/code is necessary. And ck2utils can already generate maps with one province in yellow and a little of the surrounding area. I have some more ideas for better maps on the wiki (this forum comment has two examples), but some of them would require a mediawiki extension to be installed(to get zoomable and scrollable maps or to display svg directly). Can somebody tell me if that would be possible and whom I could contact for that?
--Grotaclas (talk) 06:22, 17 March 2021 (UTC)