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

  • Thread starter Thread starter nfitc1
  • Start date Start date
Status
Not open for further replies.
Backup, backup, backup. Modding, I always keep multiple backups of my files and ISOs. In my case, I actually have 'snapshots' of certain stages in development, so I can, say, bring out a KERNEL.BIN from a couple of weeks ago, working alongside a SCENE and a certain level file from three weeks before that, etc. etc. - but that's because I'm developing a mod. Nevertheless, the basic principle holds true: don't run the risk of crippling the only ISO you've got, especially if your disks aren't conveniently at hand.
 
For now, just edit the data manually by double-clicking on the weapon name in the list to the left.
Wow, I never knew one could do that with Wall Market; it's a nice feature, since I sometimes like modding things the old fashioned way. ;D
 
For now, just edit the data manually by double-clicking on the weapon name in the list to the left.
Wow, I never knew one could do that with Wall Market; it's a nice feature, since I sometimes like modding things the old fashioned way. ;D
Yes you did. ;) I could have sworn there was another post like that, but it doesn't look like it's in the WallMarket or Proud Clod topic.
 
For now, just edit the data manually by double-clicking on the weapon name in the list to the left.
Wow, I never knew one could do that with Wall Market; it's a nice feature, since I sometimes like modding things the old fashioned way. ;D
Yes you did. ;) I could have sworn there was another post like that, but it doesn't look like it's in the WallMarket or Proud Clod topic.
Did I? Hmph, I must have known at one point and then ceased to know ;D
 
Thanks for the new version NFITC1, Also i just read on your blog (i know its a older post but still thought you might be interested) you where trying to make the program less KB and i might be able to help make it alot smaller if you want it smaller.
(And when i mean smaller i mean i can make wallmarket.exe 233kb)
EDIT:- I have been looking at this some more and it looks like it may even be possible to embed the DLLs for "Microsoft Visual Basic Power Packs 3.0" so that the program can run without "Microsoft Visual Basic Power Packs 3.0" being installed.
 
Last edited:
Thanks for the new version NFITC1, Also i just read on your blog (i know its a older post but still thought you might be interested) you where trying to make the program less KB and i might be able to help make it alot smaller if you want it smaller.
(And when i mean smaller i mean i can make wallmarket.exe 233kb)
I'm familiar with things like this. UPX being the one I've used although I believe the version I have is optimized for DOS programs. I don't care about compression making the thing smaller. That's not my goal. I want to remove a lot of debug info in the executable. I know there's a lot of extraneous code in it that handles errors like that and I want the compiler to not put that in.

EDIT:- I have been looking at this some more and it looks like it may even be possible to embed the DLLs for "Microsoft Visual Basic Power Packs 3.0" so that the program can run without "Microsoft Visual Basic Power Packs 3.0" being installed.
I would really like that. WM is only using one class in it and only for that graph. I'm surprised that it takes another set of things to do lines in .NET. It was native in VB6. Oh well. If you know how to do that please share!
 
Great job as usual NFIT.

Is it possible to make the next version (if you make it) give more options for customizing materia?

i'd like to see a tab that let's you edit the values for what peice of materia holds what abilities.

If the current version can already do that, then i guess i'm just to dumb to figure out how.
 
EDIT:- I have been looking at this some more and it looks like it may even be possible to embed the DLLs for "Microsoft Visual Basic Power Packs 3.0" so that the program can run without "Microsoft Visual Basic Power Packs 3.0" being installed.
I would really like that. WM is only using one class in it and only for that graph. I'm surprised that it takes another set of things to do lines in .NET. It was native in VB6. Oh well. If you know how to do that please share!
Well to embed the DLL you first need "ILMerge" (which is a free program from microsoft) then you can either find a GUI or use the command line to embed the DLL into the EXE,

Then basicly what you do is this,
1st - put "Microsoft.VisualBasic.PowerPacks.dll" into the same folder as WallMarket (this DLL should be in a sub folder in your WINDOWS folder and this is also the only DLL needed by WallMarket)
2nd - Run "ILMerge" and merge "WallMarket.exe" and "Microsoft.VisualBasic.PowerPacks.dll"
3rd - Now you should have a new EXE file just under 1MB, This EXE no longer needs "Microsoft VisualBasic PowerPacks" to be installed to work.

here is an example
http://www.mediafire.com/?yjjyizzwvjm
In the above example i have put 2 versions, one is uncompressed and done the exact way above,
The second is the uncompressed EXE packed with a zip compression EXE Packer.

Also ILMerge can also be used when compiling so that you dont have to do it this way
http://blog.tjitjing.com/index.php/...-exe-and-dll-into-one-single-file-in-net.html

EDIT- also if you just want to you can always just put "Microsoft.VisualBasic.PowerPacks.dll" into the same folder as WallMarket and this also makes it so you no longer need to install Microsoft VisualBasic PowerPacks (what i mean is you dont have to merge it into the EXE just being in the same folder is enough)
 
Last edited:
Christ. All this tech talk makes my app look like a piece of crap, doesn't it?
 
Not to sound ungrateful or anything, but is it at all possible to have a drop down list for the materia slot instead of having to click until you find the one you want?
 
It would save time having to click, wait, click, wait, click, wait, click *crap!! I clicked one too many times, I'll have to click another four to get back to the one I want, sigh* click, wait...

I don't mind though, that's just happened to me a few times.
 
Not to sound ungrateful or anything, but is it at all possible to have a drop down list for the materia slot instead of having to click until you find the one you want?
Hmm. I suppose it's possible. It wouldn't be a traditional drop-down, but I bet I can make it work. I'll add that to the list of "see if I can get to work". :)
 
How would that be more convenient, though?
Well, for a mod where I'm forcing 'classes' for the player to have, it would save a lot of time, as for the enforced class to work, EVERY weapon and armour needs to have 8 linked materia, and it took me about a hour just to do the armour and Cloud's/Tifa's weapons. >_<

Not to mention if you do one click too many, you'd have to do about 7-8 clicks just to get it back the way it was.

So, i was hoping for that as it could save a lot of time in that regard.

And thanks for taking it into consideration, NFITC1. ^_^
 
I didn't realize you were talking about changing the slots in equipment. Yes, this would be significantly better. A simpler option, though, might be to keep the current form, and add a right-click shell menu to change to a specific slot type. This would be easier for NFITC1, too.
 
Oh, I've got an idea in mind. Give me time to develop it and see if it's feasible.
 
Since I've got a bit of time and was poking around stuff, I thought I might as well clear this up.

Code: [Select]
Code:
Char  Level H MHP L MHP   Cloud:   7 334 323Cloud:  12 474 441Cloud:  22 955 892Cloud:  32 1753 1658Cloud:  42 2806 2639Cloud:  52 4069 3826Cloud:  62 5435 5123Cloud:  82 7834 7381Cloud:  99 9554 9007
Code: [Select]
Code:
BaseDifference = 40 * CurveBase + (level - 1) * CurveGradient  [CurveBase is between -128 - 127 inclusive]Difference = (1 .. 8) + (100 * BaseDifference / CurrentMHP) - 100   [capped between 0 and 11; L MHP uses 1 and H MHP uses 8]NewMHP = CurrentMHP + Floor(RandomBonus(Difference) * CurveGradient)
Your problems are twofold.  First, you were rounding (100 * BaseDifference / CurrentMHP) to the nearest number, not rounding down/truncating.  As such, it's really no wonder your ranges are much higher than they should be.  If you rounded down, you'd get the theoretical base range of 8965-9508 for Cloud at L99.

But that's still not the fulll range of 8960-9511, of course.  Why is that?  Simple:
But, you should know that achieving max HP requires that you must take lower than max gains at some levels....
At L11, Cloud's HP range is 385-410, which matches the "always take lowest gain" to "always take highest gain" values.  But at L12, the correct range is 435-472, not 439-464 as you might expect.

If you had 410 HP at L11, your difference would be 2% of the baseline of 422, giving you a maximum HP Gain of 1.3 * 42 = 54.  So 410 + 54 = 464.

But if you had 409 HP at L11, your difference would instead be 3% of the baseline of 422, giving you a maximum HP Gain of 1.5 * 42 = 63.  So 409 + 63 = 472.

It's not a huge increase, and the lower HP quickly catches up, and in fact can still get to Cloud's highest max HP from that value... but this example just showcases the mechanic that makes even more of a difference at higher level, where there's less chance to catch up and every point counts.

