Aslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=printpage;topic=1974.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexb21d.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1974.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexb21d.html.zx36g^ЋOKtext/htmlISO-8859-1gzip@Tue, 10 Mar 2020 06:56:10 GMT0 0P26g^ Print Page - Spare NPC's

Board of Slick

Library of the Ancients => Final Fantasy IV Research & Development => Topic started by: Grimoire LD on December 08, 2014, 10:20:45 PM

Title: Spare NPC's
Post by: Grimoire LD on December 08, 2014, 10:20:45 PM
Along the lines of my AI Conditionals hack this will go through the NPC's and look for the ones that can be freely changed without consequence (or to those who want to add a few more meaningful NPC's to the game; hint: All Dancers will be on this list.)

Cecil's Maid (Superfluous)
Baron Dancer
All Books NPC's
Kaipo Dancer
Fallen Soldier - Bank 2 Message 1
Fallen Soldier - Terrible Bombardments... (Why is That its own Event Square?!)
Captain - Not Used? (Unused)
Chocobo - Not Used? (Unused)
Baron Dancer's Dress (not even used by default in SNES FFII)
Dancer's Leg in Water
Soldier - Not Used? (Unused - When spawned correctly he only has a D filler line.)
Fabul Dancer
Mist Bomb, Not Used (Unused)
Agart Dancer
Mysidia Dancer
Troia Dance Troupe's Dance
Sleeping Bubble (Superfluous)
-------------------------------------
Underworld/Moon


Invisible (Obtaining Magazine)
Invisible (Obtaining Grimoire 6C)
Invisible (Obtaining Grimoire 6D)
Sylph (Unused?) (Has no data other than a sprite)
Invisible (Obtaining Grimoire 91)
Dwarf (Dancer)
Sleeping Bubble (2)
Heart Bubble (Only used during the Ending?)
Sleeping Bubble (3)
NPC 495-511 (Copies of Dark Knight Cecil)

There are 16+ NPC's in the Overworld which can be freely modified (if you don't care about losing the dancers)
And there 20+ NPC's in the Underworld/Moon which can also be modified.

This should give a modder some good amount of freedom when they want to create new NPC's.
And there are

Title: Re: Spare NPC's
Post by: chillyfeez on December 08, 2014, 10:38:33 PM
You can't really use "NPC1."
00 terminates the list of NPCs in each location, so if you try to place this in a map, the game will see it and stop loading NPCs.
Also, remember that the latter 256 NPCs are the NPCs for the underworld and moon. I believe it is impossible to load them in the overworld, and likewise it's impossible to load the former 256 in the underworld and moon.
Title: Re: Spare NPC's
Post by: Grimoire LD on December 08, 2014, 11:22:13 PM
Hah... how could I have forgotten that? In any case the main post has been updated to reflect that.
Title: Re: Spare NPC's
Post by: LordGarmonde on December 14, 2014, 05:08:50 PM
Would it be possible to change the world as part of the routine for entering an area? So, for instance, I enter Antlion's Den but instead of loading that it changes the world index first and then loads the map (whatever it may be - I'm too lazy to look it up right now)

Also - glad to see the forum back up and that you're still at it. I'm hoping with this semester done I can get back to business in here.  :happy:
Title: Re: Spare NPC's
Post by: chillyfeez on December 14, 2014, 06:15:25 PM
There are ways to make it happen, LordGarmonde, but you'd have to kinda trick the game using flags and events.
Let's say, for example, I want Cave Magnes to be a "world vortex" - every time you go in from the Overworld, you exit back out to the Underworld, and vice-versa.
1) find an arbitrary event flag (anything over 200 or so is pretty safe).
2) Create two tiny events:
   i) Load Overworld at (x,y), clear event flag x, end.
   ii) Load Underworld at (x,y), set event flag x, end.
3) Set the entrance/exit of the cave to be an event trigger
4) Set the event call to say, "if event flag x is set, run event i. Else run event ii."
Title: Re: Spare NPC's
Post by: LordGarmonde on December 14, 2014, 07:06:04 PM
Ah, clever! It makes me wonder if the game uses a similar trick going through the pitfall in the Tower of Babil: I would think so if not something similar. I also thinking now about something like this bing used to active Rubicante's teleporter.
Title: Re: Spare NPC's
Post by: chillyfeez on December 14, 2014, 07:40:59 PM
Ah, clever! It makes me wonder if the game uses a similar trick going through the pitfall in the Tower of Babil: I would think so if not something similar.
Oh, absolutely, except the process is masked with much more event going on.

I also thinking now about something like this bing used to active Rubicante's teleporter.
Yikes. New device, new autocorrect?
 :laugh:
Title: Re: Spare NPC's
Post by: LordGarmonde on December 14, 2014, 08:19:30 PM
I also thinking now about something like this bing used to active Rubicante's teleporter.
Yikes. New device, new autocorrect?
 :laugh:

That's nice of you to give me the benefit of the doubt. However...it's more like the attached picture...  :wink: - lol
Title: Re: Spare NPC's
Post by: chillyfeez on December 14, 2014, 08:47:11 PM
Ha! 7th Saga! I used to love that game until I discovered how disappointing and seemingly slapdash the end is.
Title: Re: Spare NPC's
Post by: LordGarmonde on December 14, 2014, 09:52:49 PM
Ha! 7th Saga! I used to love that game until I discovered how disappointing and seemingly slapdash the end is.

The writing did take a nose-dive towards the end...

I wrote more on it here... I didn't want to end up hijacking this thread  :finger:   http://slickproductions.org/forum/index.php?topic=1911.msg21576#msg21576
Title: Re: Spare NPC's
Post by: Grimoire LD on December 16, 2014, 10:24:58 AM
Would it be possible to change the world as part of the routine for entering an area? So, for instance, I enter Antlion's Den but instead of loading that it changes the world index first and then loads the map (whatever it may be - I'm too lazy to look it up right now)

Also - glad to see the forum back up and that you're still at it. I'm hoping with this semester done I can get back to business in here.  :happy:

Glad to see you back LordGarmonde! Yes, things have been a bit slower and this semester was absolutely terrible, but it's finally over for now. Chillyfeez answered your quandary well enough though in a much better way that I could have.
Title: Re: Spare NPC's
Post by: JCE3000GT on December 16, 2014, 12:42:03 PM
LOL Bonus points for the 7th Saga reference / picture.  I too loved that game until the ending...
Title: Re: Spare NPC's
Post by: LordGarmonde on December 17, 2014, 05:28:02 PM
Glad to see you back LordGarmonde! Yes, things have been a bit slower and this semester was absolutely terrible, but it's finally over for now. Chillyfeez answered your quandary well enough though in a much better way that I could have.

Thanks Grimoire LD! You guys always make me feel as welcome as Norm was every time he walked into Cheers.  :happy:

LOL Bonus points for the 7th Saga reference / picture.  I too loved that game until the ending...

Thanks JCE300GT! Since we all agree about the ending together we can collectively erase the world's memory of that part.  :wink:

 I'm curious - how did you guys play? I was generally very loyal - i.e. I'd pick one ally and stick with them forever. Over the years, though, I shifted - first taking on others until I got to my top pick - and just this last run (or two?) really cut-throating them: get 'em - steal their stuff - dump 'em.

The one thing that never changed was my hunting them - I always went around looking for them (like constantly) trying to pick fights. How 'bout you guys. That'd be an interesting mechanic to build into FF4. It seems easy enough to put any given character as an opponent in battle. I actually played around with a fight against Cecil, Kain and Rosa. Two notes about that: 1) Jump as an enemy command seems to imply "everyone jump" - or something similar, it was causing issues with more than one character enemy (clearly meant for solo opponents only) and 2) I remember having a spot of trouble with the optimal formation for multiple character enemies - I think it has something to do with how they lined up vertically: I recall that it worked pretty well when they were all staggered.  -- Now, where did I actually put that file...  :hmm:


 :edit:  - I just noticed I didn't even upload the right pic! It was one line too late  :blush: - oh well, all better!  :laugh:
Title: Re: Spare NPC's
Post by: JCE3000GT on December 17, 2014, 07:22:39 PM
I always have loyalty on game characters like this.  I do this for Final Fantasy 6, Chrono, Romancing SaGa, and Suikoden.  :D
Title: Re: Spare NPC's
Post by: chillyfeez on December 18, 2014, 12:46:25 AM
I seem to remember having trouble getting a second character to join up. After I made my first ally, usually everyone else just wanted to fight.
Been a long time since I played it, but I'm pretty sure my "dream team" was Lux and Esuna. The orange dude (what was he supposed to be, an alien or something?) was good too.
I also remember the music from the game being annoying enough that sometimes it made it hard to play for very long...
Title: Re: Spare NPC's
Post by: Grimoire LD on December 18, 2014, 11:05:36 AM
The one thing that never changed was my hunting them - I always went around looking for them (like constantly) trying to pick fights. How 'bout you guys. That'd be an interesting mechanic to build into FF4. It seems easy enough to put any given character as an opponent in battle. I actually played around with a fight against Cecil, Kain and Rosa. Two notes about that: 1) Jump as an enemy command seems to imply "everyone jump" - or something similar, it was causing issues with more than one character enemy (clearly meant for solo opponents only) and 2) I remember having a spot of trouble with the optimal formation for multiple character enemies - I think it has something to do with how they lined up vertically: I recall that it worked pretty well when they were all staggered.  -- Now, where did I actually put that file...  :hmm:


 :edit:  - I just noticed I didn't even upload the right pic! It was one line too late  :blush: - oh well, all better!  :laugh:
Interesting notes on Enemy skills, I was not aware it meant "everyone jump" I did try that a long time ago as a test on an Eagle and when they jumped they all came back down into the shape of Odin, bizarrely enough.

Yes, the game only takes basic animations into account while fighting characters and those animations are Attack (with the DeathBringer graphic, at All Times) and Special Graphic, used by Kain, Dark Knight, and Yang.

For a long time I've been considering an Ancient Cave-esque hack for FFIV but... FFIV's system is nowhere near as robust as FFV's wonderful setup as far as the game flow goes. FFV has 23 Job Classes, and 110 learnable spells, with over 40 commands, many innate skills (of which 1 exists in FFIV, Auto-Hide) and formulaic setups for various weapon types, where in comparison FFIV has 13 Job Classes, 72 Learnable spells, and 26 Commands.

Therefore creating a randomizer or an Ancient Cave hack is much more difficult in the long run as far as balancing matters go.

Title: Re: Spare NPC's
Post by: chillyfeez on December 19, 2014, 02:05:14 AM
Interesting notes on Enemy skills, I was not aware it meant "everyone jump" I did try that a long time ago as a test on an Eagle and when they jumped they all came back down into the shape of Odin, bizarrely enough.
That's weird. Maybe it has something to do with the graphic change that's assumed with Jump (and nonexistent for monsters)?

Quote
Yes, the game only takes basic animations into account while fighting characters and those animations are Attack (with the DeathBringer graphic, at All Times) and Special Graphic, used by Kain, Dark Knight, and Yang.
What about Girl?
Does Rydia "cast" the Titan spell? I would assume not, but I don't remember. I don't even remember if she uses the Special Graphic or if Titan just appears. But it seems like it would be really odd if she just stood there the whole time...

Quote
For a long time I've been considering an Ancient Cave-esque hack for FFIV but... FFIV's system is nowhere near as robust as FFV's wonderful setup as far as the game flow goes. FFV has 23 Job Classes, and 110 learnable spells, with over 40 commands, many innate skills (of which 1 exists in FFIV, Auto-Hide) and formulaic setups for various weapon types, where in comparison FFIV has 13 Job Classes, 72 Learnable spells, and 26 Commands.

Therefore creating a randomizer or an Ancient Cave hack is much more difficult in the long run as far as balancing matters go.
I think this could be a fun project. I remember you mentioning this maybe a year or so ago. Knowing what I know about the game's coding now, I think I could help with the actual randomization if you wanted to be in charge of the mostly-everything-else.
I've been trying to devise some way to randomize monsters' attacks - not formally, really, just occasionally giving thought to how such a thing would work within the game's battle script system. I haven't had any major breakthroughs on that front... But I think randomizing treasures and rooms within a dungeon would be doable. Even randomizing which battles occur, but within a balanced structure, shouldn't be too tough.
I don't know if I've mentioned this yet, but in the current WIP of A Threat from Within, I've worked out a "different battle sets depending on terrain (on the world map)" system that could be used to inform the basis of a "controlled semi-random encounters (I can't think of a better way to write that)" system.
Anyway, we both obviously have our own projects we're working on now, and I don't want to bite off more than I can vhew, but this sounds like a fun idea to kick around.
Title: Re: Spare NPC's
Post by: Grimoire LD on December 19, 2014, 04:06:31 PM
That's weird. Maybe it has something to do with the graphic change that's assumed with Jump (and nonexistent for monsters)?

That seems reasonable, though doesn't enemy Odin have some movement to him? It's been so long since I lost to him so I'm not really sure.

Quote
What about Girl?
Does Rydia "cast" the Titan spell? I would assume not, but I don't remember. I don't even remember if she uses the Special Graphic or if Titan just appears. But it seems like it would be really odd if she just stood there the whole time...

I was surprised as well, but she does literally just stand there, the entire time. The PSP version fixes this by making her react and summon naturally. (I should hope so! Disgracefully enough this was not fixed in the GBA version, I guess I shouldn't be surprised.)

Quote
I think this could be a fun project. I remember you mentioning this maybe a year or so ago. Knowing what I know about the game's coding now, I think I could help with the actual randomization if you wanted to be in charge of the mostly-everything-else.
I've been trying to devise some way to randomize monsters' attacks - not formally, really, just occasionally giving thought to how such a thing would work within the game's battle script system. I haven't had any major breakthroughs on that front... But I think randomizing treasures and rooms within a dungeon would be doable. Even randomizing which battles occur, but within a balanced structure, shouldn't be too tough.
I don't know if I've mentioned this yet, but in the current WIP of A Threat from Within, I've worked out a "different battle sets depending on terrain (on the world map)" system that could be used to inform the basis of a "controlled semi-random encounters (I can't think of a better way to write that)" system.
Anyway, we both obviously have our own projects we're working on now, and I don't want to bite off more than I can vhew, but this sounds like a fun idea to kick around.

I would Love to randomize enemy AI, I feel FFIV was far too linear in its planning, I mean FFIV is really the odd man out, FFI, II, and III all had randomized AI, IV does not, V, VI, and so on then have randomized AI from that time on. FFIV DS I believe also has randomized AI. I can sort of conceive of a system, writing a lot of one actions scripts that an enemy can choose from each turn, but how to actually program that in is near mind-boggling.

Randomizing treasure and warps would be a fun time, I'd think. I tried to set up a randomized warp a long while back, but the game is very finnicky with its exit and entrance coordinates. I imagine you may have found a way around that though. Increasing the scope of randomness could be very neat, any thoughts on how to make random events based on triggers or npc's?

You did mention the different enemy sets for terrain and it is a very neat idea.
Title: Re: Spare NPC's
Post by: chillyfeez on December 19, 2014, 04:26:56 PM
Random events should be completely doable, too.

The problem with AI is that I know very little about how the game interprets the AI data and decides what code to run as a result. I've seen where the AI scripts are loaded into RAM, though, so "watching" it happen shouldn't be too difficult. But the AI system is so convoluted, actually making sense of it all would likely take a while.
I tried to follow a monster's counter attack script in action once to see if PC counter attacks would be possible and it was kind of a nightmare.
Title: Re: Spare NPC's
Post by: LordGarmonde on December 19, 2014, 04:53:18 PM
I would Love to randomize enemy AI, I feel FFIV was far too linear in its planning, I mean FFIV is really the odd man out, FFI, II, and III all had randomized AI, IV does not, V, VI, and so on then have randomized AI from that time on. FFIV DS I believe also has randomized AI. I can sort of conceive of a system, writing a lot of one actions scripts that an enemy can choose from each turn, but how to actually program that in is near mind-boggling.

Agreed - I definitely noticed it more as I got older and played more of each game multiple times. Randomized AI though: that's something I was interested in too

I tried to follow a monster's counter attack script in action once to see if PC counter attacks would be possible and it was kind of a nightmare.

Before I set up my battle against the PCs (Cecil, Kain, Rosa) I spent a lot of time studying the monster AI and comparing the game at play to the code and trying to just get a better handle on it. "Nightmare" was a nice way to put it chillyfeez.  :wink: I ended up settling on some simple routines that I stole from other enemies and then repurposed. Like getting around the jump problem by having Kain jump only if he was the only one alive. Rosa I had cast Life 2 if someone went down - stuff like that. I can't even remember if Rosa actually worked or not, maybe just via "if solo" - but I'll have a look. I found (I think) the folder with the file in it - but naturally I was too excited that day to label anything properly...oops...   :blush:
Title: Re: Spare NPC's
Post by: Grimoire LD on December 19, 2014, 05:40:47 PM
Random events should be completely doable, too.

The problem with AI is that I know very little about how the game interprets the AI data and decides what code to run as a result. I've seen where the AI scripts are loaded into RAM, though, so "watching" it happen shouldn't be too difficult. But the AI system is so convoluted, actually making sense of it all would likely take a while.
I tried to follow a monster's counter attack script in action once to see if PC counter attacks would be possible and it was kind of a nightmare.


Random Events could be rather interesting, it is one of the main things Ancient Cave is lacking, and this seems like the most ideal way to set up a random party that you could build as you go on (and this is where the Shadow Party Hack could really come in handy).

I am still amazed that PinkPuff managed to make a readable format for the AI scripts, they are parsed and pieced into so many different forms (Index, Script, Conditionals, etc) it's ridiculous.

Quote
Before I set up my battle against the PCs (Cecil, Kain, Rosa) I spent a lot of time studying the monster AI and comparing the game at play to the code and trying to just get a better handle on it. "Nightmare" was a nice way to put it chillyfeez.  :wink: I ended up settling on some simple routines that I stole from other enemies and then repurposed. Like getting around the jump problem by having Kain jump only if he was the only one alive. Rosa I had cast Life 2 if someone went down - stuff like that. I can't even remember if Rosa actually worked or not, maybe just via "if solo" - but I'll have a look. I found (I think) the folder with the file in it - but naturally I was too excited that day to label anything properly...oops...   :blush:

How you did any of that in basic hex is far too much for me to consider. It's such a mess in plain hex. Thankfully when everything is parsed it's not too difficult to do what you will with it if you have the AI Index Reference chart in front of you, of course.
Title: Re: Spare NPC's
Post by: chillyfeez on December 20, 2014, 12:49:10 AM
Oh, I see where you're going with that now...
So, like, you enter room x (which would be picked at random from a given set of possibilities, but would be room x regardless) and there is an event call to a random event, picked from a set of given possibilities, and each possible event would be the addition of a different party member... And this could happen as many as four times in four rooms, until the party slots are all filled.
Title: Re: Spare NPC's
Post by: Pinkpuff on December 20, 2014, 06:18:59 AM
I am still amazed that PinkPuff managed to make a readable format for the AI scripts, they are parsed and pieced into so many different forms (Index, Script, Conditionals, etc) it's ridiculous.

It wasn't easy, I assure you! How long was I on the monster editor? A year or more? Anyway I did my best... glad to hear it's somewhat readable/understandable. I tried my best to explain it in the readme too.