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

Author Topic: FF6 randomizer  (Read 19919 times)

Lenophis

  • Discord Staff
  • Hero Member
  • *****
  • Posts: 971
  • The return of the sombrero!
    • View Profile
    • Slick Productions
FF6 randomizer
« on: August 27, 2014, 03:02:03 pm »
Hi ho. Dessyreqt and myself have been working on a little project for Final Fantasy 6, aptly called "FF6 randomizer." You can find it here. It is meant to just have some fun, and if racing is your thing, you can race a buddy with this as well. Current version is VI, released on October 15, 2014.

What this does randomize:
  • Character starting stats. It takes the maximum stat a character has, for instance Gau's 99 battle power, and the lowest, Strago's 10 battle power, and picks a number in that range for each character. Most stats will generally be higher as a result.
  • Treasure chests. All treasure chests in the game, save for the Striker in the Cave of the Veldt, have been put into tiers and will be chosen at random. This means you will not get a Ragnarok in Figaro Castle. If a chest contains a Potion, that chest will have something similar to a Potion. Also because of the tiers, a couple of Monster-in-a-Boxes have been added.
  • Character skillsets. Terra gets Rage? Sabin can Steal? Umaro can Runic? Sure, why not. To account for non-Gau getting Rage, and because of Gau's recruitment in the WoR, Leap has been removed entirely. Don't worry, leaning Rages is very, very easy now.
  • Natural abilities. The starting Rages, Lores, and spells of whoever has those skills has been shuffled around.
  • Shops! Items that appear in shops are shuffled around, except the Sprint Shoes. Any shop that sells the shoes will still have them.
  • Character names and palettes. Should be fairly self-explanatory.
  • Equipment. Specifically, who can equip what. This also accounts for starting equipment.
  • Espers. The spells they teach, and the rate they teach at have been shuffled around. It will be generally easier to learn spells now. However, there is no guarantee every spell will be available.
  • vVI - Colosseum items. The items you win in Dragon's Neck have been shuffled around.
  • vVI - Enemy drops and steals. They have been grouped into a tier system similar to the treasure chests and shops.
  • vVI - The RNG table. How a random number is fetched hasn't been changed, but the table from which those numbers have been generated are.



Bug fixes:
  • vVI - Psycho Cyan. Cyan, under certain circumstances would counter-attack his own attacks, which will eventually kill all enemies on the field.
  • vVI - Vanish/Doom. Vanish will now behave according to how it does in Final Fantasy VI Advance.
  • Evade. The evade stat was never referenced for any dodging, so the stat was useless.

New feature!
The interface of the randomizer will now let you set your configurations of the game before you generate your rom, basically so you never have to do it unless you need to change something mid-game. Whatever settings you use will be saved so you never have to redo them for each new rom.

Just in case the text above doesn't tell the whole story, both Dessy and myself have streamed a few sessions of the randomizer. My older one from mid-July can be found here, and a highlight from Dessy from just 3 days ago (August 24) can be seen here. While the whole video is still there, you can watch that too, but with recent changes to Twitch it won't be available for very long.

What this does not, and will not change, ever:
  • Dialogue
  • Story
:crazy:

So yeah, please check it out, and if you have any bugs to report, do so here so we can squash them! Any feedback is also welcome! Most importantly, have fun! :laugh:


Clarifying who did what:
Dessyreqt did all of the UI/program stuff, and I did all of the game hacking stuff.
« Last Edit: October 15, 2014, 03:31:17 pm by Lenophis »


https://ff6randomizer.codeplex.com/ - Randomize your FF6 experience!

Tomato

  • Sr. Member
  • ****
  • Posts: 367
    • View Profile
    • Legends of Localization
Re: FF6 randomizer
« Reply #1 on: August 28, 2014, 03:56:24 am »
Oh man, I saw this earlier today and was like  :crazy: and then during my own unrelated FFVI stream Dessyreqt and a few others were like, "Hey! FFVI Randomizer!"

It sounds like this is gonna be a ton of fun for FFVI fans, I can't wait to try it out!

Grimoire LD

  • Sr. Member
  • ****
  • Posts: 452
    • View Profile
Re: FF6 randomizer
« Reply #2 on: August 28, 2014, 09:57:00 am »
Randomizers in my opinion add so much life and vitality to a game, it lets you take a game you've played 100 times and do something completely new and unexpected with it. I am a big fan of FFV Ancient Cave for that reason, but I thought that would be a solo-entry and the FF series wouldn't see another randomizer (though FFV: AC is more of a roguelike in many respects). And while I've tried my hand at an FFIV randomizer things are just too set in stone for the most part also the equipment pools in FFIV on a default basis are very segmented and getting one weapon early may completely break the game and so-on.

