Skip to content

cwtools/cwtools-hoi4-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.cwt config files for Hearts of Iron IV

Rule files for CWTools - Hearts of Iron IV Edition

CWTools is a static code analysis tool for Paradox games. It shows potential errors in the codebase, provides autofilling, handy tooltips and much more. This repo tells CWTools how to read hoi4 code and how to recognise errors.

CWT installation for Hearts of Iron IV

  • Get VSCode here and open it
  • Install CWTools extension from the marketplace (or use CTRL+Shift+X to open Extensions and find CWTools there)
  • Navigate to “Settings”. Type “cwtools”, scroll down to “vanilla hoi4 installation” input and add path to HOI4. Example - C:\SteamLibrary\steamapps\common\Hearts of Iron IV
  • cwt_path
  • Open your repository folder in VSCode (“File -> Open Folder”). After that, open any event, decision or focus file.
  • Wait for the extension to generate cache and load - ‘Loading project…’ should appear in the bottom left. It may take up to a minute to finish loading.
  • You should see new errors and warnings in the “Problems” tab (CTRL+Shift+M). This means the extension has been installed successfully

How to set up manual rules folder:

  1. Clone this repository to a filepath, e.g. D:\Git\cwtools-hoi4-config. (or copy the contents of the zip you can download)
  2. Open VS Code, and go to File, Preferences, Settings 2.a. To make the changes only apply to this folder (not all folders on your computer), change the tab at the top to "workspace settings"
  3. Set "cwtools.rules_version" to "manual"
  4. Set "cwtools.rules_folder" to the path above. e.g. D:\Git\cwtools-hoi4-config
  5. Re-open VS Code.

Tips

  1. Double-check HOI4 vanilla path in settings
  2. Regenerate vanilla cache (if it generates immediately your hoi4 path is incorrect)
  3. If you had OS reinstall or a new device, launch the game at least once

Limitations

  • CWTools has problems validating variables and arrays - variables linked with ^ and : will most likely be reported as a false problem
  • Symbols like /\&, brackets not being closed and RGB keyword will break file validation
  • Some problems vanish upon clicking on them - see a potential workaround here
  • When opening vanilla in VSCode, it shows a couple thousands of problems. This is expected, vanilla is a mess

Contributing and maintenance

We maintain the config by committing changes to KR fork first and then uploading changes here. Go to the Kaiserreich discord server and DM Pelmen323 if you'd like to contibute

About

.cwt config for Hearts of Iron IV

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 17

Languages