ID:139962
 
I have just recently started with DreamMaker scripts and i was thinking of making a realistic game that allows you to dig underground using the Z (layers?)

So everything starts somewhere, so...

I have already made it so when you dig, it spawns two holes, ones a down hole that allows you to go down, the other, an up hole which is -1 on the z which allows you to reach the surface.

And i was just wondering how i can make it so, turfs can be randomized? So the underground layers aren't the same, so say, iron ore was randomized under the surface prior to the game start, but also allowing other materials too, especially regular dirt, so people don't find ore all the time.

Would it be objects, or still just turf? Which would be easiest for my fresh scripting brain to handle, and which one could i put my skills to the test with?

Could someone explain to me what the "..()" does? It's absolutely confusing.

..() call the parent proc.

To make dirt random, just give it a 'drop' variable, which tells it what item to drop when you dig into it, and randomize that in the turfs 'New()' proc.
Darkology wrote:
And i was just wondering how i can make it so, turfs can be randomized?

You likely want to generate the map dynamically upon the world/game starting. The basic steps to achieve something to this effort are taught by the guide.


Darkology wrote:
Would it be objects, or still just turf?

That should depend on the design of your game.


Darkology wrote:
Could someone explain to me what the "..()" does? It's absolutely confusing.

Kaikoen took a nice effort to explaining some details - [link]
Okay, thanks a bunch guys, i couldn't have done it without you.
In response to Schnitzelnagler
In that linked post, I focused more on explaining the common ". = ..()" statement, assuming prior knowledge of various things (like ..() and return values), so it may not be appropriate here. At least until the OP reads DM Reference entries, like those for ..() and return, and becomes familiar with/recognizes proc overrides. I also explained these in other past posts... probably at least a few times, but they're quite difficult to find. I came up with these:
Return value: ID:736252
Parent proc (..()) [link] (first paragraph), ID:694508 (2nd paragraph)