Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Victoria 3 filepath mod vs. game assets #84

Closed
kaiser-chris opened this issue Aug 19, 2024 · 11 comments
Closed

Victoria 3 filepath mod vs. game assets #84

kaiser-chris opened this issue Aug 19, 2024 · 11 comments
Labels
bug Something isn't working

Comments

@kaiser-chris
Copy link

Hi,

sorry for being annoying about issues, but I found another minor one.

when referencing texture assets in Victoria 3 they are referenced gfx/... but are placed in game/gfx/...

In CWT file it just references filepath. This works for mod files but not for base game files.

Example of a modded script and base game texture is:

pmg_street_lighting = {
	texture = "gfx/interface/icons/generic_icons/mixed_icon_base.dds"
	production_methods = {
		pm_no_street_lighting
		pm_gas_streetlights
		pm_electric_streetlights
	}
}

image
Texture exists in: <steamapps>\Victoria 3\game\gfx\interface\icons\generic_icons\mixed_icon_base.dds

Here an example of a modded script and texture:

mana = {
	texture = "gfx/interface/icons/goods_icons/mana_crystals.dds"
	cost = 30
	category = staple
	tradeable = no

	prestige_factor = 8

	consumption_tax_cost = 200
}

image
Texture exists in: <project>\mod\gfx\interface\icons\goods_icons\mana_crystals.dds

IDE Setup:
image

Regards,

Chris

@DragonKnightOfBreeze
Copy link
Owner

image

@DragonKnightOfBreeze
Copy link
Owner

This issue is finally caused by the game/ path prefix in plugin builtin configs which are forked from cwtools-vic3-config repo, with no more compatible processing.

Plugin should work fine if you remove these game/ path prefixes in your local config files.

@DragonKnightOfBreeze DragonKnightOfBreeze added the bug Something isn't working label Aug 19, 2024
@DragonKnightOfBreeze
Copy link
Owner

This issue is finally caused by the game/ path prefix in plugin builtin configs which are forked from cwtools-vic3-config repo, with no more compatible processing.

Plugin should work fine if you remove these game/ path prefixes in your local config files.

Sorry I'm not sure this is right, but plugin should do more compatible work for cwt configs indeed.
Like upper case identifiers (ROOT = COUNTRY, and the possible game/ path prefix ...)

@kaiser-chris
Copy link
Author

kaiser-chris commented Aug 19, 2024

Sorry but I modified the CWT for goods. For me it is only filepath. Missed adding it to my post.

I tested modifying the CWT files and when I use texture = filepath[game] base game images are found but not modded ones. And if I just use texture = filepath, the mod images are found but not base game images.

Also because you mentioned it in a deleted post. Here are my launcher settings:

{
	"formatVersion": 1.1,
	"gameId": "victoria3",
	"displayName": "Victoria 3",
	"version": "1.7.5 (Kahwah)",
	"rawVersion": "1.7.5",
	"distPlatform": "steam",
	"ingameSettingsPath": "pdx_settings.json",
	"gameDataPath": "%USER_DOCUMENTS%/Paradox Interactive/Victoria 3",
	"modPath": "mod",
	"modExtension": "zip",
	"modStubberPath": "../binaries/victoria3.exe",
	"modStubberData": {	
		"args": [ "--mod_stubber" ],
		"type": "MOD_NAME_PROMPT"
	},
	"isLooseFilesModSupported": true,
	"distPlatformModsEnabled": true,
	"dlcPath": "../game",
	"ingameSettingsLayoutPath": "settings-layout.json",
	"themeFile": "./assets/theme-settings.json",
	"browserDlcUrl": "",
	"browserModUrl": "",
	"exePath": "../binaries/victoria3.exe",
	"exeArgs": [ "-gdpr-compliant" ],
	"alternativeExecutables": [
			{
		"label": {
			"de": "Spiel im Debug-Modus öffnen",
			"en": "Open game in Debug Mode",
			"es": "Abrir juego en modo de depuración",
			"fr": "Ouvrir le jeu en mode débogage",
			"ja": "デバッグモードでゲームを開",
			"ko": "디버그 모드로 게임 열기",
			"pl": "Uruchom grę w trybie debugowania",
			"pt": "Abrir jogo em modo debug",
			"ru": "Запустить игру в режиме разработчика",
			"zh-hans": "以调试模式打开游戏"
		},
		"exePath": "../binaries/victoria3.exe",
		"exeArgs": [ "-gdpr-compliant","-debug_mode" ]
		}
	]
}

@DragonKnightOfBreeze
Copy link
Owner

Paradox-Language-Support-1.3.19.zip

Hi, I just uploaded a pre-release of 1.3.19, please check this. (IDE should reindex after plugin updated)

@kaiser-chris
Copy link
Author

kaiser-chris commented Aug 21, 2024

Hi it seems to work and it does not at the same time:

  • The path is now correctly found and clickable
  • But the group still says that the image does not exist

Path working and clickable:
image

Warning that the file does not exist:
image

What I tried:

  • Restarting IDE
  • Modifying file and texture path so it is reindexed
  • Inavlidated IDE caches and forced full reindex

EDIT: modded files still fully work

@DragonKnightOfBreeze
Copy link
Owner

The code logic about paradox path aka path shown in quick documentation may need to be refactored,
for, some how, there are some entry paths (so named in plugin code) in different games.
e.g, for Stellaris, pdx_online_assets is an entry path.

@DragonKnightOfBreeze
Copy link
Owner

Think of the file <gameRootPath>/pdx_online_assets/gfx/interface/online_feed_background.dds,
Can it be referenced by pdx_online_assets/gfx/interface/online_feed_background.dds or gfx/interface/online_feed_background.dds, or by pdx_online_assets/gfx/interface/online_feed_background.dds everywhere and by gfx/interface/online_feed_background.dds under pdx_online_assets.

I may need ask tboby or pdx for this question.

@DragonKnightOfBreeze
Copy link
Owner

@kaiser-chris
Copy link
Author

Worked like a charm.

Thank you as always!

@DragonKnightOfBreeze
Copy link
Owner

Will be fixed in 1.3.19, but code logic about file path may need to be refactored in the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants