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

  • We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
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
 
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?
 
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?
 
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:
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:
Thanks. Got it working.
 
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
 
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:
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?
 
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.