cwtools / cwtools-vscode

A VS Code extension providing language server support for paradox script files using cwtools
Other
88 stars 12 forks source link

Suggestion: Check for unused GFX #10

Closed Pietrus69 closed 4 years ago

Pietrus69 commented 4 years ago

This report comes from the old magic machine for Hearts of Iron 4: https://github.com/Kaiserreich/HOI4-Validator/issues/33 at the request of Zankoas on the Kaiserreich discord.

In order to add a new bit of GFX to the game (most GFX anyway), you add the file into the /gfx folder, and then list it in the respective text file in \interface, finally, you then add then it to the event/focus/idea/etc you want to change. So when you say 'unused' GFX it's a pretty vague term; does that mean that there are bits of GFX that are in the game files but not listed in \interface or that they are listed in \interface but not actually used in game anywhere? Have no idea. In addition scanning for ceratin types only can help a lot; event GFX are well over 100x the size of icon GFX; so finding unused ones there is far more important. Finally, the current scanning methord is full of false positives due to not understanding the rules different bits of GFX use.

Better scanning routes would be these:

Unlisted event GFX, when there is a file in \gfx\event_pictures not listed in \interface Unused event GFX, when it is listed in \interface but not then used in any event in \events

Unlisted idea GFX, when there is a file in \gfx\interface\ideas not listed in \interface Unused idea GFX, when it is listed in \interface but not then used in any event in \common\ideas

Unlisted focus GFX, when there is a file in \gfx\interface\goals not listed in \interface Unused focus GFX, when it is listed in \interface but not then used in any event in \common\national_focus

Unused portrait (they don't need to be listed), when there is a file in \gfx\leaders not used anywhere in \events, \common\national_focus, \common\scripted_effects or \history\countries

Unused flags (they don't need to be listed), when there is a file in \gfx\flags, \gfx\flags\small or \gfx\flags\medium not named right, all three groups follow the same rules. How do you tell if it is named right? It's name must start with either a tag listed in \history\countries or a cosmetic tag listed in \events, \common\national_focus, \common\scripted_effects or \history\countries. It should finished with either nothing (as in just be 'GER' or an ideology listed in common/ideologies/00_ideologies.txt, as in 'AFG_national_populist').

Unlisted technologies (they don't need to be used), any file in \gfx\interface\technologies not listed in \interface.

Unlisted models (they don't need to be used), any file in\gfx\models not listed in \gfx\entities.

Pietrus69 commented 4 years ago

I was told I was supposed to send these issues to this git: https://github.com/cwtools/cwtools-hoi4-config/issues

Sorry about that