Jump to content

Returning to RRU after 10 years


Prehistoricman
 Share

Recommended Posts

Prehistoricman

LRR was, as far as I remember, my first video game. I used to go to some child care thing where they had a single crappy PC with like 4 games on it. LRR was one of them and I played for hours.

It's been at least 14 years since then, and about 10 years since I last posted here at age 12. At that time, I had only started to develop my interest in programming and electronics.

And the website is still here! That's nuts. I remember back when there was a live chat at the top of the forum.

 

Anyway the main reason I wanted to say hello is that I started doing some of that exe magic that you guys talk of sometimes. In LRR, that is. The radar's zoom level is completely insufficient by default, IMO, so I started with doubling the maximum zoom out possible. That only requires modifying 4 bytes.

Next challenge is to make keyboard shortcuts because the game is very mouse-heavy and it's tiring. I've already got the main right-side menu mapped out to the 1-4 keys, and tab to press the back button. Unfortunately, the sub-menus for building selection, raider management, etc. are handled differently internally so they don't work yet.

What's the situation with exe hacking in LRR at the moment? I understand Community Edition has some changes to the exe. Is Cyrem our only magician?

 

Assembly hacking and reverse engineering is fun for me. It's a great distraction from my university work and always feels like there's mysteries to uncover. Recently I dumped the memory of a microcontroller in a product about the same age as LRR. It had some factory test code in that was super weird and probably nobody had seen that code in over a decade. Back to LRR, it's fun seeing its awfully-optimised code. It almost exclusively uses _cdecl which creates unnecessary memory activity. There are several functions that are a single instruction long, which the compiler should have inlined. Those are just a couple of things I've seen so far.

 

Here's a screenshot from playing with the debug keys. I modified the sonic blaster code so that it triggered not only when the keys were pressed, but also while they were held. Turns out the game doesn't handle multiple of these blasters going off at the same time very well. It also hopelessly broke the AI, as you can see by the 3 support stations that the raiders were completely ignoring. The debug key itself was also broken: it's supposed to send the rock raider to your mouse pointer, but at this point they would return to previous blaster locations as well as the intended one.

large.Screenshot_810.png.48591819ec8d87ab4407b8956ac5079c.png

That was a fun journey in single-digit FPS.

 

So anyways I hope to be posting here a bit and contributing some exe mods.

  • Like 2
Link to comment
Share on other sites

You really must be an oldie if you remember the chat. Those were interesting times.

 

It's good to see another wizard and even better to see a returning member. Cyrem is currently the main person doing EXE mods, but I thought there was maybe one other person doing something. Maybe I'm getting mixed up with a different LEGO game. Definitely talk with him to see what's possible to include. Anything to make the game less of a nightmare would be personally welcomed since I got a little fed up with the bugs when trying to create new things. Stuff like a model crashing the game unless I put a green triangle deep within the model... those truly mind-boggling bugs.

Link to comment
Share on other sites

Prehistoricman

An oldie huh? One could say... prehistoric.

I think the chat was the main reason I came here. I don't remember having anything useful to say on the forum haha

 

Bugs yes! It would be awesome to squash some bugs. I tried starting the game in a debugging session but it uses exceptions as part of normal behaviour (I think...) which makes that a nightmare too. Maybe Cyrem has better ideas.

There are some projects out there for old games to completely rebuild the source code. Tomb Raider 5 and Super Mario 64 for example. I don't see the same treatment happening to LRR (what with all the remakes) but who knows?

Link to comment
Share on other sites

13 hours ago, Prehistoricman said:

An oldie huh? One could say... prehistoric.

I think the chat was the main reason I came here. I don't remember having anything useful to say on the forum haha

 

Bugs yes! It would be awesome to squash some bugs. I tried starting the game in a debugging session but it uses exceptions as part of normal behaviour (I think...) which makes that a nightmare too. Maybe Cyrem has better ideas.

There are some projects out there for old games to completely rebuild the source code. Tomb Raider 5 and Super Mario 64 for example. I don't see the same treatment happening to LRR (what with all the remakes) but who knows?

Rebuilding the source code is a monumental task. Cyrem has worked on decompiling the game into a Community Edition but it is still very limited so far, so that's probably where you want to help out. The game's engine is still very limiting though.

 

The only two approaches of a complete engine rewrite that has actually gone somewhere is Mighty Miners and Manic Miners, of which the latter I maintain myself, but it is more aimed at people who want to play Rock Raiders bug-free and make maps easily instead of trying to maintain as much as possible of the original aesthetics. I think you'll find a lot of veterans just want a LRR source code improvement and rather enjoy the challenge of wrestling with the original game. If you'd be up for the task of completely rebuilding the source code from scratch, that's a nice that hasn't been filled yet!

Link to comment
Share on other sites

Prehistoricman
10 hours ago, baraklava said:

I think you'll find a lot of veterans just want a LRR source code improvement and rather enjoy the challenge of wrestling with the original game. If you'd be up for the task of completely rebuilding the source code from scratch, that's a nice that hasn't been filled yet!

And editing the game will likely be a form of wrestling itself.

Personally I'd be thrilled to upgrade the game to DX9. That could be a very naïve thing to think (I have no experience with DirectX) but it's a nice thing to think. Rebuild or not, making the game work without hacky wrappers that are poor performance or non-functional (dgVoodoo and DDrawCompat respectively (in my experience)) is a goal.

 

I'll message Cyrem in a couple of weeks when I'm less busy and we can discuss the endless possibilities.

I did a bit more work on the keyboard shortcuts for menus and I have it working well for all menus except building and vehicle lists. Do you think anybody is interested in this?

Link to comment
Share on other sites

I know I'm interested. While I don't mind that the game can be played entirely with a mouse, keyboard options are nice too. The problem is that debug keys take up tons of very nice keys (numbers mostly) and I consider a few to be very essential. If you're going to bind keys to menu functions, maybe it would be possible to rebind debug keys to something else.

Link to comment
Share on other sites

7 hours ago, Prehistoricman said:

I'll message Cyrem in a couple of weeks when I'm less busy and we can discuss the endless possibilities.


I am open to collaborating on a project, message me when you're ready to discuss.

Link to comment
Share on other sites

Prehistoricman
12 hours ago, Cirevam said:

I know I'm interested. While I don't mind that the game can be played entirely with a mouse, keyboard options are nice too. The problem is that debug keys take up tons of very nice keys (numbers mostly) and I consider a few to be very essential. If you're going to bind keys to menu functions, maybe it would be possible to rebind debug keys to something else.

Yes it's very simple to rebind the debug keys. Perhaps choosing ones not overlapping like S and Ctrl+S like DDI did ?‍♂️

 

12 hours ago, Cyrem said:


I am open to collaborating on a project, message me when you're ready to discuss.

Excellent, sure will.

Link to comment
Share on other sites

Hi Prehistoricman! You would have been here and left before I arrived, but welcome back regardless :) I would like to think of myself as one of the more knowledgable LRR modders: I know nothing about exe hacks but have succesfully poked and created all sorts of configuration files to do things with: like balance the game, create my very own profile picture, and some more zany things. :P So welcome once again, and I hope you'll be able to contribute something to the slow community that is RRU. :) You're welcome to ask me anything if it'd help you.

 

 

On 4/5/2020 at 1:07 PM, Prehistoricman said:

What's the situation with exe hacking in LRR at the moment? I understand Community Edition has some changes to the exe. Is Cyrem our only magician?

I'm mildly surprised nobody else answered this in great detail: Cyrem seems to be the only magician, there are a couple of other wizards who float in and out of existence and you might get somewhere if you asked them. Slimy Slug / ShadowDraikana and Jamesster/Terrev/UTTER_BODGE/AAAAAAAAAAAAAAAAAAA would be useful people to ask.

 

Slightly tangential, but as for content that isn't exe hacking & is stuff I am knowledgable about: since you left is that we've sorted out most of the LRR files... adding new vehicles, new monsters, new maps, and even new buildings is all under our control. Modelling has always been difficult but with some very recent tools using Unity anyone can definitely add stuff, with enough patience. We have varying levels of functionality: vehicles, monsters, and buildings generally can't do much more fun stuff outside of what they already did in LRR. So the Front Loader fits in as a cheaper, more accesible, but less efficient transport vehicle: but functionally it's still basically a Small Transport Truck. The Air Filter fits in as a oxygen-producing building low on crystals - but functionally it's still the same as the Support Station just with some tweaked properties. Monsters in particular use Small Spider AI, Slug AI, Rock Monster AI, with almost nothing in between - Rock Monster AI can be disabled from being able to use rocks but that's literally about all I can change.

 

