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

  • Thread starter Thread starter nfitc1
  • Start date Start date
Status
Not open for further replies.
By the way, NFITC1, contact me through ICQ about detail about AI opcodes. I can explain how any opcode works. I just too lazy to write about it.
I looked at your documentation about opcodes and found a lot of missing things. For example about 0x96 opcode =)
 
Last edited:
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.
Oops! Definitely something that needs to be addressed. I didn't ever run into that when I was just testing to see if it was reading individual scenes. I'll get this fixed ASAP (but likely later in the day today).

By the way, NFITC1, contact me through ICQ about detail about AI opcodes. I can explain how any opcode works. I just too lazy to write about it.
I looked at your documentation about opcodes and found a lot of missing things. For example about 0x96 opcode =)
I would greatly appreciate your help in writing those documentations. I wrote what's currently in the help file mostly from memory and what little documentation I had on them. Also I felt in a hurry to finish it so I could release what I had as soon as I could.
Granted, 96 was the most peculiar as it's only used once. And I don't see any evidence that 90 would take all the arguments that Fergusson says it will. That doesn't mean it won't, it just might never get used that way or I just never noticed it.
I'll have to start an ICQ account. I used to have one, but it was so long ago I don't remember the number.
 
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.
Ok that answers my question. Great!
Once again good work NFITC1. It's a lot easier moding AI now.
 
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.
Ok that answers my question. Great!
Once again good work NFITC1. It's a lot easier moding AI now.
This issue has now been resolved. It was a very simple fix, but the reason I didn't think I'd get it done this early is because I wanted to be lazy today. Well, it all works out now so whatever. :) The link on the first post has been changed.
I also caught another bug that only happens in one case (that I found). In scene 12 the first enemy is a Mu and the third enemy is a Levikron. These both have scripts, but the second monster in this scene was apparently removed, but it still has a script. All it is is a 73h where the Main script WOULD be, but it sort of errors out because it has no name. In that case the program acts weird because it thinks that monster's name doesn't exist. I solved that too.
 
And maybe you need to simplify things in descriptions cause a lot of things is difficult to understand, because they magic numbers. For example addreses where battle ai stores values.
0x0000, 0x2000 and 0x4000 are not understandable, but "unit variable array" (0x0000), "battle global structure" (0x2000) and "unit data structure" (0x4000) are much more convinient.
So opcode 0x90 store data to current "unit variable array" (you can think of it as current unit variable array, because you can set variable only to current unit), can store to global battle structure (which is only one), or it can set values to unit data structures by mask.

It may be good idea to add descriptions of this structures with addreses to easier understanding =)
 
I also caught another bug that only happens in one case (that I found). In scene 12 the first enemy is a Mu and the third enemy is a Levikron. These both have scripts, but the second monster in this scene was apparently removed, but it still has a script. All it is is a 73h where the Main script WOULD be, but it sort of errors out because it has no name. In that case the program acts weird because it thinks that monster's name doesn't exist. I solved that too.
The second monster was not removed.  It's the hole in the ground that is used for a part of the Mu's battle model.  There are nameless monsters in other scenes too, such as the Trickplay's hole, Rufus's helicopter, and in the scene with Palmer, there's the Tiny Bronco and the Shinra Truck.
 
I also caught another bug that only happens in one case (that I found). In scene 12 the first enemy is a Mu and the third enemy is a Levikron. These both have scripts, but the second monster in this scene was apparently removed, but it still has a script. All it is is a 73h where the Main script WOULD be, but it sort of errors out because it has no name. In that case the program acts weird because it thinks that monster's name doesn't exist. I solved that too.
The second monster was not removed.  It's the hole in the ground that is used for a part of the Mu's battle model.  There are nameless monsters in other scenes too, such as the Trickplay's hole, Rufus's helicopter, and in the scene with Palmer, there's the Tiny Bronco and the Shinra Truck.
Oh yeah. I forgot about those things being different enemies. Regardless, the problem still existed and was fixed. I also just realized another potential problem, but this one won't be caused by Proud Clod. If a user makes the total scripts greater than 4095 Proud Clod will still attempt to save when told to, but either won't succeed or it WILL succeed and make a scene larger than the game will handle. I forgot to add error checking to this point, but that count is there so the user knows NOT to make the size go higher than that. *sigh* I guess I should fix that shouldn't I? I'll be lazy about that. WM won't do that. I was smart enough to check for that before saving.....

