[PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)

  • Thread starter Thread starter nfitc1
  • Start date Start date
Status
Not open for further replies.
sure go ahead.

[edit]
New version works perfectly! Thank you very much. Now I can start hacking  :evil:  :-)
 
Last edited:
somehow i cant install Microsoft Visual Basic Power Packs 3.0  :/
when its finishing it gives this error

"Cannot register types for DXCore assembly"

any ideas?
directX 9.0c (4.09.0000.0904)
any ideas to fix this?  :|
 
sure go ahead.

[edit]
New version works perfectly! Thank you very much. Now I can start hacking  :evil:  :-)
Great! That version I gave you had a few tweaks that I'll upload to the main file. It doesn't have any major changes (I'm not sure that most people will notice what it fixes) so it won't get its own version number. At best it'll be 1.2.0a or something.

somehow i cant install Microsoft Visual Basic Power Packs 3.0  :/
when its finishing it gives this error

"Cannot register types for DXCore assembly"

any ideas?
directX 9.0c (4.09.0000.0904)
any ideas to fix this?  :|
Not from me. Can you get a screenshot when the error comes up and expand the error to show any details?
 
64gw2t.jpg



incase u cant watch it well like that, direct link: http://i44.tinypic.com/64gw2t.jpg
 
incase u cant watch it well like that, direct link: http://i44.tinypic.com/64gw2t.jpg
What the heck is Refactor! 1.3? That doesn't have anything to do with the powerpacks link on the first post.

EDIT:
Wanna know what I've been doing?
Code: [Select]
Code:
Midgar Zolom :Init:0x0000 11 00200x0003 60 080x0005 900x0006 11 00400x0009 60 020x000B 900x000C 73Main:0x0000 02 20600x0003 01 40800x0006 800x0007 60 000x0009 400x000A 70 001E0x000D 12 20700x0010 02 20A00x0013 820x0014 900x0015 60 200x0017 61 01B80x001A 920x001B 72 00960x001E 01 00000x0021 60 000x0023 71 00290x0026 72 002E0x0029 60 010x002B 71 00310x002E 72 00360x0031 60 020x0033 71 00540x0036 12 20700x0039 02 20A00x003C 820x003D 900x003E 60 200x0040 61 01B90x0043 920x0044 11 00000x0047 01 00000x004A 60 010x004C 300x004D 900x004E 72 00950x0051 72 00540x0054 810x0055 01 00200x0058 340x0059 520x005A 01 00400x005D 500x005E 70 007C0x0061 12 20700x0064 02 20A00x0067 820x0068 900x0069 60 200x006B 61 01BA0x006E 920x006F 11 00400x0072 01 00400x0075 60 010x0077 310x0078 900x0079 72 008A0x007C 12 20700x007F 02 20A00x0082 820x0083 900x0084 60 200x0086 61 01B90x0089 920x008A 11 00000x008D 810x008E 60 020x0090 340x0091 900x0092 72 00950x0095 910x0096 73General Counter:0x0000 02 20600x0003 01 40800x0006 800x0007 60 000x0009 400x000A 70 001A0x000D 12 20600x0010 11 40880x0013 800x0014 60 010x0016 900x0017 72 00240x001A 12 20600x001D 11 40880x0020 800x0021 60 060x0023 900x0024 02 20600x0027 03 41600x002A 800x002B 02 20600x002E 03 41800x0031 800x0032 60 080x0034 330x0035 60 030x0037 320x0038 430x0039 01 00200x003C 60 050x003E 400x003F 500x0040 70 00580x0043 12 20700x0046 02 20A00x0049 900x004A 60 200x004C 60 540x004E 920x004F 11 00200x0052 60 040x0054 900x0055 72 01080x0058 02 20600x005B 03 41600x005E 800x005F 02 20600x0062 03 41800x0065 800x0066 60 080x0068 330x0069 60 040x006B 320x006C 430x006D 01 00200x0070 60 060x0072 400x0073 500x0074 70 00A40x0077 01 00400x007A 60 020x007C 400x007D 70 009B0x0080 12 20700x0083 02 20600x0086 02 40D00x0089 800x008A 900x008B 60 200x008D 61 01BA0x0090 920x0091 11 00400x0094 01 00400x0097 60 010x0099 310x009A 900x009B 11 00200x009E 60 050x00A0 900x00A1 72 01080x00A4 02 20600x00A7 03 41600x00AA 800x00AB 02 20600x00AE 03 41800x00B1 800x00B2 60 080x00B4 330x00B5 60 050x00B7 320x00B8 430x00B9 01 00200x00BC 60 070x00BE 400x00BF 500x00C0 70 00CC0x00C3 11 00200x00C6 60 060x00C8 900x00C9 72 01080x00CC 02 20600x00CF 03 41600x00D2 800x00D3 02 20600x00D6 03 41800x00D9 800x00DA 60 080x00DC 330x00DD 60 060x00DF 320x00E0 430x00E1 01 00200x00E4 60 080x00E6 400x00E7 500x00E8 70 01080x00EB 12 20700x00EE 02 20600x00F1 900x00F2 60 200x00F4 61 02010x00F7 920x00F8 12 20600x00FB 11 40800x00FE 800x00FF 60 050x0101 900x0102 11 00200x0105 60 070x0107 900x0108 73
There's plenty more where that came from too. There's a massive txt file now (1,602,747 bytes) containing all the enemies' AI in this format. Well, at least, all the enemies that HAVE AI.
There are 114231 "lines" of assembler code in the scene file.
There are 1544 scripts in same.
The longest script is 2682 bytes long (there are two of them) and is on Eligor's main script (a monster in the north train graveyard after fighting Aps).
The average script length is 157 bytes.
Total Script size (all scripts combined) take up approximately 238114 bytes. That's roughly 12% of all the uncompressed scene data.
Opcode usage statistics:
Code: [Select]
Code:
code usage00 329601 300802 1063503 163510 258911 404412 812313 38030 99031 26932 43933 46334 131335 37436 9837 2240 468641 8342 30043 45044 15245 12550 75551 22352 105460 1966461 417762 7970 438971 174672 627273 154475 080 843081 131182 266883 26884 10285 7786 30687 22990 1241491 56292 347793 40794 1595 53996 0A0 49
Pretty cool stuff. Sorta. To me anyway. :(

UPDATE:
Big Oops! I just realized that 62 only gives an argument of three bytes and type 03 is probably just as long. *sigh* That changes quite a lot. I'll have to change WM just a bit (fortunately not much) to account for that. You'd think a 32-bit system could hold a 32-bit value in its stack....
 
Last edited:
wow i feel so stupid now... :cry: :cry:
I'm sorry. I didn't mean to make you feel stupid. I just want to get it working for you. Install the PowerPacks properly and it'll work.
 
Now that it is possible to equip a third Limit Break to each level using WM, does anyone know how to unlock those Limit Breaks ingame?
 :oops: Can't believe it took me this long to realize just what a stupid question that was.  Everyone, thank you for not embarrassing me with a reply.
 
EDIT:
Wanna know what I've been doing?
Hmmmm, so, how's ProudClod coming along?  8-)

And I've noticed a couple of things about Wallmarket's AI editing. Is the program not supposed to be able to make new scripts for characters? It seems that I can only edit ones that already exist (my apologies if this has already been answered somewhere else).

And I think that the instructions on using the 44 and 45 opcodes in the "if-conditions" part of the help file are the wrong way around; when I programmed Cloud to use heal when his health dropped below a certain point I needed to use the 45 opcode to make it work.
 
EDIT:
Wanna know what I've been doing?
Hmmmm, so, how's ProudClod coming along?  8-)
Getting closer. It just crashes on certain scripts, but that's probably because of the error I noticed yesterday (now I know what the trouble was. Attempting to fix now...).

And I've noticed a couple of things about Wallmarket's AI editing. Is the program not supposed to be able to make new scripts for characters? It seems that I can only edit ones that already exist (my apologies if this has already been answered somewhere else).
I don't think this was ever even asked, but if you select a new script and press Enter then it will begin a new script.

And I think that the instructions on using the 44 and 45 opcodes in the "if-conditions" part of the help file are the wrong way around; when I programmed Cloud to use heal when his health dropped below a certain point I needed to use the 45 opcode to make it work.
This is not surprising. the helpfile's documentation on the opcodes is no where near complete and I think it's only moderately accurate. I'm still working on improving it since I did release it before it was totally complete. I'll have a new one up today with the fix of the 62 code. That might even fix Proud Clod up for release status.
 
Last edited:
I don't think this was ever even asked, but if you select a new script and press Enter then it will begin a new script.

Hmmm, whenever I do that I get this (I have .NET Framework 3.5 and Visual Basic Power Packs 3.0):


Code: [Select]
Code:
************** Exception Text **************System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index   at System.Collections.ArrayList.get_Item(Int32 index)   at System.Windows.Forms.DataGridViewSelectedCellCollection.get_Item(Int32 index)   at WallMarket.Form1.EditCharAI_KeyPress(Object sender, KeyPressEventArgs e)   at WallMarket.Form1.AISectionList_KeyUp(Object sender, KeyEventArgs e)   at System.Windows.Forms.Control.OnKeyUp(KeyEventArgs e)   at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)   at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)   at System.Windows.Forms.Control.WmKeyChar(Message& m)   at System.Windows.Forms.Control.WndProc(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)
I've also been getting this when editing my more heavily modded (and therefore bigger) KERNEL.BINs:

Code: [Select]
Code:
************** Exception Text **************System.OverflowException: Arithmetic operation resulted in an overflow.   at WallMarket.Form1.Load_Growth()   at WallMarket.Form1.OpenKERNELBINToolStripMenuItem_Click(Object sender, EventArgs e)   at WallMarket.Form1.Form1_Load(Object sender, EventArgs e)   at System.EventHandler.Invoke(Object sender, EventArgs e)   at System.Windows.Forms.Form.OnLoad(EventArgs e)   at System.Windows.Forms.Form.OnCreateControl()   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)   at System.Windows.Forms.Control.CreateControl()   at System.Windows.Forms.Control.WmShowWindow(Message& m)   at System.Windows.Forms.Control.WndProc(Message& m)   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)   at System.Windows.Forms.ContainerControl.WndProc(Message& m)   at System.Windows.Forms.Form.WmShowWindow(Message& m)   at System.Windows.Forms.Form.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)
The latter doesn't stop me doing anything (I think), so it hasn't really bothered me.
 
I don't think this was ever even asked, but if you select a new script and press Enter then it will begin a new script.

Hmmm, whenever I do that I get this (I have .NET Framework 3.5 and Visual Basic Power Packs 3.0):


Code: [Select]
Code:
************** Exception Text **************System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index   at System.Collections.ArrayList.get_Item(Int32 index)   at System.Windows.Forms.DataGridViewSelectedCellCollection.get_Item(Int32 index)   at WallMarket.Form1.EditCharAI_KeyPress(Object sender, KeyPressEventArgs e)   at WallMarket.Form1.AISectionList_KeyUp(Object sender, KeyEventArgs e)   at System.Windows.Forms.Control.OnKeyUp(KeyEventArgs e)   at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)   at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)   at System.Windows.Forms.Control.WmKeyChar(Message& m)   at System.Windows.Forms.Control.WndProc(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)
This, at least, has been resolved now. Did some things out of order like trying to find the selected cell when there were no cells. That's bad.

I've also been getting this when editing my more heavily modded (and therefore bigger) KERNEL.BINs:

Code: [Select]
Code:
************** Exception Text **************System.OverflowException: Arithmetic operation resulted in an overflow.   at WallMarket.Form1.Load_Growth()   at WallMarket.Form1.OpenKERNELBINToolStripMenuItem_Click(Object sender, EventArgs e)   at WallMarket.Form1.Form1_Load(Object sender, EventArgs e)   at System.EventHandler.Invoke(Object sender, EventArgs e)   at System.Windows.Forms.Form.OnLoad(EventArgs e)   at System.Windows.Forms.Form.OnCreateControl()   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)   at System.Windows.Forms.Control.CreateControl()   at System.Windows.Forms.Control.WmShowWindow(Message& m)   at System.Windows.Forms.Control.WndProc(Message& m)   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)   at System.Windows.Forms.ContainerControl.WndProc(Message& m)   at System.Windows.Forms.Form.WmShowWindow(Message& m)   at System.Windows.Forms.Form.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)
The scripts in the KERNEL.BIN should not take up more than 2048 bytes. That's all the game will handle. If the growth section is larger than 3988 bytes uncompressed (I think that's the size), then the game will not run at all. Compressed size isn't an issue so I don't think that's a big deal. It might be the script in it that's causing the problem. I identified the problem with loading Ruby Weapon's script because it has a jump to an address with a "73" in it. That's the code to end the script and that's what I was using to end the AI loading. That's worse! Errors abound when this happens. I'm in the process of fixing that now and we'll see if that is the issue.
The script size issue has been fixed, it just takes a while for longer scripts to load. Ruby Weapon's script took about 50+ seconds to load and Eligor's Main (which does have the longest script) ... I started it about a minute and a half ago and it's still loading. :) Be VERY patient with the enemy AI. The longer ones just take a while, but the length-based errors have been accounted for and won't cause errors anymore.

