### Author Topic: [PSX/PC] Battle editor - Proud Clod (1.5.0/FINAL)  (Read 273863 times)

#### NFITC1

• Posts: 2947
• I just don't know what went wrong.
##### Official Proud Clod 1.0 Topic
« Reply #225 on: 2009-08-10 19:52:29 »
In the animation, huh? That makes sense. More sense than letting the damage calculation handle it. I just couldn't see any other difference between 50h and 00h so I thought that was it. I'll take that description out for the next version.

EDIT: I understand what the difference is now. 00h does absolutely nothing and 50h will cause no damage, but still attempt to perform status effect changes. This will be clarified in the future.
« Last Edit: 2009-08-12 03:16:50 by NFITC1 »

#### Akari

• Posts: 766
##### Official Proud Clod 1.0 Topic
« Reply #226 on: 2009-08-10 20:08:00 »
In the animation, huh? That makes sense. More sense than letting the damage calculation handle it. I just couldn't see any other difference between 50h and 00h so I thought that was it. I'll take that description out for the next version.

Damage calculation byte really not ome value but two. Upper 4 bit and lower 4 bit.
byte XY where X - handles different type of  hit/critical and Y - are the actual function that calculates damage.
Exeptions are X == 6,7 and A.
If X == A then it uses not standart function to calculate base damage and then use standart X == 1, Y == 1 (11)
If X == 6 or 7 then it calls 0x10 + Y function to calculate damage. But it still use upper function 6 and 7 to calculate hit/critical.

By the way - list of some lower damage calculation functions that I already reversed (I named them the same as in the TFergusson documentation)
Code: [Select]
`    formula = w[address + a4]; // lower    switch (formula)    {        case 00: lower_function_00; break;        case 01: lower_function_01; break; // physical damage        case 02: lower_function_02; break; // magical damage        case 03: lower_function_03; break; // current hp% or current mp%        case 04: lower_function_04; break; // max hp% or max mp%        case 05: lower_function_05; break; // magical heal        case 06: lower_function_06; break; // fixed damage        case 07: lower_function_07; break; // item damage        case 08: lower_function_08; break; // recovery        case 09: lower_function_09; break; // not used        case 0a: lower_function_0a; break; // not used        case 10: lower_function_10; break; // custom 00 white wind (damage = current hp of attacker)        case 11: lower_function_11; break; // custom 01 (damage = max hp - current hp)        case 12 13 14 15 16 17: break;        case 18: lower_function_18; break; // custom 08 ()34E20A80 195CE20A80 1aA0E20A80 1b18E30A80 1c78E30A80 1d        default: return;    }`

#### ARMs

• Posts: 164
##### Official Proud Clod 1.0 Topic
« Reply #227 on: 2009-08-11 01:52:20 »
Deleted.  It was an off topic question.
« Last Edit: 2009-08-11 03:38:46 by ARMs »

#### Karifean

• Posts: 60
##### Official Proud Clod 1.0 Topic
« Reply #228 on: 2009-08-17 16:27:31 »
Got a question: Will PrC be able to change models of enemies in next version? I've been looking for a possibility to do that easily.

Oh, and what animation ID will hide the attack name?

#### NFITC1

• Posts: 2947
• I just don't know what went wrong.
##### Official Proud Clod 1.0 Topic
« Reply #229 on: 2009-08-17 20:10:36 »
Got a question: Will PrC be able to change models of enemies in next version? I've been looking for a possibility to do that easily.

Yes and no. Enemy ID is related to the Model ID. You could theoretically change the Nibel Wolf to look like one of Ruby Weapon's Tentacles if you wanted, but if you do that be sure you change all relevant AI to that enemy ID (won't effect the Nibel Wolf, but can effect other things, esp Boss minions).

Oh, and what animation ID will hide the attack name?

This depends on the animation and the enemy. Typically, the general attack animation (0h I think) will not display the name.

UPDATE: I'm about three steps away from having PrC and WM ready to be released into versions 1.3. I'm still trying to make it save changes into a smaller legally-distributable-friendly file to be loaded into either WM or PrC (I've wanted this since before WM 0.9). I also need to write a documentation for PrC. Other than that I believe all the known bugs have been fixed and planned features have been added.
I also have a list of the unknown list of values in Enemy Data (0x68-0x87) all sorted by Enemy ID. From initial inspection, these range from 6h to 189h and only a few of the values in between are used. 113h seems to be the most popular. This list seems to be unique to Enemy ID, not Enemy and Scene IDs.

There are 46 enemies with a value other than NULL in index 0, 142 with index 1, 139 with index 2, 103 with index 3, 62 with index 4, 56 with index 5, 40 with index 6, 23 with index 7, 17 with index 8, 13 with index 9, 10 with index 10, 12 with index 11, 8 each with indexes 12, 13, 14 (ie, not the same 8, but some overlap exists), and two with index 15.

#### Akari

• Posts: 766
##### Official Proud Clod 1.0 Topic
« Reply #230 on: 2009-08-17 20:39:16 »
Code: [Select]
`I also have a list of the unknown list of values in Enemy Data (0x68-0x87) all sorted by Enemy ID. From initial inspection, these range from 6h to 189h and only a few of the values in between are used. 113h seems to be the most popular. This list seems to be unique to Enemy ID, not Enemy and Scene IDs.There are 46 enemies with a value other than NULL in index 0, 142 with index 1, 139 with index 2, 103 with index 3, 62 with index 4, 56 with index 5, 40 with index 6, 23 with index 7, 17 with index 8, 13 with index 9, 10 with index 10, 12 with index 11, 8 each with indexes 12, 13, 14 (ie, not the same 8, but some overlap exists), and two with index 15.`
This is camera movement id for attacks. 0x10 2 bytes values.
« Last Edit: 2009-08-17 20:44:02 by Akari »

#### NFITC1

• Posts: 2947
• I just don't know what went wrong.
##### Official Proud Clod 1.0 Topic
« Reply #231 on: 2009-08-17 20:54:34 »
This is camera movement id for attacks. 0x10 2 bytes values.

Instead of camera movement for attacks, which is stored in the attack data itself, how about camera movement for animation? I'd be willing to wager that's what that is.

#### Akari

• Posts: 766
##### Official Proud Clod 1.0 Topic
« Reply #232 on: 2009-08-17 21:02:23 »
This is camera movement id for attacks. 0x10 2 bytes values.

Instead of camera movement for attacks, which is stored in the attack data itself, how about camera movement for animation? I'd be willing to wager that's what that is.

There is no such thing as camera for animations.
If data in enemy is set then it will be used instead data from attack.

Code: [Select]
`if (FP == -1){    [address + 60] = w(hu[S4 + 8]); // set single camera from attack    [address + 64] = w(hu[S4 + a]); // set multiple camera from attack}else{    [address + 60] = w(FP); // set camera from enemy data    [address + 64] = w(FP); // set camera from enemy data}`
This camera data selected and used after attack calculation. Or just after action...Maybe we must call this actions instead of attacks, because not all of them harm or heal enemy. Some of them just play animations or do some other things.

It's easy to understand why it was done this way. During development all attacks was in one list or database and enemy just set id for attack they used (it was compiled into scene files lately during export procedure). Attacks define most commonly used camera movement. But some enemies require different camera, and programmers made that you can overwrite camera for specific enemy.
« Last Edit: 2009-08-17 21:19:23 by Akari »

#### NFITC1

• Posts: 2947
• I just don't know what went wrong.
##### Official Proud Clod 1.0 Topic
« Reply #233 on: 2009-08-17 21:56:53 »
Action Camera Index it is then. Sounds good to me.

PrC now edits these values. With the exception of that one little bit at 0x9A, virtually the entire scene.bin can be edited with either PrC or Hojo! Enemy IDs are now editable with PrC and the fourth word of every scene (at 0x06) will remain uneditable since it will do nothing (except maybe crash the game).

Other good news: The modification I'm making to allow saving changes will also work with changes made via Hojo! How cool is that?

UPDATE: I'm sorry for the lack of updates lately despite the progress I'm making. I'm going to update this post instead of making a new one so I can still post a new message and bump it up once it's ready.

I believe PrC is ready to roll, but I'm waiting on my midget slaves to finish the text changes to the WallMarket changes files. They (and by they I mean the voices in my head) warned me that the texts might not be the same lengths like I'm assuming all other parts will be. So rather than saving changes or the whole segment of strings, I'm just saving the entire string that was changed. This SHOULD save on time and space, but I'm having issues with finding the end of the segment and file. I'll need to play with it some more soon.

I'm almost done with documentation on Proud Clod. I need to write up an explanation of the camera preview mode, but for some reason it's not working on DX10. Stupid MS.

In more domestic news, my wife who has been gone for six weeks returned recently so I've been spending more time with her than with WM or PrC (as any GOOD husband would do). Also, I just today got a signed contract for our first house together. It's a brand new house that construction isn't even complete on, but we're happy with everything about it. Ergo, I'll be moving soon. Good news, though. Work is about to slow to a crawl as we're changing a pretty vital function that we all do. I'll be able to do things with it at work so it will get finished barring my de-armitation (or whatever you'd call that) or death.
« Last Edit: 2009-08-25 20:40:13 by NFITC1 »

