Rayman Raving Rabbids leaderboards

Discuss tools to aid in the modification and running of Rayman games.

Moderator: Modding and utilities team

Forum rules
Please keep the forum rules and guidelines in mind when creating or replying to a topic.
PluMGMK
Annetta Fish
Posts: 40508
Joined: Fri Jul 31, 2009 9:00 pm
Location: https://www.youtube.com/watch?v=cErgMJSgpv0
Contact:
Tings: 136606

Re: Rayman Raving Rabbids leaderboards

Post by PluMGMK »

Thank you so much! :D I had deduced a lot from trial and error with a debugger (like the "croissant" flag and most of the scores), but it's good to see I was on the right track. The scores seem subtly different from the ones I extracted from the game, but I guess they're not from the final game (judging by all the "EN ATTENTE" comments). Seeing the #defines for the minigame IDs will also save me having to unlock all the FPSes to confirm which ID corresponds to which mode, so you've probably saved my life right there :oops2:

It would be great to see logs of these from the Xbox 360 version, thank you! :up:

Out of curiosity, why are you developing this under Ray1Map rather than Raymap? It feels more thematically similar to the latter because it's 3D.
DavidSosa
Ninja Teensy
Posts: 219
Joined: Sun Apr 18, 2021 12:17 am
Location: Lima, Peru
Contact:
Tings: 3455

Re: Rayman Raving Rabbids leaderboards

Post by DavidSosa »

that´s cool Droolie, great find, what can be do with these files, i dont know nothing about code, and sorry PluM for not giving you codes, i literally cant do that, maybe someone may help you

Hey PluM how are you going in your proyect?, have you a beta or something?
and, sorry for no giving you Xbox codes, my pc can´t run it as i sayed you, but let me know if you have a early beta build so you can talk with Hunchman801 to implement it in the forum (just like a beta)
Droolie
Musician
Posts: 5343
Joined: Wed Apr 20, 2005 7:31 pm
Tings: 67835

Re: Rayman Raving Rabbids leaderboards

Post by Droolie »

@PluMGMK:

I'm glad it's helpful!
I exported these scripts from the PC, Wii and Xbox 360 versions, so you can compare between them (I also included a source file I didn't include last time):
RRR Universe Scripts.7z
(109.93 KiB) Downloaded 148 times
I was going to post these yesterday but then I discovered that they have line numbers that correspond to the source file (but with expanded macros), so today I worked on printing them a bit more nicely :)
At first glance it still looks very difficult to read, but if you replace some constants it's feasible at least.
For example, here's the beginning part of exec_universe_initvars1_ps2_Xbox360, with some notes I added to show you how to read this:

Code: Select all

                                Categ_Type                      Type_GetGAO                     3D0098B3       # GetGameObject(3D0098B3) = the Universe GameObject or "univ" in the source file
                                Categ_Keyword                   Keyword_Ultra                   0              # "." operator (e.g. univ.variable = x), or the @ in the source file
                                Categ_GlobalVar                 Type_GetInt                     35864          # Variable with buffer offset 35864 or 00008C18 in hex. in 3D0098B0, you can find this is Vars[226]: i_FinalCheat_Unlocked
                                Categ_Type                      Type_GetInt                     64             # 64
                                Categ_Keyword                   Keyword_AndOp                   0              # Keyword AND combines 2 previous nodes: this does (univ.i_FinalCheat_Unlocked & 64)
9E00EAD3:701                    Categ_Keyword                   Keyword_JumpFalseSP             5              # if False: Jump 5 lines forward, otherwise fallthrough, so if !(univ.i_FinalCheat_Unlocked & 64) advance 5 lines
9E00EAD3:702                    Categ_LocalVar                  Type_GetInt                     20             # local_20
                                Categ_Type                      Type_GetInt                     0              # 0
                                Categ_Keyword                   Keyword_Affect                  0              # Keyword_Affect is "=", so this does local_20 = 0
                                Categ_Keyword                   Keyword_Jump                    12             # advance 12 lines
                                Categ_Function                  Func_AIGetCurSystem             0              # Func_AIGetCurSystem()
                                Categ_Type                      Type_GetInt                     4              # 4
                                Categ_Keyword                   Keyword_Equal                   0              # Func_AIGetCurSystem() == 4
