Author Topic: [FF7] Automatic 'parser' for working with AI code and Welder (1.34)  (Read 7023 times)

Bosola

  • Fire hazard!
  • No life
  • *
  • Posts: 1753
  • Karma: 15
    • View Profile
    • My YouTube Channel
Link: Find the XLS file  here.

Don't like working with AI code in Proud Clod and Wallmarket, but need it to keep track of addresses and the size of your code? Fear not. The 'autoparser' is simply an excel document that automatically traces the addresses and size.

Simply start typing into it and 'autoparser' will automatically work out the address of the next line, so you don't need to keep track of the number of bytes in each line. The only limitation is that it doesn't work if AI code displays text on the battle marquee.

It also includes templates for Welder that automatically work out correct jumps for the next plugin / footer, wherever you paste them into your script. If you haven't read the Welder thread, that won't mean much to you, but basically, Welder is a means by which newbies can very easily put together quite intricate and playable AI scripts without having any knowledge of the battle engine's pseudo-assembler. I recommend reading the thread - this excel document contains the latest versions of the plugins (as have been corrected and informed by Akari, NFITC1 and Terence Fergusson).



Above: The 'hex address' values in the leftmost column are generated automatically. Just type and go.

Plugins have variables for the 'author' to change marked in red. If it has four characters, remember to use a word (two bytes, ie 0-FFFF) rather than a single byte (0-FF).

You can find the xls sheet here. Both Excel and OpenOffice Calc will open it. It's nothing special, just a pretty simple excel formula sheet, but I thought it might be handy to have.

I will post a fuller tutorial on using this spreadsheet soon.
« Last Edit: 2014-07-17 20:46:09 by Covarr »

NFITC1

  • No life
  • *
  • Posts: 2845
  • Karma: 71
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Automatic 'parser' for working with AI code (and Welder)
« Reply #1 on: 2010-07-11 16:32:54 »
The only limitation is that it doesn't work if AI code displays text on the battle marquee.

Why not? Why can't it do this?

Don't get me wrong. I greatly approve of this.

Bosola

  • Fire hazard!
  • No life
  • *
  • Posts: 1753
  • Karma: 15
    • View Profile
    • My YouTube Channel
Re: Automatic 'parser' for working with AI code (and Welder)
« Reply #2 on: 2010-07-11 17:14:22 »
Because excel isn't smart enough to be able to 'count' FF7-text strings and opcode/argument strings in different ways. Well, it can, but it's complicated and breaks compatibility between OOoCalc and Microsoft Office Excel.

Bosola

  • Fire hazard!
  • No life
  • *
  • Posts: 1753
  • Karma: 15
    • View Profile
    • My YouTube Channel
Re: Automatic 'parser' for working with AI code (and Welder)
« Reply #3 on: 2010-07-12 20:28:08 »
Update: The old version of the xls document was incorrect in a few small ways

1. It used the wrong comparator for IQ branching
2. It read HP in the 02 scope in one of its templates

Sorry about this. Have updated; will keep you posted if any other problems appear.

Gemini

  • Insane poster
  • *
  • Posts: 260
  • Karma: 2
  • Not learner's Guru
    • View Profile
    • Devil Hackers
