hypothetical Reskronchulonch editing guide, draft2

From hyperpixel, 9 Months ago, written in Venderant Nalaberong, viewed 90 times.
earl https://txt.blorgblorgbl.org/view/c9ba8429 Embed
Download Paste or View Raw
  3. hypothetical how-to-edit text:
  5. You can create your own Reskronchulonch levels using commonly available
  6. cross-platform tools. You'll need Tiled or another editor that can work with
  7. TMX files, and Python 2.7. If you share your levels, please do it in a way that
  8. makes it obvious they aren't official ones.
  10. To edit a level, first edit the TMX file corresponding to the level number,
  11. then run make_mapdata.py to compile the TMX files into a new version of
  12. mapdata.js. (To run make_mapdata.py, you might type something like
  13. "C:\Python27\python make_mapdata.py".)
  15. If make_mapdata.py encounters anything it doesn't understand, or that it
  16. thinks would break the game, then it will print a message and also save
  17. that message in a file called make_mapdata.log.
  19. For your maps to work, you need the following:
  21. - Exactly one tile layer using the foreground.tsx tileset. This contains most
  22.   of the game elements.
  24. - Optionally, one layer using the background.tsx tileset. This contains
  25.   immaterial elements the player can pass through, such as reverse-gravity
  26.   fields.
  28. - An object layer with objects using the objects.tsx tileset. This is how you
  29.   place game elements that can have individual properties. Objects will
  30.   always snap to be tile-aligned in the game, even if you place them
  31.   off-center in the editor. Objects are identified by their tile from the
  32.   tileset; the "type" is never used, and the "name" is only used for certain
  33.   orbs.
  35. You need to export the file using the verbose XML or CSV format, as
  36. the make_mapdata.py script doesn't understand base64 or compression.
  38. Here are more details about what you can place:
  42. - Walls and diagonal walls are simple solid obstacles. They'll block bullets,
  43.   except for bullets with the shotPenetrate property. They'll never block
  44.   moving orbs. The color of a wall is purely cosmetic.
  46. - Blinkwalls are shown in the tileset with a checkboard pattern and a number.
  47.   All blinkwalls open and close to the same rhythm. The number indicates
  48.   which beat of that rhythm a blinkwall uses. The color of a blinkwall is
  49.   purely cosmetic.
  51. - Doors are shown in the tileset with a color letter; this letter does not
  52.   appear during play. The color determines which buttons or dropoff points
  53.   can open the doors.
  55. - Icosahedra wait to be towed to a matching dropoff point.
  57. - Dropoff points open doors of the matching color when an icosahedron is
  58.   brought to one. Like doors, they are shown in the editor with a color
  59.   letter that does not appear in game.
  61. - Buttons open doors of the matching color when shot. They are shown with
  62.   a color letter in-editor. A button that you place using the foreground
  63.   tile layer has a permanent duration; for a timed button, you must use
  64.   the object layer.
  66. - Timers are invisible except when a timed button of the matching
  67.   color is in effect. While a button of the color is counting down, the timer
  68.   shows the approximate time remaining in seconds, or 99 for very long
  69.   durations.
  71. - Orbs are there to be shot. An orb that you place using the foreground tile
  72.   layer does not move or shoot and has no shield; more complex orbs
  73.   use the object layer.
  77. - Reverse gravity fields (blue) reverse the direction of gravity. (On
  78.   difficulty 1 only, reverse gravity is also stronger than normal gravity.)
  80. - Sideways force fields (striped) push the player sideways with a varying
  81.   degree of force. The types with arrows push in that direction; the type
  82.   without arrows alternates back and forth. The arrows are not shown in-game.
  84. - White arrows are visible, but have no physical gameplay effect. Note that,
  85.   even if they display behind walls in the editor, they will display in
  86.   front of walls in-game. These are the same as sign objects containing
  87.   just a single "u", "d", "l", or "r" character.
  91. - Sign objects display in-game as text. To be displayed, these objects
  92.   must have a property named "text" with a value of the text to display.
  93.   Only certain ASCII characters are allowed. These are the space and
  94.   ABCDEFGHIJKLMNOPQRSTUVWXYZ.:0123456789. The lowercase letters udlr can
  95.   also be used; these become up/down/left/right arrows rather than
  96.   lowercase letters. For multi-line text, place multiple sign objects.
  98. - There must be exactly one player object. This may have two properties,
  99.   "title" and "description". If these properties are used, they give
  100.   the level-select-menu title and level-start description for the level.
  101.   They are limited to the same characters as text objects, except that
  102.   description may also contain line breaks.
  104. - Button objects use their color in the same way that foreground-tile
  105.   buttons do. They may also have a property "time", an integer which
  106.   says how many frames the button keeps doors open for before closing again.
  107.   (30 frames = 1 second.)
  109. - A gravity core sets the level so that gravity is towards the core, rather
  110.   than downward (and reversed gravity is away from the core, rather than
  111.   upward). You may not have more than one. The game physics are
  112.   counterintuitive very close to the core, so walling it off is recommended.
  114. - Orb objects are much more complicated than the others, with many
  115.   optional properties. It's easiest to copy and paste an orb that already
  116.   does close to what you want, then edit it, instead of trying to set all
  117.   the relevant properties from scratch.
  118.  - shield: If this is a positive integer, the orb will have that many shields.
  119.  - regen: If this is a positive integer, and shield also is,
  120.           then the orb's shield regenerates. A higher number is slower
  121.           regeneration: one shield is restored every X frames, so for
  122.           instance regen=30 makes an orb regenerate once per second.
  123.  - spectral: If this is set to anything but blank or 0, the orb will be
  124.              a spectral orb, meaning it is invincible until all non-spectral
  125.              orbs have been shot.
  126.  - chase: If this is a positive integer, the orb will chase the player
  127.           at a speed of this many pixels per frame. Its "path" and "parent"
  128.           properties, if any, will be ignored.
  129.  - parent: If this is set to the name or ID of another orb object, then
  130.            this orb will move with that orb. For example, you can use this
  131.            to make orbs that accompany a chase orb, as in the level 8 boss.
  132.            This can be combined with the "path" property for relative movement.
  133.            The parent's movement continues to be computed and applied even if
  134.            the player destroys the parent.
  135.  - absent: If this is set to anything but blank or 0, the orb won't tangibly
  136.            spawn into the game, but its "chase" or "path" property will still
  137.            be read, and other orbs can still use it as a parent. This can be
  138.            used to construct paths that are too complex for a single "path"
  139.            property, such as the outermost orbs in level 8.
  140.  - pattern: This gives the orb a bullet pattern. It must be a string,
  141.          and the string must be formatted in a specific syntax, as described
  142.          below.
  143.  - path: This gives the orb a looping movement path. It must be a string,
  144.          and the string must be formatted in a specific syntax, as described
  145.          below.
  148. A bullet pattern is a series of commands in a simple scripting language.
  149. This is separate from the orb's path, and is run at the same time as it.
  150. Some examples of commands are: "aim 500", "angle 35 500", "aim 450 homing",
  151. "wait 30".
  153. A command starts with a VERB, and then takes more parameters depending on
  154. the VERB. Parameters are separated with whitespace, and commands are separated
  155. from each other with semicolons.
  157. The VERB "wait" takes one parameter, an integer from 1 to 9999. It makes
  158. the orb wait that long before continuing to apply the pattern, in frames
  159. where 30 frames = 1 second. For example, "wait 60" waits for two seconds.
  161. The VERB "aim" takes one mandatory parameter, an integer from 1 to 9999.
  162. The orb fires a bullet, aimed directly at the player. The number is the speed
  163. of the bullet, where 256 is one pixel per frame. After the speed number,
  164. there can be up to two other parameters: the word "penetrate" (which can be
  165. abbreviated to a prefix like just "p"), and/or an integer from 1 45.
  166. The "penetrate" parameter gives the bullet the ability to pass through walls,
  167. and an integer parameter gives the bullet homing ability, adjusting its
  168. own aim by that many degrees per frame. A bullet that has both of these
  169. abilities loses the homing ability when it first moves through a wall.
  171. The VERB "angle" takes two mandatory parameters. The first is an integer
  172. from -359 to 359. This indicates the angle for the orb to shoot at, in degrees
  173. where 0 is up and 90 is right. After the angle angle is the bullet speed, which
  174. works the same as "aim", and then optionally a homing angle and/or "penetrate".
  176. The VERB "offset" takes one parameter, an integer from -359 to 359. It
  177. adds to or subtracts from the orb's offset angle by that much. For example,
  178. "offset 180" flips an orb's offset to face in the opposite direction. An
  179. orb's offset angle is 0 when it first spawns. Once it has become non-zero,
  180. every "angle" or "aim" command is rotated by that much. For instance, if the
  181. offset angle is 5, then an "aim [...]" command will fire 5 degrees clockwise
  182. from the player, and an "angle 355 [...]" command will fire straight up.
  184. VERBs can be abbreviated to a prefix, such as "w" for wait. Just "a" is
  185. interpreted as "aim", and if you leave the VERB out entirely, the command
  186. will be interpreted as having the "angle" verb (or print an error from
  187. make_mapdata.py if it doesn't have the right parameters for that).
  189. There must be at least one wait command in a pattern, unless the pattern
  190. is completely blank. At the end of the pattern, the orb will loop back
  191. to the start of the pattern, but it will keep its offset angle.
  193. For example, the following pattern makes an orb shoot at the player every
  194. two seconds, using a bullet that moves 3 pixels per frame: "aim 768; wait 120;"
  195. This pattern does similarly, but one second out-of-step with that one:
  196. "wait 60; aim 768; wait 60;".
  197. This pattern makes the orb fire a pattern of eight bullets at
  198. 45-degree clockwise increments, one bullet every half-second:
  199. "aim 0; wait 15; offset 60;"
  201. Much more complex patterns than this are possible. If there's an orb in the
  202. game that already shoots the way you want, go ahead and copy its pattern.
  205. An orb path is a series of commands in a simple scripting language.
  206. This is separate from the orb's bullet pattern, and is run at the
  207. same time as it.
  208. Some examples of commands are: "clockwise +2,-2 30", "straight +3,0 45",
  209. "straight 160".
  210. A command has an optional VERB, an optional DESTINATION, and a DURATION.
  211. These parts of a command are separated from each other with whitespace,
  212. and commands are separated from each other with semicolons.
  214. There are five VERBs, which are:
  215. - "straight": The orb will move to the DESTINATION at a constant speed.
  216. - "accelerate": The orb will move to the DESTINATION, starting slow and
  217.                 speeding up. The velocity curve resembles the first or third
  218.                 quarter of a sine wave.
  219. - "decelerate": The orb will move to the DESTINATION, starting fast and
  220.                 slowing down. The velocity curve resembles the second or fourth
  221.                 quarter of a sine wave.
  222. - "clockwise": If the move is straight up, down, left, or right, then this
  223.                is the same as "straight". If the move is a 45-degree diagonal,
  224.                then the orb will move to the DESTINATION by travelling
  225.                clockwise around 90 degrees of a circle, at a constant speed.
  226.                If the move is any other diagonal, the orb will travel
  227.                around 90 degrees of the ellipse created by horizontally
  228.                or vertically stretching a circle, moving faster in the
  229.                stretched direction.
  230. - "counterclockwise": Like "clockwise", but travelling a counterclockwise
  231.                       90 degrees.
  232. Each verb can be abbreviated to any prefix, such as "accel" or "a" for
  233. accelerate. Just "c" is interpreted as "clockwise". "cw" is also accepted
  234. as an abbreviation for "clockwise", and "cc" or "ccw" for "counterclockwise".
  235. Leaving out the VERB entirely, so the command starts with the DESTINATION or
  236. DURATION, is allowed and is interpreted as "straight".
  238. A DESTINATION is a pair of integers separated by a comma. Each integer
  239. can also have a plus or minus in front of it. A destination is something like
  240. "+2,+3" or "0,-4". It indicates a location, in tiles, relative to the orb's
  241. starting point; for example, "+2,+3" is two tiles right and one tile up
  242. from the start. Legal values are from -9999 to 9999.
  243. Leaving out the DESTINATION entirely, so the command is just VERB DURATION
  244. or just DURATION, is allowed and interprets the DESTINATION as "0,0".
  245. If the orb is already at the DESTINATION, then the VERB is ignored and the orb
  246. just holds still for the DURATION.
  247. The last command must have a DESTINATION of "0,0", either explicitly or
  248. implied, so that the orb's path smoothly loops back on itself.
  250. A DURATION is an integer, which measures an amount of time in frames
  251. (30 frames = 1 second). The orb will carry out the command at whatever
  252. speed makes it take this long. The maximum duration is 9999.
  254. For example, the following path makes an orb travel in a complete clockwise
  255. circle with a radius of 4 tiles, taking 10 seconds for a complete loop:
  256. "cw 4,4 75; cw 8,0 75; cw 4,-4 75; cw 75;"
  257. The first command moves it to the point 4 tiles right and 4 up from its start,
  258. taking 2.5 seconds. The second one moves it to the point 8 tiles right from
  259. its start, taking another 2.5 seconds. The third moves it to 4 tiles right
  260. and 4 tiles down from its start, and the last moves it back to the start.
  261. If you replace the "cw" with "ccw", then the orb will move in a sort of
  262. star-shape, stringing together four counterclockwise 90 degree circles.
  264. The [SECTION] of map [NUMBER] contains many circles with useful paths
  265. to copy from; just scale the numbers proportionately to the size and speed
  266. you want.

Reply to "hypothetical Reskronchulonch editing guide, draft2"

Here you can reply to the paste above