And maybe you need to simplify things in descriptions cause a lot of things is difficult to understand, because they magic numbers. For example addreses where battle ai stores values.
0x0000, 0x2000 and 0x4000 are not understandable, but "unit variable array" (0x0000), "battle global structure" (0x2000) and "unit data structure" (0x4000) are much more convinient.
So opcode 0x90 store data to current "unit variable array" (you can think of it as current unit variable array, because you can set variable only to current unit), can store to global battle structure (which is only one), or it can set values to unit data structures by mask.

It may be good idea to add descriptions of this structures with addreses to easier understanding =)
I'm all about making things easier to understand. I wrote all that documentation in several sittings so it's bound to have inconsistancies in it. So let's get together and get it to be more accurate and consistant. I'd like to have a wiki or forum where all these things can be discussed, but I'm not cool enough to know how to get one started. :(
 
Ok here is the thing.. i really like the model of the Buster Blade made by APZ.. so i want to amp up the weapons stats so i could use it throughout the game... or just replace the models of the other swords... i tried both and i couldnt figure out how to overwrite the kernal so the data would be in game...

If anyone knows what to do... I truly believe im inept.. please offer aid ^.^

Okay i am unsure as of what to do... i have a version of it i am unsure which.......... and what im doing now is trying to make the Buster Blade have really high stats.... i can get that far... but how do i implement it into the game?

Thank you,
   Broken Crow
 
Last edited:
Ok here is the thing.. i really like the model of the Buster Blade made by APZ.. so i want to amp up the weapons stats so i could use it throughout the game... or just replace the models of the other swords... i tried both and i couldnt figure out how to overwrite the kernal so the data would be in game...

If anyone knows what to do... I truly believe im inept.. please offer aid ^.^

Okay i am unsure as of what to do... i have a version of it i am unsure which.......... and what im doing now is trying to make the Buster Blade have really high stats.... i can get that far... but how do i implement it into the game?

Thank you,
   Broken Crow
This will greatly depend on if you're modifying the PC or the PSX version.

1. Are you using WM 1.2.1? 1.1.8 had saving issues.
2. Are you telling it to create the kernel after you make your changes?

If you're modifying the PC version make sure that your KERNEL.BIN is in the FFVII/Data/kernel folder and is called KERNEL.BIN. If it's the PSX version...you'll have to ask someone how to inject it into the ROM image 'cause I don't know how to do that.
 
If you are going to import a file into a psx iso, you can use cdmage, but if the file becomes too large, it will truncate it, though i don't see the kernel getting bigger by much if any (though the scene.bin easily can, but if you have some decent programming knowledge, and know how to edit enemy AI, you will quickly see how badly much of the AI was written with a lot of unnecessary repetition, and shaving down on that saves some room ^^). if the file somehow becomes smaller, that is fine, since it will just add FF for the missing stuff. i was working on the psx version (before learning ai editing), but m scene file got too big so i moved to the pc version (cousin was kind enough to give me his ^^), but before that i had no trouble adding files to the psx iso with cdmage.

for a psx iso, when you open it you must chose m2/2352 track from the popup menu (else it will not read it right if at all), move to the directory on the iso that has the older file (the INIT folder), right click on the kernel (or whichever file you want to replace, such as the scene.bin, which is in the battle folder), and click import file. from there it will take you to a browser, so find your new kernel and click on it (it will warn you if it is too big or too small, though only too big is bad, unless you removed important parts from the kernel somehow), then it will quickly replace the old with the new, and you can test from there.

