ID:109379
 
Applies to:Dream Maker
Status: Open

Issue hasn't been assigned a status value.
The Idea
Built-in support for using constants (#define constants, not real constants) with .DMMs on instances.

The Details
When DM grabs the object tree, it could get a list of all of the #define'd macros and values for validation's sake. DM would store these values as their symbol name in the DMM in place of their actual value. When compiled into the DMB, it would simply get expanded into its value as expected.

The Conclusion
This would allow us to use the NORTH/SOUTH/WEST/EAST constants for 'dir' (Not everyone will remember that NORTH=1,SOUTH=2,EAST=4,WEST=8) and cut out magic numbers for other variables as well such as unique (constant) ID to match up to a certain item in a list or something to that effect.

As far as I know the .dmm format should support these constants natively (you could always check to be sure), so I think basically you're referring to the process of actually looking at an atom's vars in the map editor. It does seem like something along these lines would be doable.

Handling this for non-directions might be trickier. For instance for the mob.sight flags, we'd probably need to be able to parse some kind of rudimentary expression to deal with those.
Wow, I never would've actually thought about trying that. It does seem that they actually do work. If you edit the instance in the map editor, it'll replace the constant's name with its value, even. Changing the instance at all will over-write the constant used, however, whether that var was affected or not. I suppose this'll work for now.