Skip to content

Focus tree preview

Chaofan Yang edited this page Aug 23, 2020 · 9 revisions

Demo

Demo

How to open

  • Click button Preview HOI4 file button on tool bar of editor of an opened focus tree file.
  • When editing an opened focus tree file, open command palette (Ctrl+Shift+P), type command Preview HOI4 File, and press enter to confirm.

Focus tree view

  • Hold button on blank and drag to move focus tree view.
  • Click a focus to navigate to focus tag in file.
  • Scroll mouse wheel to zoom whole the focus tree.

Icons in focus tree are from interface/goals.gfx. If your focuses use icons from other files and want it to be shown in preview, please refer to: Reference custom sprite_type in focus/technology tree.

Shared focuses

Focus tree file can reference other focus tree file like sprite files: Reference custom sprite_type in focus/technology tree. Here's an example:

# In common/national_focus/china_nationalist.txt, to reference shared_focus "CHI_invite_foreign_investors".
#!focus:common/national_focus/china_shared.txt

Focus tree selection

If there're multiple focus trees in this file. A combo box will be here. Choose which focus tree you want to preview.

Search box

Typing focus ID or part of it in the search box will highlight focuses and navigate to first matched focus. Press enter to navigate to next focus. Hold shift and press enter to navigate to previous focus.

Condition multi-selection combo box

Conditions in this combo box are from offset and allow_branch field of focuses. Toggle conditions will re-render focus tree, showing focuses that are allowed on correct position defined by x, y, and offset.

Allow branch multi-selection combo box (deprecated, only visible when flag useConditionInFocus is disabled)

If the focus tree contains focuses with allow_branch field, there will be a multi-selection combo box on focus tree view, indicating whether the focuses and their successors are shown.

Toggle warnings button

Show/hide warning list, which shows all warnings. If there're no warnings, this button is invisible.

Clone this wiki locally