[TOOL] CWTools - a mod validating extension for VS Code

Melvasul

Banned
33 Badges
Feb 3, 2017
36
55
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Res Publica
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Golden Century
  • Age of Wonders III
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Dharma
  • Cities: Skylines Industries
  • Europa Universalis IV: Rights of Man
  • Imperator: Rome
  • Cities: Skylines - Campus
  • Crusader Kings III
  • Europa Universalis 4: Emperor
  • Europa Universalis IV: Mandate of Heaven
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Europa Universalis IV
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings II
  • Europa Universalis IV: Cossacks
  • Cities: Skylines Deluxe Edition
So, I'm having a strange, and annoying bug with the tool
I simply loaded the usual files I'm working on it, and it gives me these problems on some missions
2020.05.07-17.13.png

every mission that is highlighted in red make all the autocompletion not working there
and if a mission slot has at least one mission with the red underline, the whole slot does not work

this is the mission slot error
2020.05.07-17.15.png

this is the mission error
2020.05.07-17.19.png

if I tried to generate a mission, this would happen
2020.05.07-17.21.png

If I would click on the first 7 option, it would load me a new mission correctly with the icon, required_missions, trigger, effect
2020.05.07-17.22.png

but sadly if I try to create a custom mission, everything goes nuts

I want to say that this happened only on some files, not all of them.

one thing I noticed is that, in those files, I do not have the navigation as well:
2020.05.07-17.27.png


if you need any more info tell me :D
 

SamuelKristopher

Second Lieutenant
27 Badges
Dec 6, 2015
171
68
  • Europa Universalis IV: Rights of Man
  • Europa Universalis 4: Emperor
  • Crusader Kings III
  • Cities: Skylines - Campus
  • Europa Universalis IV: Golden Century
  • Europa Universalis IV: Dharma
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Mandate of Heaven
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Res Publica
  • Cities: Skylines Industries
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
Hi there,

Is there a manual or guide about the different errors? I have thousands of errors in my areas.txt (EU4) saying that most of the province IDs are unexpected in this area. I'm not really sure what that means or why the IDs would be unexpected?
 

Dark_wing

Sergeant
40 Badges
Jun 19, 2016
66
118
  • Crusader Kings II
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Holy Fury
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Crusader Kings III
  • Battle for Bosporus
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
Can you tell cwtools to ignore entire folders?
I'm using the WIP CK2 plugin and I normally keep vanilla + several other large mods in my workspace for reference. CWTools tries too check them all, detecting 300k+ problems. When I try to filter the problems tab, vscode freezes. This is probably because it's trying to filter too much, so I'd like to tell the tool to validate only the folder of the mod I'm working on and ignore everything else. Is this possible?
 

qweyt

General
42 Badges
Mar 17, 2012
2.365
1.333
  • Crusader Kings II
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Monks and Mystics
  • Imperator: Rome
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Leviathans Story Pack
  • Imperator: Rome Deluxe Edition
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Synthetic Dawn
  • Stellaris: Apocalypse
  • PDXCON 2018 "The Baron"
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Europa Universalis IV
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III: Chronicles
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Cities: Skylines
  • Europa Universalis IV: Mare Nostrum
How does this thing work? I am trying to follow these instructions:
1592551028732.png

But I am stuck at 6 because there are no prompts anywhere.
 
  • 2
  • 1Like
Reactions:

17blue17

Field Marshal
68 Badges
Nov 9, 2003
6.445
333
Visit site
  • Stellaris: Galaxy Edition
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • 500k Club
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Nemesis
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Heir to the Throne
  • Europa Universalis III Complete
  • Leviathan: Warships
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Victoria 2
  • Victoria 2: A House Divided
How does this thing work? I am trying to follow these instructions:
View attachment 591965
But I am stuck at 6 because there are no prompts anywhere.

1) use view extensions ( if blank click on the three ... and chose show installed) to make sure you have two extensions installed - CW tools and Paradox Syntax Highlighting.

2) For step 6 it used to prompt but you can manually get into settings by looking at the cwtools extension in step 1 and clicking on the flower looking button on the extension (manage) then choose extension settings.

3) in extension settings you should fill CWtools Cache Eu4 which would be something like C:\Steam\steamapps\common\Europa Universalis IV and do the same thing for stellaris etc.

4) after you have your game install locations done then close settings.

5) Then do file open folder and go to your main mod directory in user documents. If your main mod directory location is standard then the path will include the word Stellaris or Europa Universalis IV and this tells the program what language to use in checking the files.

6) pick any one file like an event file and open it. CW tools likes to have a .txt file from the game open when it is loading and cw_tools may stop loading if you do not have a .txt file open. So please open any .txt file from the game every time you open cw_tools.

7) Then you need to do control shift P and choose CWtools: Regenerate game vanilla cache file. If not on the list type it in. At this point in the lower left a message should say generating cache and might take a few minutes. This only needs to be done when first setting up or when Paradox does a patch.

8) Next with a file open like an event file you should see after a minute or so in the lower left Loading Project and then Validating files. Folders will be shown in red orange if errors.

9) with a file open that has errors the errors should show in the bottom of the screen and there is a funnel icon you can use to pick what you want like turn off warnings and only have errors.

NOTES:

1) If you are using windows and have made a subst drive letter ( assigned a fake drive letter as a short cut) to your game install OR to your documents mod folder then cwtools will not work because windows creates a system folder called System Volume Information and cwtools does not know what to do with this system volume information folder and will stop loading. You will need to remove the subst drive letter.

