Free Hero Mesh

Changes To Class definition file
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.

Changes to "Class definition file" between 2018-11-22 07:34:35 and 2019-05-18 03:58:33

45
46
47
48
49
50
51
52

53
54

55
56
57

58
59
60

61
62
63

64
65
66
67
68
69


70
71
72
73
74

75
76
77


78
79

80
81

82
83
45
46
47
48
49
50
51

52
53

54
55
56

57
58
59

60
61
62

63
64
65
66
67


68
69
70
71
72
73

74
75


76
77
78

79
80

81
82
83







-
+

-
+


-
+


-
+


-
+




-
-
+
+




-
+

-
-
+
+

-
+

-
+


  *  Bit constant

<h2>Class definition blocks</h2>
The class definition block starts with the class name, and then the various things inside, which can be:
  *  <tt>(Arrivals)</tt>: Sets the relative positions to this object that this object cares about other objects moving into. Needs either the keyword InPlace, or twenty-five numbers each of which is either zero or one. InPlace means this object's position only. Otherwise, 0 means don't care and 1 means does care, making a 5x5 grid with this object in the middle.
  *  <tt>(Climb)</tt>: Put a number. Defines how high the object can climb; see the documentation about moving objects for details about what this does.
  *  <tt>(CollisionLayers)</tt>: Put one or more 8-bit numbers and/or bit constants; they are bitwise ORed together. The default value is zero. If the game engine tries to place an object into the location of another object with any shared bits set in the CollisionLayers value for any reason (normal movement, teleportation, or creation), it is prevented, and the COLLIDING and/or COLLIDE messages are sent.
  *  <tt>Compatible</tt>: Enable better compatibility with Hero Mesh, including that some standard variables are now limited to sixteen bits. For new puzzle sets, it is normally better to avoid this flag, although not always.
  *  <tt>Compatible</tt>: Enable better compatibility with Hero Mesh, including that some standard variables are now limited to sixteen bits. For new puzzle sets, it is normally better to avoid this flag (although there may be some cases where you will want to use it).
  *  <tt>,Compatible</tt>: Similar to Compatible but does not limit variables to sixteen bits.
  *  <tt>(DefaultImage)</tt>: After the word DefaultImage is some numbers, or () with nothing in between or you can have a range by using () with two numbers in between. This defines which images are available for selection in the editor. If you write <tt>(DefaultImage ())</tt> then this class is not available to place objects in the editor at all. If the DefaultImage command is not included, all images can be used.
  *  <tt>(DefaultImage)</tt>: After the word DefaultImage is some numbers, or () with nothing in between or you can have a range by using () with two numbers in between. This defines which images are available for selection in the editor. If you write <tt>(DefaultImage ())</tt> then this class is not available to place objects in the editor at all. If the DefaultImage command is not included, all images can be used. This only affects the editor.
  *  <tt>(Density)</tt>: Put a number. Defines the density of the object. If there are multiple objects at the same location, this defines which ones are on top (meaning not obscured by others; does not mean its Y coordinate differs) and on bottom (meaning may be obscured by other objects) and the stuff in between. The object with the lowest density is on top, and highest density on bottom.
  *  <tt>(Departures)</tt>: See Arrivals; this is similar, but sets the departure positions it cares about instead instead of arrival positions.
  *  <tt>(EditorHelp)</tt>: After EditorHelp is one or more strings. Each is a line of help text for the composer.
  *  <tt>(EditorHelp)</tt>: After EditorHelp is one or more strings. Each is a line of help text for the composer. This does not affect game rules at all.
  *  <tt>(Hard)</tt>: Either a 16-bit number, or pairs (each a parenthesized block) of a direction and a 16-bit number. Directions must be E, N, W, or S. If it is a single number, the same number is applicable for all directions. It sets the hardness of each side of the object; this is used together with sharpness to determine if any objects are destroyed when one object moves into another (see documentation about moving objects for further details).
  *  <tt>(Height)</tt>: Put a number. Defines the height of the object; see the documentation about moving objects for details about what this does.
  *  <tt>(Help)</tt>: After Help is one or more strings. Each is a line of help text for the player.
  *  <tt>(Help)</tt>: After Help is one or more strings. Each is a line of help text for the player. This does not affect game rules at all.
  *  <tt>(Image)</tt>: After the word Image is several strings, which are the name of images in the [Picture file format|.xclass file] (without the .IMG suffix). Those are the pictures used as the images of this class; the first one listed is image number zero.
  *  <tt>Input</tt>: Causes the KEY message to be sent to all objects of this class when a move is played and no popup quiz is waiting.
  *  <tt>Invisible</tt>: Objects of this class are invisible at runtime.
  *  <tt>Invisible</tt>: Objects of this class are invisible at runtime. (Clicking on objects will still reveal them, and they still have all interactions with other objects. They are also visible in the editor.)
  *  <tt>(Misc4)</tt>: After the word Misc4 is one or more numbers; bit constants are also allows. Defines the Misc4 value (a 32-bit number) for this class as the bitwise OR of all numbers specified. The game engine does not use the Misc values; it is for your own use.
  *  <tt>(Misc5)</tt>: Like Misc4 for sets Misc5 instead.
  *  <tt>(Misc6)</tt>: Like Misc6 for sets Misc5 instead.
  *  <tt>(Misc7)</tt>: Like Misc7 for sets Misc5 instead.
  *  <tt>Player</tt>: Indicate that the object of this class is the player object.
  *  <tt>Quiz</tt>: Hide values of local variables from the player by default. Can be overridden in the user configuration file. Puzzles should generally avoid using this, since it is supposed to be a game of complete information.
  *  <tt>Player</tt>: Indicate that the object of this class is the player object. (Affects the PLAYERMOVING and BEGIN_TURN messages, as well as possibly some user interface elements. This does not affect the KEY message; see Input for that.)
  *  <tt>Quiz</tt>: Hide values of local variables from the player by default. Can be overridden in the user configuration file. Puzzles should generally avoid using this, since it is supposed to be a game of complete information. (As suggested by the name, the intention of this flag is for use with the Quiz object from Hero Defiant.)
  *  <tt>(Shape)</tt>: Either a 2-bit number, or pairs (each a parenthesized block) of a direction and a 2-bit number. Directions must be E, N, W, or S. If it is a single number, the same number is applicable for all directions. Sets the shape, which is used to allow one object to slide off of another if they hit each other while moving. See documentation of moving objects for further details about what this does.
  *  <tt>(Sharp)</tt>: This is like the Hard command but sets sharpness instead of hardness.
  *  <tt>Shovable</tt>: This object is pushable in any direction (if the object pushing it is strong enough).
  *  <tt>(Shovable)</tt>: Specifies which directions it can be pushed. After the word Shovable is either a 8-bit number, or can be one or more directions, which can be E, N, W, and S (diagonal shoving is not allowed). (It is recommended that you do not use a number; it is provided because some Hero Mesh puzzle sets set some bits that aren't supposed to be set, for some reason.)
  *  <tt>Stealthy</tt>: If this object moves, does not cause arrival and departure triggers.
  *  <tt>Stealthy</tt>: If this object moves, does not cause arrival and departure triggers. (Does not suppress any other interactions.)
  *  <tt>(Strength)</tt>: Put a number. Defines the strength of the object; see the documentation about moving objects for details about what this does.
  *  <tt>(SUBS)</tt>: A block of program instructions which is not associated with a message. It is not really that helpful (since you can use labeled blocks instead); it is provided in order to convert Hero Mesh puzzles into Free Hero Mesh.
  *  <tt>(Temperature)</tt>: After the word Temperature is a number. Defines the Temperature attribute of this class. Like the Misc values, it is not used by the game engine and is only for your own use.
  *  <tt>(SUBS)</tt>: A block of program instructions which is not associated with a message. It is not really that helpful (since you can use labeled blocks instead); it is provided in order to convert Hero Mesh puzzles into Free Hero Mesh. (In Hero Mesh, the SUBS block is mandatory, even if it is empty. In Free Hero Mesh, it can safely be omitted.)
  *  <tt>(Temperature)</tt>: After the word Temperature is a number. Defines the Temperature attribute of this class. Like the Misc values, it is not used by the game engine and is only for your own use. (By convention, this is 100 more than the equivalent Celsius temperature, and 125 represents room temperature. However, you are not required to use this convention in your own puzzles.)
  *  <tt>UserState</tt>: Does nothing, but can be used for your own purpose.
  *  <tt>VisualOnly</tt>: Most interactions of this object with other objects are suppressed.
  *  <tt>VisualOnly</tt>: Most interactions of this object with other objects are suppressed. (The original intention was that this is used for decorations that do not affect the game play; however, it has other uses too.) If Compatible is also specified, then VisualOnly implies Stealthy (but does not actually set that flag unless you do so explicitly).
  *  <tt>(Volume)</tt>: Put a number. Defines the volume of the object; see the documentation about moving objects for details about what this does.
  *  <tt>(Weight)</tt>: Put a number. Defines the weight of the object (it probably should be "Mass" instead of "Weight" (since it has to do with only how much force is needed to move it and not anything relating to gravity), but it isn't); see the documentation about moving objects for details about what this does.
  *  <tt>(Weight)</tt>: Put a number. Defines the weight of the object; see the documentation about moving objects for details about what this does.

It can also include blocks of program instructions, which can start with a label, a message name (either built-in or user message), or the <tt>SUBS</tt> keyword.