Rayman Designer hacking: Difference between revisions

mNo edit summary
RayCarrot (talk | contribs)
Some cleanup
Line 1: Line 1:
'''''[[Rayman Designer]]'' hacking''' is the process of modifying the program files of the game in order to change the appearance and the behaviour of in-game events and sceneries.
'''''[[Rayman Designer]]'' hacking''' is the process of modifying the program files of the game in order to change the appearance and the behavior of in-game events and sceneries.


==Graphics==
==Graphics==


===Normal Platforms (Tiles)===
=== Tiles ===
In every world-folder (for example "[[The Dream Forest|jungle]]" or "[[Band Land|music]]") of the game, there is a .PCX graphic file. It contains all the graphic tiles which are used by the Mapper. Tiles may be changed and added, but the following should not be changed:
In every world-folder (for example "[[The Dream Forest|jungle]]" or "[[Band Land|music]]") of the game, there is a .PCX graphic file. It contains all the graphic tiles which are used by the Mapper and the levels created from it. Tiles can be changed and added, but the following should not be changed:


*The color palette used in the file. The addition of new colours causes the in-game graphics to display incorrectly.
*The color palette used in the file. This palette is additionally used for the background and event sprites, meaning they will change their colors too.
*The first tile on the top-left corner, which is used to set the transparent color in the file.
*The first tile on the top-left corner, which is used to set the transparent color in the file.
*The lowest row of tiles, which are reserved for the Mapper's "types mode".
*The lowest row of tiles, which are reserved for the Mapper's "types mode".
Line 13: Line 13:
Also note that all custom maps will use the new graphics if the standard tiles are replaced. However, the 24 levels which come with the game have built-in graphics, and are not affected by PCX changes.
Also note that all custom maps will use the new graphics if the standard tiles are replaced. However, the 24 levels which come with the game have built-in graphics, and are not affected by PCX changes.


The PCX files used in the educational games are expansions of the ones from ''Rayman Designer'', meaning that they can easily replace the ones in Designer without removing any existing tiles.
=== Sprites ===
All animated sprites of the game (for example, [[Rayman]] himself and enemies) are stored in the .DES files, short for dessin, French for drawing. These files are packed in the .WLD, AllFix and BigRay files, which are stored in the "pcmap" folder. The .DES files contain the image data and animation information.


===Animated objects===
ETA files, short for état, French for state, are stored in the same files. They contain information about the event states, specified by Etat and SubEtat.
All animated sprites of the game (for example, [[Rayman]] himself and enemies) are stored in the .DES files, short for DESign. These files are packed in the .WLD files of the game, which are stored in the "pcmap" folder. It is possible to see what DES files are contained in a WLD file by simply opening it in a text editor. It is possible to extract sprites from these files, but little progress has been made on changing them.


ETA files, short for "''état''" ("state"), are stored in the WLD files in the same way. They appear to contain information about the animations of the sprites.
The file names for the .DES and .ETA files are only included in ''[[Rayman Designer]]'' and its spin-offs. In all previous games they are only refereed to by the index they're loaded into the game.


Before it became possible to extract sprites from the game, the only way to explore the contents of the DES files was experimentation with event codes. The names of the .DES files also give a clue as to their contents. Most of them are in French, but some are English. For example:
==[[Event (Rayman Designer)|Events]]==
 
*RAY.DES = [[Rayman]]
*SPI.DES = [[Spider]] ([[The Caves of Skops|Cave]])
*CLE.DES = Clef ([[Band Land|Music]])
*MUS.DES = [[Musician]] ([[The Blue Mountains|Mountain]])
 
Some of these files, such as CLE.DES, contain only one object, while others contain very many different objects.


The names of the DES and ETA files cannot be seen in the WLD files of the original game or the ''[[Rayman Junior]]'' games, but they are present in the files from ''[[Rayman By His Fans]]''.
==[[Event (Rayman Designer)|Events]]==
=== Editing events ===
=== Editing events ===
In every world-folder of the game, there is a file called EVE.MLT. It contains all the codes of the events of the current world and can be modified any text editor. One has to scroll down to see the codes in question. It is unclear which programming language the game is written in, but the events are coded in this way:
In every world-folder of the game, there is a file called EVE.MLT. It contains the manifest of the events of the current world and can be modified using a text editor. The manifest is written in an in-house engine command format. The events are structured in this way:




{| width="auto" align="center" style="border-style:dotted;border-width:1mm;border-color:green;text-align:left"
{| width="auto" align="center" style="border-style:dotted;border-width:1mm;border-color:green;text-align:left"
|œdef,eventname,DES_FILE,some number(?),
|œdef,eventID,DES_FILE,z-index,
FILE.ETA,
FILE.ETA,


specific event code
eventCommands


33,255,
33,255,
Line 58: Line 48:


*œdef = define; this must come first
*œdef = define; this must come first
*eventname = name of the event, could be anything; the events which come with the game all use codenames which start with "MS_" (so that they can be localized)
*eventID = the event ID. This is used to specify the event in the editor as well as to get the localized name.
*DES_FILE = name of the graphic file which should be used for the event (without the extension ".DES")
*DES_FILE = name of the graphic file which should be used for the event (without the extension ".DES")
*some number = unsure; it seems to have no effect
*z-index = the z-index, specifying the order the sprite should be drawn on screen (a value between 1-7)
*FILE.ETA = name of the ETA file which should be used; it gives the event some behaviours and orders the sprites in some way
*FILE.ETA = name of the state file which should be used
*specific event code = not every event has it; it tells the event which way it should "walk" for example
*eventCommands = the non-compiled event commands (these have to use local offsets due to not having been compiled with label offsets yet)
*33,255 = unsure; All codes must have this line or the game will crash
*33,255 = the command termination (33 is invalid command with the argument 0xFF)
*main_X_pos = main x coordinate of the event
*main_X_pos = main x coordinate of the event
*main_Y_pos = main y coordinate of the event
*main_Y_pos = main y coordinate of the event
*etat = spriteposition A (of a stored sprite in a .DES file)
*etat = the primary event state
*sub_etat = spriteposition B (of a stored sprite in a .DES file)
*sub_etat = the secondary event state
*Offset_BX = is the x coordinate of the point on the sprite on which Rayman can stand (if "Follow_enabled" is 1)
*Offset_BX = is the x coordinate of the point on the sprite on which Rayman can stand (if "Follow_enabled" is 1)
*Offset_BY = is the y1 coordinate of the point on the sprite on which Rayman can stand (if "Follow_enabled" is 1)
*Offset_BY = is the y1 coordinate of the point on the sprite on which Rayman can stand (if "Follow_enabled" is 1)
*Offset_HY = is the y2 coordinate of the point on the sprite on which Rayman can stand (if "Follow_enabled" is 1)
*Offset_HY = is the y2 coordinate of the point on the sprite on which Rayman can stand (if "Follow_enabled" is 1)
*Follow_enabled = whether or not (i.e. 1 or 0) Rayman can stand on this event ("follow" its movement)
*Follow_enabled = whether or not Rayman can stand on this event ("follow" its movement), either 0 or 1
*follow_sprite = related to "Follow_enabled". Tells the program how far from the Offset_BX coordinate rayman can stand (this actually makes "Offset_BX" redundant).
*follow_sprite = related to "Follow_enabled". Tells the program how far from the Offset_BX coordinate rayman can stand (this actually makes "Offset_BX" redundant).
*hitpoints = for enemies like [[hunter]]s, how much [[resistance]] the event has. However, for many events this number has a different meaning.
*hitpoints = for enemies like [[hunter]]s, how much [[resistance]] the event has. However, for many events this number has a different meaning, such as specifying if the sprite should appear flipped.
*obj_type = this number tells the program the main behaviours of the sprite; essentially, what type of event it is. An incomplete list of possible values, and their meanings, can be found [http://z15.invisionfree.com/Tehrunescape455/index.php?showtopic=186 here].
*obj_type = this is the event object type. All types are hard-coded in the engine and specifies how the event should be treated.
*hit_sprite = unsure
*hit_sprite = unsure
*group = in which group the event can be found in the Events Editor. For example, the "Enemies" group is group 5.
*group = in which group the event can be found in the Events Editor. For example, the "Enemies" group is group 5.


'''Event Commands'''


'''The Main Code'''
The event commands will repeat itself when it comes to the end.
 
The main code of an event will repeat itself when it comes to the end. Most of these are effective only for certain "obj_type" values, i.e. behaviours.
This is all that is known about this part:


*0, x, -> sprite moves right (x = time in milliseconds, max. 254)
*0, x, -> sprite moves right (x = time in milliseconds, max. 254)
Line 98: Line 86:


*19, x, -> wait x seconds
*19, x, -> wait x seconds
*20, t, x,y, -> sprite moves for t milliseconds (max. 254) with velocity given by x and y.
*20, t, x, y, -> sprite moves for t milliseconds (max. 254) with velocity given by x and y.
 
A complete list of the event commands can be found here: https://github.com/Adsolution/Ray1Map/blob/master/Assets/Scripts/DataTypes/Common/Serializable/Events/EventCommand.cs


=== Unused events ===
=== Unused events ===