Skip to content

Context menu item for generating a salt for noise samplers #4

Open

Description

@dfsek

For a while now we've had this issue open on Terra: PolyhedralDev/Terra#281
I have thought about this a lot, and am of the belief that there is really no good way of solving it, since all methods would come with huge caveats (mainly relating to what if additional samplers are added in a config pack update, that would completely change the look of the pack every time.)

I think that the best solution to this problem is to treat it similarly to Java's serialVersionUID, where it is expected that each instance is defined with a very large random number. This is the perfect job for a context menu action, it could also be set up to highlight a suggestion over a sampler and suggest autofilling a random salt value

Activity

  1. Bloeckchengrafik commented on Jan 10, 2026

    @Bloeckchengrafik
    Member

    Sounds good to me.

    Some ideas I have for this as well:
    When writing a sampler (assuming yaml autocomplete is finally here), this could also be a snippet autocompletion on the NoiseSampler type. This would make it so you don't even have to leave your keyboard.

    These could also be indexed so samplers with the same salt can be easily accessed via an inlay hint, although I'm unsure if this is just overkill. What do you think?

    Imo having this as both a snippet and a context menu would be good for situations where you don't have the full autocomplete setup as well.

  2. dfsek commented on Jan 10, 2026

    @dfsek
    MemberAuthor

    I think that samplers of the same salt ought to be metaconfig'd, though I suppose there are cases where you'd want very similar, but not identical, samplers of the same salt (cellular with different return types comes to mind), so I will leave that up to you.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions