herbix / hoi4modutilities

A VSCode extension that contains utilities for Heart of Iron IV mods developers
MIT License
83 stars 10 forks source link

[BUG] Extension doesn't support meta_effects #40

Closed Makkkkus closed 3 years ago

Makkkkus commented 3 years ago

Describe the bug When opening a focus tree with a meta_effect, the extension fails to load the tree.

To Reproduce Steps to reproduce the behavior:

  1. Add a meta_effect to a focus
  2. Click on Preview HOI4 File
  3. See error

Expected behavior The focus tree works in the game, and I therefore think that it should load. This can easily be fixed by ignoring meta_effects.

Screenshots image

Desktop (please complete the following information):

Console Logs image

Thank you!

herbix commented 3 years ago

Hi @Makkkkus Thanks for reporting the issue. Could you please provide a snippet that contains meta_effect and triggered the issue? I checked official document of meta_effect but didn't find anything that breaks the parser.

Makkkkus commented 3 years ago

Okay, here it is:

completion_reward = {
    hidden_effect = {
        meta_effect = {
            text = {
                set_country_flag = [META_SET_RULING_PARTY]
            }
            META_SET_RULING_PARTY = "[meta_set_ruling_leader]"
        }
    }
}
herbix commented 3 years ago

Fixed in v0.4.7.