Re: Automatic 'parser' for working with AI code (and Welder)
« Reply #4 on: 2010-07-13 08:41:05 »
Why not just updating Proud Clod and WallMarket to regenerate those jumps automatically? :(

Bosola

  • Fire hazard!
  • No life
  • *
  • Posts: 1753
  • Karma: 15
    • View Profile
    • My YouTube Channel
Re: Automatic 'parser' for working with AI code (and Welder)
« Reply #5 on: 2010-07-13 16:03:11 »
If NFITC1 wants to give me his sauce, sure.

NFITC1

  • No life
  • *
  • Posts: 2845
  • Karma: 71
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Automatic 'parser' for working with AI code (and Welder)
« Reply #6 on: 2010-07-13 16:54:40 »
What do you mean "regenerate jumps"? It already reassigns them if necessary as you edit (current release is slow at this, but the upcoming one is much better).

Sauce? Wha...?

sl1982

  • Administrator
  • No life
  • *
  • Posts: 3678
  • Karma: 41
  • GUI Master :P
    • View Profile
Re: Automatic 'parser' for working with AI code (and Welder)
« Reply #7 on: 2010-07-13 17:12:05 »
Sauce = source

Bosola

  • Fire hazard!
  • No life
  • *
  • Posts: 1753
  • Karma: 15
    • View Profile
    • My YouTube Channel
Re: Automatic 'parser' for working with AI code (and Welder)
« Reply #8 on: 2010-07-13 17:23:59 »
POAST ME YOUR DELICIOUS SAUCE

But seriously, folks. The point of the excel spreadsheet is just that coding in the PC interface is like, no offence, pulling teeth. Copy-pasting is problematic, the interface is quite clunky  and you can't easily zip between incomplete lines. I know there are reasons you put these into place, but they can be quite restrictive at times. This is just another environment which makes it easy to prepare code, esp. those using Welder (which I'm determined to push on the community, because I (naturally) think it's the bee's knees).
« Last Edit: 2010-07-13 17:29:24 by Bosola »

Gemini

  • Insane poster
  • *
  • Posts: 260
  • Karma: 2
  • Not learner's Guru
    • View Profile
    • Devil Hackers
Re: Automatic 'parser' for working with AI code (and Welder)
« Reply #9 on: 2010-07-13 18:39:08 »
So you made this because working on the code with WM/PC is a royal pain in the ass and you'd rather do it in some other editor? :o Hmm, I think I may have a solution to this problem: a proper parser. Shouldn't be too hard to adapt the one I made for FIELD to also work with AI commands.

Bosola

  • Fire hazard!
  • No life
  • *
  • Posts: 1753
  • Karma: 15
    • View Profile
    • My YouTube Channel
Re: Automatic 'parser' for working with AI code (and Welder)
« Reply #10 on: 2010-07-13 19:13:59 »
In an ideal world I'd have a compiler that could translate FF6-AI scripts into true FF7 AI code or somesuch.

Also, updated the document again - one of the templates used the wrong logic (I'm now all but certain the comparators in the WM/PC help file need revision).
« Last Edit: 2010-07-13 21:26:21 by Bosola »

Bosola

  • Fire hazard!
  • No life
  • *
  • Posts: 1753
  • Karma: 15
    • View Profile
    • My YouTube Channel
Re: Automatic 'parser' for working with AI code (and Welder)
« Reply #11 on: 2010-11-13 20:36:54 »
Another update to the file has been made. Please see the link in the first post for the latest change.

As always, if you find bugs, please contact me.

At some point, I should probably produce a newbie-friendly, comprehensive guide to using Welder. But I think the plugins need to be bugchecked further before proceeding to push it as a 'standard' method of AI scripting. I'd do more testing myself, but Real Life (TM) hasn't made things easy this last six months.

Armorvil

  • Freak
  • *
  • Posts: 621
  • Karma: 0
  • Working on : FFVII Total Grudge
    • View Profile
Re: Automatic 'parser' for working with AI code (and Welder)
« Reply #12 on: 2010-11-14 12:33:55 »
Wow, this is great! Thank you for this and Welder. You rock :D

Bosola

  • Fire hazard!
  • No life
  • *
  • Posts: 1753
  • Karma: 15
    • View Profile
    • My YouTube Channel
Re: Automatic 'parser' for working with AI code (and Welder)
« Reply #13 on: 2010-12-24 15:30:11 »
Upgraded to version 1.34

Bugfix: Typo in 'find enemy with / without two statuses'

Also, a tip: make sure your spreadsheet is treating all values as text. I've found, when copying and pasting, that Microsoft Excel likes to assume you're dealing with numbers. This can disrupt the way the Welder templates autocalculate the jumps. I'm also having problems with these jumps in Excel 2010 for some reason - the parser itself just isn't working properly.

If you're using Excel 2007+, it might be a good idea to double-check the jumps. Ideally, though, you should stick to OOCalc - that's what this spreadsheet was written for.
« Last Edit: 2010-12-24 15:58:41 by Bosola »