News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Super Castlevania 4 Randomizer  (Read 6902 times)

RedGuy

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Super Castlevania 4 Randomizer
« on: August 14, 2016, 06:36:41 pm »
0.0.2.6
https://drive.google.com/file/d/0Bx9gzQZCkH8qS2FRV1hEcUVKYmc/view?usp=sharing



SCV4Randomizer is able to randomize the following things in Super Castlevania IV:
- Simon's health
- Enemy health
- Level (room) order
- Level timers
- Candle drops

There is some limited control over the randomization:
- Difficulty
- Type (static/dynamic)
- On/Off controls

It's a work in progress and likely has bugs.  It uses the same base code as the editor to expand the ROM which will hopefully lead to some form of level platforming randomizations.

The level reordering was a little painful to implement since the game has 10+ places it makes a custom change to the level number.  So all of those had to be found and rewritten to use the randomized stage transitions.  Randomization can be done all pre game or also use the in game RNG.  Static decides randomized value before the game starts and saves it in the ROM.  Dynamic uses the in-game LFSR-based pseudo random number generator to further randomize a few things (candle drops, enemy health).  The dynamic randomization needs some improvement and that's the idea behind the "Random Function" checkbox which hasn't been implemented yet.

The difficulty level is a general set of rules applied when randomizing.  They currently have a limited effect which needs to be rebalanced when more things are randomized.

The seed is a 32-bit starting value for the randomization engine in the randomizer.  That combined with the version of the editor and the values of the check boxes forms a code after randomization.  This code can be entered into the same version of the editor (File->Enter Code) to produce identical results.  Setting the seed alone is not sufficient.

Usage:
File->Open
(Select settings)
Randomize
File->Save

source - https://github.com/RedGuyyyy/SC4Ed
« Last Edit: October 13, 2016, 10:47:33 pm by RedGuy »

Bahamut ZERO

  • Hero Member
  • *****
  • Posts: 906
    • View Profile
Re: Super Castlevania 4 Randomizer
« Reply #1 on: August 14, 2016, 06:47:38 pm »
You're the best thing that's happened to Super Castlevania.  :D

Downloading now!  :thumbsup:
Like Super Mario Land? Then you'll love my first completed Rom Hack: Maniac on the Run!

MathUser2929

  • Hero Member
  • *****
  • Posts: 1516
    • View Profile
Re: Super Castlevania 4 Randomizer
« Reply #2 on: August 14, 2016, 07:04:41 pm »
Well, I'm glad this didnt take long. Now you can get back to CV4Ed. If this is done I suggest you submit this to the site.

dACE

  • Sr. Member
  • ****
  • Posts: 331
    • View Profile
Re: Super Castlevania 4 Randomizer
« Reply #3 on: August 14, 2016, 07:28:15 pm »
Well, I'm glad this didnt take long. Now you can get back to CV4Ed. If this is done I suggest you submit this to the site.

How can it be done if this is version 0.0.0.2 (and the author claims functionality is still not implemented yet)?

Do you even read the posts you comment on?

/dACE

MathUser2929

  • Hero Member
  • *****
  • Posts: 1516
    • View Profile
Re: Super Castlevania 4 Randomizer
« Reply #4 on: August 14, 2016, 10:04:55 pm »
I accidently clicked the randomizer button and his post was scrambled. Sorry if I didn't unscramble a fact or two.

RedGuy

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: Super Castlevania 4 Randomizer
« Reply #5 on: August 26, 2016, 09:47:43 pm »
https://drive.google.com/file/d/0Bx9gzQZCkH8qa2dBdVh4OXpyNXc/view?usp=sharing

0.0.1.0
Added randomization of Simon's speed, gravity (y acceleration), whip damage, whip length, a select set of enemy speeds, and a few other things.
Added death counter in place of player lives
Added reverse direction for some levels that support it without changes
Removed level timer
Fixed graphics reload bug when a later level (usually boss level) transitions to a level in that same stage
Fixed 4-4 softlock with extra speed

Simon's speed and acceleration isn't randomized by default since it has a significant change on how the game plays.  I had to remove the scripted movement Simon has when entering levels on stairs to avoid having him run into pits with higher speed.

The game engine supports a whip length of 1 link longer than the second chain whip without major modifications.  The randomizer forces the leather whip to be of that length and then randomizes the length of the two chain whips.  The whip upgrade is a random drop and will cycle back to the leather whip if it's collected 3 times.

Big thanks to DrunkenDraconian and others for testing several of the prior versions.  Also, big thanks to DarkSamus993 for working out a lot of the WRAM layout which I frequently referenced.

Boss AI/speed and enemy AI/speed is going to take some work and I'd really like to see those added next.  Event position, event type, and platforming randomization would also be cool, but will require a lot more work.

Chris Miller

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Armageddon Games Network
Re: Super Castlevania 4 Randomizer
« Reply #6 on: August 28, 2016, 04:04:04 am »
Great program, dude!  I'm glad to see somebody's making CV4 stuff.  Everything worked fine, except that the game would invariably crash immediately after beating Death.  I tried it on multiple seeds, same result.

MathUser2929

  • Hero Member
  • *****
  • Posts: 1516
    • View Profile
Re: Super Castlevania 4 Randomizer
« Reply #7 on: August 28, 2016, 04:15:00 am »
Yeah, if it teaches you more about the game that you can use with the regular editor I'm all for this randomizer. I hope you make every one of these things part of the main editor. Like the movement speed, enemy hp and stuff.

RedGuy

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: Super Castlevania 4 Randomizer
« Reply #8 on: August 28, 2016, 10:31:10 am »
https://drive.google.com/file/d/0Bx9gzQZCkH8qOFFwNnI3ZXZLLU0/view?usp=sharing

0.0.1.2
Fixed corruption of Death's death code
Added limited randomization for Rowdain (no other bosses randomized, yet)
Added some randomization of ring (swing) acceleration

Great program, dude!  I'm glad to see somebody's making CV4 stuff.  Everything worked fine, except that the game would invariably crash immediately after beating Death.  I tried it on multiple seeds, same result.

Thanks for catching that.  There was a last minute change that had an address typo which corrupted Death's code.

RedGuy

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: Super Castlevania 4 Randomizer
« Reply #9 on: September 21, 2016, 10:16:47 pm »
https://drive.google.com/file/d/0Bx9gzQZCkH8qZ2dQNkpzQUR0Y1k/view?usp=sharing

0.0.2.4

Added more randomization.  The most notable thing is a lot more rooms can be randomized to play in reverse.

I'm realizing some of the randomization that was added may be more annoying than fun, but there are knobs to turn those things off.  You'll know what I mean if you play it...

MathUser2929

  • Hero Member
  • *****
  • Posts: 1516
    • View Profile
Re: Super Castlevania 4 Randomizer
« Reply #10 on: September 21, 2016, 10:23:35 pm »
It's really been a good time for Castlevania lately. I found some DS castlevania hacks. Theres a ayumi kojimaization of two ds castlevanias going on. This and your editor. The future alucard hack looks really good now. I'm glad all these hacks are coming out.

diablo888

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Super Castlevania 4 Randomizer
« Reply #11 on: October 04, 2016, 04:53:04 pm »
did u remove "items in walls" secrets? if not, how hard would it be to add completely new ones??

4-4 softlocked, couldnt exit to the right

suggestion: when clicking save, set the default filename to be the string containing the randomization details
can u edit/randomize whip attack speed? how awesome would it be to have a faster leather whip :D
« Last Edit: October 04, 2016, 05:01:49 pm by diablo888 »

MathUser2929

  • Hero Member
  • *****
  • Posts: 1516
    • View Profile
Re: Super Castlevania 4 Randomizer
« Reply #12 on: October 04, 2016, 07:07:25 pm »
I think different item in wall locations would also add to the replay value. And whip speed being different could be fun too.

RedGuy

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: Super Castlevania 4 Randomizer
« Reply #13 on: October 05, 2016, 12:25:34 am »
did u remove "items in walls" secrets? if not, how hard would it be to add completely new ones??

4-4 softlocked, couldnt exit to the right

suggestion: when clicking save, set the default filename to be the string containing the randomization details
can u edit/randomize whip attack speed? how awesome would it be to have a faster leather whip :D

With dynamic randomization of candles it changes the candles as well as the wall drops to be random based on the in-game pseudo random number generator.

In 4-4 (Koronot?) is the circled place in the following pic where you softlocked?  If so, make sure you are using the latest version of the randomizer posted and not the one linked in the first post.  With increased speed the randomizer fills in that gap so you can't get in there.  If that wasn't the softlock then where did it happen?  After killing Koronot it didn't advance?

I will make the default filename the randomization code.  That's a good idea.  As for the whip speed, I'll take a look at it sometime since several others have also asked for it.  Not sure how easy that will be to modify.

« Last Edit: October 06, 2016, 10:34:00 pm by RedGuy »

diablo888

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Super Castlevania 4 Randomizer
« Reply #14 on: October 06, 2016, 04:14:12 pm »
i cannot see your images, also the one in the OP...dont think google (drive) allows hotlinking. YOU can probably see them, but i dont think anyone of us.

also i meant 4-3 not 4-4, guess it has to do with mov speed idk
« Last Edit: October 06, 2016, 04:36:01 pm by diablo888 »

MathUser2929

  • Hero Member
  • *****
  • Posts: 1516
    • View Profile
Re: Super Castlevania 4 Randomizer
« Reply #15 on: October 06, 2016, 05:51:14 pm »
Yup, the images used to work but not anymore. Same with your contra 3 image.

RedGuy

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: Super Castlevania 4 Randomizer
« Reply #16 on: October 06, 2016, 11:06:59 pm »
i cannot see your images, also the one in the OP...dont think google (drive) allows hotlinking. YOU can probably see them, but i dont think anyone of us.

also i meant 4-3 not 4-4, guess it has to do with mov speed idk

Fixed the images - picasa direct links are no longer valid for everyone.

Was 4-3 (the mode7 level with the dropping platforms and skeleton spawns) running forwards or reverse?  It can randomize the level to run in the opposite direction and you have to exit on the left.  The exit on the right is removed when that happens.  I couldn't reproduce it in 0.0.2.4 of the randomizer in the forward or reverse direction, but it could be related to something else that wasn't randomized in my roms.

I moved the link to 0.0.2.4 of the randomizer into the first post.  Here's where it probably would have helped if I saved the code somewhere in the filename to make it easy to reproduce.  I need to rewrite part of the randomizer after changing a bunch of things in the editor.  Once I do that I'll test it again and post a new version where it defaults the file name to the code.

diablo888

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Super Castlevania 4 Randomizer
« Reply #17 on: October 09, 2016, 04:30:52 pm »
Fixed the images - picasa direct links are no longer valid for everyone.

Was 4-3 (the mode7 level with the dropping platforms and skeleton spawns) running forwards or reverse?  It can randomize the level to run in the opposite direction and you have to exit on the left.  The exit on the right is removed when that happens.  I couldn't reproduce it in 0.0.2.4 of the randomizer in the forward or reverse direction, but it could be related to something else that wasn't randomized in my roms.

I moved the link to 0.0.2.4 of the randomizer into the first post.  Here's where it probably would have helped if I saved the code somewhere in the filename to make it easy to reproduce.  I need to rewrite part of the randomizer after changing a bunch of things in the editor.  Once I do that I'll test it again and post a new version where it defaults the file name to the code.

thx for all ur effort and amazing, i didnt think of checking the other thread to put suggestions there rather than here...
here is what i remember ive since overwritten the file, it was 4-3 running FORwards, and the background was glitchy as fukk, and it was 0024 randomizer.

RedGuy

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: Super Castlevania 4 Randomizer
« Reply #18 on: October 09, 2016, 08:28:19 pm »
https://drive.google.com/file/d/0Bx9gzQZCkH8qS2FRV1hEcUVKYmc/view?usp=sharing

0.0.2.5

Changed default save file name to code.
Updated expanded ROM to use the latest version.
Fixed (attempted) room reverse problem.

0.0.2.6

Fixed rotating room entrance softlock bug.

Try that version.  I think it's fixed now and had to do with the way the reverse of the previous room (rotating) was being reversed.  Played through a few different randomized versions and didn't see the problem.
« Last Edit: October 13, 2016, 10:47:17 pm by RedGuy »

bogaabogaa

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: Super Castlevania 4 Randomizer
« Reply #19 on: October 29, 2017, 01:14:35 pm »
Hi everybody

I think there is a newer version. 0.0.2.9 https://cdn.discordapp.com/attachments/197096946270208000/283003738862387200/SCV4Randomizer.exe
I am sorry that I did not share this earlier. It is out for a while now

- Fixed bug with static candle randomization.



I think it would be cool to include a palette randomizer. Redguy did lose the interest in the project. I can not build the randomizer. I think the source need some work and I did never build a program before.
I may work on a ROM or tow with nice changed palettes as a side project and paste my progress here. https://pastebin.com/6Tf1he3X
Any help in the project is very welcome.