# Changing number of inputs based on user selection?

**URL:** <https://forum.world-machine.com/t/changing-number-of-inputs-based-on-user-selection/5197>\
**Category:** Creating Device Macros\
**Created:** [March 7, 2020, 4:20pm UTC](https://forum.world-machine.com/t/changing-number-of-inputs-based-on-user-selection/5197 "2020-03-07T16:20:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![blattacker](https://forum.world-machine.com/user_avatar/forum.world-machine.com/blattacker/32/2874_2.png) [@blattacker](https://forum.world-machine.com/u/blattacker)\
**Post date:** [March 7, 2020, 4:20pm UTC](https://forum.world-machine.com/t/changing-number-of-inputs-based-on-user-selection/5197/1 "2020-03-07T16:20:17Z")

</div>

Hey there, I’m trying to make a texturing macro mostly for my own use, since my texturing networks tend to get a little bit messy. My idea is to have a base “default” texture that combines water/terrain/erosion data with several custom gradients, applying some other stuff here and there. I want to also include functionality for setting custom biome zones based on masks, but if possible, I only want those inputs to show up on the actual macro device if a box is ticked. It seems like there’s no way to have a macro parameter affect how many inputs there are, though. Is this correct, or am I missing something? If it’s correct, is this something that can be changed in the future? I feel like having that slight bit more of control over the appearance of the macro itself could be very useful for more than just this specific scenario (such as making complex macros that unlock more functionality, but only provide basic functions at first, to not confuse new users).

---

<div class="post-metadata">

**Author:** ![WFab](https://forum.world-machine.com/user_avatar/forum.world-machine.com/wfab/32/129_2.png) [@WFab](https://forum.world-machine.com/u/WFab)\
**Post date:** [March 7, 2020, 6:27pm UTC](https://forum.world-machine.com/t/changing-number-of-inputs-based-on-user-selection/5197/2 "2020-03-07T18:27:19Z")

</div>

The number of inputs can’t be varied dynamically, as far as I know. Not yet at least. @Stephen desparately needed feature for macro creators imo! Could it be implemented for LTE?

Working on a big complex texturing macro as well, for personal use as well as maybe public release. Need to simplify my cluttered node setup at least for texturing.

---

<div class="post-metadata">

**Author:** ![blattacker](https://forum.world-machine.com/user_avatar/forum.world-machine.com/blattacker/32/2874_2.png) [@blattacker](https://forum.world-machine.com/u/blattacker)\
**Post date:** [March 8, 2020, 10:00am UTC](https://forum.world-machine.com/t/changing-number-of-inputs-based-on-user-selection/5197/3 "2020-03-08T10:00:35Z")

</div>

Ahh, that’s unfortunate. It would be a very useful feature! In the meantime, I was reading in the documentation that one should “short circuit” devices that may not need to be built based on user selections, and it said it would go further in depth in a later chapter, but I haven’t been able to find that, is there something I’m missing, or has that part of the documentation not been written yet? In the latter case, can anyone advise on how to accomplish that? Would it be as simple as setting up a router to determine which “path” the build process follows, or is it more complex than that?

Edit: Dynamic port variation could also be useful for the parameters as well. Again using this specific texturing macro that I’m working on, being able to dynamically change how many biomes are in a project could be super helpful, so it’d be nice to be able to have a parameter that was, for example, just an integer that determines how many biome parameters show up in the dialogue box.

---

<div class="post-metadata">

**Author:** ![Stephen](https://forum.world-machine.com/user_avatar/forum.world-machine.com/stephen/32/317_2.png) [@Stephen](https://forum.world-machine.com/u/Stephen)\
**Post date:** [March 8, 2020, 9:39pm UTC](https://forum.world-machine.com/t/changing-number-of-inputs-based-on-user-selection/5197/4 "2020-03-08T21:39:14Z")

</div>

Hi folks,

Having ports be controllable on macros is an interesting idea - I haven’t thought of it before, but I agree there are lots of good use cases! Will see what I can do for implementing this sooner than later. I strongly want to raise the level of abstraction that you work with in WM generally, while preserving full nitty-gritty-details if needed, and this could help.

LTE will bring a lot of other improvements in this regard; for example, parameters can be flagged as “advanced”, and hidden from view unless called for, simplying complex devices/macros enormously.

Regarding short-circuiting macro processing, here’s a forum thread talking about it. The essence is to make sure devices have a dependence on a macro input, so that if that input is not available, the device won’t build.

> [@WM calculating non-picked routes](https://forum.world-machine.com/t/wm-calculating-non-picked-routes/5107):
>
> Hello World Machine community. I am using World Machine 3028, Standard build 64 bit. I started playing around with the macro and as an experiment decided to create a terrain generation macro for a mod I’m creating. The macro can take a height input and optionally layout input and turn it into different types of terrain, such as canyons or mountains. Each one of these types of terrain has its own group of nodes and the idea is that WM will only calculate the group chosen by a dropdown box that f…
