I'd like to share a really basic snippet to help new users randomize their ground cover like grass and dirt.
What it looks like before randomization
What you get is a really dull looking ground cover and yes I know this is using black and brown. It's an example.
What it looks like after randomization
Here's the same example with variation in the brightness which gives the impression of hills and crests. This doesn't look like flat ground anymore. Also the arrangement of dots is randomized for each icon. I did this on MS-Paint using the spray can tool.
You may personally want more states or more/less variation in brightness.
What code is used for this?
This code gives each turf object the ability to be randomized. Chosen turf will automatically be randomized when they are created on the map.
turf
icon = 'Turf.dmi'
var
randomize = FALSE
randomStates = 0 // How many icons you've made
proc
randomizeIcon()
icon_state = "[name] [rand(0,randomStates)]"
New()
..()
if(randomize == TRUE)
randomizeIcon()
This code shows what would need to be set to work with the following icons.
turf/Ground
Rock
icon_state = "Rock"
randomize = TRUE
randomStates = 3
END
Thank you for reading my snippit.