Rayman 1 Level Editor/Viewer (Ray1Map)
Moderators: English moderators, Modding and utilities team
Forum rules
Please keep the forum rules and guidelines in mind when creating or replying to a topic.
Please keep the forum rules and guidelines in mind when creating or replying to a topic.
-
- Posts: 37010
- Joined: Fri Jul 31, 2009 9:00 pm
- Location: https://www.youtube.com/watch?v=cErgMJSgpv0
- Contact:
- Tings: 102745
Re: Rayman 1 Level Editor/Viewer (Ray1Map)
Yeah, I remember from my Designer days that making Moskito's health bar appear was surprisingly easy. All you need to do is be at the bottom of the level, and have the Moskito object in view. I knew it took commands to make the boss actually work though, but I'm surprised there are only six. In the old days, I copy-pasted the Ferocious Little Livingstone's command block, which I'm pretty sure was much longer, to make something somewhat passable.
Here I copied one of the moving platforms, since it at least had the right number of commands, but I figured that my inability to change them was because that wasn't (yet) implemented in the editor, rather than a bug. Is there a particular challenge to editing them, or is it just part of the UI work that needs to be done?
Here I copied one of the moving platforms, since it at least had the right number of commands, but I figured that my inability to change them was because that wasn't (yet) implemented in the editor, rather than a bug. Is there a particular challenge to editing them, or is it just part of the UI work that needs to be done?
Sig with Dora made by R4Y_ANC3L; others made by me
Android: How to block an image you don't like
It's good to learn from the past: read the Pirate-Community Documentary!
Other things you should know about this site
Re: Rayman 1 Level Editor/Viewer (Ray1Map)
Oh haha, that's pretty neat! It's quite interesting how they made this command system quite early on and then just decided to stop using it Basically if you look at the events you'll see enemies and such in later worlds don't use them at all and instead have the commands be compiled into actual functions in the exe. I'd imagine it was a lot faster doing it that way as it seemed like a pain having to deal with label offsets etc. Still, it was a nice effort of them to make it easier to modify on the fly.PluMGMK wrote: ↑Sun Jul 05, 2020 7:52 pm In the old days, I copy-pasted the Ferocious Little Livingstone's command block, which I'm pretty sure was much longer, to make something somewhat passable.
On PC it's quite simple, we just haven't had it implemented to the UI. Ryemanni was the only one making the UI before, and he's left the project now.
If you're familiar with C# you can quite easily modify the code to do it though. The saving is done in "SaveLevel" in the "PC_Manager" class. What you can do is at the very start of the method find your event through something like
Code: Select all
var e = editorManager.Level.EventData.First(x => x.Data.Type == EventType.TYPE_MOSKITO2);
Re: Rayman 1 Level Editor/Viewer (Ray1Map)
Here's an update video showing the real-time editing as well as maps from GBA, DSi and Jaguar
-
- Posts: 83848
- Joined: Thu Aug 07, 2003 6:50 pm
- Location: Paris, France
- Contact:
- Tings: 610019
Re: Rayman 1 Level Editor/Viewer (Ray1Map)
Looking great! And soon they'll all be on RayWiki.
Re: Rayman 1 Level Editor/Viewer (Ray1Map)
You can now convert custom Rayman Designer maps to work in By his Fans and 60 Levels I also figured out how to change the level counts in those games, so you can essentially make your own expansion packs now. This also solves Designer's biggest flaw, that being that you normally can't use different tilesets between levels.
-
- Posts: 37010
- Joined: Fri Jul 31, 2009 9:00 pm
- Location: https://www.youtube.com/watch?v=cErgMJSgpv0
- Contact:
- Tings: 102745
Re: Rayman 1 Level Editor/Viewer (Ray1Map)
Ah yes, "By His Fans" would be so much better if it contained the likes of "You Will Not Win", as opposed to the short and frequently bugged maps it originally shipped with.
EDIT: Btw, it looks like Moskito's ETA is number 14 in the Educational games. Still have to check it in-game…
EDIT2: Yeah, looks right, but the lack of commands means he doesn't do anything and I can't hit him. Better go and hack the C#…
EDIT3: Yet another silly question – how do I actually edit collision types? I seem to be stuck in erase mode…
EDIT: Btw, it looks like Moskito's ETA is number 14 in the Educational games. Still have to check it in-game…
EDIT2: Yeah, looks right, but the lack of commands means he doesn't do anything and I can't hit him. Better go and hack the C#…
EDIT3: Yet another silly question – how do I actually edit collision types? I seem to be stuck in erase mode…
Sig with Dora made by R4Y_ANC3L; others made by me
Android: How to block an image you don't like
It's good to learn from the past: read the Pirate-Community Documentary!
Other things you should know about this site
-
- Posts: 83848
- Joined: Thu Aug 07, 2003 6:50 pm
- Location: Paris, France
- Contact:
- Tings: 610019
Re: Rayman 1 Level Editor/Viewer (Ray1Map)
On the subject of Ray1Map, the exported maps have been uploaded to the wiki and we'll be adding them to the level articles soon.
-
- Posts: 37010
- Joined: Fri Jul 31, 2009 9:00 pm
- Location: https://www.youtube.com/watch?v=cErgMJSgpv0
- Contact:
- Tings: 102745
Re: Rayman 1 Level Editor/Viewer (Ray1Map)
Cool!
I got Moskito working anyway, having corrupted the map one more time in the attempt. I might post a video tomorrow.
A strange thing I noticed is that he seems to require at least two always events for the medium fruit: one for when he's flying right, and the second for when he's flying left. I put four always events in the map, since that's how many there are in the original game, but I get the feeling only two are required. I only had one always event for the small fruit, and that worked perfectly, despite the fact that the original game also seems to have four of those…
Also, I was eventually able to place types, but it seemed to take several clicks on the icon before the editor registered that I actually wanted to place that type…
EDIT: If anyone's interested, here's the code I added to the SaveLevel function – nothing too complicated, but in case you're not familiar with C#:
EDIT2: Actually, the original game just has two always events for the small spiky fruit. I still seemed to be able to get away with just one though…
I got Moskito working anyway, having corrupted the map one more time in the attempt. I might post a video tomorrow.
A strange thing I noticed is that he seems to require at least two always events for the medium fruit: one for when he's flying right, and the second for when he's flying left. I put four always events in the map, since that's how many there are in the original game, but I get the feeling only two are required. I only had one always event for the small fruit, and that worked perfectly, despite the fact that the original game also seems to have four of those…
Also, I was eventually able to place types, but it seemed to take several clicks on the icon before the editor registered that I actually wanted to place that type…
EDIT: If anyone's interested, here's the code I added to the SaveLevel function – nothing too complicated, but in case you're not familiar with C#:
Code: Select all
// Fixup the Moskito hack...
var PlumsMosk = commonLevelData.EventData.First(x => x.Data.Type == EventType.TYPE_MOSKITO2);
PlumsMosk.CommandCollection.Commands[0].Command = EventCommand.GO_LABEL;
PlumsMosk.CommandCollection.Commands[0].Arguments = new byte[] {1};
PlumsMosk.CommandCollection.Commands[1].Command = EventCommand.GO_WAITSTATE;
PlumsMosk.CommandCollection.Commands[1].Arguments = new byte[] {1};
PlumsMosk.CommandCollection.Commands[2].Command = EventCommand.RESERVED_GO_SKIP;
PlumsMosk.CommandCollection.Commands[2].Arguments = new byte[] {0};
PlumsMosk.CommandCollection.Commands[3].Command = EventCommand.GO_LABEL;
PlumsMosk.CommandCollection.Commands[3].Arguments = new byte[] {2};
PlumsMosk.CommandCollection.Commands[4].Command = EventCommand.GO_NOP;
PlumsMosk.CommandCollection.Commands[4].Arguments = new byte[] {200};
PlumsMosk.CommandCollection.Commands[5].Command = EventCommand.RESERVED_GO_GOTO;
PlumsMosk.CommandCollection.Commands[5].Arguments = new byte[] {1};
PlumsMosk.LabelOffsets = new ushort[] {1, 7};
// And the fruit hack...
foreach (var PlumsFruit in commonLevelData.EventData.Where(x => (x.Data.Type == EventType.TYPE_MST_FRUIT1 || x.Data.Type == EventType.TYPE_MST_FRUIT2))) {
PlumsFruit.CommandCollection.Commands[0].Command = EventCommand.GO_NOP;
PlumsFruit.CommandCollection.Commands[0].Arguments = new byte[] {200};
}
Sig with Dora made by R4Y_ANC3L; others made by me
Android: How to block an image you don't like
It's good to learn from the past: read the Pirate-Community Documentary!
Other things you should know about this site
Re: Rayman 1 Level Editor/Viewer (Ray1Map)
Awesome! I'd love to see how that works in-game.
Yeah, the tile/collision editors have some minor issues atm. They're also a bit confusing to use with their weird keyboard combinations We we're trying to copy what the Mapper does, but it got confusing with our existing controls for moving the map etc. It's something we'll hopefully fix if we find someone to help out with the Unity UI side of things.
Btw, does anyone here know of a way to access the game memory from emulators, such as for PS1 or GBA? We have this real-time editing/viewing feature which currently only works with DOSBox has it has static pointers to the game memory, but I couldn't find anything like that for other emulators sadly. If we could find it it'd be very easy implementing real-time editing/viewing for essentially any platform (besides Jaguar as that's a different engine) as all versions essentially look the same in memory.
-
- Posts: 37010
- Joined: Fri Jul 31, 2009 9:00 pm
- Location: https://www.youtube.com/watch?v=cErgMJSgpv0
- Contact:
- Tings: 102745
Re: Rayman 1 Level Editor/Viewer (Ray1Map)
Hmm, PCSXR seems to have a pointer psxM, which I imagine should be in a fixed location itself, but the actual address it points to must be variable. I guess it's a matter of figuring out where that pointer lives and following it at runtime? That's probably much easier said than done…
Uploading the video now – question is, do I want to disable comments by saying it's for kids… It does contain footage of Rayman Junior after all…
Uploading the video now – question is, do I want to disable comments by saying it's for kids… It does contain footage of Rayman Junior after all…
Sig with Dora made by R4Y_ANC3L; others made by me
Android: How to block an image you don't like
It's good to learn from the past: read the Pirate-Community Documentary!
Other things you should know about this site
Re: Rayman 1 Level Editor/Viewer (Ray1Map)
Yeah, you'd need to find a pointer in a static address which then points to the game memory, which will vary between instances. I'll look into what you linked later. I'm not too familiar with PS1 emulators and such, but would be cool to figure out a way to do it.
For DOSBox I found a thread somewhere where someone had listed static pointers for it for multiple versions. I'd also used that before when I had the TPLS being run from RCP.
As for the video, I wouldn't bother marking it as for kids. That has a lot of annoyances, such as not allowing the mini player to be used on mobile.
For DOSBox I found a thread somewhere where someone had listed static pointers for it for multiple versions. I'd also used that before when I had the TPLS being run from RCP.
As for the video, I wouldn't bother marking it as for kids. That has a lot of annoyances, such as not allowing the mini player to be used on mobile.
-
- Posts: 37010
- Joined: Fri Jul 31, 2009 9:00 pm
- Location: https://www.youtube.com/watch?v=cErgMJSgpv0
- Contact:
- Tings: 102745
Re: Rayman 1 Level Editor/Viewer (Ray1Map)
Yeah, I remember marking a lot of my old Rayman videos as made for kids back when the email first came in in 2019. Somehow it didn't really hit me that all the old comments would then get lost in 2020! I'll take your advice: Apparently, YouTube's editor doesn't let you speed stuff up anymore, so I had to go back and edit the file locally – that's why it took so long! Actually, that gave me the kick I needed to resolve an issue with my system that's been bugging me for a while, and that I actually woke up thinking about this morning…
Sig with Dora made by R4Y_ANC3L; others made by me
Android: How to block an image you don't like
It's good to learn from the past: read the Pirate-Community Documentary!
Other things you should know about this site
Re: Rayman 1 Level Editor/Viewer (Ray1Map)
Nice!! I'm glad to see the tool come to good use Really neat that the boss is fully functional. One day I might try moving over the R1 exclusive events to Designer by editing the .wld files. I'd imagine the code to handle them is all still there. Only issue is that there's probably a memory limitation on those (but maybe not in Designer since that reserves a lot more memory for the data than R1).
-
- Posts: 37010
- Joined: Fri Jul 31, 2009 9:00 pm
- Location: https://www.youtube.com/watch?v=cErgMJSgpv0
- Contact:
- Tings: 102745
Re: Rayman 1 Level Editor/Viewer (Ray1Map)
I seem to recall reading somewhere that they took out the bosses (and I guess some other sprites) because of memory limitations… Either way, it seems pretty arbitrary that they deleted Moskito but left in Rayman riding him. And also left in Tarayzan.
I'd imagine the code is all there indeed. Otherwise, they might have reused some of the object-type numbers for the new events they added, which they didn't.
Speaking of which, I noticed a comment in the code that "MS_wiz_comptage" is different in the EDU games. It's not really that different – it's still a counter, just an invisible one as opposed to a coloured Ting. They use them in the final parts of the levels where you have to find all the right answers to make the exit sign appear.
Also, I noticed that the "musical exit sign" sprite is actually used for invisible screen-moving entities in the original game. I wonder if this means it was never intended to be visible, and just represented the starting of the chase music in most versions of the game?
I'd imagine the code is all there indeed. Otherwise, they might have reused some of the object-type numbers for the new events they added, which they didn't.
Speaking of which, I noticed a comment in the code that "MS_wiz_comptage" is different in the EDU games. It's not really that different – it's still a counter, just an invisible one as opposed to a coloured Ting. They use them in the final parts of the levels where you have to find all the right answers to make the exit sign appear.
Also, I noticed that the "musical exit sign" sprite is actually used for invisible screen-moving entities in the original game. I wonder if this means it was never intended to be visible, and just represented the starting of the chase music in most versions of the game?
Sig with Dora made by R4Y_ANC3L; others made by me
Android: How to block an image you don't like
It's good to learn from the past: read the Pirate-Community Documentary!
Other things you should know about this site
Re: Rayman 1 Level Editor/Viewer (Ray1Map)
And then they also left that weird Electoon gate in every PC version
Yeah, the main difference is that one is visible (a normal event) and the other isn't (an editor event). Currently the code filters the editor and always events based on the type, which is why I added that comment. It's really too bad they hard-coded so much in the executable for each game.PluMGMK wrote: ↑Sat Jul 11, 2020 6:36 pm Speaking of which, I noticed a comment in the code that "MS_wiz_comptage" is different in the EDU games. It's not really that different – it's still a counter, just an invisible one as opposed to a coloured Ting. They use them in the final parts of the levels where you have to find all the right answers to make the exit sign appear.
Musical sign is the autoscroll trigger, yeah. The reversed exit sign is used a vertical autoscroll trigger. I'm fairly sure they were never made for that purpose originally as that would have been odd. All other editor events reuse existing graphics, such as gendoors using the Magician's graphics, Mr Sax triggers using his feet, palette swappers using the HUD etc. They probably originally had a different purpose, but got used as editor events instead of being removed.PluMGMK wrote: ↑Sat Jul 11, 2020 6:36 pm Also, I noticed that the "musical exit sign" sprite is actually used for invisible screen-moving entities in the original game. I wonder if this means it was never intended to be visible, and just represented the starting of the chase music in most versions of the game?
Re: Rayman 1 Level Editor/Viewer (Ray1Map)
(sorry for double posting)
I gave it a try moving over an event from R1 to Designer and it kinda works? (ignore the text, I didn't add a localization string, so it's using the wrong one atm)
So the DES and ETA transferred fine, and with a quick mlt edit I got it to show up in the editor. However it doesn't move for some reason. I even added the move indicator triggers, but that didn't seem to help. I might be missing something obvious though as I'm not really sure how the UFO works At least moving events is possible, and I'd imagine bosses and such would work too.
Here's the code in case you want to try for yourself. It can be placed anywhere really (I did it in the main Controller in the Start method):
MLT code:
Only thing to keep in mind is you need to change the indexes (28 and 27) accordingly (check the sheet: https://docs.google.com/spreadsheets/d/ ... sp=sharing).
Edit: I fixed a minor issue in the code
I gave it a try moving over an event from R1 to Designer and it kinda works? (ignore the text, I didn't add a localization string, so it's using the wrong one atm)
So the DES and ETA transferred fine, and with a quick mlt edit I got it to show up in the editor. However it doesn't move for some reason. I even added the move indicator triggers, but that didn't seem to help. I might be missing something obvious though as I'm not really sure how the UFO works At least moving events is possible, and I'd imagine bosses and such would work too.
Here's the code in case you want to try for yourself. It can be placed anywhere really (I did it in the main Controller in the Start method):
Code: Select all
var r1Settings = new GameSettings(GameModeSelection.RaymanPC_1_21, Settings.GameDirectories[GameModeSelection.RaymanPC_1_21], World.Cave);
var rdSettings = new GameSettings(GameModeSelection.RaymanDesignerPC, Settings.GameDirectories[GameModeSelection.RaymanDesignerPC], World.Cave);
using (var r1Context = new Context(r1Settings))
{
using (var rdContext = new Context(rdSettings))
{
// Create managers
var r1 = new PC_R1_Manager();
var rd = new PC_RD_Manager();
// Load files
await r1.LoadFilesAsync(r1Context);
await rd.LoadFilesAsync(rdContext);
// Get file paths
var r1WldPath = r1.GetWorldFilePath(r1Settings);
var rdWldPath = rd.GetWorldFilePath(rdSettings);
// Load files
var r1Wld = FileFactory.Read<PC_WorldFile>(r1WldPath, r1Context);
var rdWld = FileFactory.Read<PC_WorldFile>(rdWldPath, rdContext);
const int r1DesAllfixCount = 7;
const int rdDesAllfixCount = 9;
const int r1EtaAllfixCount = 4;
const int rdEtaAllfixCount = 5;
// Copy over the DES
rdWld.DesItems = rdWld.DesItems.Append(r1Wld.DesItems[28 - r1DesAllfixCount - 1]).ToArray();
rdWld.DesItemCount = (ushort)rdWld.DesItems.Length;
rdWld.DESFileNames[rdWld.DesItemCount + rdDesAllfixCount - 1] = "UFO.DES";
// Copy over the ETA
rdWld.Eta = rdWld.Eta.Append(r1Wld.Eta[27 - r1EtaAllfixCount]).ToArray();
rdWld.ETAFileNames[rdWld.Eta.Length + rdEtaAllfixCount - 1] = "UFO.ETA";
// Save
FileFactory.Write<PC_WorldFile>(rdWldPath, rdContext);
}
}
Code: Select all
œdef,MS_UFO,UFO, 4 ,
UFO.ETA,
30,200,33,255,
100,80,
0 , 13 ,
60,96,8,
1,0,0,
162 , 0 , 9 ,
Edit: I fixed a minor issue in the code
-
- Posts: 37010
- Joined: Fri Jul 31, 2009 9:00 pm
- Location: https://www.youtube.com/watch?v=cErgMJSgpv0
- Contact:
- Tings: 102745
Re: Rayman 1 Level Editor/Viewer (Ray1Map)
Ah yes, I remember that adding extra groups caused weird text to show up! To think that back when I dabbled in MLT hacking, I knew so little about programming that I didn't even understand the "%02d".
I haven't tried this yet, but I think each indicator entity needs to be placed on top of a reactive tile – could that be the issue? Also, I remember in the old days, we thought that the palettes and UFOs were just standard moving platforms with ad hoc sequences of commands in each instance to trace out a specific path. How wrong that was! That theory never made sense really, because that doesn't account for how the levers can change the path.
Anyway, I've started working on a version of the Events.csv spreadsheet for the EDU games. So far it's mostly just the standard entities also available in R1 and Designer, but I'll keep working on it. Is that useful to you, or is someone else already working on it?
Speaking of UFOs, it looks like they split the indicators out into a separate ETA/DES pair in the EDU games, whereas they're in together with the UFO in the original game. I wonder what's up with that. Maybe it's because they also needed the indicators to be available in Image and didn't want to copy over the UFO. By that logic though, they should also have stripped the DES containing the red pricklies to the bare minimum – as it is, it can be used to place lots of formerly Cave/Mountain-exclusive entities in every world!
I haven't tried this yet, but I think each indicator entity needs to be placed on top of a reactive tile – could that be the issue? Also, I remember in the old days, we thought that the palettes and UFOs were just standard moving platforms with ad hoc sequences of commands in each instance to trace out a specific path. How wrong that was! That theory never made sense really, because that doesn't account for how the levers can change the path.
Anyway, I've started working on a version of the Events.csv spreadsheet for the EDU games. So far it's mostly just the standard entities also available in R1 and Designer, but I'll keep working on it. Is that useful to you, or is someone else already working on it?
Speaking of UFOs, it looks like they split the indicators out into a separate ETA/DES pair in the EDU games, whereas they're in together with the UFO in the original game. I wonder what's up with that. Maybe it's because they also needed the indicators to be available in Image and didn't want to copy over the UFO. By that logic though, they should also have stripped the DES containing the red pricklies to the bare minimum – as it is, it can be used to place lots of formerly Cave/Mountain-exclusive entities in every world!
Sig with Dora made by R4Y_ANC3L; others made by me
Android: How to block an image you don't like
It's good to learn from the past: read the Pirate-Community Documentary!
Other things you should know about this site
Re: Rayman 1 Level Editor/Viewer (Ray1Map)
Oh nice! I wouldn't recommend editing the .csv files directly as they generated exports from the sheet I sent. Instead it'd be better to edit that directly. The only thing we need is a new column for the DES and ETA of the EDU games. If you send me an email of yours I can give you write access Then I can also edit Ray1Map to utilize it correctly.PluMGMK wrote: ↑Sun Jul 12, 2020 8:42 pm Anyway, I've started working on a version of the Events.csv spreadsheet for the EDU games. So far it's mostly just the standard entities also available in R1 and Designer, but I'll keep working on it. Is that useful to you, or is someone else already working on it?
The way we did the current sheet was to export the event data from every level and merge duplicates. We could do something like that again here, perhaps by exporting to a separate sheet we then manually merge.
Eventually I want to find a way to make the sheet support PS1, but I have no idea how Basically the DES and ETA there are pointers rather than indexes (PS1 uses memory files, so the format is basically identical to how the PC version looks like in memory), but since they're duplicated in several levels and worlds it means they'd be different all the time.
Edit: I'm hoping the EDU games all have the same DES and ETA For example the Japanese and Chinese versions have an extra DES in allfix for the new characters, so all DES are offset by 1. I really wish all games referenced them by filename instead as that's much simpler to work with. That's how we can have just one column in the sheet for Kit which works for Designer and By his Fans even if they have different DES and ETA (both games have file tables).
Huh, interesting. That might explain why it doesn't work in Designer then (since if the ETA has been split it means the etat and subetat values are changed, which the engine uses to determine how the objects should be handled).PluMGMK wrote: ↑Sun Jul 12, 2020 8:42 pm Speaking of UFOs, it looks like they split the indicators out into a separate ETA/DES pair in the EDU games, whereas they're in together with the UFO in the original game. I wonder what's up with that. Maybe it's because they also needed the indicators to be available in Image and didn't want to copy over the UFO. By that logic though, they should also have stripped the DES containing the red pricklies to the bare minimum – as it is, it can be used to place lots of formerly Cave/Mountain-exclusive entities in every world!
Re: Rayman 1 Level Editor/Viewer (Ray1Map)
I had seen some posts about this in the Rayman 1 thread, but this looks really nice judging by the videos in the first post.
FC: 40210 | CF: 103059 | BOM: 94388 | LOTLD: 120486 | DOTK: 110450 | LS: 40810 | SBTC: 99693 | HH: 100028 | TOTL: 100563
TOTAL: 809687