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
Function - New Button
IF the Active Map IS a .webmOR.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)
The new Button should appear on both areas. The context menu of the quick navigation bar on top of the screen AND the scene browser on the right.
Function - Replace File Paths
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.
In 90% of the cases the map path stored in the Background Image file path of thescene configuration
In 10% of the cases the the Background Image file path of thescene configuration IS EMPTY and the map is THEN displayed as a Tile. This is the case because some maps needed to be rotated and that is not possible with embedded Background Images.
If this scene has a tile map you need to change the Tile Image Or Video path of that tile instead of the Background Image path of the scene settings with the same rules.
NOTE: Scenes can have MULTIPLE tiles on it. To find the correct one with the actual map on it you can identify it by the file path. IF the path leads to beneos_assets/beneos_battlemaps/hd/...ORbeneos_assets/beneos_battlemaps/4k/... it is a map! IF the path leads to beneos_assets/beneos_battlemaps/map_assets/... it is NOT a Map and therefore not the correct tile.
Testing
DOWNLOAD THE Crystal Cave 01 release in the 4k version to have everything you need to test.
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 theBackground Image
path of the scene settings or theTile Image Or Video
path of tiles placed ON the canvas.This will be the file structure
Function - New Button
.webm
OR.webp
file AND in thebeneos_assets/beneos_battlemaps/hd
OR in thebeneos_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..webm
file in thebeneos_assets
folder display "Use Static Map" using the icon:modules/beneos-module/icons/icon_image.svg.
.webp
file in thebeneos_assets
folder display "Use Animated Map" using the icon:modules/beneos-module/icons/icon_video.svg.
Function - Replace File Paths
.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 tobeneos_assets/beneos_battlemaps/4k/01_crystal_cave/04_crystal_cave_camp/4k_bm.webp
beneos_assets/beneos_battlemaps/4k/01_crystal_cave/04_crystal_cave_camp/4k_bm.webp
should be changed tobeneos_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.
Background Image
file path of thescene configuration
Background Image
file path of thescene configuration
IS EMPTY and the map is THEN displayed as a Tile. This is the case because some maps needed to be rotated and that is not possible with embedded Background Images.Tile Image Or Video
path of that tile instead of theBackground Image
path of the scene settings with the same rules.beneos_assets/beneos_battlemaps/hd/...
ORbeneos_assets/beneos_battlemaps/4k/...
it is a map! IF the path leads tobeneos_assets/beneos_battlemaps/map_assets/...
it is NOT a Map and therefore not the correct tile.Testing
Crystal Cave 01
release in the 4k version to have everything you need to test.Use Case 1: FILE AS SCENE BACKGROUND IMAGE
Use Case 2: FILE AS TILE