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

Biomes with param2 for their nodes #15319

Open
kno10 opened this issue Oct 23, 2024 · 7 comments
Open

Biomes with param2 for their nodes #15319

kno10 opened this issue Oct 23, 2024 · 7 comments
Labels
Feature request Issues that request the addition or enhancement of a feature @ Mapgen

Comments

@kno10
Copy link
Contributor

kno10 commented Oct 23, 2024

Problem

param2 can be used for coloring nodes, such as grass, per biome; but the current biome API does not allow the specification of param2 values for nodes, only node names.
I saw that earlier proposals #6441 were rejected, but maybe just because they were too complicated.

Solutions

A biome definition currently contains node names, but no param2 values. E.g., from the current documentation:

{
    name = "tundra",
    node_dust = "default:snow",
    node_top = "default:dirt_with_snow",
    node_filler = "default:permafrost",

Adding fields param2_dust, param2_top, param2_filler etc. would be simple and consistent with the decoration API.
Alternatively, node_dust could accept a table with name and param2.

Because the decoration API has support for param2:

    param2 = 0,
    -- Param2 value of decoration nodes.
    -- If param2_max is not 0, this is the lower limit of a randomly
    -- selected param2.

    param2_max = 0,
    -- Upper limit of the randomly selected param2.
    -- If absent, the parameter 'param2' is used as a constant.

Alternatives

Additional context

No response

@kno10 kno10 added the Feature request Issues that request the addition or enhancement of a feature label Oct 23, 2024
@kno10 kno10 changed the title Biomes with param2 for their nodes. Biomes with param2 for their nodes Oct 23, 2024
@Zughy Zughy added the @ Mapgen label Oct 23, 2024
@sfence
Copy link
Contributor

sfence commented Oct 24, 2024

It can also be useful with #13811.

@cx384
Copy link
Contributor

cx384 commented Oct 24, 2024

I suggest to not use param2 and to instead add a biome dependent node tiles feature (similar to what I wrote about in #15203).
This way the nodes are the same, but only look different to the client depending on where they are placed.
But I'm not completely sure what your exact use case is, so I don't know if it could be solved this way.

@kno10
Copy link
Contributor Author

kno10 commented Oct 24, 2024

@cx384 biome-specific hardware-accelerated coloring, not more complex textures. paramtype2="color" in particular.

@cx384
Copy link
Contributor

cx384 commented Oct 24, 2024

Then biome dependent node tile (not texture) modifiers (like align_style) would be a good solution, since you don't have to pollute pram2 (you can still use it for something else) and you don't have to manually update things, but the nodes will be exactly the same on server-side, besides their map position.

@sfence
Copy link
Contributor

sfence commented Oct 24, 2024

@cx384 Biome depend node tile does not sound good to me. In that case, the node you place will be able to look different depending on the biome. The builders will not be happy with that.

@cx384
Copy link
Contributor

cx384 commented Oct 24, 2024

, the node you place will be able to look different depending on the biome.

Yeah, this is something I previously meant with the use case.

@kno10
Copy link
Contributor Author

kno10 commented Oct 24, 2024

I also do not think this will work well for my use cases.
Consider a tree is generated, it should have all its leaves set to the same param2 color, even if some of the leaves reach into another biome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Issues that request the addition or enhancement of a feature @ Mapgen
Projects
None yet
Development

No branches or pull requests

4 participants