2) CW tools likes to have a .txt file from the game open when it is loading and cw_tools may stop loading if you do not have a .txt file open. So please open any .txt file from the game when cw_tools starts.
 
Last edited:

qweyt

General
42 Badges
Mar 17, 2012
2.365
1.333
  • Crusader Kings II
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Monks and Mystics
  • Imperator: Rome
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Leviathans Story Pack
  • Imperator: Rome Deluxe Edition
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Synthetic Dawn
  • Stellaris: Apocalypse
  • PDXCON 2018 "The Baron"
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Europa Universalis IV
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III: Chronicles
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Cities: Skylines
  • Europa Universalis IV: Mare Nostrum
Thanks. Got it working.
 

Redride' s OG

Second Lieutenant
4 Badges
Jan 2, 2016
118
85
  • Europa Universalis IV
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II
1) use view extensions ( if blank click on the three ... and chose show installed) to make sure you have two extensions installed - CW tools and Paradox Syntax Highlighting.

2) For step 6 it used to prompt but you can manually get into settings by looking at the cwtools extension in step 1 and clicking on the flower looking button on the extension (manage) then choose extension settings.

3) in extension settings you should fill CWtools Cache Eu4 which would be something like C:\Steam\steamapps\common\Europa Universalis IV and do the same thing for stellaris etc. Important: If you are using windows and have made a drive short cut letter to your install then cwtools will not work because windows creates a system folder called System Volume Information and cwtools does not know what to do with it. If you have this then make an extra copy your install someplace else without this folder and point the install location there.

4) after you have your game install locations done then close settings.

5) Then do file open folder and go to your main mod directory in user documents. If your main mod directory location is standard then the path will include the word Stellaris or Europa Universalis IV and this tells the program what language to use in checking the files.

6) pick any one file like an event file and open it.

7) Then you need to do control shift P and choose CWtools: Regenerate game vanilla cache file. If not on the list type it in. At this point in the lower left a message should say generating cache and might take a few minutes. This only needs to be done when first setting up or when Paradox does a patch.

8) Next with a file open like an event file you should see after a minute or so in the lower left Loading Project and then Validating files. Folders will be shown in red orange if errors.

9) with a file open that has errors the errors should show in the bottom of the screen and there is a funnel icon you can use to pick what you want like turn off warnings and only have errors.

It is generating vanilla cache infinitely
 

Mr. Spock's Teddy Bear

Corporal
56 Badges
Jan 2, 2018
27
2
  • Crusader Kings II
  • Europa Universalis IV: Third Rome
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Stellaris: Distant Stars
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Cities: Skylines - Green Cities
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Parklife
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Dharma
  • Stellaris: Necroids
  • Stellaris: Federations
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Hearts of Iron IV: La Resistance
  • Prison Architect
  • Cities: Skylines - Campus
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Battle for Bosporus
  • Europa Universalis IV
  • Europa Universalis 4: Emperor
  • Victoria 2
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Steel Division: Normandy 44
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Stellaris
  • Europa Universalis IV: Cradle of Civilization
  • Victoria 2: A House Divided
Having the same problem here with step 6. Only a few errors are being highlighted when there should be at least 2,000.

1594685312620.png


1594685562791.png



--Edit--
I tried moving the mod and vanilla folders around to see if that would change anything. Just set everything back to defaults.

1. What OS? Ubuntu 20.04
2. What version of the extension? 0.8.41
3. What's the full path to the folder you opened (feel free to censor username etc)?
/home/.../.local/share/Paradox Interactive/Europa Universalis IV/mod/SuperStates129
4. Does it say "paradox" in the bottom right when you have a file open? No, it says EU4

I have the output ready if you want me to DM you.
 
Last edited:

Lysdor

Recruit
1 Badges
Dec 27, 2014
1
0
  • Stellaris Sign-up
Would it be possible to add a list of mod folders? At the moment the detection only kicks in if the user opens the actual mod folder in Documents/Paradox Interactive but it's not always where I develop mods. Could you add an option in the settings where we can add folders where to use the syntax highlight/features as well?
 

Mr. Spock's Teddy Bear

Corporal
56 Badges
Jan 2, 2018
27
2
  • Crusader Kings II
  • Europa Universalis IV: Third Rome
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Stellaris: Distant Stars
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Cities: Skylines - Green Cities
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Parklife
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Dharma
  • Stellaris: Necroids
  • Stellaris: Federations
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Hearts of Iron IV: La Resistance
  • Prison Architect
  • Cities: Skylines - Campus
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Battle for Bosporus
  • Europa Universalis IV
  • Europa Universalis 4: Emperor
  • Victoria 2
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Steel Division: Normandy 44
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Stellaris
  • Europa Universalis IV: Cradle of Civilization
  • Victoria 2: A House Divided
Having the same problem here with step 6. Only a few errors are being highlighted when there should be at least 2,000.

View attachment 599762

View attachment 599763


--Edit--
I tried moving the mod and vanilla folders around to see if that would change anything. Just set everything back to defaults.

1. What OS? Ubuntu 20.04
2. What version of the extension? 0.8.41
3. What's the full path to the folder you opened (feel free to censor username etc)?
/home/.../.local/share/Paradox Interactive/Europa Universalis IV/mod/SuperStates129
4. Does it say "paradox" in the bottom right when you have a file open? No, it says EU4

I have the output ready if you want me to DM you.

Found a solution. For any future lurkers using Linux, you need to
- clone https://github.com/cwtools/cwtools-eu4-config to a folder
- In settings, extensions, set rules_version to manual and rules_folder to that folder you just cloned.