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)