#### Karifean

• Posts: 60
##### Official Proud Clod 1.0 Topic
« Reply #234 on: 2009-08-18 07:24:31 »
Sounds very nice!!

Btw, I'm aware of the problems I would get if I change Model IDs - because of the scripts in the AI that change animations. I simply wanted to create a new enemy and assign the right model.

#### Chrysalis

• ESUI Developer
• Global moderator
• Posts: 348
##### Official Proud Clod 1.0 Topic
« Reply #235 on: 2009-08-28 15:45:01 »
ok guys sorry if this sounds dumb, but how do I edit enemy AI, I dont mean how do I use the app to change values  I mean how do I learn what each value does etc.

See I know in the game safer seph first move is wall followed by shadow flare, yet the attacks are listed in a completely different order in the editor.

This is what I want to achieve as an initial test.

Seph to heal himself probably with a full cure (capped to 30k hp on my limit config) every time he moves to flying position or to close position so twice every full cycle.
Seph to counter with either comet2 or ultima everytime attacked.
To make heartless angel be used when down to 66% hp instead of 25% hp.

#### Kudistos Megistos

• Banned
• Posts: 3929
##### Official Proud Clod 1.0 Topic
« Reply #236 on: 2009-08-28 19:24:41 »
The order in which you see attack IDs in the AI has nothing to do with the order in which those attacks are used in battle

Have you looked at the AI tutorial that comes in the Wall Market help file? It gives some basic help with starting to edit AI. You should also look at enemies that do things similar to what you're trying to do and see how their AI works.

Now, on to some more practical stuff. SOLDIER 3rd checks to see if it's HP is less than 1/4, 2/4 or 3/4 of its max. It goes like this :

Code: [Select]
`02 206003 41608002 206003 41808060 043360 * this number is the fraction /4 that it checks3243`
Sephiroth's check for a fraction of his HP goes like this:

Code: [Select]
`02 206003 41608002 206003 41808060 043344`
So, what would happen if Sephy's script were changed to this?

Code: [Select]
`02 206003 41608002 206003 41808060 033360 023243`
I think it would check to see if he has less than 2/3 of his max HP and then do the attack. I haven't checked this, however, and it might be completely wrong. You'll also have to fix the jumps in his script, and you can do that yourself (if you don't, the game will die)

See if you can get that working for now.
« Last Edit: 2009-08-28 19:26:26 by Kudistos Megistos »

#### NFITC1

• Posts: 2947
• I just don't know what went wrong.
##### Official Proud Clod 1.0 Topic
« Reply #237 on: 2009-08-29 02:30:30 »
Have you looked at the AI tutorial that comes in the Wall Market help file? It gives some basic help with starting to edit AI.

Careful with these, though. Some of them are wrong. Like the randomly assigning statuses won't work the way I said it would. I still haven't confirmed that loops work at all either. Let me test that real quick...

Apparently it does:
Code: [Select]
`72  001193  2C 4F 4F 50 00 54 45 53 54 FF72  001472  000373`
This actually works so I'd guess if I didn't have that 72  0014 in there it'd loop infinitely....

NO! DON'T CREATE AN INFINITE LOOP! The game hangs and I couldn't get out of it other than resetting the computer. Fortunately, Firefox is awesome and saves sessions.

Dang, I just realized that I wasted the "new post" I was saving for the next version. Someone else post something so I won't be accused of double posting...
« Last Edit: 2009-08-29 02:32:20 by NFITC1 »

#### sl1982

• Posts: 3757
• GUI Master :P
##### Official Proud Clod 1.0 Topic
« Reply #238 on: 2009-08-29 02:38:59 »
Something

• Posts: 287
##### Official Proud Clod 1.0 Topic
« Reply #239 on: 2009-09-05 21:33:11 »
ok, so you tease with a new version, and never  post about it, you meanie

heh  ... anyway i found an issue with the copy/paste function when trying to insert into a fresh AI section (as in when you just hit enter, and all that is there is the end statement), it will all paste in fine and all, but when you exit, the copied data is all gone, and it acts as if it has nothing in it at all. i noticed that the little * next to the section showing that  it is modified is not there when you just hit enter to add new data, the end statement doesn't seem to be considered as "something" in the section  , and copying doesn't seem to count as something added either, but it is fixed if you type in anything, delete it and then copy over, maybe having the end statement automatically trigger the "contains data" *  would be a simple fix for it?

also, on a similar note, it doesn't seem to like copying over if you are in the middle of modifying data, as in you type in 60, press enter, and while in the value section you hit copy, it will produce an error, but if you click continue (nothing is shown in the section), then click a different section and return, everything copied over fine  .

Edit: and another addition to this problem with the paste function, it seems that trying to paste anything without modifying something beforehand results in nothing being retained when the AI editor is closed, just like with it not keeping the changes if you start from a fresh section. it apparently has something to do with the pasted data itself then, it probably needs to be what gets counted as changed data then, not the end statement, because that would only fix new sections, not the rest

also, about your search function, it would probably be better if it had the possibility of having a case sensitive searching style (little check box  ), because searching for specific enemies (MP for example) will bring up scenes with multiple enemies with mp in the name, like jumping and the sample enemies. it would also be nice if it would allow you to do other things within PrC (trying to click anything gives the beep error because you have the window up still, not sure if you can easily do that), so you can look at the scenes with the enemies you searched up, and modify as you go, rather than having to memorize/write down the scenes and modify it like that.
« Last Edit: 2009-09-06 22:00:20 by secondadvent »

#### NFITC1

• Posts: 2947
• I just don't know what went wrong.
##### Official Proud Clod 1.0 Topic
« Reply #240 on: 2009-09-08 02:50:01 »
ok, so you tease with a new version, and never  post about it, you meanie

I told everyone that it's going to be coming out the same time WM is. I'm not entirely done with WM so just WAIT.

heh  ... anyway i found an issue with the copy/paste function when trying to insert into a fresh AI section (as in when you just hit enter, and all that is there is the end statement), it will all paste in fine and all, but when you exit, the copied data is all gone, and it acts as if it has nothing in it at all. i noticed that the little * next to the section showing that  it is modified is not there when you just hit enter to add new data, the end statement doesn't seem to be considered as "something" in the section  , and copying doesn't seem to count as something added either, but it is fixed if you type in anything, delete it and then copy over, maybe having the end statement automatically trigger the "contains data" *  would be a simple fix for it?

also, on a similar note, it doesn't seem to like copying over if you are in the middle of modifying data, as in you type in 60, press enter, and while in the value section you hit copy, it will produce an error, but if you click continue (nothing is shown in the section), then click a different section and return, everything copied over fine  .

Easy enough fix I suppose. It's going on the current row's address to determine copy range. I can make it where it will select the next valid row's address instead.

Edit: and another addition to this problem with the paste function, it seems that trying to paste anything without modifying something beforehand results in nothing being retained when the AI editor is closed, just like with it not keeping the changes if you start from a fresh section. it apparently has something to do with the pasted data itself then, it probably needs to be what gets counted as changed data then, not the end statement, because that would only fix new sections, not the rest

You may be right. It's probably not flagging it as a change. I'll get that fixed easily enough.

also, about your search function, it would probably be better if it had the possibility of having a case sensitive searching style (little check box  ), because searching for specific enemies (MP for example) will bring up scenes with multiple enemies with mp in the name, like jumping and the sample enemies. it would also be nice if it would allow you to do other things within PrC (trying to click anything gives the beep error because you have the window up still, not sure if you can easily do that), so you can look at the scenes with the enemies you searched up, and modify as you go, rather than having to memorize/write down the scenes and modify it like that.

I've come to the conclusion that this has now reached suite-level proportions. There are indeed too many windows for a causal user to juggle. Rather than it all be driven from the Attack editing window, this needs to be nested in a larger window with child windows. I'm thinking something like Lunar Magic, but if you'd rather it might be easier to restrain it all into a larger window rather than let them roam about like the F-Zero track editor. Goodness knows it'll be easier on the code if I do that. I have too much code embedded in that main frame that each of the other frames use. This is unacceptable to me now. After 1.3 is released I'll work on adapting it to that end. PrC will apparently have a version 1.4 that I never wanted to do. It's necessary now though; So I don't regret it.

Now someone post again so I won't double post when 1.3 is finished. And blame secondadvent for me posting before the next version is done. Any more comments from me will likely wait until after 1.3 is released. Feel free to continue making suggestions. Just know that I might not respond to them right away.

• Posts: 287
##### Official Proud Clod 1.0 Topic
« Reply #241 on: 2009-09-08 06:07:44 »
i agree that something like that would probably be better... some of the stuff i have trouble keeping track of, and smaller code segments are always easier to keep track of  . and you always like to blame me huh?
« Last Edit: 2009-09-08 06:09:54 by secondadvent »

#### NFITC1

• Posts: 2947
• I just don't know what went wrong.
##### Official Proud Clod 1.0 Topic
« Reply #242 on: 2009-09-11 14:14:55 »
New version now. Be happy.

Oh yes, in case you haven't seen it: http://forums.qhimm.com/index.php?topic=8876.0

• Posts: 287
##### Official Proud Clod 1.0 Topic
« Reply #243 on: 2009-09-12 04:59:41 »
ok... i think it is definitely happy worthy  .

and i did see that thread... as soon as you happened to show it to me  . anyway, i will have to play around with the new PrC/WM a good bit now .

EDIT: and i also found a bug that is preventing me from redoing Guard Scorpion's main, because i end up with something along the lines of this:

it ends up massively screwing up the messages for whatever reason, and if i do not modify the text at all, and add anything else to the AI, it ends up crapping out right after the "Locked on Target" message, so i am assuming they are connected. i haven't tried from a fresh scene.bin as of yet, i only tried my original redone GS AI, and my more recent one, so I will get back with the results.

and it does create the same error when changing the original GS's main AI, and here is an error i get when trying to return to the main after modifying and leaving/returning to it's main:

Code: [Select]
`System.IndexOutOfRangeException: Index was outside the bounds of the array.   at ProudClod.Form2.FF7BattleScript(Byte[] NameArray, UInt16& StartPlace)   at ProudClod.Form2.AISectionList_SelectedIndexChanged(Object sender, EventArgs e)   at System.Windows.Forms.ListBox.OnSelectedIndexChanged(EventArgs e)   at System.Windows.Forms.ListBox.set_SelectedIndex(Int32 value)   at ProudClod.Form2.CharacterAINameList_SelectedIndexChanged(Object sender, EventArgs e)   at System.Windows.Forms.ListBox.OnSelectedIndexChanged(EventArgs e)   at System.Windows.Forms.ListBox.WmReflectCommand(Message& m)   at System.Windows.Forms.ListBox.WndProc(Message& m)   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)`
when it had the error disassembling, it says an error is at or before the byte after the end of the main AI, not sure what that means, since the AI is fine otherwise :/.

and i also checked some other AI sections of different enemies, and it seems to only affect those that have the 93 command in use, and the bug only occurs if something is changed, the code will compile fine beforehand, so any text that was in originally will disassemble correctly, but any change breaks it.

i also assume that you added in the auto jump repointing (since my jumps just happened to repoint to the correct location, and i was at a loss as to why until i remembered you saying about that at some point, though i didnt see it in the list of changes ), and so far that is working wonderfully... i was feeling kinda lazy while "fixing" the MP's machine gun range issue (enemies do not seem to have long range attacks for back row ignoring), and what do you know the editor helped me out a bit  . this is off topic, but i was tired of the enemy range issue, since there were enemies designed to attack differently with back row enemies, also taking into account their own row (which was broken itself  ), and so i decided that since being in the back row halves damage, i just made the same attack (machine gun/beam gun as examples) with an unused index, and made it's power twice the normal, and only being able to be used on a back row (or the enemy is in the back row) target, essentially negating the halved damage  .
« Last Edit: 2009-09-12 09:27:24 by secondadvent »

• Posts: 287
##### Official Proud Clod 1.0 Topic
« Reply #244 on: 2009-09-13 05:02:14 »
ok, not entirely sure if you meant for it to be done solely in the new raw format, or a mix of normal and hex (as i suspect), but as of right now only encoding in the new raw format will allow changes to be made, making it done in regular text no longer works.

#### NFITC1

• Posts: 2947
• I just don't know what went wrong.
##### Official Proud Clod 1.0 Topic
« Reply #245 on: 2009-09-13 13:27:45 »
Uh-huh....! Ya know, I think it's not terminating that string correctly when it re-writes the script. It's supposed to be terminated by FFh, but it looks like I'm terminating it with 00h. This is pretty significant and I'll have to look at it again to see what's happening. Odd, though. This didn't happen when I was testing it the first time.

IN THE MEAN-TIME: Add "opcode" FFh after all string calls. Like this:

Code: [Select]
`0x025  93  Locked on Target0x037  FF0x038  11  0060`
That will "correctly" terminate the strings and allow the reading to work. There will just be an extra space at the end. Keep in mind, this will have to be done after every edit. Sorry. It's the only work-around I can think of for now.

Yes, it can/should be a mix of the raw and string formats.

• Posts: 287
##### Official Proud Clod 1.0 Topic
« Reply #246 on: 2009-09-13 21:56:35 »
well, that is better than the way i was doing it (typing the string in raw format), so i think i will have a go at GS now  . when i re-redid mono drive, i just waited on doing the text until last, and since the repointing is working nicely, it wasn't too hard to do, but adding FF sounds a bit easier to keep track of

#### NFITC1

• Posts: 2947
• I just don't know what went wrong.
##### Official Proud Clod 1.0 Topic
« Reply #247 on: 2009-09-14 15:14:10 »
OK, I fixed the issue secondadvent brought up. Texts in battle will now save correctly. I have also made this change to WallMarket too so it will work as well. It looks like only a few dozen people downloaded it so plz re-dl it. If anyone wants to bump WM's thread with that info, be my guest.

This is why I don't want anyone else to try to host these. They're constantly changing. Oh well, water under the bridge...

With the exception of a few bug fixes, there's only two things I can do to PrC to make it better. See the documentation for further details.

#### chocofeather

• Guest
##### Official Proud Clod 1.0 Topic
« Reply #248 on: 2009-09-17 00:41:48 »
Seems I underestimated this little jem of a program....