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

  • Thread starter Thread starter nfitc1
  • Start date Start date
Status
Not open for further replies.
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.
The problem is that it simply isn't true that it occurs after damage calculation.  If that was the case, Limit Breaks simply *wouldn't work* against Diamond Weapon until he begins his countdown.  Note his PreTurn counter: he specifically checks if the skill being used is Summon, W-Summon or Limit, and if this is the case, he will turn off his Physical Immunity for just that attack.  As a result, this has to occur before damage is calculated, otherwise the limit would just do nothing, and the timing for his invulnerability being turned off would not be as observed.

EDIT: Oh, and yes, strings and attacks would only show up after the current action due to the standard queue system.  There's only so much this counter can do, but at least it can juggle variables fine without relying on queuing.

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.
Akari can probably give you more details, but it's mostly pretty straightforward.  You have the basic Attack Formulas:
Code: [Select]
Code:
x0: No damagex1: Physical Formula (Pwr / 16) * (Stat + [(Lvl + Stat) / 32] * [(Lvl * Stat) / 32])x2: Magical Formula (Pwr / 16) * ((Lvl + Stat) * 6)x3: HP% Formulax4: Max HP% Formulax5: Cure Formula (Pwr * 22) + ((Lvl + Stat) * 6)x6: Fixed Formula (20 * Pwr)x7: Item Formula (16 * Pwr)x8: Full Recoveryx9: Throw FormulaxA: Coin Formula
And the Attack Types are essentially:
Code: [Select]
Code:
0x: Physical, no hit checks1x: Physical, Phys Accuracy, Crit Hit2x: Magical, Mag Accuracy3x: Physical, 100% Hit4x: Magical, 100% Hit5x: Magical, 100% Hit6x: Physical, Phys Accuracy, Crit Hit, uses Special Formulas7x: Magical, Mag Accuracy, uses Special Formulas8x: Magical, uses Lv?-Based condition9x: Magical, uses Manipulate AccuracyAx: Physical, Phys Accuracy, Crit Hit, uses Weapon Special FormulasBx: Physical, Phys Accuracy, no Criticals
I'm not sure what the difference is between 4x and 5x, if any exist.  And you have most of the Special Formulas already, and the Weapon Special Formulas can all be found by matching from the Weapon Data.
 
Last edited:
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.
The problem is that it simply isn't true that it occurs after damage calculation.  If that was the case, Limit Breaks simply *wouldn't work* against Diamond Weapon until he begins his countdown.  Note his PreTurn counter: he specifically checks if the skill being used is Summon, W-Summon or Limit, and if this is the case, he will turn off his Physical Immunity for just that attack.  As a result, this has to occur before damage is calculated, otherwise the limit would just do nothing, and the timing for his invulnerability being turned off would not be as observed.

EDIT: Oh, and yes, strings and attacks would only show up after the current action due to the standard queue system.  There's only so much this counter can do, but at least it can juggle variables fine without relying on queuing.
I see what you're saying now. Any visible effects would only occur after the animation was complete. Just the limitation of the world renderer I suppose. Diamond weapon is immune to physical damage except during his countdown which occurs every other summon/Limit attack. I see where this would pose a problem for every physical limit. Perhaps "Pre-Attack Setup" would be a better name.
While on the subject of Diamond weapon, maybe you can clarify something for me. At the end of his Death-Counter Script he's got a 60 22 60 0F 92 command that Akari told me that means execute script section 0F. He doesn't have anything in his Post-Battle section. It's possible that this interpretation of the 22 command is wrong and it doesn't execute scripts. Do you have any idea what this does?

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.
Akari can probably give you more details, but it's mostly pretty straightforward.  You have the basic Attack Formulas:
Code: [Select]
Code:
x0: No damagex1: Physical Formula (Pwr / 16) * (Stat + [(Lvl + Stat) / 32] * [(Lvl * Stat) / 32])x2: Magical Formula (Pwr / 16) * ((Lvl + Stat) * 6)x3: HP% Formulax4: Max HP% Formulax5: Cure Formula (Pwr * 22) + ((Lvl + Stat) * 6)x6: Fixed Formula (20 * Pwr)x7: Item Formula (16 * Pwr)x8: Full Recoveryx9: Throw FormulaxA: Coin Formula
And the Attack Types are essentially:
Code: [Select]
Code:
0x: Physical, no hit checks1x: Physical, Phys Accuracy, Crit Hit2x: Magical, Mag Accuracy3x: Physical, 100% Hit4x: Magical, 100% Hit5x: Magical, 100% Hit6x: Physical, Phys Accuracy, Crit Hit, uses Special Formulas7x: Magical, Mag Accuracy, uses Special Formulas8x: Magical, uses Lv?-Based condition9x: Magical, uses Manipulate AccuracyAx: Physical, Phys Accuracy, Crit Hit, uses Weapon Special FormulasBx: Physical, Phys Accuracy, no Criticals
I'm not sure what the difference is between 4x and 5x, if any exist.  And you have most of the Special Formulas already, and the Weapon Special Formulas can all be found by matching from the Weapon Data.
This is also very interesting. I didn't know that White Wind and "? ? ? ?" are considered physical attacks. That would explain why White Wind sometimes flashes the screen as if it were a critical attack. This would be a real simple change to make too.
 
