øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1993.msg22294e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index5f0f.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1993.60e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index5f0f.html.zx%-g^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ…¬ê(OKtext/htmlISO-8859-1gzip0|Öê(ÿÿÿÿÿÿÿÿTue, 10 Mar 2020 06:17:32 GMT0ó°° ®0®P®€§²ð®$-g^ÿÿÿÿÿÿÿÿ6.ê( Final Fantasy IV: Side Project (Random AI Routine complete!)

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

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Final Fantasy IV: Side Project (Random AI Routine complete!)
« Reply #60 on: January 05, 2015, 11:18:24 PM »
No. Sorry, some stats affect all monsters, speed is among them. I can't recall specifically why I chose to do it that way, but I think part of it was to help level the playing field for monsters against major grinding... Which might have been silly.
The good news is that I did keep accurate notes about that patch, so reworking it is entirely possible if it's making things difficult. But as with other monsters, you can also try adjusting down the starting level in FF4kster if he's coming out too slow.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Final Fantasy IV: Side Project (Random AI Routine complete!)
« Reply #61 on: January 05, 2015, 11:33:30 PM »
No. Sorry, some stats affect all monsters, speed is among them. I can't recall specifically why I chose to do it that way, but I think part of it was to help level the playing field for monsters against major grinding... Which might have been silly.
The good news is that I did keep accurate notes about that patch, so reworking it is entirely possible if it's making things difficult. But as with other monsters, you can also try adjusting down the starting level in FF4kster if he's coming out too slow.

Indeed the clear reasoning why Speed would be affected is fully obvious, but I had thought that Bosses weren't supposed to be affected by the modding process? Was that a misunderstanding on  my part?

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Final Fantasy IV: Side Project (Random AI Routine complete!)
« Reply #62 on: January 06, 2015, 10:32:14 AM »
No. Sorry, some stats affect all monsters, speed is among them. I can't recall specifically why I chose to do it that way, but I think part of it was to help level the playing field for monsters against major grinding... Which might have been silly.
The good news is that I did keep accurate notes about that patch, so reworking it is entirely possible if it's making things difficult. But as with other monsters, you can also try adjusting down the starting level in FF4kster if he's coming out too slow.

Indeed the clear reasoning why Speed would be affected is fully obvious, but I had thought that Bosses weren't supposed to be affected by the modding process? Was that a misunderstanding on  my part?
Well, yes.
I left bosses largely unaffected so that they wouldn't be too easy or too hard during normal gameplay (read: not a speed-run and not overgrinding), but I also didn't want a situation where you go through a gauntlet of super powered regular foes only to fight a boss who dies in one round.
I'm not quite sure how I decided which stats would increase for bosses, though. It looks like speed and defense (base and multiplier, physical and magical) are affected regardless of whether the enemy is a boss, according to what I posted here:
http://slickproductions.org/forum/index.php?topic=1940.msg20858#msg20858
But the code also skips the stats it does by way of several branch Ops, so this can be adjusted easily, simply by changing some branch parameters.
« Last Edit: January 06, 2015, 10:38:05 AM by chillyfeez »

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Final Fantasy IV: Side Project (Random AI Routine complete!)
« Reply #63 on: January 06, 2015, 11:13:19 AM »
Ah, I see now. I should have read that better the first time around. Yes, that is probably the crux of the issue then. Maybe I want to decrease levels rather than increase them all-around now that I think about it, especially with a project like this since the ShadowMod splits experience into 13 by end-game as I recall correctly? This would better balance monsters; I flew to Agart and fought monsters around there at one point and the FlameDog surprisingly had 1 or so speed, 40-some HP, minimum attack, it was surprising but I see its purpose.

It's to balance it against a party's current level and that does leave open the possibility of throwing any variety of foes with very little worry that they would be too weak or too strong at a given point. Another idea for me would be to increase speed all around to assure that if it is being divided it's not made into nothing.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Final Fantasy IV: Side Project (Random AI Routine complete!)
« Reply #64 on: January 06, 2015, 03:35:33 PM »
Haha funny you should mention increasing speed.
In TfW, there is one monster (a tree type) that I wanted to be slow, but strong (you know, cuz it's a tree). Problem was, I didn't put a lower limit into this code, so whereas the tree started with something like 2 speed, when it was leveled down, its speed actually increased to something astronomically high.
So that is definitely something to watch out for...

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Final Fantasy IV: Side Project (Random AI Routine complete!)
« Reply #65 on: January 06, 2015, 10:53:52 PM »
Haha funny you should mention increasing speed.
In TfW, there is one monster (a tree type) that I wanted to be slow, but strong (you know, cuz it's a tree). Problem was, I didn't put a lower limit into this code, so whereas the tree started with something like 2 speed, when it was leveled down, its speed actually increased to something astronomically high.
So that is definitely something to watch out for...

Haha, yeah. I could see something like that causing problems, good thing you caught it though. On my side everything has been moving smoothly I have all of the Random AI set up until most of Mt. Hobbs.

For bosses I was thinking of generally leaving them alone, except I was considering replacing all of the Fiend's "Fight" commands with Random AI to mimic their counterparts from FFI so Milon for the first phase could use...

Sleep-Slow-Hold-Lit2 and Milon Z would use Fire2-Haste-Ice2,-Sleep Gas...

Now I can even set this so that the mode that the Fiends are currently in for the other three switch the Random AI by switching their Magic Evasion during battle, since it is used a grand total of twice in the game and never to any truly noticeable effect. (a new post incoming on my main topic by the way of the means to modify the AI commands that change stats. With free space and the right Jumps you can do a lot of things here.)

I think I also have a solution for the Exp. problem (at least at first, since you can only get a maximum of 65,500 Exp per battle) is to x13 all of the possible Exp. from foes and at the start of the game add and remove all party members to assure they are developing in the Shadow Party; this solves two problems, a need to massively balance the party for when someone drastically lower joins the group and make sure battles are still relevant, by default battles become less and less important due to the diminishing returns from battle.



chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Final Fantasy IV: Side Project (Random AI Routine complete!)
« Reply #66 on: January 07, 2015, 12:08:47 AM »
That's a clever idea about experience, but you should try multiplying by 9 or 13/5 or 9/5, not 13.

The reason (again) is to curtail grinding abuse.

Let's use the hypothetical example of a battle that yields 100 exp...

In the original game, this would get divided by as much as 5 (depending upon the amount of living active party members), then the result would be distributed to all living members and the entire shadow. An enterprising grinder could, though, kill off four party members. Then the one living character and the entire shadow gets 100 each.

Now, let's look at what would happen in the shadow hack...
With all members alive or in the shadow (that is, nobody dead or not yet activated), each character would be awarded 7 or 8 exp (100/13).
Well, you wouldn't want to multiply by 13, because then everyone gets 100, and if there are four dead party members, then everyone gets 144.

If you multiply by 9 (900), then a full party gets 69 and 100 with four dead bodies.

9/5 (180) yields 13 and 20 respectively

13/5 (260) yields 20 and 28.

Or you could try some other "improper" fraction...
9/2 (450) yields 34-50
13/2 (650) yields 50-72

It depends on what you want the upper and lower limits to be, I guess, but you don't want your balancing attempt to give the player an unfair advantage.


Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Final Fantasy IV: Side Project (Random AI Routine complete!)
« Reply #67 on: January 07, 2015, 06:39:24 AM »
You present a persuasive argument. In all reality it's probably best to make the default Exp. a little lower, nothing too extreme (as it is by default) but enough to make battles feel like they are worth fighting. I may touch up the drops or drop rates, nothing insane like Combat Boost's drop tables though, that was several weeks of proper planning to make that work as intended, just little things here and there to make battle feel worth fighting. So x9 actually feels the most appropriate.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Final Fantasy IV: Side Project (Random AI Routine complete!)
« Reply #68 on: January 07, 2015, 11:54:21 PM »
I think I've noticed a slight oversight with your LevelUp Mod, Chillyfeez. I tried this plan and was met with some bizarre results, despite all characters being added and removed the mod still thinks that there's a Level 25 and Level 50 in the party and that's because removing a character only removes the very first byte' all of their other data is still kept intact. Your mod looks to see if a Level is present to determine whether to include them in APL, this seems a bit risky as it throws off the intended APL.

I see the danger on changing that 2002 as it is also used to store the Level if there is one present. Do you have any suggestions on this regard? I can foresee this causing several problems down the line.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Final Fantasy IV: Side Project (Random AI Routine complete!)
« Reply #69 on: January 08, 2015, 12:24:15 AM »
Oooh, yeah.

That certainly is a problem. I'll probably have to rework the routine a bit to fix it.
Now that you mention it, there's probably nothing in there that tells it to ignore dead party members either, which I think I would want to do.

Gimme a little time on this one, I'm not positive I'll have the time to fix it before I go away for the weekend, but it's high on the priority list - especially since this is an issue that would manifest in TfW, too.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Final Fantasy IV: Side Project (Random AI Routine complete!)
« Reply #70 on: January 11, 2015, 08:37:13 PM »
Hey, Grimoire. So when I find the time over the next week, I'll be working on a fix for the level-up patch APL problem.
While I'm doing that would be as good a time as ever to change which boss stats are affected... Any thoughts about that, since you were talking about it recently?

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Final Fantasy IV: Side Project (Random AI Routine complete!)
« Reply #71 on: January 13, 2015, 11:44:39 AM »
Hmm, I'm wondering if the decreases/increases in Speed are far too drastic all around. HP and all of that seem reasonable, but speed is probably the most important stat a monster has, my thought is possibly to increase/decrease that by 25% rather than 50% when stats are adjusted.

As for bosses though, I do like the idea that they should balance, but I think they should Balance Up, I don't think they should be effected if their level is higher and the party runs into them. But if a higher level APL is to run into them their stats should be adjusted up as if they were a normal foe.

I like the idea of normal foes of having higher-lower adjusted stats though as it means that there can be a Much greater variety of foes unbound by levels and the like.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Final Fantasy IV: Side Project (Random AI Routine complete!)
« Reply #72 on: January 13, 2015, 03:25:59 PM »
So:
1) reduce the degree to which speed is affected, and
2) have bosses adjust up but not down.

I like those ideas a lot. I think I'll even make those changes in my own hack. Thanks!

The rewrite will be pretty significant, but not particularly difficult - the relative level calculation will remain the same (except for the part about skipping empty slots), only the stats affected will have to change. So it'll take a while to fix, but should be worth it in the end.

 :edit:
Do you think this mod could benefit from a level-appropriate exp adjustment while I'm at it?
It would have to be entirely separate coding from the stat adjustment, because stats are populated at the beginning of battle and exp is figured at the end. I can store the adjustment ratio in some unused stat record bytes, though - monsters have plenty of them. The purpose of something like that would be so that people don't exploit the mod against, say, Flamedogs around Eblan (probably many possibilities in the Underworld, too).
« Last Edit: January 13, 2015, 04:29:46 PM by chillyfeez »

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Final Fantasy IV: Side Project (Random AI Routine complete!)
« Reply #73 on: January 13, 2015, 05:41:52 PM »
So:
1) reduce the degree to which speed is affected, and
2) have bosses adjust up but not down.

I like those ideas a lot. I think I'll even make those changes in my own hack. Thanks!

The rewrite will be pretty significant, but not particularly difficult - the relative level calculation will remain the same (except for the part about skipping empty slots), only the stats affected will have to change. So it'll take a while to fix, but should be worth it in the end.

 :edit:
Do you think this mod could benefit from a level-appropriate exp adjustment while I'm at it?
It would have to be entirely separate coding from the stat adjustment, because stats are populated at the beginning of battle and exp is figured at the end. I can store the adjustment ratio in some unused stat record bytes, though - monsters have plenty of them. The purpose of something like that would be so that people don't exploit the mod against, say, Flamedogs around Eblan (probably many possibilities in the Underworld, too).

I'm glad you like the idea! When it comes to FFIV I like to think I have a pretty good head for balancing the game out, but I do tend to skew towards the more challenging side; I am glad to hear this mod being revamped.

Oh yes. The Exp is a major issue with the mod as it stands. I noticed that though the FlameDog had only 48 HP at Level 1 they still yielded 1000's of Exp.  I am glad that you reminded me of that. Without it, it's a hurdle to properly balance enemies in areas they originally weren't.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Final Fantasy IV: Side Project (Random AI Routine complete!)
« Reply #74 on: January 15, 2015, 12:00:20 PM »
I'm making some progress on the new level adjustment code today. Hopefully I can finish it soon.
The way it will work is this:
All normal monster stats will adjust the same as before, except for Agility. Agility will adjust by half the difference it was adjusting before.
So, if a Monster normally had an agility score of 0x10, and the adjustment ratio would normally adjust it up to 0x20, then it will instead adjust to 0x18.
Likewise, if a Monster had an agility score of 0x10 and the ratio would adjust it down to 0x08, then it will adjust down to 0x0C instead.
So the agility changes will be half as drastic as all other stat changes.

As for Bosses...
If the boss monster's starting level is higher than the adjusted APL, then there will be no effect on the Monster's stats at all (boss monsters will not weaken under any circumstances).
If the boss monster's starting level is lower than the adjusted APL, then all stats will adjust as though the Boss was a normal monster (Weaker bosses will get significantly harder the higher your party's level).

I still have to debug the APL calculations before this is complete, but he new coding jumps to a subroutine to calculate APL, so making changes is easy to do without disturbing the rest of the code.


As for Exp adjustment...
I haven't begun that portion yet, but if I recall correctly, what the game does is look at the monster types and quantities and simply perform some calculations based on those figures to determine the total experience award.
This presents a bit of an issue with adjustments, since a different adjustment cannot be made for each individual monster.
SO, my plan is to save each monster's adjustment ratio in the unused stat bytes 2012,x and 2013,x (base wisdom and willpower). At the end of the battle, an average adjustment ratio will be calculated, and the total experience award will be multiplied by this number.
This will make things kinda weird if you fight a battle against, say, an Imp and an EvilMask (I know, this generally will never happen, but you get my point), because the adjustment average will be close to nothing.
For most normal battles, though, this will work nicely, I think...