Entities

Any object in Cartography Shop can be assigned a list of user-defined properties.  To add user-defined properties, select an object and go to the Edit>Properties menu.

 

 

Point entities are points in space with a string of user-defined properties attached to them.  This information takes the form of keynames and keyvalues.  A keyname is a name for a variable.  Examples include “health”, “sound”, “color”, etc.  A keyvalue is a value for that variable.  Examples include “100”, “noise.wav”, or “255 255 255”.  Put them together, and you get a string of data that looks like this:

 

“health”=”100”

“sound”=”noise.wav”

“color”=”255 255 255”

 

What do entities do?  It depends on what you want them to do.  Cartography Shop does not recognize any specific entities, except lights.  The rest are just place holders for you to add information to so that when you load an exported map in your own program, you know where to add a light, a monster, or something else, and what values it should have.

 

Entities can be added to the Cartography Shop menu so that you can select them from the menu and create them instantly.  To do this, create a file called “entities.script” (or something else +.script) and place it in the Cshop\scripts\ folder.  The file name will be the submenu all entities are categorized under.  To add an entity, write some data like this:

 

[Monster: 255,255,0 : 16,32]

"health"="100"

"flags"="1"

“mode”=”asleep”

 

Here, we have an entity that will be called a “Monster” in the menu.  The entity will be yellow and 16x16 units.  All listed keys will be added to that entity when it is created.  These are the default values.  You can add as many entities per script files as you want.

 

Of course, Cartography Shop does not write behavior of entities for you.  Deciding what you want entities to do and how to accomplish that is up to the programmer.  This just provides a convenient way to place items in a level.