The exception to this is maps, which we have a ton of scripting power for that has only recently actually been worked out what-the-heck-is-going-on, and oddly it's one of the more friendly & functional things of LRR - for an example utilizing it a lot, see this. There are some really cool ideas which I have floating around with this (I recently worked out I can force crystals away from you if you haven't build a good amount of Power Stations, and give you said crystals back when you build enough. I could even force those Power Stations to be built on specific tiles), some of which I put into reality (like Christchurch) and others of which I tried to put into reality and then ran into a brick wall.

 

Oh, and adding new minifigures is on the radar, but they do the same stuff regular raiders would anyway even if you try to make them not to, so it can be a little pointless.

 

Cyrem's Cafeteria also makes installing mods for an end-user less painful than ever, and it's quite nice to work with overall - especially as when LRR eventually bricks itself you can just copy out your mod files to a new folder and keep going. 

 

Back to the exe hacks, Cafeteria + Community Edition also has functional resolution support, which is super great! Community Edition is Cyrem's collection of exe hacks and has a bunch of cool stuff to play with, like custom smoke particles, and fixing the glitch whereby the Tunnel Transport will delete all your raiders off the map.

 

Something I think would be super cool is that debug key Z corresponds to Eat Sandwich. What if you could magic that so that key pointed to Fire Hand Laser? O.O That would be super cool and is magic totally beyond my capabilities. There are some really cool ideas here as well. You've already increased the radar zoom level which is super cool, especially on more massive screens :) Keyboard shortcuts would be a godsend, too.

 

 

Ultimately I think the jank, crashiness, and general weird shenanigans of LRR keep at least myself and others from making stuff with it. (Remember how I said I could subtract crystals using script? It freezes the game for about seven seconds every time I do this.) Also Path.map and hidden caverns are very stupid and I don't know why. This is just two examples of a weird and broken game from 1999 that was rushed to completion and despite the best efforts to make it playable, it really shows. I'm surprised it still runs on my modern machine so flawlessly, given there are so many other classic Lego games that just... don't. There is just so much jank, so much shenanigans, so much indecipherable crashing, and so much uncustomizability that can make doing things with LRR very un-fun.

 

But - it sometimes works, and, when it does, those moments are special. :) My Upgraded Hover Scout brick model still sits above my PC ❤️ and LRR is still installed on all the machines I've ever owned. It's truly special, and the community of RRU that surrounds it and has kept the slow fire going all these years is also special.


Again I say to you: welcome back to RRU!

 




P.S.

I realise this has been a very long post, but there is much to say in the years since you've been here, and also there is no such updated list of functionality that I could easily refer you to. I tried to put in as many links as possible for all sorts of examples to prevent you from having to navigate what sometimes feels like a quagmire of history and knowledge, but I cannot link everything - that is why the forum exists, to be navigatable - and there are many more 'sucess stories' buried deep (like this one!)

  • Like 2
Link to comment
Share on other sites

Prehistoricman

Wow, what a huge reply! I appreciate all those links.

I am liking the look of your improvements mod. So far I've been using the "No frustrating mechanics" mod but it does over-buff lasers, and the walking speed buff hilariously breaks the tutorial.

More sandwiches is a real hoot, thanks for that. 

 

I did take a look over the forums for tools and mods when I came back to LRR a couple of weeks ago. It's pretty amazing what IS possible since it's easier to program a game to be rigid rather than flexible. NERPs was a surprise to me the first time. The fact that they added all these functions and their own scripting language to make levels work. You wouldn't see that these days - it's a waste of time to roll your own language and make the interpreter for it.

Cafeteria is pretty awesome. It's nice to see how the modding tools have matured over time. It's been long enough! I wonder what the original devs think of this dedication...

 

I need extra resolution! I had a good try at running at higher res but didn't manage to do it. Cafeteria only had the standard resolution available and LRR:CE crashed after loading (on higher resolutions).

 

So the sandwich-eating debug key Z is triggered by this code:

large.ogSvAouDQQSeo5rXFjBMsQ.png.9873252

It seems reasonable to me that this number in the lower block '23h' is related to the particular activity the RR performs. I haven't tested anything though. More of that to come.

You also see some of that optimisation I was on about earlier. This code makes 5 calls to the same function to get the same value.

 

The trouble with changing some of the ways the game handles things is a classic software engineering problem. LRR is an existing code base with files that support whatever quirks were hard-coded in. Improving the things that make no sense can break everything! So you're left with two bad options: make no change and live with a crap system, or make the change and put in all the effort to make the overhaul.

 

12 hours ago, aidenpons said:

Ultimately I think the jank, crashiness, and general weird shenanigans of LRR keep at least myself and others from making stuff with it.

