I Need help with randomness.

I’m trying to have inform seven randomly change the value of an object. The problem is, the object – the ground – is present in every room. I only want to have the game modify the ground’s composition randomly in a select few rooms. Is there a way to do this?
Basically, there is a value, the composition. The composition is oak, iron, etc. The ground can be made up of any one of these, but at the start of the game some of the grounds will have to be of a random composition. It would be nice if I could designate large stretches of grounds for certain rooms as materials, but if I have to do each non-random one by hand, that’s fine.
Somewhat related, is there a way to have an action check for an object in the location of the player? Say the ground has a state that is a number. Can I check for the state of the ground in the room of the player, and have the action do something if it’s greater than 0, then only effect the state of that single ground item that’s with the player?

I’m not quite sure what you’re asking. Do you mean that the ground is everywhere, and when the player goes into a certain room, the composition of the ground everywhere changes? Or do you mean that the ground should have one default value in most places, then use a special description in a few specific rooms?

For the former:

The ground is a backdrop. The ground is everywhere.
The ground can be oak, iron, earth, or ice (this is its composition). The ground is oak.
The description of the ground is "It seems to be made of [composition]."

After going to the Elemental Domain of Iron: now the ground is iron; continue the action.

For the latter:

The ground is a backdrop. The ground is everywhere.
A room has some text called the ground description.

The description of the ground is "[if the ground description of the location is empty]Not much to see here, just the ground.[else][ground description of the location]".

Mid-Air is a room. The ground description of Mid-Air is "It looks very hard, and you are approaching it very very quickly."

A cave is a kind of room. The ground description of a cave is "Worn and uneven rock."

Sort of. What I’m trying to do is have a ground that’s used in most places, a default ground
composition for a certain area if you will, but there are specific rooms where, at the start of the game,
its composition is randomly selected.

So I would have a whole bunch of hallways where the ground composition would always be granite,
and I can specify all that by hand, since it won’t be changing,
but then a handful of chambers where the game should individually randomize the composition for
the ground. In one game the left-hand side might have a ground made from iron and the right hand
side might have one made of sandstone, and they might be reversed or completely different the next
play through.

The reason I’d much rather have the ground be objects is because I’d like to take the composition
over into items and creatures, too. It’s not a necessity, but it would probably make things neater. Beggars can’t be choosers though, so any answer would be greatly appreciated.

Thanks for the help!

You could use the second option, then, and randomize the ground description in a When Play Begins rule.

When play begins:
    if a random chance of 1 in 2 succeeds, now the ground description of the Chaotic Room is "text text text";
    otherwise now the ground description of the Chaotic Room is "other text here".

I think that the poster wants to make a different random choice of ground in each room. Setting a different description randomly for each room would work.

Sorry, haven’t been around much for a couple of days, so the thanks are a bit late. But thank you
for the help.