behavior of the -game2 switch

qbism Super8 is a gritty software-rendering 3D engine based on Makaqu and other GPL Quake source code.
Post Reply
User avatar
Joel B
Posts: 8
Joined: Tue Jan 19, 2021 1:45 pm

behavior of the -game2 switch

Post by Joel B » Tue Jan 19, 2021 1:50 pm

Hi, quick question (I hope). The readme says:

[+] -game2 – set additional game dir on top of game. Handy for modding.

...which seems to say that assets in the "game2" directory would override any same-named assets in the "game" directory.

However in COM_InitFilesystem it looks like the opposite is true. It does COM_AddGameDirectory for "game2" first (and "game3", "game4") then subsequently for "game", so "game" has the last word.

I did a quick test of this with a different custom conback.lmp in the "game" and "game2" directories, and indeed the one from the "game" dir was the one used.

It looks like COM_InitFilesystem prioritizes the dirs from lowest to highest as "game2", "game3", "game4", "game".

Is that correct or am I confused? If correct... is that the intended behavior?

Thanks!

User avatar
Joel B
Posts: 8
Joined: Tue Jan 19, 2021 1:45 pm

Re: behavior of the -game2 switch

Post by Joel B » Sat Jan 23, 2021 2:30 pm

Also FWIW, if I specify both game and game2, then savegames go in the "game" folder (not game2), and likewise any config changes will be saved in the "game" folder.

This is what I would expect if "game" is supposed to be always be the highest priority folder for file reads/writes. (I haven't yet actually tested game3/game4 but I don't expect them to change that.) So the code functionality as it currently is seems fine(?) and if so then it could just be a documentation issue.

User avatar
func_qbism
Posts: 92
Joined: Tue Aug 04, 2015 1:51 pm
Contact:

Re: behavior of the -game2 switch

Post by func_qbism » Sun Jan 24, 2021 11:14 am

Definitely a documentation error. I just now corrected this in the console commands post. The behavior of the switches makes sense from the standpoint that saved games and screenshots will always be in the -game directory.
Welcome to Rivendale, Mister Anderson.

User avatar
Joel B
Posts: 8
Joined: Tue Jan 19, 2021 1:45 pm

Re: behavior of the -game2 switch

Post by Joel B » Sun Jan 24, 2021 9:58 pm

Sounds good!

Post Reply