Template talk:National ideas

From Europa Universalis 4 Wiki
Jump to navigation Jump to search

First draft[edit source]

I've created a first draft. Note that I haven't added the name parameter support, as that's a bit of a chore. ~ Meneth (talk) 16:00, 6 January 2016 (CET)

Letter buckets[edit source]

We also need to split it by character like we did for {{icon}}, so as to make it more resource efficient, and easier to edit (a page this large can easily lag during editing). ~ Meneth (talk) 16:00, 6 January 2016 (CET)

The # of NIs by letter look roughly like this:

A 14 B 12 C 16 D 4
E 2 F 2 G 6 H 9
I 6 J 4 K 14 L 7
M 17 N 11 O 4 P 11
Q 1 R 6 S 18 T 16
U 1 V 3 W 3 X 0
Y 4 Z 1

For the most part, one template per letter seems reasonable, but we might want to combine D, E, F, G for 14, H, I, J for 19, O, P for 15, and U, V, W, X, Y, Z for 12. Much like how x, y, z are combined in {{icon}}. Thoughts? ~ Meneth (talk) 16:18, 6 January 2016 (CET)

Combination might be useful but that's more for set up than use so its a decision which one or two people have to make and then implement. The rest of us can use the same code for either option. I'm also putting myself out of the setup team here. Dauth (talk) 16:22, 6 January 2016 (CET)
Are the group ideas factored into this as well? It would be best to change their name to be inline with the in-game name. ~ SolSys (talk) 16:25, 6 January 2016 (CET)
Yes, those are included, as are the converter ideas. ~ Meneth (talk) 16:27, 6 January 2016 (CET)

A related, but probably mostly unavoidable, issue is that buckets will lead to duplication of NIs used by two countries (E.G., Prussian ideas). A decent solution to this is probably to just have one call the other, so if you get to "|Brandenburg = blah", that'd say "|Brandenburg = {{national ideas|Prussia}}" or something like that. Then the actual info won't be duplicated at least. ~ Meneth (talk) 16:33, 6 January 2016 (CET)

Sounds good. I like this because it can even be extended to tags using group NIs [some of them aren't that obvious]. ~ SolSys (talk) 17:15, 6 January 2016 (CET)
AFAIK, it's not possible that a template is recursive. – Lillebror (talk) 08:02, 7 January 2016 (CET)
It stop if he find a loop but if we do something like "|Brandenburg = {{national ideas/op|Prussia}}" we don't have any problem, because NIs call NIs/b that call NIs/op. Stigni (talk) 09:14, 7 January 2016 (CET)

Needed features[edit source]

We wanted the template to be able to show the ideas, have the notes option for the new traditions and ideas event and change name if needed. We don't have the latter, which I'm ok with. Do we have the other two? Dauth (talk) 16:22, 6 January 2016 (CET)

I see that the pages have been split, but the naming remained the same. Is it still planned or..?~ SolSys (talk) 12:12, 7 January 2016 (CET)
Yes it is still planned, and I propose to change the default name as in-game because Spanish ideas looks better than Flag of Spain Spain/Flag of Castile Castile ideas. Stigni (talk) 12:56, 7 January 2016 (CET)

Which countries need to be added in this template?[edit source]

I have removed Egypt from this template because I believe that in this template need to be added only the TAGs that there are in /Europa Universalis IV/common/ideas/00_country_ideas.txt or the group in /Europa Universalis IV/common/ideas/zz_group_ideas.txt. The secondary TAG will have a link to the main TAG (e.g. Castile to Spain), and all the other we insert {{National ideas}} in country's page. Stigni (talk) 14:15, 8 January 2016 (CET)

I think if a [re]formable nation doesn't get the New Traditions & Ambitions event [meaning it doesn't have a NI set associated with it], should mention the most likely NI + note [like on the Egypt page]. ~ SolSys (talk) 14:58, 8 January 2016 (CET)
I agree with SolSys' suggestion, otherwise I can see people trying to add ideas directly into formed nation strategy pages which is what we wanted to avoid. Dauth (talk) 16:07, 8 January 2016 (CET)
I too agree with SolSys, assuming I understand the discussion here correctly. ~ Meneth (talk) 16:10, 8 January 2016 (CET)