You say that but... this makes me think of my personal guitar hero Jack White. For a solid decade he focused on making music by limiting himself as much as possible. He put effort into making performing inconvenient. Often, I choose to hack certain things simply because they were not meant to be done. As an act of defiance against the universe. Perhaps it's the same for some members here?

Your journey with discovering all the scripting stuff is not too unlike reverse engineering the exe. Come to the dark side. We have more crashes here :)

 

Thanks for the interest in hotkeys. Right now my hack is very incompatible with debug keys (I managed to get permanently stuck in first person).

Thank you for everything you've done with mods and LRR knowledge. I hope you continue to...

 

 

Link to comment
Share on other sites

lol username

BTW - just letting you know your images aren't embedding and are initially throwing 403 errors when loaded separately in another tab; I have to refresh that tab to get then to appear. Could use imgur or the RRU gallery, perhaps?

 

Looking forward to seeing what sort of exe trickery you can come up with :D

  • Like 1
Link to comment
Share on other sites

Oh snap, is that Ida Pro I see? I'm quite familiar with using that program for analysis but haven't use it to edit binaries.

 

I believe I remember you from the old zetaboard forums. I think my username was stephendsdude on there. Nice to see you again

I've been largely inactive, but thought I'd at least say hi. I've pretty much resigned to being a lurker, though I'll still chime in on discussions here and there (like now).

Link to comment
Share on other sites

Prehistoricman
14 minutes ago, PWNZOR said:

Oh snap, is that Ida Pro I see?

The one and only. Downloaded free from the most official sources. Maybe I'll drop the $1k+ when I have cash to drown in.

It's not great for editing binaries since I don't think there's a built-in assembler. I use a hex editor to make the changes and Cheat Engine as an assembler.

 

12 minutes ago, PWNZOR said:

stephendsdude

That's not a name I've heard in a long time.

Are you sure we met on RRU? I'm think of Roblox for some reason...? I didn't post a lot here according to the post history. Was everything deleted when the forums migrated?

Thanks for dropping by.

Link to comment
Share on other sites

5 minutes ago, Prehistoricman said:

Are you sure we met on RRU? I'm think of Roblox for some reason...? I didn't post a lot here according to the post history. Was everything deleted when the forums migrated?

Thanks for dropping by.

 

Oh wow, maybe that was it, now that you mention. That was an age long past, I haven't been active on there in forever.

 

I don't remember much what I did from the zetaboards forums, to be honest. Most of my activity in 3D modeling for LRR is a blur, I only really remember re-doing the Teleport Pad in 'recent' (2 years ago...) memory, and even that's still not great because I kept forgetting LRR can't handle lots of polygons.

 

11 minutes ago, jamesster said:

The zetaboards still exist here:

https://www.tapatalk.com/groups/rock_raiders_united/

AFAIK, no data was migrated from there to here, since the switch happened relatively early on. I was only lurking on the site at that point, I think I signed up shortly after the switch.

 

Wow, I wasn't aware. My old profile on those forums...is cringe. I guess that's what I get for being like 13 or 14 at the time.

Link to comment
Share on other sites

Prehistoricman
7 minutes ago, PWNZOR said:

Oh wow, maybe that was it, now that you mention. That was an age long past, I haven't been active on there in forever.

Yep I'm sure of it now. I don't have an account on the old forums.

Roblox forums died a long time ago. I was really active on Scripting Helpers and then moved over to Scripters at some point. I think you were one of the Lua wizards at the time.

Link to comment
Share on other sites

On 4/8/2020 at 3:13 PM, Prehistoricman said:

NERPs was a surprise to me the first time. The fact that they added all these functions and their own scripting language to make levels work. You wouldn't see that these days - it's a waste of time to roll your own language and make the interpreter for it.

 

Just a little fun fact slash old news, I've already tested successfully switching out NERPS and embedding a script language like ChaiScript into LRR. Allows for way more possibilities in game levels.

 

On 4/8/2020 at 3:13 PM, Prehistoricman said:

Cafeteria only had the standard resolution available and LRR:CE crashed after loading (on higher resolutions).

Sounds like you're not using the correct exe, resolutions only become available when it detects the CE exe. I've also tested successfully giving the game 32bit colour support which requires re-writing parts of several BMP reading functions as it's specifically written to convert to 16bit.

 

On 4/8/2020 at 3:13 PM, Prehistoricman said:

It seems reasonable to me that this number in the lower block '23h' is related to the particular activity the RR performs.

Correct, LRR has a list of constants to define different activities, which is tells the selected LRR to perform.

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.