News:

11 March 2016 - Forum Rules

Main Menu

Solstice Randomizer (NES)

Started by pbandpickle, June 08, 2020, 06:46:11 PM

Previous topic - Next topic

Cyneprepou4uk

@JP32, 0x000155 subroutine is also executed when you collect all staff pieces.

RobertCorwen

Thanks @JP32, I quickly applied those fixes using my hex editor and it seemed to have worked. Now I'll try to use my modified ROM with the randomizer patch with expert mode enabled to see if it works.

@Cyneprepou4uk
What does that subroutine implies exactly? Is there something to fix regarding staff pieces?

RobertCorwen

#42
Quote from: RobertCorwen on November 15, 2022, 09:56:46 PMNow I'll try to use my modified ROM with the randomizer patch with expert mode enabled to see if it works.

OK, it does seem to work as expected if you set both "0x00013B" and "0x00015C" to 0 as @JP32 kindly advised. It obviously is not as perfect as the "save state" behaviour I expected from credits, but it's close enough to make the expert mode viable in the randomizer.

@JP32
Are we able to modify the game code so after losing all lives, we are brought to the game over screen and then the title screen directly (bypassing the credits completely regardless of how many has been collected)? Here is a screenshot of what I mean.

Or alternatively, if the above is too hard to do, is there a way to keep the credits count at 0 in RAM at all times after picking a credit? Please let me know!




Thanks!

Robert

JP32

Quote from: Cyneprepou4uk on November 15, 2022, 06:52:16 PM@JP32, 0x000155 subroutine is also executed when you collect all staff pieces.
Oh yeah that, the game does that too, you dont notice these things as at most time you have full potions anyway. But yeah the game also fills up the potions after getting all staff pieces + gives permanent invincibility.

Quote from: RobertCorwen on November 15, 2022, 10:19:02 PM@JP32
Are we able to modify the game code so after losing all lives, we are brought to the game over screen and then the title screen directly (bypassing the credits completely regardless of how many has been collected)? Here is a screenshot of what I mean.

Or alternatively, if the above is too hard to do, is there a way to keep the credits count at 0 in RAM at all times after picking a credit? Please let me know!




Thanks!

Robert
That should be easy enough, I'll poke around later today.

RobertCorwen

QuoteThat should be easy enough, I'll poke around later today.
Thanks @JP32!

QuoteOh yeah that, the game does that too, you dont notice these things as at most time you have full potions anyway. But yeah the game also fills up the potions after getting all staff pieces + gives permanent invincibility.
I think this should be left as is. This is the only real perk of getting the staff.

Although, if I were allowed a wish, I would want a piece of staff to constantly appear in room FB, replacing any of the 3 items that are there (the room adjacent to the one that holds the last piece of staff in the vanilla ROM, locked by a detonator). However, the detonator that opens room FB must be located anywhere but in room FB for that to work.

This would ensure that no matter the item placement of the rando, you can't get all 6 pieces of staff without climbing all the way atop the "Tower of Ultimate Terror", which otherwise gets bypassed quite often in a typical rando run. And the fact it is locked into a detonator room makes it more likely that you can only get the last piece at the very end of the run (thus having full potions at that time would be less of an issue really, akin to the vanilla ROM).

My two cents 😀

Robert

JP32

Okay so that didn't took long.

At address "0x001480" change byte to "60" (default "B9").
Or in disassembly bank_00.asm control+f "ofs_005_9470_credit:" and change "LDA tbl_947A_credits - $EB,Y" to "RTS", or just remove first three lines to save space.

So basically this makes the credit items code to be skipped, so the game doesn't update credits stuff so it acts like you never picked one, completion % still raises and game remembers that you picked it up though.

Again this is little bit crude "fix" but it seems to work lol.

I think the all staff pieces permanent invincibility code is elsewhere and these shouldn't change this but I have not tested these changes fully.

RobertCorwen

#46
QuoteAgain this is little bit crude "fix" but it seems to work lol.
I confirm that it works quite well. From now on, I will keep a ROM with the "0x001480" fix and the palette inconsistencies fix applied as a base before applying any rando hack on top (the rando hack applies the necessary fixes to potions and lives if you enable the expert mode). Since the credits are completely bypassed now, I won't be needing the previous fixes listed in post #39 (although I'll keep them handy for future reference, who knows!).

