Free Hero Mesh

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

Differences From Artifact [ca248fd4af]:

To Artifact [27db209f5d]:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
1
2
3
4
5



6
7
8
9
10
11
12





-
-
-







This document is a tutorial of the use of Free Hero Mesh. (It is provided
for the benefit of users who want it; some people have requested it. My
own opinion is that the other documentation is better. If you have any
concerns about this documentation or how to improve it, please do so.)

(If you have used MESH:Hero before, then you may wish to read the section
entitled "For users of MESH:Hero".)

(NOTE: This tutorial is incomplete.)


=== Installation ===

1. Compile it (if it is not already compiled). See README file for details
about compilation. I will assume it called "heromesh" and is in the PATH.
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
265
266
267
268
269
270
271











































































-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
A composite puzzle set is read-only. If you want to edit it then you must
decompose it. This can be done by typing:

  cat example.fhm | har x example.xclass example.class example.level example.solution

Now it can be used like a noncomposite puzzle set, again.


=== For users of MESH:Hero ===

Free Hero Mesh was designed to be compatible with most puzzle sets for
MESH:Hero, although many improvements have also been made.

The class editing is now done in a text file, so any formatting you do
will be preserved and will not be lost, and you can use any functions of
your text editor. However, the syntax is different.

Some of the significant differences of class codes in Free Hero Mesh
compared to MESH:Hero include the following:

* Sigils are now used to indicate the kind of name (e.g. $ for classes,
and # for user-defined messages, etc). You need not worry about any names
you have defined interfering with new features added to future versions,
nor do you need to worry about class names interfering with variable names.

* It is now case-sensitive. Furthermore, variable names are not limited to
seven letters, and some characters are now allowed in names which were not
previously allowed.

* The syntax is very different. It is now RPN-based; for example, instead
of "o.Height = p.Height+1", you will write "%o %p ,Height 1 + =,Height".
Also, many instructions no longer need explicitly mentioning "Self"; for
example, you can write "%dir Move" instead of "Move(Self, dir)" (you would
write "%obj %dir ,Move" if you wanted "Move(obj, dir)"; note the comma to
indicate working on an object other than Self).

* Some names of existing instructions have been changed (there are also
many new instructions). For example, "MsgArg1" is now called "Arg1",
"CurImage" is now called "Image", "DirN" is now "N", "MSG_INIT" is now
"INIT", etc.

* There is now signed arithmetic as well as unsigned arithmetic. (Most
instructions are unsigned by default, but many instructions can have a
comma in front to make them signed instead.)

* A few instructions have been removed, but are not very important anyways.

* Local variables and user-defined messages need not be declared; there is
no VARS block.

* Values now have types. Attempting to use a value of the wrong type will
result in a "Type mismatch" error. This is harmless; it will result only
in the loss of game, and will not segfault. You can restart or rewind the
level or play a different level.

* It detects errors with accessing objects that no longer exist. This will
display an error message like above, and will not segfault; you can restart
or rewind like any other error.

* Several other errors are detected and/or prevented too, e.g. you can no
longer inadvertently affect the game state with IgnoreKey.

* You can now access the attributes of classes without needing to create an
object of that class. For example, if Misc1 refers to a class, then you can
write "Misc1 ,Temperature" to read the Temperature attribute of that class.

* You can name the bits of Misc4-Misc7, if you wish, rather than having to
always refer to them by number. (Using the numbers works too.)

* There are some differrences in behaviour, including increasing some
fields to 32-bits; if you define a class with the "Compatible" flag then
this will revert some of the behaviours to be closer to MESH:Hero.

(TODO)