Qhimm.com Forums

Final Fantasy Forums => Tools => FF7 Tools => Topic started by: Bosola on 2010-07-11 14:10:35

Title: [FF7] Automatic 'parser' for working with AI code and Welder (1.34)
Post by: Bosola on 2010-07-11 14:10:35
Link: Find the XLS file  here (http://libre-limitbreakeditorforff7.yolasite.com/modding-efforts.php).

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 (http://forums.qhimm.com/index.php?topic=9729.msg135359#msg135359) 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).

(http://img153.imageshack.us/img153/3476/autoparser.png)

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 (http://libre-limitbreakeditorforff7.yolasite.com/modding-efforts.php). 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.
Title: Re: Automatic 'parser' for working with AI code (and Welder)
Post by: NFITC1 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.
Title: Re: Automatic 'parser' for working with AI code (and Welder)
Post by: Bosola 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.
Title: Re: Automatic 'parser' for working with AI code (and Welder)
Post by: Bosola 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.
Title: Re: Automatic 'parser' for working with AI code (and Welder)
Post by: Gemini on 2010-07-13 08:41:05
Why not just updating Proud Clod and WallMarket to regenerate those jumps automatically? :(
Title: Re: Automatic 'parser' for working with AI code (and Welder)
Post by: Bosola on 2010-07-13 16:03:11
If NFITC1 wants to give me his sauce, sure.
Title: Re: Automatic 'parser' for working with AI code (and Welder)
Post by: NFITC1 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...?
Title: Re: Automatic 'parser' for working with AI code (and Welder)
Post by: sl1982 on 2010-07-13 17:12:05
Sauce = source
Title: Re: Automatic 'parser' for working with AI code (and Welder)
Post by: Bosola 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).
Title: Re: Automatic 'parser' for working with AI code (and Welder)
Post by: Gemini 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.
Title: Re: Automatic 'parser' for working with AI code (and Welder)
Post by: Bosola 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).
Title: Re: Automatic 'parser' for working with AI code (and Welder)
Post by: Bosola 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.
Title: Re: Automatic 'parser' for working with AI code (and Welder)
Post by: Armorvil on 2010-11-14 12:33:55
Wow, this is great! Thank you for this and Welder. You rock :D
Title: Re: Automatic 'parser' for working with AI code (and Welder)
Post by: Bosola 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.