[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.
Quick Question:

Is this still being worked on? The last update of CWTools was in september and with the new Stellaris version/dlc I seem to be getting more errors when importing the same vanilla files before making any changes to them than before the new version/dlc.
 
It is, but I don't really care that much about some lines being red, so I haven't put as much effort into making sure none are than I might have done.

Though there have been updates since September, it automatically updates the rules without having to update the extension. (I can't remember, maybe you need to install git for that, though)
 
Any chance it could be updated for EU4 1.30.4? :D
 
I think I'm stupid, I spent like 2 hours trying to figure out why it's not giving me any auto completion choices, tooltips, or letting me go to any definition or references.
The only thing it seems to be doing is coloring, I also seem to have generate options for various event types. Other than that, nothing works.

I'm trying to work on a Stellaris mod, so I thought that this mod has support for it.
 
I think I'm stupid, I spent like 2 hours trying to figure out why it's not giving me any auto completion choices, tooltips, or letting me go to any definition or references.
The only thing it seems to be doing is coloring, I also seem to have generate options for various event types. Other than that, nothing works.

I'm trying to work on a Stellaris mod, so I thought that this mod has support for it.
I understand that it can be frustrating. I had trouble myself. :) I see you have both stellaris and eu4 for games and the instructions for cw tools is the same for both. So please go over to the cw tools thread on the eu4 forum and read posts 1, 15, and 18. I spent a lot of time trying to get the instructions in the eu4 cw_tools thread to be helpful.

:)
 
Hello. I'm using CWTools for EU4 modding, but I find that CWTools never loaded keys in my mod. For example, I added a new tag XXX, but CWTools still tells me "Expecting a country_tags value" when I use "tag = XXX". It also warns me for localisations and sends error for me when I use global flags, new religions etc. Even though I created them in my mod.
WHY DID CWTools NEVER READ MY MOD's NEW DECLARATIONS?

By the way, it's said that "tree view cwtools-files never registered", and I don't know how to do with this.
 
  • 1
Reactions:
Hello. I'm using CWTools for EU4 modding, but I find that CWTools never loaded keys in my mod. For example, I added a new tag XXX, but CWTools still tells me "Expecting a country_tags value" when I use "tag = XXX". It also warns me for localisations and sends error for me when I use global flags, new religions etc. Even though I created them in my mod.
WHY DID CWTools NEVER READ MY MOD's NEW DECLARATIONS?

By the way, it's said that "tree view cwtools-files never registered", and I don't know how to do with this.
In the future please post eu4 questions in the eu4 forum cw tools thread as I check there more often :)

There could be several reasons why cw tools is not finding your new tag or localizations etc including:

1) vs code is not very good at noticing changed files so you often need to close vscode and then reopen vscode and then have cw_tools load the project and validate the files again. This can be required frequently when editing your files. This is a known problem with vscode and there is no known fix other than closing and reopening from time to time.

2) your mod is located in the wrong place like the mod folder under steam rather than the mod folder in my documents. Never use the mod folder under steam.

3) your mod is zipped or is a steam mod. Cw_tools only works with local mod ( not steam mods ) and they must be unzipped.

4) if your mod is a local non steam mod in your documents then please delete any descriptor file for the mod and make sure the .mod file uses a short path like path="mod/Fred" and not a long path with program files etc.

If things are still not working please zip up your mod and .mod file ( need both) and upload to someplace like mediafire and then post a download link in the cw_tools thread on the eu4 Paradox forum and I will take a look. I need it zipped up so it is easy to download the whole thing.

As far as your tree error I have never seen this. Can you look at posts 1, 15, and 18 in the eu4 forum cw tools thread and make sure you have things installed correctly? I will also ask the author of cw_tools Dayshine about that error.

:)
 
Hello. I'm using CWTools for EU4 modding, but I find that CWTools never loaded keys in my mod. For example, I added a new tag XXX, but CWTools still tells me "Expecting a country_tags value" when I use "tag = XXX". It also warns me for localisations and sends error for me when I use global flags, new religions etc. Even though I created them in my mod.
WHY DID CWTools NEVER READ MY MOD's NEW DECLARATIONS?