Even in a rando without expert mode enabled, credits are really buggy when shuffled around. That's because each single credit come with an in-the-room location for Shadax to appear at. For instance, lets say you pick a credit in a small room during a rando, but said credit was normally in a large room in the vanilla ROM, when using the credit Shadax will appear out of bounds. In some other cases, like in my post #37, Shadax can even respawn on top of spikes and get killed instantly.

What I'm really trying to say is that in any rando starting now (regardless of the expert switch), it's beneficial to make sure to fix the base ROM in order to completely disable the credits, cause using a randomized credit almost always results in a mess, and trying to fix that would be too involving. I consider that anyone interested to play Solstice randomized has enough experience and skills to avoid reliance on credits anyway. It's a known fact that Solstice can be quite hard to master, especially for newcomers.

Thank you @JP32!

Robert


RobertCorwen

Hi,

I have one more question today, in 2 panels. On a vanilla ROM, which address(es) should I modify if:

1) I want to prevent new lives being added when picking them up?
2) I want potions to never exceed 1 shot available? (if 0 shots it goes to 1, if 1 shot it stays at 1)

I don't know how you guys are able to locate those address with such precision, it feels like total wizardry to me as things goes. It's really a skill I'd like to learn, as overwhelming it looks at first glance...

As always, thanks in advance!

Robert

JP32

1.
At address "0x001465" change byte to "60" (default "EE").
Or in disassembly bank_00.asm control+f "ofs_005_9455_hat:" and change "INC ram_lives" to "RTS", or just remove the line completely to save single byte
Like with credits this skips hats code, so the game doesn't increase lives ram value when its picked up.

2.
At address "0x00147A" change byte to "01" (default "04").
Or in disassembly bank_00.asm control+f "0x00147A 00:946A: A9 04" and change "LDA #$04" to "LDA #$01"
This changes what value potions go to when picked up, by default it goes to hex "04"(full), with "01" it forces minimum.

Hat code is untested but should work, I only quickly tested the potion one but it should work too. You probably should combine the latter one with the starting&after continue potion amount changes too.


With the disassembly, which is basically the source code its pretty straightforward(although solstices one is jungle of uncommented/non-documented mess due to my laziness lol), assembly can be scary, but with some practice and learning its not impossible to read/write/understand, start simple. Before the disassembly I had to use FCEUX's debugging tools and hex editor which was even more tedious.


As for the credits making you go out of bounds, pbandpickle should fix the credit X/Y/Z positions in the credit table ("tbl_9674:" in the disassembly) so that when credits are randomized, that table is also correctly modified to match where the credits are after being randomized. It sounds like the XYZ positions are not updated so player ends up in wrong location.

Cyneprepou4uk

Quote from: JP32 on November 16, 2022, 09:37:08 AMOh yeah that, the game does that too, you dont notice these things as at most time you have full potions anyway. But yeah the game also fills up the potions after getting all staff pieces + gives permanent invincibility.

What I meant is, if you change something inside this subroutine like you did for respawning via a credit, this will have the same effect for picking up all staff pieces.

JP32

Quote from: Cyneprepou4uk on November 16, 2022, 03:27:08 PMWhat I meant is, if you change something inside this subroutine like you did for respawning via a credit, this will have the same effect for picking up all staff pieces.
I know(I probably just worded my initial response badly), but I also said I've only quickly tested these so I dont know if there are side effects, since RobertCorwen requested them he can do full testing, I dont have time for that until weekend.

And what the game does after picking up all staff pieces AFAIK is give player permanent blue potion effect, adds +2 to all potions and opens up the ending Room(to room FE, in F3) and displays the message, so what my change does in this case, in theory anyway, is that after collecting all staff pieces does not give any extra potions(or just one). I did say its dirty quick fix :).

Cyneprepou4uk

The best thing to do here would be leaving the subroutine intact, and just NOP'ing out the JSR to it when respawning.

Also, by mentioning the disassembly, you should at least provide a link to it. I don't thing this dude even knows what or where it is.

Anyway, we are getting off topic here. It is about randomizer after all, not Solstice hacking requests.

RobertCorwen

#52
QuoteJP32 said: "I know(I probably just worded my initial response badly), but I also said I've only quickly tested these so I dont know if there are side effects, since RobertCorwen requested them he can do full testing, I dont have time for that until weekend."
First, the default behaviour when getting the full staff: Shadax becomes invulnerable and flashes continually (only spikes can affect him, so it's basically the same effect as a blue potion, but permanent). The potions are also maxed out (you can use them infinitely, they remain full).

Also, note that with any of the fixes below applied, I had no problem getting 100% runs, which means that none of these fixes affect the completion rate (as previously expected by @JP32).

I did several 100% playthroughs on a vanilla ROM with various fixes applied, but without applying a randomizer patch, so the latter can't interfere with my testing. In a nutshell, here are my observations/recommendations:

The following fixes do not seem to have any negative side effects:
"0x000d56" (starting amount of lives);   => AFAIK, the randomizer fixes this setting when Expert mode is enabled, no need to enable manually.
"0x000d2b" (starting amount of uses per potion);   => AFAIK, the randomizer fixes this setting when Expert mode is enabled, no need to enable manually.
"0x00147A" (max amount of uses per potion);   => AFAIK, the randomizer fixes this setting when Expert mode is enabled, no need to enable manually. I strongly recommend not to go lower than 2 when applying this fix to a vanilla ROM, otherwise you may not be able to finish the game (you need at least 2 back-to-back blue potion uses to get past rooms D5 and D7, with no other blue potion refills available in that area. It can still be done with 1 use of a blue potion if you make your way to D7 from the "Mines of Insanity", however this route is not obvious and really cumbersome).
"0x001465" (prevents lives from being added when picked up);   => AFAIK, the randomizer fixes this setting when Expert mode is enabled, no need to enable manually.
"0x001480" (prevents credits from being added when picked up).   => Recommended with the randomizer patch, no matter the options selected.

The following fixes ARE NOT recommended:
"0x00015C" (amount of potion uses added after using a credit)   => Obsolete when the credits fix is applied
Reason for rejecting: affects the potion levels after getting the full staff, in comparison to the default bahaviour. The potion levels are kept the same as before getting the full staff (they are not maxed out and if you continue using them, they will deplete). This fix should thus be avoided.
"0x00013B" (amount of lives added after using a credit)   => Obsolete when the credit fix is applied
Reason for rejecting: has no use when the credits fix is applied (setting "0x001480" to "60"), so I recommend not applying it.

QuoteCyneprepou4uk said: "Also, by mentioning the disassembly, you should at least provide a link to it. I don't thing this dude even knows what or where it is."
I already noticed the Github link in the footer of your posts. I quickly looked at the Solstice files from the repo yesterday, but as @JP32 mentioned, Solstice code lacks comments in several places, so it's really difficult to know what affects what, especially for the uninitiated (and it's why I reached for help here).

QuoteCyneprepou4uk said: "Anyway, we are getting off topic here. It is about randomizer after all, not Solstice hacking requests."
With maybe the exception of post #44 in which I dared voicing a wish of mine, I tried my very best to keep in line with the randomizer topic. The idea behind my recent posts was an attempt to fix the Expert mode of the randomizer, which currently is broken because of the way credits work by default. I consider that @JP32 greatly delivered on that front.

Don't worry, I'm keeping most of my requests for @pbandpickle's official return; I have many core ideas that could greatly involve the randomizer, if he would consider listening to them!

Thank you all!

Robert

JP32

QuoteI strongly recommend not to go lower than 2 when applying this fix to a vanilla ROM, otherwise you may not be able to finish the game (you need at least 2 back-to-back blue potion uses to get past rooms D5 and D7, with no other blue potion refills available in that area. It can still be done with 1 use of a blue potion if you make your way to D7 from the "Mines of Insanity", however this route is not obvious and really cumbersome).
Huh? Where do you even need blue potion in room D5? How can you even go from caves to stonehedge garden to the final area, without the block? Theres like ten way to go from D6 to D7 and I just dont see reason to use blue potion in D5 unless you meant some other room.

Like I know you need blue potion in D7, but going from the usual route from slaughter yards -> mines of insanity -> stonehedge gardens -> final area, but you only need one blue potion use in D7.. now that I think about it, can you go through F0 room without using potions if you take the item? I always use blue/purple potion there.

RobertCorwen

Quote from: JP32 on November 17, 2022, 02:42:57 PMHuh? Where do you even need blue potion in room D5? How can you even go from caves to stonehedge garden to the final area, without the block? Theres like ten way to go from D6 to D7 and I just dont see reason to use blue potion in D5 unless you meant some other room.

Like I know you need blue potion in D7, but going from the usual route from slaughter yards -> mines of insanity -> stonehedge gardens -> final area, but you only need one blue potion use in D7.. now that I think about it, can you go through F0 room without using potions if you take the item? I always use blue/purple potion there.

Hi @JP32,

Please find the attached screenshot which also contains what I meant in my previous comment. It may be appearing a bit small here, just open the image in a new tab.

It's not unfeasible by any means, it's just very different than any route I've taken before, since I don't usually have a potion constraint. As it stands, the Mines of Insanity route cannot be integrated in my routing without severely affecting my pacing. I need to start to consider using a whole new route that will allow for the lowest potion usage rate possible (less menu fidgeting), altho I need to figure this all out in detail and make sure it's faster than my old route before I start putting some serious time grinding this.

My two cents, have a good weekend!

Robert


JP32

Ahh now I understand, it never even occurred to me that you could use shrek goblin to get the block lol. I always took the, I guess, intended long route.

RobertCorwen

Quote from: JP32 on November 16, 2022, 02:52:57 PM1.
At address "0x001465" change byte to "60" (default "EE").
Or in disassembly bank_00.asm control+f "ofs_005_9455_hat:" and change "INC ram_lives" to "RTS", or just remove the line completely to save single byte
Like with credits this skips hats code, so the game doesn't increase lives ram value when its picked up.

@JP32
Is there a way to do the same thing as above (from posts #47/48), but for potions instead?

I want to be sure that picking a potion refill on the map does not affect the count in the pause screen. Let's say I modify 0x000d2b (starting potions) to 1 and 0x00147A (max amount of potions) to 0, I need to be sure that newly picked up potion refills will be skipped in the code.

Right now, if you modify the 2 addresses above, you start with 1 potion, but as soon as you get 1 potion refill on the map, the potion count gets to 0; I want it to stay at 1, but if the player uses the starting potion and then picks up a refill on the map, it will then stay at 0. I hope you get what I mean.

Please let me know if this is possible or not, I can't find what I'm looking for in the disassembly, I'm puzzled on this one.

Also, as @Cyneprepou4uk implied in his recent comments, should we consider starting a new thread for game modifications (separate from the rando)? I mean, after this one request I don't foresee any more else in the short/middle term, but I want everyone to keep being happy if I can.

Thanks a lot!

Robert

RobertCorwen

#57
Quote from: RobertCorwen on November 24, 2022, 05:38:33 PM@JP32
Is there a way to do the same thing as above (from posts #47/48), but for potions instead?

OK nevermind, I found what I was looking for!

I took the hat skipping fix you gave me in post #48 as a hint, and looked at other subs in it's vicinity in the disassembly. I found 4 short subs (1 for each potion color); following the blue potion lines was the line I was looking for. So I basically changed "0x00147C" from "99" to "60", which completely removes the effect of picking potion refills on the map (they're still being counted towards 100% tho), and leaves untouched any starting potion amount one may have set by fixing the value for "0x000D2B".

I've tested it up with a few 100% runs, it seems to work exactly as I intended in my previous post, without any side-effect of any kind. Potions still max out when getting the full staff, which is desired bahaviour.

If he finds this pertinent, I suggest @pbandpickle to add the fix above to the rando's expert mode, as well as the no credits fix described in post #45. This will make the challenge more real, since the player will only get 1 shot at each potion (more if he feels 1 starting potion is not enough) without a possibility to refill, as well as removing the possibility to rely on credits to get more lives and potions back. Or maybe make this a new difficulty setting; hardcore seems like a fitting name.

Have a good weekend,

Robert

JP32

Cool that you found solution yourself less work for me ;D  .

Anyway, if its completely unrelated to the randomzier(imo these previous posts haven't been so far, since the expert mode is little broken and we found solution for it), you can use my hacks thread instead. But dont flood it with requests as Im 99% likely to ignore them if they get too complicated or crazy, but Im happy to explain anything about how the game works or help with disassembly/hacking.