calref / cboe

Classic Blades of Exile
http://spiderwebforums.ipbhost.com/index.php?/forum/12-blades-of-exile/
Other
167 stars 41 forks source link

Windows: Custom scenarios hidden in cChooseScenario dialog #335

Closed NQNStudios closed 1 year ago

NQNStudios commented 1 year ago

I did a bunch of debugging to figure out why.

https://github.com/calref/cboe/blob/ca816995ba9da539ed08a568616fbf36bea8bde0/src/game/boe.dlgutil.cpp#L1559

Here, the number of scenario headers loaded is checked for >= 3, which makes sense, BUT the vector being checked only contains custom scenarios, not built-in scenarios. So unless the player has 4 custom scenarios installed, they won't be able to launch custom scenarios.

NQNStudios commented 1 year ago

I wanted to check if this is just a Windows thing, and it does affect Linux too. Does Mac also separate custom and built-in scenarios out of this vector?

CelticMinstrel commented 1 year ago

Does Mac also separate custom and built-in scenarios out of this vector?

Huh? Is this platform-specific code? Most things are the same on all platforms, other than winutil and a couple of others…

NQNStudios commented 1 year ago

It's not platform-specific, other than the extern scenDir variable --on Windows it's in AppData, on Linux it's in HOME/.config, and on Mac I don't know where it is. I don't think it would do this, but if the installation process on Mac puts built-in scenarios in there it would change the vector's contents.

CelticMinstrel commented 1 year ago

No, built-in scenarios in the Mac version go in Blades of Exile Scenarios/ next to the .app while installed scenarios go in ~/Library/Application Support/Blades of Exile/Scenarios/. I'm pretty sure this is almost identical in spirit to the situations on Windows and Linux too.

NQNStudios commented 1 year ago

The PR should be good across platforms, then. I tested Windows and Linux.