9E00EAD3:703                    Categ_Keyword                   Keyword_JumpFalseSP             5              # if !(Func_AIGetCurSystem() == 4) advance 5 lines
9E00EAD3:704                    Categ_LocalVar                  Type_GetInt                     20             # local_20
                                Categ_Type                      Type_GetInt                     0              # 0
                                Categ_Keyword                   Keyword_Affect                  0              # local_20 = 0
                                Categ_Keyword                   Keyword_Jump                    4              # advance 4 lines
9E00EAD3:706                    Categ_LocalVar                  Type_GetInt                     20             # local_20
                                Categ_Type                      Type_GetInt                     1              # 1
                                Categ_Keyword                   Keyword_Affect                  0              # local_20 = 1
                                Categ_Type                      Type_GetGAO                     3D0098B3       # "univ"
                                Categ_Keyword                   Keyword_Ultra                   0              # "."
                                Categ_GlobalVar                 Type_GetInt                     36             # Variable with buffer offset 0x24. Vars[141]: i_force_newgame_reinit
                                Categ_Keyword                   Keyword_Not                     0              # !(univ.i_force_newgame_reinit)
9E00EAD3:709                    Categ_Keyword                   Keyword_JumpFalseSP             435            # if (univ.i_force_newgame_reinit) advance 435 lines
So I think this translates to:

Code: Select all

if (univ.i_FinalCheat_Unlocked & 64)
    local_20 = 0;
else if (Func_AIGetCurSystem() == 4)
    local_20 = 0;
else
    local_20 = 1;


if (!univ.i_force_newgame_reinit) {
    ...
}
Where the last part matches the source file :)

Just replacing 3D0098B3 with "univ" and some variable offsets with the name should already make this a lot more readable. :) You can also search for constants mentioned in the source script to find what you need. I hope this helps a bit.
PluMGMK wrote: Wed Jun 30, 2021 6:27 pmOut of curiosity, why are you developing this under Ray1Map rather than Raymap? It feels more thematically similar to the latter because it's 3D.
Jademap will eventually be its own project, but creating a separate project is not very fun and hard work whereas reverse engineering Jade is fun (to me, at least). :D
As for why I'm implementing this in Ray1map, the serializing system that I wrote for it with RayCarrot is much more up to date than Raymap's and enables many useful features (logging functionality, reading/writing with the same code, batch processing of level data...), so much that I think I'll need to rewrite Raymap to use this new serializer system in the future.
PluMGMK
Annetta Fish
Posts: 40508
Joined: Fri Jul 31, 2009 9:00 pm
Location: https://www.youtube.com/watch?v=cErgMJSgpv0
Contact:
Tings: 136606

Re: Rayman Raving Rabbids leaderboards

Post by PluMGMK »

That's great! :D Thanks for your help understanding the output too! :D

So apparently there are two Xbox 360-exclusive minigames, a basketball-type one and the rock-paper-scissors one that DavidSosa mentioned before. This tallies with info I found elsewhere on the web, but now I know for sure it's correct!

Code: Select all

[ ~/Rabbids files from Droolie/scripts ]$ diff -u exec_universe_init_maps_{PC,Xbox360}.* | grep '^[^ ].*String'
-                                Categ_Type                      Type_GetString                  "Fight Arene"
+                                Categ_Type                      Type_GetString                  "Basketball"
-                                Categ_Type                      Type_GetString                  "Fight Arene Variante"
+                                Categ_Type                      Type_GetString                  "finger Guess"
Meanwhile, this is what I ended up doing to get a list of scores:

Code: Select all

$ pcre2grep -M 'GetInt\s.*\r\n.*GetGAO.*\r\n.*Ultra.*\r\n.*32020.*\r\n.*_Type.*Float.*\r\n.*Affect' exec_universe_initvars2_ps2_PC.ofcdec | sed 's/\r//' | sed -e 's/^.*_Type.*GetInt\s.*\s\([0123456789]*\)$/Minigame \1:/' -e /GAO/d -e /Ultra/d -e /32020/d -e 's|^.*/\([^/]*\)$|Score set to: \1|' -e s/^.*Affect.*$// > PC_Scores.txt
$ pcre2grep -M 'GetInt\s.*\r\n.*GetGAO.*\r\n.*Ultra.*\r\n.*34848.*\r\n.*_Type.*Float.*\r\n.*Affect' exec_universe_initvars2_ps2_Xbox360.ofcdec | sed 's/\r//' | sed -e 's/^.*_Type.*GetInt\s.*\s\([0123456789]*\)$/Minigame \1:/' -e /GAO/d -e /Ultra/d -e /34848/d -e 's|^.*/\([^/]*\)$|Score set to: \1|' -e s/^.*Affect.*$// > Xbox360_Scores.txt
Took longer than I'd hoped! :oops2: Now to make sure the end result is the same as what I extracted at runtime, and figure out what exactly the differences are between PC and Xbox 360…
DavidSosa
Ninja Teensy
Posts: 219
Joined: Sun Apr 18, 2021 12:17 am
Location: Lima, Peru
Contact:
Tings: 3455