Forget what WAS here. My readme example sucked. My logic is fine
 
Last edited:
I tried proudclod 1.0. this program can change the AI of the enemies, right? So, you can add dialogue to the fighting as well as fighting the scorpion? I have tried to do with Scene Edit but have not managed to change the script...  :? :
 
I tried proudclod 1.0. this program can change the AI of the enemies, right? So, you can add dialogue to the fighting as well as fighting the scorpion? I have tried to do with Scene Edit but have not managed to change the script...  :? :
Sure can. Just make sure that if you do you also make the characters pause. There's documentation in WallMarket's helpfile on how to do that under command 92h.
 
Ah, now I can make new scripts!

And I think I'm going to have some fun with ProudClod as well. Virtual cake for you  :-D

I changed my name because this is what I use everywhere else; I doubt it will be enough to confuse anyone.
 
Just a question...

Do you have to start a new game when you edit the scene.bin file? Because it surprised me when I could use my old saves with the modified kernel.bin.
 
Just a question...

Do you have to start a new game when you edit the scene.bin file? Because it surprised me when I could use my old saves with the modified kernel.bin.
...I never had to start a new game in either case. I guess it depends on what you edit in the KERNEL.BIN, but editing the scene.bin should be safe.
 
Hey, great work here N.

I just noticed something with Proud Clod. I was checking out my new enemies with it, and the program seem to be importing scripts from other scenes on certain enemies. For instance, in scene 4 (or 3 zero based) I made a new enemy called Jinx. I only made a Pre-Battle and Main script, but according to PC it has All the counters as well, except magical (The CGeneral and CPhysical are from the standard chocobo AI). As far as I know it only happens with my new enemies.

I should thank you as well 'cause I discovered some bugs in my mod.  :-D

Just a question...

Do you have to start a new game when you edit the scene.bin file? Because it surprised me when I could use my old saves with the modified kernel.bin.
No, but certain things will be messed up. Like Current Materia AP vs Master. And editing initial data is pretty useless (the initial savemap).
 
Fantastic work, with relatively simple enemy AI editing I finally have all the needed tools for a FF7 rebalancing hack.

There's a bug with it though: If you check/edit a scene (let's use scene 93 in this example - MP, Guard Hound, Smogger), then move to another scene (let's use scene 78 - Mono Drive, Grunt, 1st Ray) it doesn't unload AI scripts that don't exist in the new scene properly. 1st Ray now has Smogger's PreBattle script in the example used. Only one scene can be edited at a time as is.
 
Status
Not open for further replies.
Back
Top