soupyd

Searching The Wads

Recommended Posts

soupyd

Hey guys

 

I'd like to edit the vanilla game's energy-crystals-required-to-win values.  I tried looking for it in decompiled legorr0.wads but then decided I'd better come here and ask for directions.  Anyone made any of these modifications for themselves?  I looked through BAZ's mod and he has made this change, but he's also made many others (which have tempted me, but I'm being a purist with LRR and after playing his first level feel that the level design makes it too obvious that it was made by a person).

 

thanks people

Share this post


Link to post
Share on other sites
Jessietail

Level objectives are scripted in the NPL file, a hexidecimal translation of NERPs script files. You can make your own NPLs with the NPL Scripter tool:

I don't know if there's any proper documentation though, and while I think there are some NPL tutorials on the old wiki they're kind of a mess and were made before we had proper tools like this and I haven't rewritten them yet sorry.

 

Alternatively, you can just open a level's NPL file in a hex editor like XVI32. You'll want to find a string like this:

0D 00 02 00 05 00 01 00 31 00 00 00

where 0D 00 02 00 is GetEnergyCrystalsStored, 05 00 01 00 is the greater than > sign, and 31 00 00 00 is the number of Energy Crystals you need to have more than to win written in little-endian hexadecimal, in this case 0x31 = 49 from Rocky Horror's NPL script. The third word there will have a different number depending on the level, but just find it and change it to whatever you want if that's all you do. Remember that it needs to be in hexadecimal, and the number is greater than and not equal to, so it needs to be one less than what you want your actual goal to be. And since it's little-endian, if you want to set it to a number above 255, you'll have to write it with the least significant value first - so if you have an objective of 350, you'd write 5D 01 00 00, where 5D is 93, and 01 is a leading digit that represents 256, adding up to 349. I don't think you can cross over 65535, because you'd have to start adding the leading digit to the third slot, eg 00 00 01 00 and it might try to read that as a function

10 hours ago, soupyd said:

which have tempted me, but I'm being a purist with LRR and after playing his first level feel that the level design makes it too obvious that it was made by a person

All of Rock Raiders was made by people... if you just change the NPLs and there aren't enough crystals in the level you won't be able to play them well.

  • Thanks 1

Share this post


Link to post
Share on other sites
Slimy Slug

Or there's this tutorial: 

 

http://www.rockraidersunited.com/topic/3583-npl-scripting-with-oguns-npl-tool/

 

This should get you on sound footing.  Basically, (assuming you read that topic) you can decompile the npl using Ogun's tool, and simply edit the crystals number in notepad or something.  Recompile and put in the level folder (move the original out of there first).  Again, I've assumed you read that topic.  

 

  • Thanks 1

Share this post


Link to post
Share on other sites
aidenpons

Aaaaaalso, providing you don't want crystal counts of greater than 50, it should be possible to just use an existing .npl - like put Rocky Horror's .npl in the Lava Laughter folder (& rename it) and voila, you now need 50 instead of 30 crystals in Lava Laughter.

 

Word of warning: Slug scripts are handled with the same files as crystal counts, so move Back to Basic's slug script to Rock Hard and you'll have a slug-spam on your hands. (However, for slugs to emerge you need Slimy Slug holes in the first place, which are handled in a different file, so put Back to Basic's .npl in Driller Night and you won't get any slugs spawning)

  • Thanks 1

Share this post


Link to post
Share on other sites
Jessietail
1 hour ago, aidenpons said:

Aaaaaalso, providing you don't want crystal counts of greater than 50, it should be possible to just use an existing .npl - like put Rocky Horror's .npl in the Lava Laughter folder (& rename it) and voila, you now need 50 instead of 30 crystals in Lava Laughter.

well I mean there's a lot of other stuff in NPLs that could screw up other levels. Ice Spy has a programmed game over if you teleport up your Tool Store for no reason, which other levels in the lower tiers don't have afaik. Lava Laughter has coordinated Lava Monster and slug setups, which aren't used in the actual level but might activate and do weird things if you dropped its NPL into a different level with slug holes, emerges, and tutorial blocks. Some NPLs give pre-built buildings upgrades from the start. Stuff like that that you don't notice in normal levels but that do weird stuff regardless. It's easier to just find the hex code and edit it than mess with that stuff imo.

Share this post


Link to post
Share on other sites
soupyd
18 hours ago, Jessietail said:

 

Alternatively, you can just open a level's NPL file in a hex editor like XVI32. You'll want to find a string like this:

