National focuses not working
Update: fixed some of that, but now I'm getting this: [07:38:43][persistent.cpp:48]: Error: "Unexpected token: , near line: 1" in file: "common/national_focus/.DS_Store" near line: 1
[07:38:43][persistent.cpp:48]: Error: "Unexpected token: , near line: 1" in file: "common/national_focus/.DS_Store" near line: 1
[07:38:43][persistent.cpp:48]: Error: "Unexpected token: , near line: 1" in file: "common/national_focus/.DS_Store" near line: 1
[07:38:43][persistent.cpp:48]: Error: "Unexpected token: , near line: 1" in file: "common/national_focus/.DS_Store" near line: 1
[07:38:43][persistent.cpp:48]: Error: "Unexpected token: , near line: 1" in file: "common/national_focus/.DS_Store" near line: 1
[07:38:43][persistent.cpp:48]: Error: "Unexpected token: focus, near line: 77" in file: "common/national_focus/canadian-focus-tree.txt" near line: 111
[07:38:43][persistent.cpp:48]: Error: "Unexpected token: focus, near line: 114" in file: "common/national_focus/canadian-focus-tree.txt" near line: 131
[07:38:45][triggerimplementation.cpp:3132]: Invalid focus scripted in trigger. has_completed_focus = CAN_ally_the_united_states (events/canada_offers_alliance.txt:13: has_completed_focus)
[07:38:45][trigger.cpp:114]: Trigger failed to validate: events/canada_offers_alliance.txt:13: has_completed_focus
In the select effect for "Ally the United States" you need to remove the < from the reward:
USA = { country_event = { id = <canada_offers_alliance.1 } }
In your event, you need to wrap the trigger in the tag selector, so it knows which country completes the focus:
CAN = {
has_completed_focus = CAN_ally_the_united_states
}
As for this line:
[07:38:43][persistent.cpp:48]: Error: "Unexpected token: , near line: 1" in file: "common/national_focus/.DS_Store" near line: 1
Do you by any chance play on a Mac? If so, you need to remove this file which MacOS adds in to downloaded files.
do you know where to find said file? I don't see it under common/National focus
I managed to get this fixed, but I'm still not getting the event for the alliance, along with that when I attempt to finish the focus "Canada Day" this pops up in the error log :
[09:29:58][effectimplementation.cpp:10167]: common/national_focus/canadian-focus-tree.txt:67: set_autonomy: cant have a relation to yourself
I'm not getting any error logs when I do the focus that fires the event, but I get an error log while doing the focus that tries to make Canada independent.
and now I'm getting this:
[13:31:54][persistent.cpp:48]: Error: "Unexpected token: focus, near line: 113" in file: "common/national_focus/canadian-focus-tree.txt" near line: 130
[13:31:54][nationalfocus.cpp:2016]: CAN_ally_the_united_states: Couldn't find dependency CAN_canada_first
I think it may be because in "Canada Day" you're trying to set the autonomy in regards to yourself:
set_autonomy = {
target = CAN
autonomy_state = autonomy_free
end_wars = no
end_civil_wars = no
}
Should be:
ENG = {
set_autonomy = {
target = CAN
autonomy_state = autonomy_free
end_wars = no
end_civil_wars = no
}
}
And the UK is Canada's master.
As a side note, are you doing anything "weird" when creating your focuses? When exporting, the site automatically converts a space to _. However, only in the focus "Ally the United States" does this work correctly; giving the ID "CAN_ally_the_united_states" but all the others have no spaces. For example: "CAN_keepthestatusquo" or "CAN_canadaday". These should still work correctly, I'm just curious as to why they're not exporting with _ when the names have spaces.
I think it may be because in "Canada Day" you're trying to set the autonomy in regards to yourself:
set_autonomy = {
target = CAN
autonomy_state = autonomy_free
end_wars = no
end_civil_wars = no
}
Should be:
ENG = {
set_autonomy = {
target = CAN
autonomy_state = autonomy_free
end_wars = no
end_civil_wars = no
}
}
And the UK is Canada's master.
As a side note, are you doing anything "weird" when creating your focuses? When exporting, the site automatically converts a space to _. However, only in the focus "Ally the United States" does this work correctly; giving the ID "CAN_ally_the_united_states" but all the others have no spaces. For example: "CAN_keepthestatusquo" or "CAN_canadaday". These should still work correctly, I'm just curious as to why they're not exporting with _ when the names have spaces.
-jordsta95
When I check the files the ids for the focuses all have underscores rather than not having spaces in them.
more error logs I got:
[09:23:47][persistent.cpp:48]: Error: "Unexpected token: focus, near line: 80" in file: "common/national_focus/canadian-focus-tree.txt" near line: 135
[09:23:48][triggerimplementation.cpp:3132]: Invalid focus scripted in trigger. has_completed_focus = CAN_ally_the_united_states (events/canada_offers_alliance.txt:14: has_completed_focus)
[09:23:48][trigger.cpp:114]: Trigger failed to validate: events/canada_offers_alliance.txt:14: has_completed_focus
GekGamer
after finally getting my focus tree up and running, I've started to experience problems. The first example is when trying to do a focus to ally the US the event doesn't fire for them. The second example is after doing the focus to make Canada independent, nothing happens. Here are the error logs:
[11:44:49][parser.cpp:932]: Error: unexpected token in file: "common/national_focus/canadian-focus-tree.txt" near line: 105 ( canada_offers_alliance.1 )
[11:44:49][effect.cpp:297]: Error: "Malformed token: <, near line: 105
Unexpected token: canada_offers_alliance.1, near line: 105" in file: "common/national_focus/canadian-focus-tree.txt" near line: 105
[11:44:49][persistent.cpp:48]: Error: "Unexpected token: focus, near line: 114" in file: "common/national_focus/canadian-focus-tree.txt" near line: 131
[11:44:49][nationalfocus.cpp:2016]: CAN_ally_the_united_states: Couldn't find dependency CAN_canada_first