In every focus reward do i have to put a } at the end?

So when im modding i run into problems. I try to fix the errors but new ones just pop up, i need someone to clarify something. Where do i put the this thing }? Like does it have to be there at the end or can i just leave the end blank?

It very much depends on what the actual error is.

Sometimes, it is a case of missing a } at the end. But sometimes it could be due to the wrong scope (e.g. trying to add a building, but not specifying the state to add it to).


If you run your game in debug mode, I'll be more than happy to help solve the issue :)

It very much depends on what the actual error is.

Sometimes, it is a case of missing a } at the end. But sometimes it could be due to the wrong scope (e.g. trying to add a building, but not specifying the state to add it to).


If you run your game in debug mode, I'll be more than happy to help solve the issue :)

-jordsta95

 Alright so im trying to mod a german focus tree. Its basically a mod where "what if the weimar republic standed", also its a country overhaul



Here is how it looks ingame: 





Here is the tree: https://edge.hoi4modding.com/focus-tree/edit/36098



Error:

[11:09:10][persistent.cpp:48]: Error: "Unexpected token: focus, near line: 104" in file: "common/national_focus/wmr-tree.txt" near line: 115

[11:09:10][persistent.cpp:48]: Error: "Unexpected token: focus, near line: 137" in file: "common/national_focus/wmr-tree.txt" near line: 345

[11:09:10][nationalfocus.cpp:2016]: WMR_proclaimthegermanrepublic: Couldn't find dependency WMR_democracyatitswork 

[11:09:10][nationalfocus.cpp:2016]: WMR_the_red_threat: Couldn't find dependency WMR_support_the_popular_front 

[11:09:10][persistent.cpp:48]: Error: "Invalid focus: AST_never_another_gallipoli: focuses, near line: 140

Invalid focus: AST_support_indonesian_uprising: focuses, near line: 141

Invalid focus: AST_delegation_to_china: focuses, near line: 142" in file: "common/bookmarks/blitzkrieg.txt" near line: 143

[11:09:10][persistent.cpp:48]: Error: "Invalid focus: AST_never_another_gallipoli: focuses, near line: 200

Invalid focus: AST_support_indonesian_uprising: focuses, near line: 201

Invalid focus: AST_delegation_to_china: focuses, near line: 202" in file: "common/bookmarks/the_gathering_storm.txt" near line: 203

[11:09:12][trigger.cpp:641]: Invalid trigger 'communist' in events/GE_events.txt line : 90

[11:09:12][trigger.cpp:494]: Error: "Unknown trigger-type: communist, near line: 90" in file: "events/GE_events.txt" near line: 93

[11:09:12][effect.cpp:402]: Invalid effect 'set_ruling_party' in events/GE_events.txt line : 96

[11:09:12][effect.cpp:297]: Error: "Unknown effect-type: set_ruling_party, near line: 96" in file: "events/GE_events.txt" near line: 99

You need to remove the first line "completion_reward = {" from the focus "Allied investments"


In all focuses which add communist support the reward is missing a } at the end. 


In "Agrarian reform" you are missing a } before the line "add_popularity = {"


In all focuses which add communist support, in the reward it should be "communism" instead of "communist".


In "Build The Second High Seas fleet" you are missing a } at the end

You need to remove the first line "completion_reward = {" from the focus "Allied investments"


In all focuses which add communist support the reward is missing a } at the end. 


In "Agrarian reform" you are missing a } before the line "add_popularity = {"


In all focuses which add communist support, in the reward it should be "communism" instead of "communist".


In "Build The Second High Seas fleet" you are missing a } at the end

-jordsta95

 i did what you said and modified a couple things but its still not working



the error now:

[15:30:28][persistent.cpp:48]: Error: "Unexpected token: focus, near line: 155" in file: "common/national_focus/wmr-tree.txt" near line: 172

[15:30:28][persistent.cpp:48]: Error: "Unexpected token: focus, near line: 175" in file: "common/national_focus/wmr-tree.txt" near line: 355

[15:30:28][nationalfocus.cpp:2016]: WMR_the_red_threat: Couldn't find dependency WMR_support_the_popular_front 

[15:30:28][persistent.cpp:48]: Error: "Invalid focus: AST_never_another_gallipoli: focuses, near line: 140

Invalid focus: AST_support_indonesian_uprising: focuses, near line: 141

Invalid focus: AST_delegation_to_china: focuses, near line: 142" in file: "common/bookmarks/blitzkrieg.txt" near line: 143

[15:30:28][persistent.cpp:48]: Error: "Invalid focus: AST_never_another_gallipoli: focuses, near line: 200

You're still missing the closing } in the following focuses' rewards:

  • Agrarian reform
  • Fight the Opposition
  • The Red Threat.

And in "Mobilize the army" there is a } at the end of the reward which needs removing.

Other than those, I don't see any issues.