Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different image paths generate the same alias #205

Open
jeparlefrancais opened this issue Dec 18, 2023 · 3 comments
Open

Different image paths generate the same alias #205

jeparlefrancais opened this issue Dec 18, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@jeparlefrancais
Copy link

Describe the bug

When I setup some images in directory structure like this:

  • assets
    • images
      • button.png
      • menu
        • button.png

In my mantle config, I specify my images like this:

assets:
  - assets/images/**/*.png

Mantle tries to generate the same asset alias for both button.png. It is worth noting that image are successfully published, it's just the asset alias part that fails.

To Reproduce
Steps to reproduce the behavior:

  1. Setup some images like described above
  2. Run mantle deploy
  3. See error Failed: Roblox error (409 Conflict): An alias with the provided name already exists.

Expected behavior

I have not used mantle a lot, but it seems like the alias could probably be made up from the image path instead of just the image name?

Side question: what is even the alias used for? I can already get the image id from the mantle outputs using the image path. In my setup I don't think I even need the alias.

Environment (please complete the following information):

  • OS: Windows
  • Mantle Version [e.g. 0.11.13]
@jeparlefrancais jeparlefrancais added the bug Something isn't working label Dec 18, 2023
@Etheroit
Copy link
Contributor

Side question: what is even the alias used for? I can already get the image id from the mantle outputs using the image path. In my setup I don't think I even need the alias.

Aliases are a way to mark the images (and other assets) as your game's assets and name them. You may browse those "aliased" assets in Asset Manager widget within studio.
You may also reference those assets within that game by an alias instead of asset id, eg:
rbxgameasset://Images/people
structure is rbxgameasset://Images/(imageAliasHere) [Images is not an asset folder name but a default category assigned by Roblox]
instead of rbxassetid://(asset id which changes everytime)
This way you can keep the images in-game kept up to date without redeploying the game few times everytime (1st to push assets, then 2nd to update the asset ids)

I'm not sure why mantle does not use the full path to generate the alias though (Roblox limits perhaps?)

@blake-mealey
Copy link
Owner

This definitely feels like a bug. I do not remember why I made that decision initially - is it possible that aliases are not allowed to have additional / characters? Even if that is the case, we should probably use the full path and replace slashes with dashes or something.

@Etheroit
Copy link
Contributor

@blake-mealey / characters appear to be allowed in the aliases (at least in Studio)
They also seem to work correctly when used in asset paths
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants