Skip to content

Adding 'Data' to path twice, persists through reinstalls #205

@smangham

Description

@smangham

Describe the bug
When I run the "Compile Project" task, it fails as it can't find the .ppj file, as it sticks an extra Data on the path.

I think this is related to me misclicking the first time I set up FO4 project files on my new PC and accidentally creating them in the Fallout 4 directory, not Fallout 4/Data.

To Reproduce
Steps to reproduce the behavior:

  1. Uninstall the Papyrus extension.
  2. Enter the Fallout 4/Data directory and delete .vscode/launch.json, .vscode/tasks.json, Scripts/Source/User/fallout4.ppj, Fallout4.code-workspace.
  3. Restart VSCode, reinstall Papyrus extension.
  4. Check the settings are pointing to the correct place.
  5. Run Task -> pyro: Compile Project (Data/Scripts/Source/User/fallout4.ppj).
  6. It fails, error:
2025-03-15 19:03:25,354 [ERRO] Cannot load nonexistent PPJ at given path: "C:\Steam\steamapps\common\Fallout 4\Data\Data/Scripts/Source/User\fallout4.ppj"

As you can see, there's an extra Data in there - it looks like the project file path is being added to C:\Steam\steamapps\common\Fallout 4\Data\Data. But it's not getting that from launch.json, as the workspace root is the Data directory and I get the same error even if I change all the relative paths to absolute.

This is especially confusing, as I've got it working A-O-K on my laptop. The .vscode, Fallout4.code-workspace and fallout4.ppj files are identical and in the same places. The VSCode extension settings are the same (I have Fallout 4 installed in C:\Steam on both machines). The CreationKit.ini files are identical.

All I can imagine is that some file containing that original incorrect project root is stored somewhere that isn't in the ~/.vscode/extensions/joelday.papyrus-lang-vscode-3.2.0/ directory (or any of the 'project files' directories) and is escaping the purge? Any idea where that might be?

Edit: I just tried the one thing I hadn't tried, switching the Fallout4.code-workspace path key to be absolute not relative .. Worked. Even though . was the data directory, and it's . in the data directory on my laptop. Ghost in the machine I guess.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions