Module:Focus/doc

天津风不是天津的风讨论 | 贡献2024年3月7日 (四) 18:44的版本 (创建页面,内容为“<includeonly>{{lua|Module:Focus/generic|Module:Focus/tfv|Module:Focus/dod|Module:Focus/wtt|Module:Focus/mtg|Module:Focus/lar|Module:Focus/bftb|Module:Focus/nsb|Module:Focus/bba|Module:Focus/aat}}<!-- -->Documentation Module:Focus/doc</includeonly> Implements {{tl|Focus}}. == Adding/editing focuses == First, go to the appropriate subpage for the country you want to edit. ;Add To keep the order, find focus above/below the one you want to add.<br> To add a…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

这是Module:Focus的文档页面


Implements {{Focus}}.

Adding/editing focuses

First, go to the appropriate subpage for the country you want to edit.

Add

To keep the order, find focus above/below the one you want to add.
To add a focus, start with the country tag followed by the focus ID in square brackets, example: sov['sov_infrastructure_effort_nsb'] = { }
Then, based on the parameters listed below, add an entry.

Edit

To edit the focus, find it and simply edit it.

Parameters

Parameter Required Type Example Note
name Yes String "Army Effort" Focus name from localization file.
icon Yes String
Table
"goal_generic_allies_build_infantry" Focus icon.
Focus icons. [1] is default.
dup_name No String "C" Should be used only if 2 or more focuses have the same name.
Remember to update Template:Focus/doc.
subtree No String ": industrial branches" Only if national focus page is splited to 2 or more.
Currently used only for Soviet Union.
replaceName No String "Develop Capital" In case when anchor name in nf page is different than localization name.
shared No Bool true If focus is from shared page.
By default it's set automatically by loop.
joint No Bool true If focus is from joint page.
By default it's set automatically by loop.
continuous No Bool true If focus is from continuous focus file.

Example entry: fra['fra_autoroutes'] = { name = "Autoroutes", icon = "goal_generic_construct_infrastructure" }

The national focus page should be placed at the end of the module, right after the loops.