While on the subject of Diamond weapon, maybe you can clarify something for me. At the end of his Death-Counter Script he's got a 60 22 60 0F 92 command that Akari told me that means execute script section 0F. He doesn't have anything in his Post-Battle section. It's possible that this interpretation of the 22 command is wrong and it doesn't execute scripts. Do you have any idea what this does?
All I know about 0x92 is that it shoves the command, ability and targetting data onto the ability queue (stored at 009A988C, which can hold up to 64 queued abilities), and the priority usually depends on either what part of the AI script is running or what type of player ability is used (although there are also possibly exceptions to that).  I'm fairly sure Akari's done more work than me on the scripting engine, so I cannot confirm or contradict his findings.  I know that during a simple test I did I was unable to use 0x22 to run arbitrary script IDs, but I still don't know any firm details about what it does.

This is also very interesting. I didn't know that White Wind and "? ? ? ?" are considered physical attacks. That would explain why White Wind sometimes flashes the screen as if it were a critical attack. This would be a real simple change to make too.
Be aware that although the chance of a critical hit will be calculated, not all attacks will use the Critical Hit modifier.  In fact, I think only the Physical Formula uses it, and since Critical Hit chance is only used with the Physical Attack Types, it doesn't seem possible to get a Magical Critical Hit without editing the executable, even if you used a Magical attack using the Physical Formula.

The Weapon Special Formulas will all use the standard Physical Formula as a base though, rather than replacing it entirely, so they can work with Critical Hits when given the opportunity.

You might also want to test out the various Attack Types and Formulas yourself so you can think of better ways to describe them from the point of view of a modder: the way I've described them is somewhat concise, but not always as clear as it could be.
 
AI Trigger: Ally Death: This trigger is actually run at the End of Battle, not on Ally Death.
Going back to this, could it be accurate to call this section "Battle Victory" and sections 8-15 be "Custom Event"? I can't get any scripts 8-14 to fire (The Midgar Zolom is acting really weird. Executing script that I erased and confirmed isn't in the scene anymore. Spooky...), but that's likely what they would do.
 
3x: Physical, 100% Hit
4x: Magical, 100% Hit
5x: Magical, 100% Hit
Acording to my notes they all the same. And they do nothing (not calculate miss chance and not calculate critical chance). So it's simple "100% hit, no critical".
 
Going back to this, could it be accurate to call this section "Battle Victory" and sections 8-15 be "Custom Event"? I can't get any scripts 8-14 to fire (The Midgar Zolom is acting really weird. Executing script that I erased and confirmed isn't in the scene anymore. Spooky...), but that's likely what they would do.
I'd pretty much agree with that naming scheme, yes.  If any further information about how they can be used turns up, it can always be changed again.
 
Going back to this, could it be accurate to call this section "Battle Victory" and sections 8-15 be "Custom Event"? I can't get any scripts 8-14 to fire (The Midgar Zolom is acting really weird. Executing script that I erased and confirmed isn't in the scene anymore. Spooky...), but that's likely what they would do.
I'd pretty much agree with that naming scheme, yes.  If any further information about how they can be used turns up, it can always be changed again.
Battle Victory - What is the id of this script?
 