By the way, it's said that "tree view cwtools-files never registered", and I don't know how to do with this.
The author does not understand why the tree view error happened. It has happened to a couple other people and they got it to work by deleting a strange file in the mod directory. Usually happens when cw_tools opens and shows paradox language instead of stellaris or eu4 then changes to stellaris or eu4. Maybe something new that is vscode related. If you have any strange non game files ( also not .cwtools ) in the mod directory then back it up and delete it and see if error goes away. You will need to restart vscode.
 
Last edited:
Sadly cannot back up all the other enthusiastic reviews on this thread. CWTools and its sister tool (Paradox Syntax Highlights, also on the vscode extension markteplace) do not function correctly for me; the text is either all in lightblue or in orange (for strings). There's no correct syntax highlight, nor are there any tooltips. I've attempted reinstalling twice and there have never been any results, so sadly I can't see why CWTools is regarded as a viable tool, as all it has done is change text from white to light blue for me, which is not exactly what I'd call a practical modding tool.
 
Sadly cannot back up all the other enthusiastic reviews on this thread. CWTools and its sister tool (Paradox Syntax Highlights, also on the vscode extension markteplace) do not function correctly for me; the text is either all in lightblue or in orange (for strings). There's no correct syntax highlight, nor are there any tooltips. I've attempted reinstalling twice and there have never been any results, so sadly I can't see why CWTools is regarded as a viable tool, as all it has done is change text from white to light blue for me, which is not exactly what I'd call a practical modding tool.
It sounds like something is not installed correctly and yes I had a lot of trouble at first just like you are. I must have installed and reinstalled 10 times before I found the problem. Please go over to the Eu4 mod forum and look for the cwtools thread just like this one. The instructions are a little more clear in that thread as I spent a lot of time trying to make them understandable. Please read posts 1, 15, and 18 and hopefully you can get cwtools to work.
 
Hi, uh.... Its normal that this extension takes TWO AND HALF GBs of RAM????
The cwtools game validation rules are fairly small in size. You should be able to look for yourself in C:\Users\yourname\.vscode\extensions\tboby.cwtools-vscode-0.9.5

It also depends on how many mods and how large the mods are that you are checking as the mods get loaded into vscode.

Also Vscode needs to be closed and reopened often for things to work correctly. I close and reopen every time I change something. Just remember to always have at least one .txt game file open for cwtools to work. Without a game .txt file open it often just sits there and does nothing.
 
I am using macOS for my modding (when I'm out and about. I do have a Windows 10 Desktop). For some reason despite me linking it to the Hoi4 Files/Mod File I still get a huge list of errors regardless. Most of which things like 'does not detect localisation' 'cannot find character in files' etc. Things that wouldnt be there if it could find the hoi4 files.

My question is: Is there a way to fix this? Or does the extension not really support macOS?
 
Tell me how I can change the settings so that tooltip ignores thе scope. Because the tooltip string is localization and will not be executed, so it does not matter in which area it is located.
1657824115347.png
 
Hey, is the syntax available in plain text anywhere? I want to update the old Notepad++ syntax for the newest version? AKA a list of all the active scopes, conditions, commands, definition tokens, modifiers, etc.?

Any way to extract a list from the VScode extension?
 
Last edited:
Hey, is the syntax available in plain text anywhere? I want to update the old Notepad++ syntax for the newest version? AKA a list of all the active scopes, conditions, commands, definition tokens, modifiers, etc.?

Any way to extract a list from the VScode extension?
The extension files are .cwt which are the same as .txt which you can open with a text editor. Note the code is frequently updated every time a new patch comes out plus there are some fixes along the way so you will have to constantly update.
 
FYI CWTools is on the Stellaris Modding Den.

The basic install instructions are in the posts above. For help with other issues follow the link below:

 
Quick question.
I've seen that when loaded the CWT server process uses around 5 GB of RAM in my Fedora machine
1705653096872.png

Would using a local version of the rule reduce the usage by a bit?