though for the pc version it is easy as copy and paste, and if you can't do that then i can't help you  :evil:

nfitc1, what all is needed to make an enemy, such as the MP, use, say the fire spell? from what i have seen, it is likely that it is a problem with their limited animations (only the tonfa attack and machine gun animations), that they lock up when trying to cast fire (camera moves like it is being casted, then sits there, requiring a ctrl+q exit), as when i set their attack animation (in the hex, setting both the attack and animation in the enemy data section correctly) to either of the two they are able to use, they can perform the attack, but it looks like their normal attack, no magic casted, but the damage is that of the fire spell, not very useful. now i was able to give a mono drive the vacuum ability (from bloatfloats) that shares the same animation index as fire, and it did show the vacuum attack right, and not the fire spell. i still need to test and see if the mono drive can use other spells (likely), and if it can then there must be something that has to be set in the animations of the enemy themselves.

So... how exactly can i change the enemy animations, since only ifalna can see their animations (errors when trying to edit), kimera will not even load the files, since they are "not a valid P file", and i know little about the hex for animations. hell, i'd settle for just a copy of their idle animation that i can call that has the ability to use magic, at least until i can learn more about adding animations. if you have any insight that would be wonderful.

also, some suggestions on your proud clod, it would be very nice if you would add the ability for the user to edit the enemy attack id's (what they can use ability wise) as well as the animations (that the moves use), so for example MP uses animation 03 for attack 0110 (machine gun attack), and 04 for 0111 (tonfa attack), since i have to manually extract the files and open them up in a hex editor to change something as small as that (i don't think any of the programs allow for this yet, so this could be a first, and shouldn't take much to do, since it is even less than what is already added, you'd just have to point to two different places per enemy). i'd also like to thank you for the ai editor, as it has been very useful, and the C format decoding of it helps out a lot (so i can see if i screwed up much easier  :-P), and paired with hojo and WM, things are going nicely ^^

sorry about the long post, but i tend to ramble on... if you could implement my suggestion, i'd really appreciate it (and likely many others as well). battle formations would be nice too, but i know they aren's completely known yet, but i can do enough to do what i need via hex for now (it is a lot, so changes are actually worthwhile to manually hack, unlike changing two values  :|). and if you can help with my problem, i'd appreciate that as well.

Edit: gave mono drive ice, but the camera doesn't seem to follow through right... ice is finished before it fully pans over to cloud, but that could be due to the speed at which it casts spells (takes about half the time cloud does to get the spell off, which could explain it), and i even edited the spell's camera movement in WM to fire (which it uses correctly), but it was still off by a good bit... maybe it has something to do with me having a mono drive battle happen after the MP's are killed, or maybe something else?
 
Last edited:
I am using the PC version.... And when i go to compile it just floods my desktop with lots of KERNAL files.. i have no save option... and i don't know what you mean.. What exactly is it I'm suppose to be copying and pasting?
 