Battle Victory - What is the id of this script?
0x6.  So immediately after Magic Counter and immediately before PreTurn.  Though looking at the proposed name for it again, I'm no longer as sure about that name... battles can end in other states than simply Victory, and I'm not sure of all the conditions that 0x6 fires on (I just know that it doesn't fire on Ally Death and definitely waits until the end of battle to apply its affects).

Doesn't matter though: I'm sure Akari knows where all the hooks are better than I -- I'm working on information I dug out years ago.
 
Though looking at the proposed name for it again, I'm no longer as sure about that name... battles can end in other states than simply Victory, and I'm not sure of all the conditions that 0x6 fires on (I just know that it doesn't fire on Ally Death and definitely waits until the end of battle to apply its affects).
I'm using "victory" in a generic sense of the word. Whatever ends the battle to move the plot along. Technically the Ultimate Weapon fights don't end in a "victory" until the one where he's over Cosmo Canyon. As I understand it, a battle ends when either all enemies or all allies are flagged either dead, inactive, or escaped. Some battles are forcibly ended (Mystery Ninja) at certain points just by flagging the main script as inactive. These are not "victories" in the specific definition of the word (enemy not flagged as "dead"), but it's a victory in the fact that it wasn't a defeat. It's just easier to say than "Non-failed Battle" or something to that effect.
 
Some updates on progress, despite double-post (forgive?).

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.
That's what the materia tab is for.....read the manual

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?
How does this look? (look at the third materia slot)

When you click on any materia slot that menu will show up with the current materia aligned on the menu. Click on the desired materia to add or click on another object (or the aligned materia) to cancel.
 
That looks fine. ^_^

any idea when it'll be included in the next version?
 
That and a few other changes have already been implemented. I believe WM is ready to go, but I'm making some last-minute PrC changes and updating the documentation. Thanks to Terence Fergusson, I've completely redone the way the attack damage byte is changed. I've also considered a more versatile search for attacks in PrC, but I'll probably wait on that one. What I'm really going to do next is allowing the formation AI to be edited like TFergusson pointed out in a previous post. I won't likely be able to start on it until late next week.
 
this looks so nice , just a shame i can't use it in wine. (stupid .net...) any chance for a Qt port? i would be more then happy to help you with it....
 
...
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.
...
I was going to ask I you (NFITC1) if you've planned to do anything with this. I haven't made any editor for the party AI so I kinda hoped you would make one.  :P
 
Quick question, why does Hades inflict Stop to Ruby Weapon when he has protection?  And Hades doesn't even seem to have Stop as a status?
 
Last edited:
You are confusing [Stop] with [Paralysis], which prevents attacks for approximately two turns (it's some number of V-Timer units). Hades inflicts paralysis, and Ruby is vulnerable. Paralysis is inflicted also by the item 'Dazers' and the Limit Break, 'Cross slash'.
 
...
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.
...
I was going to ask I you (NFITC1) if you've planned to do anything with this. I haven't made any editor for the party AI so I kinda hoped you would make one.  :P
That and a few other changes have already been implemented. I believe WM is ready to go, but I'm making some last-minute PrC changes and updating the documentation. Thanks to Terence Fergusson, I've completely redone the way the attack damage byte is changed. I've also considered a more versatile search for attacks in PrC, but I'll probably wait on that one. What I'm really going to do next is allowing the formation AI to be edited like TFergusson pointed out in a previous post. I won't likely be able to start on it until late next week.
That's what I meant by those statements. PrC only seems to lack the formation AI. I just did a quick loop through and I found scripts on these formations: Turks:Reno, Bottomswell, Carry Armor (all three of these are likely the same thing. If the "captured" character dies while captured then they need to be released from captivity), Bizarro Sephiroth (All formations. They might contain loads of battle addresses I've never seen), Safer Sephiroth, & final Sephiroth. I haven't looked at any of these scripts so I'm not sure what they all do. I just know there are scripts there.

Editing Formation AI is all well and good, but you have so little room to do it in. It's only 512 bytes in size and only 472 bytes of those are usable for a script; Fewer if you want multiple formations' worth.
 
You are confusing [Stop] with [Paralysis], which prevents attacks for approximately two turns (it's some number of V-Timer units). Hades inflicts paralysis, and Ruby is vulnerable. Paralysis is inflicted also by the item 'Dazers' and the Limit Break, 'Cross slash'.
Ahhh of course!  Silly me.

Anyway bug report, and this has been a bug for quite some time.  Every so often I will load up my kernel to discover text has been corrupted or deleted.  usually the deletion is 1 letter (in the actual name and not description), but today I spotted this in a few places >

problemwithwallmarket.png


It has added "cures darkness" to the end of the string.  It has done the same for the item directly above it too.
 
Last edited:
Anyway bug report, and this has been a bug for quite some time.  Every so often I will load up my kernel to discover text has been corrupted or deleted.  usually the deletion is 1 letter (in the actual name and not description), but today I spotted this in a few places >

problemwithwallmarket.png


It has added "cures darkness" to the end of the string.  It has done the same for the item directly above it too.
Is that on the PC text or the PSX text? The PSX text might have issues since I haven't even touched it since I wrote it.
 
PC and it has happened to differing degrees since the first wallmarket I used (prob around 4 releases ago)
 
Status
Not open for further replies.
Back
Top