Oh, and you can easily test the 'base' range ingame by simply altering the executable at the HP/MP growth stage and get it to always spit out 1s or 8s, and then just level from 6 to 99 quickly (easy if you also set Cloud's starting XP to a large enough value).  Obviously, this won't get the true range (and you can't without a far more complex and time-consuming routine), but it'll be close enough.

EDIT: I also just found an error in his example:
The minimum for him in that level bracket would, of course, be 40% of 98, or 58 (remember to round down).
40% of 98 is not 58, it's 39. 58 is ~60% of 98
That was a by-hand example, and yeah, looks like I took 40% of 147 instead.  My apologies on that.  The actual range data was calculated via a program, and have been proven by people after Max Stats (although FF7's crappy RNG meant that a new path had to be found by someone because it's impossible to get both Max HP and Max MP at the same time).




And while I'm taking a quick look at things, I'll note the following about certain things in Wall Market/Proud Clod.

AI Trigger: Ally Death: This trigger is actually run at the End of Battle, not on Ally Death.

AI Trigger: Post-Attack: This is a far worse name than what I've tended to call it (PreTurn).  I never called it PreTurn because I thought it happened as soon as someone's Time Bar finished filling.  I called it PreTurn because it happens before whatever command you enter gets to do things.  You could call it Pre-Command, I guess, but since it's triggered by any queued command (including Poison damage, I believe), it's a really difficult thing to name.  The point is that the changes it makes all occur before the attack is run.  Of course, an enemy can't use it to attack before you hit due to the attack queue, but it can certainly do stuff like alter its invincibility state or evasion before your attack even connects.

Battle-specific Party AI: Proud Clod could use the ability to set/change the Battle specific AI data for party members.  Much like Enemy AI starts at 0xE80 with 3 records (one for each enemy), Party AI starts at 0xC80 with 4 records (one for each enemy formation).  This is used in FF7 to deal with things like removing Waterpolo from a dead party member, but it has the potential to be used for so much more.

Attack Data: Attack Damage: You really need to split this up into the two different pieces of data it really is: the Attack Type and the Attack Formula.  The Attack Type dictates whether the attack is Physical or Magical (and thus whether Att or MAt is used), whether there will be a Critical Hit or not, what type of accuracy is used, and whether any custom formulas must be used.  The Attack Formula dictates how the damage is calculated, and with the exception of Attack Types 6, 7 and A, the formulas work the same no matter what the Attack Type.  Being able to set both Type and Formula individually offers far more customisation.
 
Since I've got a bit of time and was poking around stuff, I thought I might as well clear this up.

Code: [Select]
Code:
Char  Level H MHP L MHP   Cloud:   7 334 323Cloud:  12 474 441Cloud:  22 955 892Cloud:  32 1753 1658Cloud:  42 2806 2639Cloud:  52 4069 3826Cloud:  62 5435 5123Cloud:  82 7834 7381Cloud:  99 9554 9007
Code: [Select]
Code:
BaseDifference = 40 * CurveBase + (level - 1) * CurveGradient  [CurveBase is between -128 - 127 inclusive]Difference = (1 .. 8) + (100 * BaseDifference / CurrentMHP) - 100   [capped between 0 and 11; L MHP uses 1 and H MHP uses 8]NewMHP = CurrentMHP + Floor(RandomBonus(Difference) * CurveGradient)
Your problems are twofold.  First, you were rounding (100 * BaseDifference / CurrentMHP) to the nearest number, not rounding down/truncating.  As such, it's really no wonder your ranges are much higher than they should be.  If you rounded down, you'd get the theoretical base range of 8965-9508 for Cloud at L99.

But that's still not the fulll range of 8960-9511, of course.  Why is that?  Simple:
But, you should know that achieving max HP requires that you must take lower than max gains at some levels....
At L11, Cloud's HP range is 385-410, which matches the "always take lowest gain" to "always take highest gain" values.  But at L12, the correct range is 435-472, not 439-464 as you might expect.

If you had 410 HP at L11, your difference would be 2% of the baseline of 422, giving you a maximum HP Gain of 1.3 * 42 = 54.  So 410 + 54 = 464.

But if you had 409 HP at L11, your difference would instead be 3% of the baseline of 422, giving you a maximum HP Gain of 1.5 * 42 = 63.  So 409 + 63 = 472.

It's not a huge increase, and the lower HP quickly catches up, and in fact can still get to Cloud's highest max HP from that value... but this example just showcases the mechanic that makes even more of a difference at higher level, where there's less chance to catch up and every point counts.

Oh, and you can easily test the 'base' range ingame by simply altering the executable at the HP/MP growth stage and get it to always spit out 1s or 8s, and then just level from 6 to 99 quickly (easy if you also set Cloud's starting XP to a large enough value).  Obviously, this won't get the true range (and you can't without a far more complex and time-consuming routine), but it'll be close enough.

EDIT: I also just found an error in his example:
The minimum for him in that level bracket would, of course, be 40% of 98, or 58 (remember to round down).
40% of 98 is not 58, it's 39. 58 is ~60% of 98
That was a by-hand example, and yeah, looks like I took 40% of 147 instead.  My apologies on that.  The actual range data was calculated via a program, and have been proven by people after Max Stats (although FF7's crappy RNG meant that a new path had to be found by someone because it's impossible to get both Max HP and Max MP at the same time).
Someone did point out a while back that my rounding was wrong. I haven't gotten around to fixing it since it was a lower priority. I have done the math since and discovered that your ranges are more accurate if truncated like most computers do. I know the PSX is capable of floating-point precision and I was assuming that the entire operation was handled in that scope.

And while I'm taking a quick look at things, I'll note the following about certain things in Wall Market/Proud Clod.

AI Trigger: Ally Death: This trigger is actually run at the End of Battle, not on Ally Death.
This was always a guess. Cloud is the only one that has it, but it probably does make more sense that his "battle affection" would go down for every battle his companions are down and he doesn't revive them (even if it's not his fault!). I never tested the timing on this script.

AI Trigger: Post-Attack: This is a far worse name than what I've tended to call it (PreTurn).  I never called it PreTurn because I thought it happened as soon as someone's Time Bar finished filling.  I called it PreTurn because it happens before whatever command you enter gets to do things.  You could call it Pre-Command, I guess, but since it's triggered by any queued command (including Poison damage, I believe), it's a really difficult thing to name.  The point is that the changes it makes all occur before the attack is run.  Of course, an enemy can't use it to attack before you hit due to the attack queue, but it can certainly do stuff like alter its invincibility state or evasion before your attack even connects.
The timing on this always occurred after damage was calculated. That's now things like this can happen (Red XIII is my test subject for most of these). I gave him a simple "Display string: 'Script 07'" script for that section and it showed up at the end of the action being performed. In retrospect that might not be the best way of telling since displaying strings will wait until the end of the currently happening action to display. "Post-Attack" just seemed logical because that's when you'll see the effects.

Battle-specific Party AI: Proud Clod could use the ability to set/change the Battle specific AI data for party members.  Much like Enemy AI starts at 0xE80 with 3 records (one for each enemy), Party AI starts at 0xC80 with 4 records (one for each enemy formation).  This is used in FF7 to deal with things like removing Waterpolo from a dead party member, but it has the potential to be used for so much more.
Now THAT is some hard data I can use! I didn't look at all the scenes to see if there even was anything there. The ones I looked at were all blank. That scene does have a script for formation 0 in the death counter. That's very nice. It'll definitely have to be added.

Attack Data: Attack Damage: You really need to split this up into the two different pieces of data it really is: the Attack Type and the Attack Formula.  The Attack Type dictates whether the attack is Physical or Magical (and thus whether Att or MAt is used), whether there will be a Critical Hit or not, what type of accuracy is used, and whether any custom formulas must be used.  The Attack Formula dictates how the damage is calculated, and with the exception of Attack Types 6, 7 and A, the formulas work the same no matter what the Attack Type.  Being able to set both Type and Formula individually offers far more customisation.
I think Akari's been trying to convince me of that for a while. I'd love to add it, but I can't really tell what they all do. The only reason I haven't done so yet is I haven't figured out what the values are. I know that the upper nibble and lower nibble are significant of each other.
 
Status
Not open for further replies.
Back
Top