This is a wonderful idea and I would love to see how you went about it as it may give me some ideas on how to fix-up FFIV to work in a sort of similar fashion.

I will be playing this here and there and will give my impressions as I go through it.

Celice

  • Hero Member
  • *****
  • Posts: 646
    • View Profile
Re: FF6 randomizer
« Reply #3 on: August 28, 2014, 08:19:22 pm »
I love the recent randomizer interest in romhacks and mods. I'm super interested in how the FF6 one will play.

Madsiur

  • RHDN Patreon Supporter!
  • Full Member
  • *****
  • Posts: 180
  • FF6 hacker
    • View Profile
Re: FF6 randomizer
« Reply #4 on: August 30, 2014, 12:28:24 pm »
This is a neat idea. I'm gonna try a playthrough this weekend!

bxbcore

  • Jr. Member
  • **
  • Posts: 4
    • View Profile
Re: FF6 randomizer
« Reply #5 on: August 31, 2014, 06:36:02 pm »
I'm really enjoying the depth that the randomizer has so far and think that it's commendable work. Unfortunately, I'm stuck on Vargas with Sabin. He simply automatically attacks until he is wiped out. Any way of mitigating this?

Grimoire LD

  • Sr. Member
  • ****
  • Posts: 452
    • View Profile
Re: FF6 randomizer
« Reply #6 on: August 31, 2014, 10:17:17 pm »
Yes, I'm stuck at Vargas as well, I do hope that the Pummel-check was removed to end the battle as I did an additional 2000 damage to Vargas with Magic-using Sabin, but didn't finish him.

Lenophis

  • Discord Staff
  • Hero Member
  • *****
  • Posts: 971
  • The return of the sombrero!
    • View Profile
    • Slick Productions
Re: FF6 randomizer
« Reply #7 on: September 01, 2014, 12:39:18 am »
Vargas' HP was greatly reduced because of the randomizer. You may or may not need to heal once to beat him. Even with the Berserker draw that bxbcore seems to have acquired, you can still win. Berserker may need a little luck, but 1 additional level should do the trick.

We're not evil enough to make you remove 10,000+ HP from the third boss of the game. :crazy:


https://ff6randomizer.codeplex.com/ - Randomize your FF6 experience!

bxbcore

  • Jr. Member
  • **
  • Posts: 4
    • View Profile
Re: FF6 randomizer
« Reply #8 on: September 01, 2014, 08:02:56 pm »
Vargas' HP was greatly reduced because of the randomizer. You may or may not need to heal once to beat him. Even with the Berserker draw that bxbcore seems to have acquired, you can still win. Berserker may need a little luck, but 1 additional level should do the trick.

We're not evil enough to make you remove 10,000+ HP from the third boss of the game. :crazy:

I think my problem was that I kept reloading a save state that was doomed to fail. I will retry an old save and just grind a little. Thanks for the help, just want to say again that this randomizer is a ton of fun!

Lenophis

  • Discord Staff
  • Hero Member
  • *****
  • Posts: 971
  • The return of the sombrero!
    • View Profile
    • Slick Productions
Re: FF6 randomizer
« Reply #9 on: September 04, 2014, 02:58:31 am »
Tonight version 5 of the randomizer was released! Mostly been bug-fixes and other minor tweaks, but there are some really good changes coming up in the near future! :woot!:


https://ff6randomizer.codeplex.com/ - Randomize your FF6 experience!

Lenophis

  • Discord Staff
  • Hero Member
  • *****
  • Posts: 971
  • The return of the sombrero!
    • View Profile
    • Slick Productions
Re: FF6 randomizer
« Reply #10 on: October 15, 2014, 01:52:15 pm »
Yesterday we released version VI, and now that I'm finally starting to get some more time to work on this, the last of the big changes we were intending to implement will be coming soon!


https://ff6randomizer.codeplex.com/ - Randomize your FF6 experience!

Next Gen Cowboy

  • Hero Member
  • *****
  • Posts: 1766
  • "People are like dice"
    • View Profile
Re: FF6 randomizer
« Reply #11 on: October 15, 2014, 02:23:44 pm »
Awesome to see. As always, best of  luck.
"Remember when we were in Japan? You said you were my gun, if you're the gun then that means I'm the bullet."

"All my life I've been waiting for the gunpowder to go off, you know what you need to ignite gunpowder? You need a gun."

Grimoire LD

  • Sr. Member
  • ****
  • Posts: 452
    • View Profile
Re: FF6 randomizer
« Reply #12 on: October 16, 2014, 01:46:05 am »
Anything to add even more randomness to the system! These new changes look fantastic, hopefully I'll have some time soon to load this up again.

Rutibex

  • Jr. Member
  • **
  • Posts: 1
    • View Profile
Re: FF6 randomizer
« Reply #13 on: December 10, 2014, 10:36:09 pm »
This is absolutely amazing!  FF6 is one of my favorite games and I do some kind of challenge run with it at least once a year.  This will give me an infinite variety with future playthroughs!

Have you thought about randomizing the monster stats/pallets/behaviors/encounter tables?  That would make this pretty much perfect.

Lenophis

  • Discord Staff
  • Hero Member
  • *****
  • Posts: 971
  • The return of the sombrero!
    • View Profile
    • Slick Productions
Re: FF6 randomizer
« Reply #14 on: December 11, 2014, 02:24:48 am »
AI has been discussed, I believe, but it isn't worth the effort, sadly. A very good chunk of proportional data would have to be reshuffled into "what if" scenarios, and it's too likely to set up a no-win situation.

I think palettes were on the table at some point, but I don't remember.

The zoning for world maps and dungeons has been discussed, and we're thinking of ways it could be implemented that aren't crazy to the player. The randomizer was set up so that people could race against one another, and tossing in monsters you aren't prepared for may cause a no-win scenario. That will partially depend on planning, but it also speaks to the need to heavily tweak monster stats as well in order for different monsters appearing to be feasible.

It's possible, and we may do that, but it's going to take a lot of work. :o


https://ff6randomizer.codeplex.com/ - Randomize your FF6 experience!

abyssonym

  • Jr. Member
  • **
  • Posts: 42
    • View Profile
Re: FF6 randomizer
« Reply #15 on: December 11, 2014, 02:53:41 pm »
I know a thing or two about shuffling AI and formations! In my opinion, if you were to do these things, it would be very difficult to cross any line that you haven't already crossed by putting monsters in chests (which I have already seen a few racers get a game over to). Vanilla FF6 is a very, very easy game and there are only a select few encounters that actually pose a threat to an experienced player... namely, those that are impossible to run away from, like Ninjas.

However... I don't think shuffling formations is a very amusing randomization. The player doesn't really get any kind of thrill by thinking, "Wow! I'm encountering a Greasemonk outside of Narshe instead of South Figaro!" The only real use for formation randomization is to subvert traditional grinding spots, like Intangirs or Cactrots.

On the other hand, I believe that AI can be a very worthwhile randomization. It's possible to randomize AI in a subdued way that doesn't make the game unwinnable. As long as you don't somehow make an enemy doublecast Ultima or something, there are very few scenarios that actually are unwinnable, or require more grinding than you would need for a bad Sabin at Vargas. I think you can be more liberal with how you mutate enemies in random encounters, because they are (for the most part) optional. But even for bosses, simple changes like increasing the probability of a certain attack on a certain turn are very safe.

If you decide to go ahead with monster palette randomization, I'd be happy to share what I know.

justin3009

  • Hero Member
  • *****
  • Posts: 1658
  • Welp
    • View Profile
Re: FF6 randomizer
« Reply #16 on: December 11, 2014, 03:12:23 pm »
I'm not sure if this is plausible, but is there anyway to specify certain monsters in a group and possibly have abilities for monsters in that group be randomly picked?  So you could essentially tell what spells can be used by them.

As for their stats, maybe just have it randomized where it can be + or - a random number on any or all of their stats per encounter?

I think any of this would require some hell of a rewrite of a lot of code and expansion.
'We have to find some way to incorporate the general civilians in the plot.'

'We'll kill off children in the Juuban district with an infection where they cough up blood and are found hanging themselves from cherry blossom trees.'

Lenophis

  • Discord Staff
  • Hero Member
  • *****
  • Posts: 971
  • The return of the sombrero!
    • View Profile
    • Slick Productions
Re: FF6 randomizer
« Reply #17 on: December 11, 2014, 05:32:21 pm »
On the other hand, I believe that AI can be a very worthwhile randomization. It's possible to randomize AI in a subdued way that doesn't make the game unwinnable.
There's more to it that just a particular battle that may make it unwinnable. Say for example I tweak a Brawler in Mt. Koltz. His AI is now set to, just for the heck of it, cast Poison on the first turn randomly on one person. That one character, barring relic use, may die that battle, or soon thereafter, either from just pure damage, poison damage, or lack of Antidotes.

Take this example a bit further, and say you never got a Tent anywhere from the beginning up until the save point in Mt. Koltz. Most people will buy Phoenix Downs in South Figaro or Figaro Castle, should they have the funds and are available. Remember, there's no guarantee that any particular item will show up in any particular place. The randomizer may have just made Vargas unwinnable from semi-frequent Brawler encounters because they poisoned you to death.

That's just one example.

A more realistic scenario from the same dungeon. Say we give Cirpius a 66% chance of petrifying a character every round. No Softs available? Oops.

RNG should not determine if you can get through a dungeon. That's one aspect of games that I personally dislike and something almost all challenge hacks put people through. This randomizer is making sure that RNG can't screw you over like that, though it may make people go "oh no" a few times.

Quote
If you decide to go ahead with monster palette randomization, I'd be happy to share what I know.
Sure, fire away.


https://ff6randomizer.codeplex.com/ - Randomize your FF6 experience!

abyssonym

  • Jr. Member
  • **
  • Posts: 42
    • View Profile
Re: FF6 randomizer
« Reply #18 on: December 11, 2014, 07:25:53 pm »
I understand your point, but I feel as though you've already committed to this style of RNG-based gameplay. There are many situations where not having the necessary items in your arsenal actually makes vanilla encounters somewhat dangerous:
  • Brawlers with Poison are bad, but Triliums are almost the exact same situation. You're guaranteed to encounter at least one Trilium in every battle on the final stretch to Vargas, and each Trilium has a 33% chance to poison a character on their first turn.
  • On the Floating Continent, Ninjas are substantially more dangerous because Thunder Rods are no longer breakable, and repeated castings of Ramuh or Bolt 2 will drain your resources fairly quickly... assuming you can defeat them quickly enough to begin with. It's possible to encounter Ninjas in every single encounter on the Floating Continent, if you're unlucky.
  • If I'm not mistaken, it's possible to roll a South Figaro without any healing items, right? In that case, a person with a surplus of Softs might actually prefer a 66% chance of petrify to sustained, slow death by physical attacks.
  • It's possible to roll a berserker Celes who has access to neither Jewel Ring nor Ribbon. In this situation, she is especially vulnerable to enemies using Petrify attacks at the start of the World of Ruin.
And so on. I also don't necessarily agree with the sentiment that RNG shouldn't determine success to at least some degree. RNG gives an incentive to gamble and helps craft colorful situations. A player who is suddenly carrying a statue up Mt. Koltz has to make a difficult decision about whether it is worth attempting to reach Vargas, or if they should just reset and start from the base of the mountain.

That said, I do understand the desire to try to make the game as skill-based as possible. I just think that there are some fundamental inconsistencies with this design philosophy, and the design of both FF6 and the randomizer in their current states.

Gear shift. Monster palettes.

The nice thing about enemy palettes is that nearly every enemy has their own unique palette. Characters are limited to only about 6 main palettes, mostly due to display limitations, but no more than 3 enemy palettes are used at any given time, so enemies are free to have whatever palette you want.

The monster graphics specifications are stored at 0x127000 (unheadered); among other things, this includes the pointer to the graphic data and the palette index. The palettes themselves begin at 0x127820. As far as the "palette index" is concerned, each palette is only 16 bytes long. However, some enemies use more than 8 colors, and require a 32 byte palette... in this situation, they use the palette at the palette index and the following palette as well. I don't know if there's a better way of identifying whether a palette is used for 8-colors or 16-colors, but as far as I can tell, enemy palettes almost never overlap, so if a palette at index X is being used for a 16-color enemy, then palette X+1 won't be used by any enemy. I can't say whether this approach is bulletproof... in Beyond Chaos, Guardian never has a decent palette, but that might be because I botched the handling of Esper palettes (which are stored as monster graphics as well).

You're probably familiar with the palette format, but I'll explain it anyway. Each color is two bytes, so a palette of 16 bytes has 8 colors. The highest bit is used for some kind of transparency. The next 15 bits are red, green, and blue components (5 bits each), though I don't remember what order they're in.

In Beyond Chaos, the way colors are mutated is very simple. Each palette is partitioned into groups based on which color components are dominant... for example, a red group, a blue group, etc... except I use 6 groups. Then, all of the colors in a given group have their color components swapped the same way. In addition to that, I might fudge the "middle" component closer or further from the high and low components, but I fudge this component by the same ratio for each color. This technique results in coloring that looks very consistent with the original artwork because the shading and general composition stays the same. But it also varies the results in more interesting ways than a simple hue change.

I hope that was helpful. If you'd like to see the algorithms themselves, the relevant code is in
Code: [Select]
monsterrandomizer.py:MonsterGraphicBlock and
Code: [Select]
utils.py:get_palette_transformer

Lenophis

  • Discord Staff
  • Hero Member
  • *****
  • Posts: 971
  • The return of the sombrero!
    • View Profile
    • Slick Productions
Re: FF6 randomizer
« Reply #19 on: December 12, 2014, 02:45:31 pm »
Brawlers with Poison are bad, but Triliums are almost the exact same situation. You're guaranteed to encounter at least one Trilium in every battle on the final stretch to Vargas, and each Trilium has a 33% chance to poison a character on their first turn.
Touché. I have an idea, and it will go in with the shop update we already have in mind. Shops that already sell Sprint Shoes will still be guaranteed to sell Sprint Shoes, so why not take this a step further with some status items? Item shops could either sell a few ailment cures, or a Remedy. A Remedy will be kind of costly, especially early-game, but it would at least be available.

Quote
On the Floating Continent, Ninjas are substantially more dangerous because Thunder Rods are no longer breakable, and repeated castings of Ramuh or Bolt 2 will drain your resources fairly quickly... assuming you can defeat them quickly enough to begin with. It's possible to encounter Ninjas in every single encounter on the Floating Continent, if you're unlucky.
In terms of general speedrunning, that's basically a run-killer anyway. I do have an idea that can at least help prevent such a scenario, I just need to implement it.

Quote
If I'm not mistaken, it's possible to roll a South Figaro without any healing items, right? In that case, a person with a surplus of Softs might actually prefer a 66% chance of petrify to sustained, slow death by physical attacks.
Sure, but what if you don't have that surplus of softs? I can see your scenario playing out, and I can just as easily see a scenario with no healing items and no status lifting items.

Quote
It's possible to roll a berserker Celes who has access to neither Jewel Ring nor Ribbon. In this situation, she is especially vulnerable to enemies using Petrify attacks at the start of the World of Ruin.
With the current version, yes. However, we have already made a change to the relic system that will negate this point. All relics will go be equippable by everyone again, save for the few unique that only make sense for one person to wear. CELES SMASH!

Quote
And so on. I also don't necessarily agree with the sentiment that RNG shouldn't determine success to at least some degree.
I guess I worded my sentence poorly. RNG shouldn't be the sole determining factor of success or failure.

Quote
RNG gives an incentive to gamble and helps craft colorful situations. A player who is suddenly carrying a statue up Mt. Koltz has to make a difficult decision about whether it is worth attempting to reach Vargas, or if they should just reset and start from the base of the mountain.
One thing that has both hurt and helped the randomizer is the rather abundant supply of free inns scattered throughout the game. Narshe, Figaro Castle, Cave of South Figaro, Duncan's house, Returner's Hideout, Phantom Forest, Mobliz, and Gau's Father's house all have some form of free inn.

Quote
I don't know if there's a better way of identifying whether a palette is used for 8-colors or 16-colors
I don't think there was either. I just used the monster sprite editor to determine which monsters had 8 and which had 16-color palettes.

Quote
You're probably familiar with the palette format, but I'll explain it anyway. Each color is two bytes, so a palette of 16 bytes has 8 colors. The highest bit is used for some kind of transparency. The next 15 bits are red, green, and blue components (5 bits each), though I don't remember what order they're in.
ABBB BBGG GGGR RRRR

Quote
In Beyond Chaos, the way colors are mutated is very simple. Each palette is partitioned into groups based on which color components are dominant... for example, a red group, a blue group, etc... except I use 6 groups. Then, all of the colors in a given group have their color components swapped the same way. In addition to that, I might fudge the "middle" component closer or further from the high and low components, but I fudge this component by the same ratio for each color. This technique results in coloring that looks very consistent with the original artwork because the shading and general composition stays the same. But it also varies the results in more interesting ways than a simple hue change.
That is an interesting approach.

Quote
I hope that was helpful.
Indeed it was!

Quote
If you'd like to see the algorithms themselves, the relevant code is in
Code: [Select]
monsterrandomizer.py:MonsterGraphicBlock and
Code: [Select]
utils.py:get_palette_transformer
Sweet, thanks. :thumbsup:


https://ff6randomizer.codeplex.com/ - Randomize your FF6 experience!