Deployment of this[edit source]

The next step of the ideas template deployment is on the national ideas page. This I think would remove the final duplication of ideas. Dauth (talk) 16:07, 8 January 2016 (CET)

I can do it later/tomorrow. They will appear without flags/country-name though, so there might be some confusion. ~ SolSys (talk) 16:30, 8 January 2016 (CET)
I think we'd like them to have the names/flags on National ideas, is it possible? If not then I'd prefer to go without flag than have duplication. Dauth (talk) 16:33, 8 January 2016 (CET)
It would require modifying the name parameter. Maybe splitting it into Name1/Name2 might be better. It will call Name1 one from country page and Name2 from others. ~ SolSys (talk) 16:47, 8 January 2016 (CET)
Scrap that, apparently you can override the name. Stigni‎ already took care of the page. ~ SolSys (talk) 17:28, 8 January 2016 (CET)
I have done, but "Warning: Template include size is too large. Some templates will not be included." It reach Smolensk and it stop. Stigni (talk) 17:50, 8 January 2016 (CET)
The issue is caused by the template system being rather naive. It essentially included the whole switch statement, not just the bit that matches. Not sure what to do about it. ~ Meneth (talk) 18:27, 8 January 2016 (CET)
I may be unpopular saying this after all the work with the templates. Meneth has told me we're effectively hitting a hard limit with the letter buckets and transclusions. The options that we've been able to come up with are as follows
  1. Lillebror's idea of a template per idea group (400+)
  2. Going back to the old transcluding from the National ideas page and having the naming issues.
The question then becomes, do we want to have to maintain 400+ templates, or put up with some slightly dodgy naming in strategy pages for the ideas. Dauth (talk) 11:31, 9 January 2016 (CET)
Why 400? Can't it be achieved with splitting the current template into 4-5 smaller templates? ~ SolSys (talk) 11:42, 9 January 2016 (CET)
The current template is ~26 templates. Splitting it into 4-5 you'd already be at 100. ~ Meneth (talk) 11:46, 9 January 2016 (CET)
It's also possible we can get around the naming issue even with section transclusion by using {{#ifeq:{{FULLPAGENAME}}|National ideas|NAME WITH FLAG|IN-GAME NAME}} for the name.
I've got a proof of concept of this on User:Meneth/Sandbox; in a preview on a different page, try {{#lst:User:Meneth/Sandbox|Test}}; note how "B" is shown rather than "A" due to being on a separate page. ~ Meneth (talk) 11:41, 9 January 2016 (CET)

I think if we link directly {{National ideas/a}} instead {{National ideas}} in National ideas page; we can jump a Template and gain somenthing. This can be done with AWB, if nobody will do this I will do in late afternoon. Stigni (talk) 11:36, 9 January 2016 (CET)

{{National ideas}} is tiny now, so it really wouldn't amount to much, and it'd just be delaying the issue slightly even if it were somehow enough. ~ Meneth (talk) 11:42, 9 January 2016 (CET)
Tried it out in a preview; it got to Sulawesi before being too large. Not a massive improvement. ~ Meneth (talk) 11:46, 9 January 2016 (CET)
Another idea (but I don't know if it works) that if set something like {{#ifeq: {{{FULLPAGENAME}}}|National ideas| Insert every template | Do the switch}} so we insert in the page one template for letter and it insert all the NIs. Stigni (talk) 11:46, 9 January 2016 (CET)

I'm kinda tired so its not the best, but were the easy [work-around] solutions considered? Besides going back to the old transclusion style [and minimizing the template back to group NIs only], there's also the option of splitting the NI page itself [thus avoiding the issue with the switch statement], but make it seamless to users by having an all-inclusive ToC at the top of the page. ~ SolSys (talk) 22:45, 9 January 2016 (CET)

The problem with splitting is that it makes search and the like harder. I definitely prefer going back to section transclusion with some added logic for the naming. ~ Meneth (talk) 23:03, 9 January 2016 (CET)
I think it would be easier too. It's just the page was responding slow when editing because of its size. Think of it this way, all the search would direct to main page and from user gets a ToC straight up. If you'd decide to go back, I have a file with all the country NIs. I'll have it ready just in case with old name under name1 and new name name2 to be used with your {{#ifeq:{{FULLPAGENAME}}|National ideas|NAME1|NAME2}}. ~ SolSys (talk) 23:35, 9 January 2016 (CET)
Yeah, the performance of the page isn't great. Personally I copy it over to Notepad++, edit there, then copy it back.
There doesn't seem to be any perfect solutions here though; everything proposed so far has one drawback or another. ~ Meneth (talk) 23:53, 9 January 2016 (CET)

I find it hard to say goodbye to this idea and return to the transclusions.
There is one thing I want to mention regardless of the implementation. (A suggestion from Stigni: see here.) We have a stylistic incongruity in the headers on the national ideas page between unique and group ideas. The group ideas have always the ingame name in the header while unique ideas have this only on country pages. So I would like to change the header of unique ideas on country pages. The disadvantage is that the link to the country page is lost, but this could be added as note. – Lillebror (talk) 08:26, 10 January 2016 (CET)

Extensions[edit source]

I found this extention [1] that can let to convert the parameters of the switch to a list, so we insert all the list in the NIs page. We a couple of well placed if we can spit the ideas (for each letter) in Countries/Group/Converted. Stigni (talk) 13:24, 10 January 2016 (CET)

Did you mean something in this fashion {{Loops xx | xx={{National ideas|country1}} | xx={{National ideas|country2}} | xx={{National ideas|country3}} }} ?
I didn't see a mention of any limitation like with the LoopFunctions[2] so it seems worth investigating. ~ SolSys (talk) 14:36, 10 January 2016 (CET)
I already implemented a draft on my sandbox, but now it doesn't work because we don't have the extension. Stigni (talk) 14:44, 10 January 2016 (CET)
I've installed the extension, but nothing appears to be happening on your sandbox.
Experiment a bit with and see if you can get it working, would you? ~ Meneth (talk) 17:53, 15 January 2016 (CET)
Most ot the examples there use also the Variables extension. – Lillebror (talk) 11:16, 16 January 2016 (CET)
Correct, the [3] say: "{{#forargs}} is to be used in templates. It takes arguments that are passed to the template and puts them in variables accessible by VariablesExtension's {{#var:}} parser function." Stigni (talk) 11:28, 16 January 2016 (CET)
Installed as well now. Still doesn't appear to be working. ~ Meneth (talk) 12:17, 17 January 2016 (CET)
I don't really understand what you have installed, as far as I know LoopFunctions and Variables but not Loops[4], because neither {{#while}} works. Stigni (talk) 09:19, 18 January 2016 (CET)
@Stigni: You can see here which expansions are installed. – Lillebror (talk) 10:53, 18 January 2016 (CET)
Three separate extensions needed to maybe get this working? None of which are likely to be used outside a single page? Nah, I'm putting my foot down; this is getting silly. ~ Meneth (talk) 10:55, 18 January 2016 (CET)
No just two of them Loops and Variables. But of course I understand your point. Stigni (talk) 11:42, 18 January 2016 (CET)
This takes longer than expected. We can get back to it in the future, but for now I restored the Template:Group NI and modified the Template:Country to use transclution from NI page. I had a problem with the group ideas, can someone take care of it? [as of now countries with group ideas don't display NI :/] ~ SolSys (talk) 13:57, 18 January 2016 (CET)

(Unindent) You'll need to set up sections for the group ideas on the national ideas page; right now they don't have those, so nothing gets transcluded. ~ Meneth (talk) 14:04, 18 January 2016 (CET)

Can't the Ideas parameter be used to get the NI directly from the group template? ~ SolSys (talk) 14:11, 18 January 2016 (CET)
Probably, yeah. ~ Meneth (talk) 14:12, 18 January 2016 (CET)
Sectioned them for the time being. Best to remove later to reduce load/performance. ~ SolSys (talk) 14:24, 18 January 2016 (CET)
@SolSys: As you added the 'name2' parameter to the {{idea group}} template ... could you please change the pages which still use the {{national ideas}} template. – Lillebror (talk) 08:56, 20 January 2016 (CET)
Sorry, saw this just now. I'm having a bit of an issue with formable nations [the ones lacking unique NIs]. Can't seems to add the note with transclution. I'll add them as a comment for now and deal with them later. Edit: Done. ~ SolSys (talk) 20:09, 21 January 2016 (CET)

Options[edit source]

Can we keep this from getting too distributed, what are the options and what are the adv/disadv of using them? I am still mostly for going back to translcusions. Dauth (talk) 20:58, 11 January 2016 (CET)

Not much to say for adv/disadv, but the options seem to be:
  1. Going back to old NI page + merged template for Group NI + implementing the naming Meneth suggested. cons: unresponsiveness.
  2. Keeping the current NI template + splitting NI page into 2 + ToC at top to make it seem seamless. cons: search harder. Likely to require another split in the future as # of ideas grows
  3. Keeping the current NI template + testing the new function [5] Stigni suggested. cons: not installed, requires testing.
~ SolSys (talk) 21:21, 11 January 2016 (CET)
OK therefore I suggest we go for the third of your options and try the new install. However I think national ideas is a popular page and don't want it broken for long. If we can't solve it soon we may need to go back to the translcusions. Dauth (talk) 21:24, 11 January 2016 (CET)

Parameter[edit source]

Do we really need the construction out of the icon templates for the parameter here? – Lillebror (talk) 19:53, 8 January 2016 (CET)

What do you mean? ~ Meneth (talk) 20:02, 8 January 2016 (CET)
Sorry. That was a thought of the day before yesterday. – Lillebror (talk) 10:49, 9 January 2016 (CET)

Withdrawal[edit source]

SolSys has turned this off on the main National Ideas page, I think the same should be done on the country pages to remove any duplication of content. If people wish to persevere then this template can be kept but I would like to see a note on the main page once we've disabled it elsewhere. Dauth (talk) 17:03, 15 January 2016 (CET)

We probably should delay any further changes [to country pages and etc.] until the plugin is tested. I changed the NI page for now because the solution was delayed [and you did mention it being a popular page]. BTW, I included two name parameters over there in case the plugin won't deliver. ~ SolSys (talk) 17:24, 15 January 2016 (CET)

version parameter is broken[edit source]

the version parameter seems to only generate a single } for outdated versions. See the example on the right side which uses "version=1.31". --Grotaclas (talk) 04:39, 28 November 2021 (UTC)

Aachen ideas
Ambox outdated info.png Please help with verifying or updating this infobox. It was last verified for version 1.31.

Traditions.png Traditions:

+1 Diplomat
+1 Yearly prestige

Prestige decay.png Charlemagne's Capital

−1% Prestige decay

Yearly republican tradition.png Imperial Free City

+0.3 Yearly republican tradition

Stability cost modifier.png Spa City

−10% Stability cost modifier

Production efficiency.png Guild and Government

+10% Production efficiency

Missionary strength vs heretics.png Expel Heretical Officials

+2% Missionary strength vs heretics

Construction cost.png Baroque Architecture

−10% Construction cost

Diplomatic reputation.png Congresses of Aachen

+2 Diplomatic reputation

Idea bonus.png Ambition:

+1 Diplomatic relation
Changed something after the tests. Arrgh. Fixed. – Lillebror (talk) 08:12, 28 November 2021 (UTC)