BeneosBattlemaps / beneos-module

1 stars 2 forks source link

Beneos Module - Battlemaps: New Feature | switch animated map to static map #124

Closed BeneosBattlemaps closed 7 months ago

BeneosBattlemaps commented 7 months ago

Description At the moment patrons only download animated .webm files via Moulinette. In the future I would like to also provide the static images of every map and scenery as well. For low-End machines or in case of internet issues, I want to have a feature, that allows to change the image-path of the .webm file to the .webp file that is always located in the same folder. The main feature is to replace the image path extension from .webm to .webp and vice versa if the scene is not an intro scene (= No "intro" in the scene title) with a new interface button in the scene context menu. The new feature needs to be able to replace substrings in the Background Image path of the scene settings or the Tile Image Or Video path of tiles placed ON the canvas.

This will be the file structure image

Function - New Button

  1. IF the Active Map IS a .webm OR .webp file AND in the beneos_assets/beneos_battlemaps/hd OR in the beneos_assets/beneos_battlemaps/4k folder (= part of the file path), THEN Add a new button for easy edit in the right click menu of the top toolbar on the canvas.
    • If the active map is a .webm file in the beneos_assets folder display "Use Static Map" using the icon: modules/beneos-module/icons/icon_image.svg.
    • If the active map is a .webp file in the beneos_assets folder display "Use Animated Map" using the icon: modules/beneos-module/icons/icon_video.svg.
    • If the Scene title has "intro" in it, do not do anything (Intros do not have a static version)

image

Function - Replace File Paths

  1. replace the .webm file-extension in the file path to .webp to make this map a static map, OR switch the .webp file extension in the file path to .webm to make this map an animated map. EXAMPLES:
    • beneos_assets/beneos_battlemaps/4k/01_crystal_cave/04_crystal_cave_camp/4k_bm.webm should be changed to beneos_assets/beneos_battlemaps/4k/01_crystal_cave/04_crystal_cave_camp/4k_bm.webp
    • OR
    • beneos_assets/beneos_battlemaps/4k/01_crystal_cave/04_crystal_cave_camp/4k_bm.webp should be changed to beneos_assets/beneos_battlemaps/4k/01_crystal_cave/04_crystal_cave_camp/4k_bm.webm

There are two use cases where the map path could be stored stored.

Testing

Use Case 1: FILE AS SCENE BACKGROUND IMAGE

image

Use Case 2: FILE AS TILE

LeRatierBretonnien commented 7 months ago

So fixed and available