TrenchBroom V2019.6 on Fedora
Ok so I'm probably just doing something wrong, but here is my filesystem layout:
game-test/
βββ levels
βΒ Β βββ mylevel.map
βββ main.lua
βββ textures
βββ house
βΒ βββ paneling.png
...
If I create a map with the Generic game and add ./game-test/ as game path, then I get a texture/house collection and I can enable it.
However, I now tested this custom game config with ./ added as game path:
{
"version": 3,
"name": "MyGame",
"fileformats": [
{ "format": "Standard" }
],
"filesystem": {
"searchpath": "game-test",
"packageformat": { "extension": "zip", "format": "idpak" }
},
"textures": {
"package": { "type": "directory", "root": "textures" },
"format": { "extensions": [ "png" ], "format": "image" }
},
"entities": {
"definitions": [ "entities.fgd" ],
"defaultcolor": "0.6 0.6 0.6 1.0",
"modelformats": [ "md2" ]
}
}
... and if I do that the texture collections do still show and I see textures/house as before under Available, but if I click + for any of them or double click them they don't move from Available to Enabled. Basically, the folders seem to be recognized as collections but I can't actually use any of them.
Sadly, the manual seems to lack a "format": "image" example, maybe I did that wrong with the extensions? In any case, I'm stumped. Is this a bug of sorts or am I doing something wrong?
I suggest that you join our discord and ask people there. Itβs the best way to get support for questions like this. The github issues are for bugs and feature requests and not so much for questions.
@eGax do you know whatβs going on here? And does the manual need clearing up here? Thanks!
I looked over his gameconfig vs his directory structure and his searchpath is set to a non-existing path under his main directory/root path game-test In this case searchpath should be "."
Also having it set up the way he has makes it impossible for the texture folders to visible at all from within TrenchBroom so not sure how they would be visible and not clickable in the 1st place as stated above.
Thanks!
@kduske @eGax what do you mean? The path exists, please note the game path in the second case is . not ./game-test/. I tried various variations which didn't work, I used this one because it seemed closest to trenchbroom's usual expectations.
game-test/
βββ levels
β βββ mylevel.map
βββ main.lua
βββ textures
βββ house
β βββ paneling.png
...
I see no folder under game-test named game-test.
I also tried searchpath . and setting the game path to inside ./game-test/ btw, just due to #2991 I assumed it was a less typical case for TrenchBroom. In any case, it doesn't work either with the same result: the texture collections show up under Available, but double-clicking them / clicking + does nothing, they won't move to Enabled.
Your file system search path is wrong.
{
"version": 3,
"name": "MyGame",
"fileformats": [
{ "format": "Standard" }
],
"filesystem": {
"searchpath": "game-test", <<<<<------ set this to "."
"packageformat": { "extension": "zip", "format": "idpak" }
},
"textures": {
"package": { "type": "directory", "root": "textures" },
"format": { "extensions": [ "png" ], "format": "image" }
},
"entities": {
"definitions": [ "entities.fgd" ],
"defaultcolor": "0.6 0.6 0.6 1.0",
"modelformats": [ "md2" ]
}
}
Please ask these questions on discord, this is not a support forum.
I already tried both variants. Game path to parent of game-test with search path game-test, game path set to inside game-test with search path .. Both yield the same result.
Edit: and it works fine with the generic game. I suspect it might be related to TrenchBroom not picking up the actual images (while it sees the folders), maybe it thinks the collections are empty? The manual isn't really clear on what extensions to specify for "image'
You, you also didn't include the attribute declaration in your texture configuration, which is the worldspawn attribute under which TB stores the selected textures. So whatever texture collections you try to activate, TB cannot store them anywhere.
"textures": {
"package": { "type": "directory", "root": "textures" },
"format": { "extensions": ["jpg", "jpeg", "tga", "png"], "format": "image" },
"attribute": "_tb_textures" <<<<<<<<<<----------- this needs to be set
},
Ah, amazing :heart: thanks, that did actually fix it! Not sure how I forgot that, I guess I assumed it was some special thing I should leave away? (I struggled a bit finding what minimal config will actually work since the manual is so extensive on options, not meant as a complaint btw :open_mouth: )
And sorry for the spam here, I was just about to move to discord and just had the urge to clarify the search path thing anyway for some reason :grimacing: my bad
That's why a new user is better off making a copy of the Generic game folder and modifying to your needs since it already works.
@eGax that didn't occur to me as an option, actually. :smile: (silly me!) I somehow assumed that was hardcoded/built-in. I actually wanted to avoid a custom config entirely for a while, what finally made me try one is that the default entities have no good "generic" spawner entity and that there is no way to set a default texture scale otherwise
Glad its sorted. The manual needs some clarification in a few spots, but gameconfig's aren't hardcoded in any way, but use syntax, model, and texture formats specific to their games, but that's it. Any of them can be changed, used for a template for new configs, etc. Some parts of them are always required though like "attribute": "_tb_textures" in your issue.
A different missing attribute previously gave me a missing attribute error popup, so I guess that is why I didn't notice for this one: Trenchbroom was just silently unhappy about me doing wrong things :open_mouth: