Aslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1637.msg16344e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index3ac4.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;u=6;area=showposts;start=555e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index3ac4.html.zxh^@>MOKtext/htmlISO-8859-1gzip@MWed, 11 Mar 2020 08:35:09 GMT0 0Ph^M Possible new project - AI script discussion

Author Topic: Possible new project - AI script discussion  (Read 1971 times)

Djibriel

  • Karlabos
  • *
  • Posts: 32
  • Gender: Male
  • I am a Zen Buddhist crime fighting machine.
    • View Profile
    • Collapse of Heaven and Earth
Possible new project - AI script discussion
« on: June 26, 2011, 06:44:11 AM »
Figured I'd make a new topic

For those of you that are late to the party, I've been pondering the potential value of a new AI script document. Readability for the Amish and in-practice departures from what the AI script would have you believe would be the selling points over bover's (fine) document.

http://tenchinohoukai.cavesofnarshe.com/final_fantasy_iii_ai_1_0.txt


Assassin asked:
Quote
Djibriel said: I would like to avoid words like 'variable', 'set', 'clear' and 'increment' as much as possible.

why?  they're direct, and not really that esoteric.  it's not like it's "bytes" or "caches" or "floating point units" or "gigawatts".

some questions:
- what does "(loop)" mean, particularly when it's before an "(end if)"?  such ordering makes me think that the IF block will never terminate.
- it seems you use "PLUS" to indicate an additional command in a block being executed, but later in FlameEater's script, you seem to use "AND" in its place.

The mentioning of 'variable' is, I think, suboptimal since when you start reading an AI script, you don't know what the variable governs. You don't know when it's incremented, set or cleared, you only know (if you're reading top to bottom) which behavior it toggles. Especially where there are multiple variables, it gets confusing. Giving the variables names will immediately inform a reader what the purpose of that variable is. If the name is clear enough, anyway.

I've only seen set/clear in the context of technical discussions about SNES games' behavior, so I didn't think they'd be general knowledge. In addition, 'set' and 'clear' only have a meaning in relation to what sets and clears the variable, so "If Var036 is clear, do..." has no inherent meaning. "If 'Bomblet is set to go' is active, do..." however, does.

(loop) should be taken as (end turn, loop to start of AI script). Looking back, I think it's best to precede every turn with an "-" and conditions and additional actions lacking any symbol.

There were some mix-ups with PLUS and AND, but the distinction I think would be good to make is that AND means an additional condition, and that PLUS means an additional actions. As you can see, this was a rough first draft; should it really become a project, I'll need to think a lot about the clearest wording. Ideally, it would no explanation beyond the AI script itself.

The genius who created me only took care of my dashing good looks, my razor sharp wit and my irresistible attraction to the wrong women.

Djibriel

  • Karlabos
  • *
  • Posts: 32
  • Gender: Male
  • I am a Zen Buddhist crime fighting machine.
    • View Profile
    • Collapse of Heaven and Earth
Re: Possible new project - AI script discussion
« Reply #1 on: June 26, 2011, 06:50:08 AM »
Master Pug:

Master Pug will use WallChange every 15 global battle timer intervals, then use an attack linked to its weakness. However, after fighting Master Pug a few times to verify behavior, I've noticed that there is somewhat of a delay. From the (possible) document:

There is a footnote though: there is somewhat of a delayed reaction. After the
WallChange, Master Pug's elemental reaction appears to immediately kick in.
However, Master Pug is somewhat slow to adapt on the offense; for a small moment,
it will still work with the elemental properties from before the WallChange.
In Master Pug's turn comes up during this small period, it'll display 'wrong'
behavior and will either inflict a physical strike (after the very first
WallChange) or perform an attack linked to the previously owned weakness.


Also, Master Pug will take a stop towards the party every WallChange, and execute the following AI script (copy/paste from Lord J:)

 (WallChange and step)
1 added to VAR003
If variable VAR003 is greater than or equal to 7
Set VAR003 to 0
Targetting: random ally
Lore: !Cleaver

This would indicate that after 7 WallChange attacks, he'll use !Cleaver and retreat again. In practive, however, I've consistently counted 8 WallChange attacks. After messing a bit, I've noticed that the FC 0D command that Lord J translates with 'greater than or equal to' functions like 'greater than'. In this instance anyway. Both bover and myself have taken this information for gospel, but this is clearly not the case.

 :edit: During the FlameEater battle, the FC 0D command does appear to work as an "equal to". More testing is obviously required.

Areneid:


Areneid will check Terra's level; if it's sitting at 7 or higher, it will include !Numb in its AI script. They will also exclusively focus on Terra, though. Lord J's wording doesn't imply that they should, nor do I think that they should. My theory is that they'll mistakingly remember Terra as a target. Also note that Lord J includes the fact that if Terra isn't present any random character's level can be checked; without Terra though, they'll never use !Numb.

M-TekArmor:

There's a script in the M-TekArmor bit that counters any Magic spell that strikes an M-TekArmor to cause the M-M-M-Magic cutscene (but only one time). However, starting the first battle with M-TekArmors, this scene will play in any battle (Leaver, Bleary, Hornet, what have you) and it's triggered by any casting of Magic, be it offensive or curative (though the cutscene leans towards Terra performing some destructive act). So this is just a bit of useless AI script...?
« Last Edit: June 26, 2011, 11:21:50 AM by Djibriel »
The genius who created me only took care of my dashing good looks, my razor sharp wit and my irresistible attraction to the wrong women.

Deathlike2

  • FF4 R&D Master
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Possible new project - AI script discussion
« Reply #2 on: June 29, 2011, 12:38:51 AM »
M-TekArmor:

There's a script in the M-TekArmor bit that counters any Magic spell that strikes an M-TekArmor to cause the M-M-M-Magic cutscene (but only one time). However, starting the first battle with M-TekArmors, this scene will play in any battle (Leaver, Bleary, Hornet, what have you) and it's triggered by any casting of Magic, be it offensive or curative (though the cutscene leans towards Terra performing some destructive act). So this is just a bit of useless AI script...?


The script operates if it hasn't been triggered yet starting from the "boss" M-tek battle (which is triggered either before or when the battle starts). I would lean towards an event driven battle script hybrid.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

darkmage

  • Phantom Train
  • *
  • Posts: 339
  • Skating the Razor
    • View Profile
Re: Possible new project - AI script discussion
« Reply #3 on: June 30, 2011, 08:06:53 AM »


Areneid:


Areneid will check Terra's level; if it's sitting at 7 or higher, it will include !Numb in its AI script. They will also exclusively focus on Terra, though. Lord J's wording doesn't imply that they should, nor do I think that they should. My theory is that they'll mistakingly remember Terra as a target. Also note that Lord J includes the fact that if Terra isn't present any random character's level can be checked; without Terra though, they'll never use !Numb.

I was wondering why I would only see this if I was trying to power-level Terra before the boss M-Tek Armor scene. Now I know.  :bah: