Author Topic: Final Fantasy IV: Side Project (Random AI Routine complete!)  (Read 10570 times)

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Final Fantasy IV: Side Project (Random AI Routine complete!)
« on: December 30, 2014, 07:58:04 PM »
With Combat Boost in a pretty stable state I thought I should talk about a side-project of sorts, as Chillyfeez has pointed out one of the glaring issues with FFIV is the lack of any randomized AI, the closest the game ever gets to randomization in AI is Blaster/Slap/Gaze which can do a variety of randomized status effects. Where FFIV shines was its use of counter-attacks and scripts depending on the enemy's state, but those are so rarely used in normal battle anyhow except for the Charm Script. (except for Counter-Scripts which will be left alone for the most part)

My thought is to use several formulas which aren't necessary (Protect and Shell come immediately to mind) and use them to Jump to a lot of empty space where I could set up four random spells/commands for an enemy to use.

What will probably be done is that each family of monster will get the same AI Choices (just as in the normal game each family of monster has similar AI)

In FFIV there are 65 Normal Enemy Families even that is a fairly tall order, but I think there will be enough space to make this work (One of those four choice will probably be Fight that all monsters could use anyhow so really only 3)

There are three unused spells in FFIV, Two blank skills right underneath W. Meteo and DullSong (is meant to be used by Scarmiglione as a counter, but the Index is never given to him) that should be enough to tie the random AI to.

In addition this patch would use Chillyfeez's Shadow Party Hack, Enemy Level Up, and User Options and will use Vivify93's Project II as a base.

This project will also include my various fixes.

Since this is using the Shadow Party Hack I will try to set up events for switching characters in the Tower of Prayer late in the game, exchanging Kain for Yang, Edge for Cid OR Edward, Rosa for Porom, and Rydia for Palom.

I should have enough event slots for this.

That's about the gist of it, I might throw in another hammer and harp or two for Cid and Edward. I will note now that I will not bother to mess with the end-game events, though for fairly obvious reasons. This patch is just a proof of concept, really.


So in total...

Randomized AI
Enemy Level Up
Bug Fixes
Party Rejoining
« Last Edit: January 03, 2015, 06:00:59 PM by Grimoire LD »

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Final Fantasy IV: Side Project
« Reply #1 on: December 30, 2014, 08:57:05 PM »
Fun. Inspired idea for random AI.
Does this mean you're taking a break from Combat Boost?

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Final Fantasy IV: Side Project
« Reply #2 on: December 30, 2014, 09:06:21 PM »
Not so much a break, an "intermission" I suppose you could say since I'm just about at the Underworld. I don't anticipate this project taking any longer than a couple of weeks since the most complicated part will be testing the event npc's and the like and the most laborious part will be writing the customized AI choices. Everything else is pretty much already done.

TheBigT2000

  • Siren
  • *
  • Posts: 80
  • Gender: Male
    • View Profile
Re: Final Fantasy IV: Side Project
« Reply #3 on: December 30, 2014, 09:48:59 PM »
I have sort of a better idea, have all of the party members except for Cecil all be in the Lunar Whale walking around, and if you talking to say, Rosa, she would ask: "Mind if I tag along?" And you can say Yes or No, saying yes, she would stay in the party, but if you say no, it would take her out of the party. Then say, Yang asks to join the party and if you say yes, he'd join the party. I'm thinking of doing this for my hack.

LordGarmonde

  • Baigan
  • *
  • Posts: 271
  • Gender: Male
  • "Power only breeds war..."
    • View Profile
Re: Final Fantasy IV: Side Project
« Reply #4 on: December 30, 2014, 09:54:53 PM »
 :hmm: FF6/FF7 Style - Interesting

I wouldn't necessarily say better though; I could imagine trouble when it came to the end when playing the cutscene where everyone wishes for you. That would have to be extensively modified to include loading the Lunar Whale.
"Now I know; and knowing makes it even more confusing..."

TheBigT2000

  • Siren
  • *
  • Posts: 80
  • Gender: Male
    • View Profile
Re: Final Fantasy IV: Side Project
« Reply #5 on: December 30, 2014, 09:57:35 PM »
That's another thing I was thinking of: Removing that scene entirely. Seems to be the most effective think to do.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Final Fantasy IV: Side Project
« Reply #6 on: December 30, 2014, 10:27:33 PM »
I have sort of a better idea, have all of the party members except for Cecil all be in the Lunar Whale walking around, and if you talking to say, Rosa, she would ask: "Mind if I tag along?" And you can say Yes or No, saying yes, she would stay in the party, but if you say no, it would take her out of the party. Then say, Yang asks to join the party and if you say yes, he'd join the party. I'm thinking of doing this for my hack.

While it looks good on the surface it doesn't take what happens when you already have five characters into account.

Say in your plan that I have a full party and I forget to remove someone, then when I choose someone else to join the party, the game won't add them to my party because my party is already full, in reality though that's not a big deal.

For the problem of character copies you could utilize event flags to change the character's event into just "Remove character? Yes/No" when they're already in the party but there is no default check the game performs to see if there is a full party.

You know... there just might be something to this, I'll have to set up a test for this to see if that will work. Thanks for the idea!

This plan will require 18 event scripts, 9 for...

Kain
Rydia
Edward
Rosa
Yang
Palom
Porom
Cid
Edge

And 9 for their flag check of "already in party."

As for optional events that no one should miss...

1.Ouch! from fire
2.Cecil's Maid
3. Item Selection: Soft (On the Twins)
4. Giott: Open the Door! (Not used)
5. Terrible bombardments... (not necessary)
6. WA! (Pretty sure... not used?)
7. We also might have been hypnotized (not used, bank2 message)
8. Calling Fat Chocobo with Carrot (Final will have the Cache command)
9. Resting for free in Fabul "Let's sleep in the King's Bed!"
10. Reading the Magazine
11. Obtaining the Magazine
12. Obtaining Grimoire1
13. Obtaining Grimoire2
14. Obtaining Grimoire3
15. Kaipo Dancer
16. Fabul Dancer
17. Agart Dancer
18. Dwarf Castle Dancer


That covers 18 non essential and hardly noticeable events. I just need to be careful to give all of the dying soldiers the "..." event then in Damcyan.
« Last Edit: December 30, 2014, 10:58:03 PM by Grimoire LD »

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Final Fantasy IV: Side Project
« Reply #7 on: December 30, 2014, 11:14:54 PM »
Can't the Damcyan Soldiers just use bank 2 messages?
I never understood why they had their own events.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Final Fantasy IV: Side Project
« Reply #8 on: December 30, 2014, 11:25:13 PM »
Can't the Damcyan Soldiers just use bank 2 messages?
I never understood why they had their own events.

I think it was supposed to be a way of saving Bank 2 space (so they wouldn't have to use "..." several times in the maps) but it does kill an event spot, yes. So I have everything all figured out for the party composition in any event due to BigT2000's suggestion.

3/7 Kain (Down)
1.Ouch! from fire - Kain Joining
2.Cecil's Maid - Kain Leaving (Flag 90)

5/7 Rydia
3. Item Selection: Soft (On the Twins)
4. Giott: Open the Door! (Not used)

9/7 Edward
5. Terrible bombardments... (not necessary)
6. WA! (Pretty sure... not used?)

11/7 Rosa
7. We also might have been hypnotized (not used, bank2 message)
8. Calling Fat Chocobo with Carrot (Final will have the Cache command)

12/8 Yang (Left)
9. Resting for free in Fabul "Let's sleep in the King's Bed!"
10. Reading the Magazine

12/9 Palom
11. Obtaining the Magazine
12. Obtaining Grimoire1

12/10 Porom
13. Obtaining Grimoire2
14. Obtaining Grimoire3

2/8 Cid (Right)
15. Kaipo Dancer
16. Fabul Dancer

2/9 Edge
17. Agart Dancer
18. Dwarf Castle Dancer

Another problem I thought of was "What happens if you switch to that party member while the Party Member is standing right there?" Well, while it's not so clean, I was thinking of forcing Paladin Cecil's sprite to be the one displayed when you go to talk to them, so yes there will be that weirdness when you see a copy of a party member, but since it switches to Paladin Cecil's sprite when you go to speak with them it shouldn't look too strange.

TheBigT2000

  • Siren
  • *
  • Posts: 80
  • Gender: Male
    • View Profile
Re: Final Fantasy IV: Side Project
« Reply #9 on: December 30, 2014, 11:58:10 PM »
Glad I could help by giving you the idea! ^_^

Also, I'm serious about doing something like this in my hack. XD
« Last Edit: December 31, 2014, 12:03:15 AM by TheBigT2000 »

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Final Fantasy IV: Side Project
« Reply #10 on: December 31, 2014, 12:02:20 AM »
Another problem I thought of was "What happens if you switch to that party member while the Party Member is standing right there?" Well, while it's not so clean, I was thinking of forcing Paladin Cecil's sprite to be the one displayed when you go to talk to them, so yes there will be that weirdness when you see a copy of a party member, but since it switches to Paladin Cecil's sprite when you go to speak with them it shouldn't look too strange.
Hmm... That is a weird logistical issue.
You could make the character disappear (and deactivate) when they join the party, then maybe the fat chocobo in the whale (since he won't be storing items) could offer the option to clear out the roster, which would remove all characters, and activate all of their NPCs. Though the invisible ones would stay invisible until you exit and reenter the screen... Unless you put Fatty in his own separate room... Or... Anybody got any other ideas?

TheBigT2000

  • Siren
  • *
  • Posts: 80
  • Gender: Male
    • View Profile
Re: Final Fantasy IV: Side Project
« Reply #11 on: December 31, 2014, 12:04:55 AM »
I say it wouldn't be THAT huge of a problem.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Final Fantasy IV: Side Project
« Reply #12 on: December 31, 2014, 12:10:56 AM »
Another problem I thought of was "What happens if you switch to that party member while the Party Member is standing right there?" Well, while it's not so clean, I was thinking of forcing Paladin Cecil's sprite to be the one displayed when you go to talk to them, so yes there will be that weirdness when you see a copy of a party member, but since it switches to Paladin Cecil's sprite when you go to speak with them it shouldn't look too strange.
Hmm... That is a weird logistical issue.
You could make the character disappear (and deactivate) when they join the party, then maybe the fat chocobo in the whale (since he won't be storing items) could offer the option to clear out the roster, which would remove all characters, and activate all of their NPCs. Though the invisible ones would stay invisible until you exit and reenter the screen... Unless you put Fatty in his own separate room... Or... Anybody got any other ideas?

I didn't think about it like that... that would work, I do already have events set up for the "Add Character" and "Remove Character" if I had thought about it setting them to deactivate and clearing the Roster (and reload the map in the process of the evennt) would make that much easier, I... only needed 9 events then, hah.

Great idea by the way Chillyfeez! This will look the cleanest.

In other news I now have the room setup and it looks pretty nice.


TheBigT2000

  • Siren
  • *
  • Posts: 80
  • Gender: Male
    • View Profile
Re: Final Fantasy IV: Side Project
« Reply #13 on: December 31, 2014, 12:14:19 AM »
It looks awesome! Nice layout!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Final Fantasy IV: Side Project
« Reply #14 on: December 31, 2014, 12:27:44 AM »
Ah, one small problem with the Fat Chocobo... it seems maps are forced to use only 12 NPC's the Lunar Whale uses 2 by default (well 6 before deleting the Fat Chocobo) and with 9 characters that leaves only one, for one normal NPC for the party clear. So I guess that normal NPC will be... let's go with Namingway, he follows you everywhere else, why not to the Moon?