ID:2721930
 
(See the best response by Shadowkaroth.)

Problem description:
I wasn't sure how I wanted to design monster spawning, so just made a turf that spawns monsters using probability. The icon is see through for mapping purposes, but changes the icon_state to null once the world starts.

Because this is a overlay turf on top of other, it appears that the spawner's New() is overriding any other turfs under it and their New() operation.

Example: When the Grass turf calls New(), it selects a style of grass and then picks a selection of colors. This no longer happens if it has a Spawn turf over it.

Best response
Every coordinate in DM is A turf/tile. Only one exists in any one point.

In the map editor in DM you can stack/place multiple on one tile. When the game compiles(or boots) That multiple turfs of information is smashed together.

Specifically... The top most "turf" Is kept and all the turfs under it have their "appearance" added to the top turfs underlays so they appear under said turf.

So the only New() function being called at all is the top most one. As it is now the only one on the map.

You should try using "obj" for this and it will instantly fix your issue.
Shadowkaroth is correct. The top turf is the only real turf; the one beneath is an underlay.

You might want to consider getting rid of the spawning turf and instead using an obj for this.

For performance, you should also limit the use of turf/New(), as it will slow down your game loading time.
Alright, thanks guys, I got it working.

I want to say like 95% of my turfs all randomly assign color and variation on New(), I can't see replacing all of that with objects.

I guess I could probably have a different proc that does all the changes instead when the world boots up, but for a 1000X1000 map, the extra time is literally seconds, so I don't really care.
In response to HartWing
You wouldn't replace the color changing with objects.. we suggested changing the spawning turf to an /obj , a "prop". A turf/tile is a visual space the represents a coordinate on the map.

However, I am not against the New()s. But what Lummox is really saying is that having things happen in New() on turfs with slow down the "boot" time of the game-world.

Something you can do after the world has booted up is to then just run the same command on all of the worlds tiles of specified type.

Such as have a Initialize() function/proc that runs in or after the world/New().

PS. I believe you know all this. Just wanted to clear it up with your last post. Glad its all working now.

Note: The world map loading takes place before world/New() unless you use some map saving/loading obviously. So one reason to hijack this behavior is to load in clients while the game is still "loading".