Skip to content

Conversation

@vanja-ivancevic
Copy link
Contributor

  • Allow adventure worlds to provide custom battle backgrounds by placing files in their skin/ directory, using the same pattern that SoundSystem uses to allow custom music.
  • The texture loading order for adventure backgrounds (ADV_BG_*) would be:
    1. Adventure world skin directory (e.g., Shandalar Old Border/skin/adv_bg_swamp.jpg)
    2. Common adventure skin directory (common/skin/)
    3. Default skin directory (fallback)

@Jetz72 Jetz72 added GUI Adventure For the Adventure Module labels Dec 15, 2025
Copy link
Contributor

@Jetz72 Jetz72 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the background correctly update if you change planes without restarting the application? I think load is only invoked when the texture first appears, and I don't know if it's unloaded after that point.

@vanja-ivancevic vanja-ivancevic force-pushed the pr/adventure-world-backgrounds branch from 97de74a to 8eba775 Compare December 18, 2025 14:39
@vanja-ivancevic
Copy link
Contributor Author

Does the background correctly update if you change planes without restarting the application? I think load is only invoked when the texture first appears, and I don't know if it's unloaded after that point.

It doesn't automatically update without restarting. However, changing planes prompts the user to restart anyways.

@Jetz72
Copy link
Contributor

Jetz72 commented Dec 18, 2025

I'd like to think we'll eventually get rid of the need to restart to change planes. I don't like adding to the list of problems that will need to be identified and solved in order to achieve that. Could just use a static method to clear out all the adventure background textures and invoke it when switching planes. (Which would be another use case for that EnumSet just sayin' 😝)

@vanja-ivancevic vanja-ivancevic force-pushed the pr/adventure-world-backgrounds branch from 8eba775 to 731c474 Compare December 18, 2025 17:51
Allow adventure worlds to provide custom battle backgrounds by placing
files in their skin/ directory (e.g., skin/adv_bg_swamp.jpg).

The texture loading order is:
1. Adventure world skin directory (e.g., Shandalar Old Border/skin/)
2. Common adventure skin directory (common/skin/)
3. Default skin directory (fallback)

This enables adventure creators to customize biome-specific battle
backgrounds without modifying the default skin.
@vanja-ivancevic vanja-ivancevic force-pushed the pr/adventure-world-backgrounds branch from 731c474 to 275945f Compare December 18, 2025 17:57
@vanja-ivancevic
Copy link
Contributor Author

Great point. Added invalidateAdventureTextures() which resets the cached textures when switching planes - called alongside setAdventureDirectory() in all four places. Also switched to using an EnumSet as you suggested. Would this work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Adventure For the Adventure Module GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants