I am trying to randomize the selection of passage based on their relative weight. I think that I grasped the logic of how I could make it works with datamaps, but my programming abilities are...well, they are not. I am using Harlowe 3.0.2.
For now, I have this:
(set: $passage_weights to (dm: "passage1", 2, "passage2", 1))
(set: $passage_choices to (a: [?])
(set: $passage to (either: ...$passage_choices))
In this example, passage1 should have two chances to be selected, while passage2 should have one.
I think that all I am missing is the [?] part. What I aim for is to convert the datamap in something like this: ("passage1", "passage1", "passage2").
Then, with the either macro, all shoud work as I want. Is there anyway to do something like this?