if you are using wall market to edit the buster blade (get the newest version of wall market, since it does everything  :-P) then you should have no problem saving it. all you need to do is load your kernel with wall market, edit the things you want, click file->create kernel.bin, and that should replace the kernel you loaded with the modified one you made (back up your original first, though there is always an extra one on the install disk). i don't ever see wall market splitting up into many files unless you use the piece managing thing, and it isn't really necessary (it is for manual hex editing, but there isn't much need when you have wall market  :-D).

what i said about copying/pasting was to move your kernel (if it was not in the folder it should be, if you were editing one outside the main folder) into the place in the ffvii folder it is supposed to go in, but i didn't see the "it is spitting out pieces when i compile" thing. so unless i do not know what you are talking about, then the above should work.

on another side note, is there status checks (or whatever they are called) for allocating drops/steal items that are possible through ai, so that more items can be stolen (different or same), different drops for doing different things in battle, or checking if an item was stolen so the enemy gets pissed off (goo king from bof games anyone?). i know that was kind of hard to understand, so i will try to give some examples:

normally through ai, you can set/check certain things related to the enemy such as status problems, actual stats, exp/ap/gil, etc. by doing something similar to, say:
12    2060 -> self mask
00    4010 -> barrier
80            -> combine them together (self.barrier)
60    01    -> sets flag to active
90            -> combines (self.barrier = 1)

where the 4010 is the check for barrier, 42e0 for exp, etc. does anybody know what a check for dropped/stolen items are, how to set their chances, and how to reenable stealing (i.e. if item stolen = 1, item stolen = 0), or am i just dreaming here? because adding an enemy with anger issues when stolen from would be fun (get something really good from bosses, but they increase their aggression and pummel you to death), or giving an enemy multiple steals possible (a boss who puts up a barrier, and resists a ton of damage unless you steal his "battery" in which it goes down for a bit until he installs another... and i know i could have fun doing things with hojo's battle (human form)  :evil:). but mainly i just want even more possibilities to be open, and i'm just curious about this, but having multiple steals for enemies is nice as well.
 
I figured out the problem.. my download had corrupted data.. because i  was  doing everything you said... and it wasn't working so i re-downloaded the latest version... that works on my PC that is  which is like version 1.17.... then i did the thing again .. created the KERNAL and it worked like a charm...   I did everything the same as before... so it had to be that my PC messed up on the download.. or i screwed up moving the files around or something....

Thank you,
Broken Crow
 
the only thing i can think of is you not having the Microsoft Visual Basic Power Packs 3.0 needed to run the newer one (dunno if the 1.1.7 needs them or not), or if you have windows vista, since it LOVES to cause utter chaos in many things (like when .exe's randomly started running only in notepad, so when i started up the computer, i got ~50 .txt files popping up on me...), which is why i custom ordered my quad core with xp on it ^^. i don't think it'd let you run WM without it though, so it could have been the pack not installing correctly, in which case you could always uninstall/reinstall them to see if it fixes it... i don't know the inner workings of WM like nfitc1 does (he made it), so i cannot give any other advice on why it wouldn't work. just try to reinstall the required stuff on the first page and then try it again on an unedited kernel file (a copy of your kernel works too) to see if it works.
 
Last edited:
Yeah.... but my grandpa keeps his PC on all the time... Hard Drive issues.... but it seems to be immune to a lot of things I've heard about vista... For example i remember getting a patch to work on Vista that they said was impossible for Vista to run... but I'm not sure if i read that right .......... I'm such a newb with technology.. *Laughs quietly to himself*


Edit* Okay..... I made a back up of my original KERNAL.... and i used WalllMArket to make my Buster Blade Ultra powerful.... then i decided i wanted to lower the stats... so i did that.. and it didnt work.. my buster blade remained ultra powerful.... so i decided to replace my original KERNAL and start from scratch.. i replaced the KERNAL and went into the game just to double check if everything checked out........... MY  Buster Blade was still ultra powerful........... Im in no mood to re-install everything.... so does anyone know what is wrong??? Or is it Vista turning around on me after what i said up there? :P
 
Last edited:
Yeah, vista seems to either run pretty flawlessly (at times, until you hook up an emulator it doesn't like), or crap out whenever it is is very bad to have happen. xp has flaws, but nothing that can't be tweaked to get around (plenty of tweaking manuals out there for big performance boosts and better stability, though it is still more stable than vista   :|). they are making it very hard to not get vista on your computer, when xp is obviously more reliable... if they used xp's stability and built from there instead of redoing everything, vista could actually be something worthwhile. meh... i just hate it  :-P.

anyway, im going to get back to ai editing (have enemies up to the motor ball boss on the shinra highway stat edited), and hopefully find some of the unknowns out at some point, because there could be something good hidden in there ^^. also, on the side i'm going to be working on ffvi advance's enemies and ai hacking, since i know where the offsets for pretty much everything is (or at least a general idea... i did find the ai and enemies at least, as well as all the items), and may look into updating the ff3 (snes ffvi) editor which did prety much everything, since the two are programmed almost exactly the same way, just the advance one has more added to it, and much more room for possibilities. but i am in no real rush for ffvi, since i am already pretty far into hacking ffvii.


and another question for you nfitc1, would it be easily possible for you to allow for more than one character editor to pop up at a time from proud clod from different scenes (same scene.bin, different file within), so that i can easily compare ai from one enemy to another, and still be able to edit both enemy's ai? so if i wanted to compare MP from scene 76 (75 in proud clod) to the grenade combatant in 105 (104), i could see both of their ai at the same time in two separate windows, and add changes at will instead of having to use the current manual switch between widows, comparing what i wrote down (or screenshot), and then going back to make changes. this is the biggest issue others are smaller, such as the random errors when i forget to press enter when adding a value and then moving to a new square in the ai, and the top most block never seems to want to add a new row BELOW it if there is already stuff underneath it, making me have to move a ton around to add what i wanted to. adding the ability to chose where the empty blocks are added would be great. also, being able to resize the window, and have the rest of the things in the window actually resize with it would be nice, since the ai disassembled into C is usually pretty lengthy, and having to repeatedly scroll back and forth can be a pain.

not that i am complaining about it, it is wonderful having the (approximate) C equivalent makes coding and understanding much easier, especially when used in combination with terence's enemy mechanics guide, since it helps sort things out even more (and searching ai for certain examples is much easier with a search function :-P). but it does need some work (being the first proud clod release), and i think these are all good possible additions to make life easier (even though you will be the one to do the work to make it easier on us  :evil:). if not, oh well, i am already used to the current version, but i wouldn't mind a more cushioned ai editing program *whistle*.

ok, to hopefully answer your problem, the kernel is only loaded at the start of a new game (i think anyway), so if you made it to a save point, saved, and reloaded after making changes, nothing would change, and previous changes would stick. try to run from a new game and see from there (installing the one YAMP patch, the gyptinstant patch i think, allows you to skip the intro movie to make things faster (ctrl+s), though it usually leads to the black screen glitch, but if you just go to the menu and come back it is fixed... and if you press it again you turn off the frame limit, or at least that is what happens for me, though it doesn't work in battle), and if not, then i do not know what is wrong... but likely vista :evil:
 
Last edited:
Gah! I play Zelda II for one day and see what happens. :P Lotsa questions. I don't mind, I just wish I was here earlier and could answer them.

what all is needed to make an enemy, such as the MP, use, say the fire spell?
First of all you'll have to add the fire attack data to the scene attack data. You might want to have a side-by-side comparison to WM for this. The attack doesn't even have to be 100% the same as the "Fire" attack in the KERNEL.BIN, but if you want to have that spell exactly you'll probably want to copy it.
Second, you'll have to add a reference to it in the attacker's AI. Make sure they have enough MP to cast it or you'll get the "Not enough MP!!" warning. To do this you'll have to set the target and use 92 to perform the command. When it gets around to that spot in the AI it will then try to perform it.

the camera doesn't seem to follow through right... ice is finished before it fully pans over to cloud, but that could be due to the speed at which it casts spells
As far as I can tell, yes this is correct. The camera data contains timings, angles, and distances. There's no documentation on the camera angles available and there's not even a good way to explain what they all look like. Most were probably created on the fly anyway.

it would be very nice if you would add the ability for the user to edit the enemy attack id's
I thought it could.... Do you have the newest version?

would it be easily possible for you to allow for more than one character editor to pop up at a time from proud clod from different scenes (same scene.bin, different file within), so that i can easily compare ai from one enemy to another, and still be able to edit both enemy's ai?
It's possible, but I won't do it. That has "memory leaks" written all over it and would require all the scenes to be decompressed in memory at all times. You can run two instances of Proud Clod to the same effect, just have one dedicated to display and one dedicated to writing.

on another side note, is there status checks (or whatever they are called) for allocating drops/steal items that are possible through ai, so that more items can be stolen (different or same), different drops for doing different things in battle, or checking if an item was stolen
I do not know the answer to these, but "Item Stolen" might actually be one of the Unused script segments that activates when something is stolen. I might test this later today. As for address of items, just find a decent monster to test against and see what happens. I find the Vlakorados a good one to use because it can take a few hits before going down. At least, if you haven't broken the damage limit.

the kernel is only loaded at the start of a new game
This is incorrect. The kernel is loaded when you load the game and is never re-loaded while you're actually playing. Saving, modding, and re-loading will reflect any changes you wish to make in the KERNEL.BIN.

... and it wasn't working so i re-downloaded the latest version... that works on my PC that is  which is like version 1.17....
I don't even have code for the older version so I won't support anything when they go wrong. 1.1.8 was the first one that needed Power Packs, but it wouldn't open if you didn't have it. Just be aware that if you're not using whatever the latest version is I can't help you. I'd like to help you getting 1.2.1 working, but I still don't understand the error you're getting with it. If you had a corrupted download you should just download it again.

Phew. I think that's everything. If it's not feel free to post again.
 
It's possible, but I won't do it. That has "memory leaks" written all over it and would require all the scenes to be decompressed in memory at all times. You can run two instances of Proud Clod to the same effect, just have one dedicated to display and one dedicated to writing.
Why are monsters like the Bizarre Bug, Tail Vault, and Dual Horn being displayed under "Character AI Edit"?

By the way, say I wanted to create a whole load of new attacks, with new attacks IDs... how many new Attack IDs would I be able to throw in there?  Can I make as many as I want without going into five-figure numbers, or is the limit lower than that (and possibly reachable)?
 
what all is needed to make an enemy, such as the MP, use, say the fire spell?
First of all you'll have to add the fire attack data to the scene attack data. You might want to have a side-by-side comparison to WM for this. The attack doesn't even have to be 100% the same as the "Fire" attack in the KERNEL.BIN, but if you want to have that spell exactly you'll probably want to copy it.
Second, you'll have to add a reference to it in the attacker's AI. Make sure they have enough MP to cast it or you'll get the "Not enough MP!!" warning. To do this you'll have to set the target and use 92 to perform the command. When it gets around to that spot in the AI it will then try to perform it.
About this... I was under the impression that when enemies used shared attacks, the game always ignores the attack data in the scene.bin and looks at the attack data in the kernel.bin. Doesn't this mean that as long as the attack IDs and AI are right, the enemy will cast fire normally, whatever data is in the attack data part of the scene file? Or am I wrong about this?
 
I don't know of any limit, but they should be unique within each scene. Just make sure they're greater than 100h. If you want it to teach an E.Skill, use the corresponding E.Skill's attack ID. That's how the game knows an E.Skill was used on a player.

Traditionally there are less than 1000 unique attacks and I'm not sure what will happen if the IDs go higher than this. Aire Tam Storm has the highest attack ID at 3E1h. If you want to keep them all unique, download the list of monster attack names from Filefront and find an ID that's not being used. There's about 50 of them between 100h and 3E8h, but I don't have a list of those. Remember, all the Attack IDs are in hex even though that list is not.

About this... I was under the impression that when enemies used shared attacks, the game always ignores the attack data in the scene.bin and looks at the attack data in the kernel.bin. Doesn't this mean that as long as the attack IDs and AI are right, the enemy will cast fire normally, whatever data is in the attack data part of the scene file? Or am I wrong about this?
While I believe this is true (I only did one test and I've forgotten the results), the data still needs to be in the scene. That's how the infamous Adamantaimai glitch occurs. It tries to cast Cure, but since it doesn't have the data for Cure in the scene it doesn't work....Unless all the unit variables are initialized as FFh then it tries to use attack FFFFh (which doesn't exist) and crashes because of that.
 
Status
Not open for further replies.
Back
Top