so in the next version of hedigegger how will editing the AI work? will we be given a list of commands we can input and what attack we want them to link to or will it only do the simple stuff? It will be so usefull as making one mistake in hex editing can ruin a whole script.
Oh yes, it will be complicated. There's no way to make it easy. It will have to be done in assembler since I don't have the ability to compile. Theoretically it could, but it's not likely. AI Scripting for this game is just that complex.
The readme will come with a moderately detailed explanation on how to code in the assembler you're allowed, but it's up to you to decide how you want to do it all.
UPDATE:
Some may have noticed the new tag here, but not noticed anything new (unless I updated this of course
). What changed is the picture of the completed CharAI on the first post. It now
will end up looking like this. Cool, huh?
This is the way it will look in WM. It will look similar in Proud Clod as well. The interface is still just a little clumsy, but let me explain what it's got right now.
There are only six parts to it. It's got a character list, a script section list, a "Disassemble" button, a Total Script Size indicator, the actual code in assembler that can be edited, and a "translated" scrollable, copyable text box.
The asterisks by the character names and script section names indicates that there is a script linked to those (eg. "Cloud*" means Cloud has scripts while "Red XIII" does not and there is a "General Counter*" script while there is not a "Pre-Battle" one).
The total script size MUST NOT EXCEED 2048 BYTES! Any larger than that and the game won't load (seriously banged my head for a LONG while confused as to why my game wouldn't start
). This count updates when a script is edited so you can keep track of how much space you have left.
NOTE: Removing those pointless "Battle Love Character Points" script from the characters reduces used space from 1508 to 410! That should be more than enough to do several little things to most of the characters. I'd suggest leaving Vincent's Main script alone or his Limit Breaks won't work the same.
The editable code is conveniently separated into Opcode and Argument. If an Opcode is entered that requires an argument, this will conveniently add 0s equal to the required Argument length in the Argument column. More conveniently so, if an argument is typed that is too short, it makes it the appropriate length. Even MORE conveniently, if an Argument is typed where one is not allowed, it just removes it. If that weren't enough, the arguments are in Little Endian instead of Big Endian! (That means that the value 1 is stored as "0001" instead of "0100") That's a lot of convenience!!! And yes, I'm hyping all that because I can't compile code like "If Self.HP = 1". and get good results.
The "translated window" to the right will show the assembler version of what the codes mean. This probably won't mean much to some. But the "Disassemble" button will (
key word alert!)attempt(
key word alert!) to turn it into readable code similar to C or Java. It may or may not end up exactly the way the game will read it and it's mostly based on the existing scripts on characters.
And that's what I've got. Aside from one annoying interface fluke it's all fully functional. I'm now devoting more time trying to iron that out since my final is over.
UPDATE 2:
Look promising? Ignore the red text and the mis-aligned curly brackets.