Re: Rayman Raving Rabbids leaderboards

Post by DavidSosa »

Hey PluM remember to use the official minigame name because it says basketball but the minigame name is other, of it´s just the minigame name in the internal data, well anyway, do you have a beta build to put in the site or something to test? you must say to Hunchman801 to put your beta (If you have one)
Hunchman801
Bad Rayman
Posts: 87628
Joined: Thu Aug 07, 2003 6:50 pm
Location: Paris, France
Contact:
Tings: 640252

Re: Rayman Raving Rabbids leaderboards

Post by Hunchman801 »

There’s no point in uploading anything at the moment David, just be patient and let PluM work on it. :)
PluMGMK
Annetta Fish
Posts: 40508
Joined: Fri Jul 31, 2009 9:00 pm
Location: https://www.youtube.com/watch?v=cErgMJSgpv0
Contact:
Tings: 136606

Re: Rayman Raving Rabbids leaderboards

Post by PluMGMK »

Does anyone know the French names of those two Xbox 360 exclusive minigames? "Bunnies don't like basketball" and "Bunnies don't like Rock, Paper, Scissors"? One could nearly guess them I suppose, but as David said we really should have the official names.
Hunchman801
Bad Rayman
Posts: 87628
Joined: Thu Aug 07, 2003 6:50 pm
Location: Paris, France
Contact:
Tings: 640252

Re: Rayman Raving Rabbids leaderboards

Post by Hunchman801 »

I've sent you a link to the localization archive Carrot made, hopefully it contains the answer.
DavidSosa
Ninja Teensy
Posts: 219
Joined: Sun Apr 18, 2021 12:17 am
Location: Lima, Peru
Contact:
Tings: 3455

Re: Rayman Raving Rabbids leaderboards

Post by DavidSosa »

I really want to help on this, but right now i´m making the Rayman 2 2D Demo (a fan game i was making, you can see it in *Rayman Fanworks*) anyway, is there any need of more codes of the pc, wii or xbox 360 version?
Droolie
Musician
Posts: 5343
Joined: Wed Apr 20, 2005 7:31 pm
Tings: 67835

Re: Rayman Raving Rabbids leaderboards

Post by Droolie »

PluMGMK wrote: Mon Jul 12, 2021 10:22 pm Does anyone know the French names of those two Xbox 360 exclusive minigames? "Bunnies don't like basketball" and "Bunnies don't like Rock, Paper, Scissors"? One could nearly guess them I suppose, but as David said we really should have the official names.
I'm still working on a localization export function (so you won't find it in the localization archive), but:
(fr) "580007B5": "Les lapins n'aiment pas le basketball.",
(en) "580007B5": "Bunnies don't like basketball",
(nl) "580007B5": "Konijntjes houden niet van basketbal",
(de) "580007B5": "Hasen mögen kein Basketball",
(it) "580007B5": "I conigli non amano la pallacanestro",
(sp) "580007B5": "Los conejos no la saben meter",

(fr) "580007B8": "Les lapins n'aiment pas jouer à papier, ciseaux, caillou.",
(en) "580007B8": "Bunnies don't like rock, paper, scissor",
(nl) "580007B8": "Konijntjes houden niet van steen, papier en schaar",
(de) "580007B8": "Hasen mögen Schnick-Schnack-Schnuck nicht",
(it) "580007B8": "Ai conigli non piace la morra cinese",
(sp) "580007B8": "Los conejos no juegan a piedra, papel o tijera",
(Yes it's "rock, paper, scissor" in the game, not "scissors" :p)
PluMGMK
Annetta Fish
Posts: 40508
Joined: Fri Jul 31, 2009 9:00 pm
Location: https://www.youtube.com/watch?v=cErgMJSgpv0
Contact:
Tings: 136606

Re: Rayman Raving Rabbids leaderboards

Post by PluMGMK »

DavidSosa wrote: Fri Jul 16, 2021 3:32 pm I really want to help on this, but right now i´m making the Rayman 2 2D Demo (a fan game i was making, you can see it in *Rayman Fanworks*) anyway, is there any need of more codes of the pc, wii or xbox 360 version?
Yes, we're good for codes for now. I'll let you know if I need your help again ;)
Droolie wrote: Fri Jul 16, 2021 11:39 pm (Yes it's "rock, paper, scissor" in the game, not "scissors" :p)
That's what I get for typing it from memory :oops2: Thanks Droolie, that was one of the last missing pieces of the puzzle! At some point, I should also go and mention on our wiki that these two minigames exist! :fou2:
DavidSosa
Ninja Teensy
Posts: 219
Joined: Sun Apr 18, 2021 12:17 am
Location: Lima, Peru
Contact:
Tings: 3455

Re: Rayman Raving Rabbids leaderboards

Post by DavidSosa »

hey everyone, how is going the thing?
Hunchman801
Bad Rayman
Posts: 87628
Joined: Thu Aug 07, 2003 6:50 pm
Location: Paris, France
Contact:
Tings: 640252

Re: Rayman Raving Rabbids leaderboards

Post by Hunchman801 »

The ball is in my court now: the plan is to publish a public beta first, so that everyone can test PluM's algorithm. I hope I'll find the time to develop it next week.
DavidSosa
Ninja Teensy
Posts: 219
Joined: Sun Apr 18, 2021 12:17 am
Location: Lima, Peru
Contact:
Tings: 3455

Re: Rayman Raving Rabbids leaderboards

Post by DavidSosa »

Yeah, finally what i was saying!
Flat Earth Society
Jumping eye
Posts: 354
Joined: Fri Jun 11, 2021 4:10 pm
Location: On the flat earth …
Tings: 45

Re: Rayman Raving Rabbids leaderboards

Post by Flat Earth Society »

Hunchman801 wrote: Thu Jul 29, 2021 10:33 am The ball is in my court now: the plan is to publish a public beta first, so that everyone can test PluM's algorithm. I hope I'll find the time to develop it next week.
Great progress, I wish you every success for the development.
Hunchman801
Bad Rayman
Posts: 87628
Joined: Thu Aug 07, 2003 6:50 pm
Location: Paris, France
Contact:
Tings: 640252

Re: Rayman Raving Rabbids leaderboards

Post by Hunchman801 »

PluM's algorithm is available for testing here. For now, all it does is check the code and return the results. Please report any problems here, and if all goes well, the next step will be to set up a real leaderboard for this. :)
DavidSosa
Ninja Teensy
Posts: 219
Joined: Sun Apr 18, 2021 12:17 am
Location: Lima, Peru
Contact:
Tings: 3455

Re: Rayman Raving Rabbids leaderboards

Post by DavidSosa »

i just tested it, it works perfectly
DavidSosa
Ninja Teensy
Posts: 219
Joined: Sun Apr 18, 2021 12:17 am
Location: Lima, Peru
Contact:
Tings: 3455

Re: Rayman Raving Rabbids leaderboards

Post by DavidSosa »

so, how it is?
Hunchman801
Bad Rayman
Posts: 87628
Joined: Thu Aug 07, 2003 6:50 pm
Location: Paris, France
Contact:
Tings: 640252

Re: Rayman Raving Rabbids leaderboards

Post by Hunchman801 »

DavidSosa wrote: Sat Aug 21, 2021 6:07 pm so, how it is?
We'll keep you posted but don't expect anything to happen before a few weeks at least. ;)
arnoldfranklin
Carnivora (bad)
Posts: 741
Joined: Wed Aug 18, 2021 1:51 am
Location: Near, far, wherever you are
Contact:
Tings: 12665

Re: Rayman Raving Rabbids leaderboards

Post by arnoldfranklin »

PluMGMK wrote: Sun Jun 20, 2021 1:10 am Just one code from any minigame will do ;) Also, if anyone happens to have any codes from the Mac or Wii U versions, please let me know! :)
I don't think the Wii U version has specific different codes because the game is available digitally as virtual console as a Wii game. I don't know if they changed anything with the leader boards or not because they would have been irrelevant. Hopefully, they didn't cut them out because of that for this sake. :winkgrin:
Post Reply