where 0D 00 02 00 is GetEnergyCrystalsStored, 05 00 01 00 is the greater than > sign, and 31 00 00 00 is the number of Energy Crystals you need to have more than to win written in little-endian hexadecimal, in this case 0x31 = 49 from Rocky Horror's NPL script. The third word there will have a different number depending on the level, but just find it and change it to whatever you want if that's all you do. Remember that it needs to be in hexadecimal, and the number is greater than and not equal to, so it needs to be one less than what you want your actual goal to be. And since it's little-endian, if you want to set it to a number above 255, you'll have to write it with the least significant value first - so if you have an objective of 350, you'd write 5D 01 00 00, where 5D is 93, and 01 is a leading digit that represents 256, adding up to 349. I don't think you can cross over 65535, because you'd have to start adding the leading digit to the third slot, eg 00 00 01 00 and it might try to read that as a function

All of Rock Raiders was made by people... if you just change the NPLs and there aren't enough crystals in the level you won't be able to play them well.

You guys are so great, seriously.  Thank you, Jessie, for explaining this:  I understand perfectly!  I have enough information here to do what I wanted to do, although I did consider the lack of crystals in a level being a problem, but I think we'll be fine.  And yes, all maps are made by people, but the better ones don't make the fact so obvious. 

 

But yeah... gee guys.  I remember the first time I found this forum my jaw fell off.  I couldn't believe this obscure game from my childhood had an alive community.  For real:  out of this world. 

 

Anyway, I read that Npl thread.  This game isn't so hard to modify, is it?  Editing hexdec doesn't scare me too much, so I'll probably mess with that.  Like I said, Baz's mod is really good, it's just a few thing like the level design and the extreme amounts of ore one gets as a side effect of his level design that changes the experience too much.

 

edit: You guys know why my raiders idle a lot?  I on't remember this from a decade ago... my pawns just stand around, ignoring their priorities.  Eventually they get in the vehicle, or blow the wall, or shovel the rubble, but at some point in my games this always happens!

  • Like 2

Share this post


Link to post
Share on other sites
Jessietail
8 hours ago, soupyd said:

Like I said, Baz's mod is really good, it's just a few thing like the level design and the extreme amounts of ore one gets as a side effect of his level design that changes the experience too much.

Oh you mean like square-ish caverns and such? yeah I like more natural-looking maps too.

 

8 hours ago, soupyd said:

edit: You guys know why my raiders idle a lot?  I on't remember this from a decade ago... my pawns just stand around, ignoring their priorities.  Eventually they get in the vehicle, or blow the wall, or shovel the rubble, but at some point in my games this always happens!

hmmm might not have been such an issue on older, weaker computers then. I know some other weird bugs pop up on modern architecture like some things lacking certain values being read as infinite of that value by new computers instead of no value like intended, maybe idleness syndrome is a result of that too.

Share this post


Link to post
Share on other sites
soupyd
6 hours ago, Jessietail said:

Oh you mean like square-ish caverns and such? yeah I like more natural-looking maps too.

 

hmmm might not have been such an issue on older, weaker computers then. I know some other weird bugs pop up on modern architecture like some things lacking certain values being read as infinite of that value by new computers instead of no value like intended, maybe idleness syndrome is a result of that too.

I'm glad you agree with me :P.

 

Anyway, idleness syndrome.  Weird stuff.

Share this post


Link to post
Share on other sites
aidenpons
15 hours ago, soupyd said:

edit: You guys know why my raiders idle a lot?  I on't remember this from a decade ago... my pawns just stand around, ignoring their priorities.  Eventually they get in the vehicle, or blow the wall, or shovel the rubble, but at some point in my games this always happens!

Cause unknown and cure unknow- sorry, cure known and that is "rebuild the entire game and make LRR 2."

However, I can also tell you that something which helps alleviate the symptoms of Idleness Syndrome is to open up Lego.cfg in LegoRR1.wad, look for the line TextureUsage up the top, and add on as many zeroes as you feel like adding on to the end of that number (three should be good). That line tells the game how many computer resources it can use.

Share this post


Link to post
Share on other sites
soupyd
On 12/7/2017 at 3:43 PM, aidenpons said:

Cause unknown and cure unknow- sorry, cure known and that is "rebuild the entire game and make LRR 2."

However, I can also tell you that something which helps alleviate the symptoms of Idleness Syndrome is to open up Lego.cfg in LegoRR1.wad, look for the line TextureUsage up the top, and add on as many zeroes as you feel like adding on to the end of that number (three should be good). That line tells the game how many computer resources it can use.

Thanks.  I'll put four ;P  

 

EDIT: Welp, doing that seems to mess with the tile-lighting.  Its a shame coz I keep crashing when using dynamite.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now