Final Fantasy Hacktics

Modding => Help! => Topic started by: Paheej on January 22, 2010, 02:49:48 am

Title: Stop Katanas from Breaking
Post by: Paheej on January 22, 2010, 02:49:48 am
Is there anyway to stop Katanas from breaking with the Samurai Skill Set?  I tried changing the calculation away from "XXX//May display broken" but all that does it make the skill work similar to an item (in which the katana is auto-consumed) which is the exact opposite of what I am trying to do.  I figured this has probably been done before but I could not find a thread about it.
Title: Re: Stop Katanas from Breaking
Post by: Vanya on January 22, 2010, 03:05:37 am
there is a post in one of the asm threads that has the addresses and data for the chance to break each katana.
change those values to 00 and you're set.
Title: Re: Stop Katanas from Breaking
Post by: Pickle Girl Fanboy on January 22, 2010, 10:29:09 am
A Katana's attack power is it's chance to break.
For example:
7 Attack Power = 7/100 chance of breaking when using Draw Out.

I think someone found a way to get Draw Out skills to use weapons other than Katanas, but maybe it's the Katana formula itself that forces the weapon's attack power to become it's break percentage.

Possible Solution:  Change the formula for the Draw Out skills.

Tell me if that works for you, we need to know this.
Title: Re: Stop Katanas from Breaking
Post by: philsov on January 22, 2010, 10:33:53 am
QuoteA Katana's attack power is it's chance to break.

A decent rule of thumb but the two numbers are ultimately independant.
Title: Re: Stop Katanas from Breaking
Post by: Vanya on January 22, 2010, 04:04:09 pm
Yeah, the attack powers don't have any affect on the chance to break.

This is the data Razele provided:

Katana's chance to break
in SCUS_942.21
0x543EC = Asura
0x543F4 = Koutetsu
0x543FC = Bizen Boat
0x54404 = Murasame
0x5440C = Heaven's Cloud
0x54414 = Kiyomori
0x5441C = Muramasa
0x54424 = Kikuichimoji
0x5442C = Masamune
0x54434 = Chirijiraden
Title: Re: Stop Katanas from Breaking
Post by: Pickle Girl Fanboy on January 23, 2010, 11:39:44 am
viewtopic.php?f=8&t=2913 (http://www.ffhacktics.com/forum/viewtopic.php?f=8&t=2913)

*confused*
Title: Re: Stop Katanas from Breaking
Post by: philsov on January 23, 2010, 03:30:11 pm
huh.  the more you know.
Title: Re: Stop Katanas from Breaking
Post by: Paheej on January 24, 2010, 11:39:45 pm
Quote from: "Pickle Girl Fanboy"A Katana's attack power is it's chance to break.
For example:
7 Attack Power = 7/100 chance of breaking when using Draw Out.

I think someone found a way to get Draw Out skills to use weapons other than Katanas, but maybe it's the Katana formula itself that forces the weapon's attack power to become it's break percentage.

Possible Solution:  Change the formula for the Draw Out skills.

Tell me if that works for you, we need to know this.


Do you mean through ASM hacking or through FFT Patcher.  Using FFTPatcher to change the formula makes the Katana skills work exactly like item.  In effect you "use" a Katana to execute a skill and it is permanently lost like a potion.
Title: Re: Stop Katanas from Breaking
Post by: Vanya on January 25, 2010, 11:37:06 am
The attack power has nothing to do with chance to break.

@ Pickle: Don't know what that is. It could literally be anything.
Title: Re: Stop Katanas from Breaking
Post by: Paheej on January 30, 2010, 01:38:42 pm
Quote from: "Vanya"Yeah, the attack powers don't have any affect on the chance to break.

This is the data Razele provided:

Katana's chance to break
in SCUS_942.21
0x543EC = Asura
0x543F4 = Koutetsu
0x543FC = Bizen Boat
0x54404 = Murasame
0x5440C = Heaven's Cloud
0x54414 = Kiyomori
0x5441C = Muramasa
0x54424 = Kikuichimoji
0x5442C = Masamune
0x54434 = Chirijiraden

I have no idea what I'm doing with ASM hacking.  Is there a picture tutorial or something I can look for that will help me do this?  Its the only ASM hack I really need done (outside of the ones provided by Nate's ASM hack program).  This is the one last thing I need to do for class balance so if I could figure it out today that would be great.  I've got the Cheat Engine, Renegade 64, and a Hexeditor but have no idea what to do - the examples on viewtopic.php?f=8&t=1582&start=20 (http://www.ffhacktics.com/forum/viewtopic.php?f=8&t=1582&start=20) I don't really understand.
Title: Re: Stop Katanas from Breaking
Post by: philsov on January 30, 2010, 09:51:27 pm
well for starters that isn't really asm.

extract SCUS from your iso with CDmage or similar program, then open it up with a hexeditor.  Navigate to 0x544whatever and change the values to 00.  save, reinsert with cdmage.
Title: Re: Stop Katanas from Breaking
Post by: Paheej on January 31, 2010, 02:31:16 am
Damn, well I have no clue about how to use hex editors.  I've got SCUS_942.21 extracted with CD Mage and I have it opened in my hex editor.  Unfortunately I don't know how to navigate to those locations using "Hex Workshop" can anyone help me out?  I know I'm n00bing it the hell up here but this is way the hell different to what I normally mod (CPU games).
Title: Re: Stop Katanas from Breaking
Post by: Vanya on January 31, 2010, 02:18:54 pm
There is a tutorial on Hex Editing around here somewhere.
I've heard it's pretty informative and noob friendly.
Title: Re: Stop Katanas from Breaking
Post by: Paheej on January 31, 2010, 02:50:15 pm
Ok, got it done, let's see if it works . . .
Title: Re: Stop Katanas from Breaking
Post by: Paheej on January 31, 2010, 03:15:10 pm
Quote from: "Vanya"The attack power has nothing to do with chance to break.

Yo man, this is entirely incorrect.  Changing the values based on Razele's data results in Attack Power of Katana's being also being changed.  For instance when I changed the values to 00 the attack power on all Katanas became 00.  

So PickleBoy was right.  We'll need to change the Katana Draw Out formulas.  Anyone have any idea how to do this?
Title: Re: Stop Katanas from Breaking
Post by: Vanya on January 31, 2010, 07:28:13 pm
Weird. no one ever mentioned that before.
Changing the formula is far more complex.
Only a handful of ppl know how to do that, but most of them haven't been around for a while.
I understand the gist of it. You'd have to locate the relevant code and modify it to use a value of 00 instead of loading the values from the table.

I have a question for you though. Does changing those values also change them in the patcher?
Title: Re: Stop Katanas from Breaking
Post by: Arganthonius on February 01, 2010, 01:35:04 pm
I know how to make katanas unneeded by changing their action menu to default, but I don't know how to keep them required AND stop them from breaking.
Title: Re: Stop Katanas from Breaking
Post by: Pickle Girl Fanboy on February 02, 2010, 05:27:09 pm
This would require a major overhaul of the Item and Item Attributes for Katanas, but you could set every katana's attack power to 0, then give the individual katanas special things that make them useful despite having no attack power.
Title: Re: Stop Katanas from Breaking
Post by: Vanya on February 02, 2010, 05:41:19 pm
It's a solution, but it just doesn't feel right for a katana not to have it's own attack power.
Title: Re: Stop Katanas from Breaking
Post by: Paheej on February 02, 2010, 07:05:13 pm
I'm thinking the easiest thing would be to change the Samurai skills to something else (half of them are redundant already).
Title: Re: Stop Katanas from Breaking
Post by: Pickle Girl Fanboy on February 03, 2010, 10:06:16 am
Quote from: "Vanya"It's a solution, but it just doesn't feel right for a katana not to have it's own attack power.
Let's not bullshit each other, my "solution" sucks.

I was going to see if changing a weapon's attack power to something greater than 0x80 can change the Draw Out break rate, but for some reason pSX won't let me gameshark ramza 9999 JP in all job classes and I loaned out both my copies of FFT.

So if anyone wants to do it, here's how.

You need:
>A character with Kiyomori learned.
 >This character needs to be a samurai.
>A Kiyomori Katana equipped.
>10 more Kiyomori Katanas in your inventory
>A gameshark, or an emulator.


FIRST TEST
Enter the following code:
30063c14-008f
This sets Kiyomori's attack power to 143, or 0x8f in hex.

Now, enter a battle that won't be hard.

When you get a chance, look at Kiyomori's Weapon Power when it's equipped on your Samurai and write down what it is.

When the battle gets easy, set up your Samurai where he or she can cast Kiyomori without being bothered by the enemy.  Cast it 10 times, and make a mark each time a katana breaks.

What was Kiyomori's equipped weapon power?
Was it 143, 43, 15, or something else?

How many times did Kiyomori break when you used it's corresponding Draw Out skill?
Was it 1 out of 10?  10 out of 10?  No breaks at all?  Something else?

Post your results in this topic.

If you want to do another test, use 0xbf instead of 0x8f, do the exact same thing, record your results, and post them here.

If you want to do one last test, use 0xef instead of 0xbf and follow the instructions above.

Shouldn't take more than 10-20 minutes to do each test.

I doubt that Bit 7 or Bit 6 allow the katana formulae to not break weapons, but you never know until you check.
Title: Re: Stop Katanas from Breaking
Post by: Vanya on February 03, 2010, 07:00:17 pm
Wouldn't it be easier just to do it with the patcher?
Title: Re: Stop Katanas from Breaking
Post by: Pickle Girl Fanboy on February 04, 2010, 10:44:27 am
You're right.  I could do this by making Kiyomori cost 0 JP and making Ramza a Samurai at Gariland.  And giving everyone Kiyomori Katanas.

I'm still kinda puzzled that pSX won't let me cheat ramza into a samurai.  I looked up the ram addresses in the gameshark handbook and everything.
Title: Re: Stop Katanas from Breaking
Post by: Vanya on February 04, 2010, 11:30:42 am
Wierd. But then again most emulators tend to have their own special bugs and quarks.
Title: Re: Stop Katanas from Breaking
Post by: Pickle Girl Fanboy on February 05, 2010, 01:43:36 pm
Complete failure.

Setting a Katana's attack power to 127 or greater makes that Katana break 100% of the time when it's corresponding Draw Out is used.

A Katana's Break rate is: Attack Power/127
Title: Re: Stop Katanas from Breaking
Post by: Vanya on February 05, 2010, 03:30:31 pm
Interesting. That bit of info would make it easier to find the code that controls the break rate.
All we really have to do is find that code and change it.
Title: Re: Stop Katanas from Breaking
Post by: SilvasRuin on February 05, 2010, 03:59:20 pm
Change it to what I wonder.  Wouldn't just removing it make the game crash when using the abilities?  Or setting that 127 to 0?
Title: Re: Stop Katanas from Breaking
Post by: Vanya on February 05, 2010, 09:47:28 pm
Yes. It would, technically. However, you can't technically just remove it either. What would have to be done is to just change it to load 0 as the value for break rate instead of doing the calculation it normally does. Then just replace any left over bytes with the NOP command that instructs the program to do nothing and go on to the next instruction. It should be that simple. The hassle is finding the correct data.
Title: Re: Stop Katanas from Breaking
Post by: Ventai on February 10, 2010, 11:09:21 am
Hm, I have a thought, I was looking through the FFTPatcher, (because I was trying to make a custom class for Tidus) So I thought I'd look into Samurai... though I always hate the Break Rates, and when I looked at the abilities here's what I found, I think it's the formula for the Break:

22 //MayDisplay"Broken"

I think if it was possible to remove the //MayDisplay"Broken" text, it would make it impossible to break... but I couldn't find a way to change it around
In case anyone wants to look themselves, its under the ability tabs
Title: Re: Stop Katanas from Breaking
Post by: Pickle Girl Fanboy on February 10, 2010, 11:57:25 am
The text is just a description used in FFTPatcher.  It has absolutely nothing to do with the actual calculations the game does.
Random Question: how old are you?
Title: Re: Stop Katanas from Breaking
Post by: SilvasRuin on February 10, 2010, 10:58:02 pm
When you see "//" preceding anything in code, it means what follows is a comment that doesn't actually do anything.  It is there to explain something to the person looking at it.
Title: Re: Stop Katanas from Breaking
Post by: Pickle Girl Fanboy on February 11, 2010, 01:04:47 pm
Anyone know if the unused Traps do anything?  I'd love to have some HP and MP Restore traps lying around, and I want to get rid of Degenerators.  Looks like I have another experiment coming up.

What about the attack types?  Striking, Lunging, Direct, Arc?  How exactly do they work, and how does range factor in?  I'm wondering if I can give cloths a range of 2-4 panels in the four cardinal directions by giving cloths lunging and arc?

Random Questions:
What's the difference between the following Formulas?
0A Hit_F(MA+X)
0B Hit_F(MA+X)
Is there something hard-coded to one of them?

Same Questions, but with:
1C Hit_(X)% NS
1D Hit_(X)% NS

Same here:
00 Dmg_(Weapon)
01 Dmg_(Weapon)
05 Dmg_(Weapon)
Title: Re: Stop Katanas from Breaking
Post by: SilvasRuin on February 11, 2010, 01:19:33 pm
Animation is probably the biggest thing affected by those attack types.  Unless I'm mistaken, Striking is what makes the character swing downward, Lunging is what makes the character thrust, and I'm not sure about the others.  I'm wanting to think Arc is what makes bows able to be shot over obstacles.  The real question is whether it is a mechanics setting or a graphical setting.  I suspect the same with Direct and guns/crossbows.

I'd have to figure out which of those formulas were used for what abilities to have any idea, but I might try taking a look and hunting them down.  Really, all you'd need is to look in the patcher for vanilla settings and see which ones are tied to abilities that have something special the formula doesn't list.


Edit:  It's weird.  0A is for all status spells that they assume you will target the enemy for.  0B is for all the status spells that they assume you will target an ally for.  Maybe the AI reads them a little differently?

1C and 1D are for singing and dancing respectively.  They might have something to do with reading those specific slots and doing the effect that each one is supposed to have.

00 probably shouldn't be used.  I'd be worried it wouldn't work right.  01 is the basic weapon attack formula.  I didn't see 05 anywhere.  I'm not sure why.
Title: Re: Stop Katanas from Breaking
Post by: Pickle Girl Fanboy on February 11, 2010, 01:59:30 pm
Do you think we should make a sticky topic where we collect all the random oddities and stuff you wouldn't know unless you dig through the forums?  Stuff like having Jump higher than 0x80 lets others use you as a stepping stone?

EDIT
When all 3 unknown move-find item bits are activated:
1.  You can't get the treasure.
2.  But you don't activate the trap when you step on it, with or without Move-Find Item.
3.  Nothing happens.
^See uza.PNG

Look at terminate.PNG and mandalia.PNG.  See anything?
The fourth unknown bit from the top probably is a Move-Find Item Trigger.  If that bit is set, then you must have Move-Find Item to activate the Trap, and if it's not set, then you can activate the trap just by stopping on it.

Are the Trap Effects hard-coded to them, or do they just reference a specific ability?  Like how Counter Tackle references Dash, Counter references Attack, Gilgame Heart references Steal Gil, and Counter Flood references Geomancy.


Results of the other experiment where I screwed around with attacky types:

Striking
Forces a range of 1 onto the weapon.

Lunging
Forces a range of 2 - in the four cardial directions - on the weapon.

Direct
Cannot target the nearest 2 panels, so giving a Direct Weapon a Range less than 3 makes that weapon unusable.

Direct Combos
Sometimes forces a Crossbow-type attack pattern on the weapon.

Arcing
Cannot target the nearest 2 panels, so giving an Arcing Weapon a Range less than 3 makes that weapon unusable.

Arching Combos
Sometimes forces a Bow-type attack pattern on the weapon.

Combos
1.  Produce weird, unpredictible results.
2.  For some reason, the Range of the weapon has an effect on which trait (Striking, Lunging, Direct, and Arcing) is dominant.  Ask the guy who tried to make a turn-based FFT for more information of the effects Range has on Attack Types.
3.  Someone with serious ASM skills needs to take a look at this stuff.  There's way too much going on for me to sort it all out.


Random things I'll test soon:
Does Regenerator reference Regen?  They have the same animation...
Does Critical Quick reference Quick?
Title: Re: Stop Katanas from Breaking
Post by: Ventai on February 14, 2010, 12:03:45 pm
Quote from: "Pickle Girl Fanboy"The text is just a description used in FFTPatcher.  It has absolutely nothing to do with the actual calculations the game does.
Oh, I see. Well, I'm new to all of this stuff, so I just know the basics, and I've still not even got those down pat.

Quote from: "Pickle Girl Fanboy"Random Question: how old are you?
Lol, why do you want to know?
Title: Re: Stop Katanas from Breaking
Post by: SilvasRuin on February 14, 2010, 04:16:21 pm
QuoteDoes Critical Quick reference Quick?
Hrm... that would be interesting.  More possibilities for creating special counters.  Bonecrusher (or whatever vanilla called it.  I forget) would potentially reference one of those abilities that do the same thing.  Even if they aren't tied to specific abilities, it should be possible to find the formulas they do reference and then customize them as we please.  Theoretically one could turn Critical Quick or Meatbone Slash (is that the vanilla name?) into the higher tiered Behemoths' tradition of casting meteo upon death.
Title: Re: Stop Katanas from Breaking
Post by: formerdeathcorps on February 14, 2010, 05:05:20 pm
What happens if you uncheck all of the weapon hit types?  Does your weapon become inoperable?
Pickle, I don't think we need ASM to test this as much as we need meticulous testing of hit type combinations at varying range.

This is probably some of the best news I've heard in a while.  It's good to know that I can actually make a throwing axe.
Title: Re: Stop Katanas from Breaking
Post by: Ventai on February 15, 2010, 07:55:42 am
Quote from: "formerdeathcorps"It's good to know that I can actually make a throwing axe.
I would love to see a throwing axe.... in real life and the game!
Title: Re: Stop Katanas from Breaking
Post by: Pickle Girl Fanboy on February 15, 2010, 12:45:03 pm
Quote from: "formerdeathcorps"What happens if you uncheck all of the weapon hit types?  Does your weapon become inoperable?

Never thought of that... and it should be easy to test.
And as for the testing, you have all the possible combonations of:
Striking,
Lunging,
Direct,
Arcing,
and 0-255 Range.
The only way to be completely sure is to test EVERYTHING, which is why Vanya's Unused and Unknown Bit exploration project never took off.  There's just too many possiblities, too many things to test.  I have a notepad document at home full of things that need to be tested and verified, but I'm always looking for little things that I could check without losing my mind.
Title: Re: Stop Katanas from Breaking
Post by: formerdeathcorps on February 15, 2010, 02:54:43 pm
If we split the task amongst the 5-10 of us interested, I'm sure we'd be able to do it.  I'm also willing to bet that beyond 8 range, there probably wouldn't be any difference in effects.
Title: Re: Stop Katanas from Breaking
Post by: Ventai on February 15, 2010, 11:20:36 pm
Quote from: "formerdeathcorps"If we split the task amongst the 5-10 of us interested, I'm sure we'd be able to do it.  I'm also willing to bet that beyond 8 range, there probably wouldn't be any difference in effects.
Well, I'm willing to help out
Title: Re: Stop Katanas from Breaking
Post by: formerdeathcorps on February 16, 2010, 12:02:15 am
The blank check box with no current description is just whether the weapon can be thrown or not.  We won't need to check that, though I think we might also need to check 0 range (the range on shurikens).

Assuming 0 range means nothing and full understanding of just one option at any range, we have at most 13 checkbox combinations and 8 range options (assuming they're all different), so we have at most 104 possibilities.  In reality, it's likely no more than 52 since most of the range differences probably stop after 3 (so we have 4 range "groups": 1, 2, 3, 4+).

I'll look into direct + other options and the totally blank option, since I'll be using both in my hack.
Title: Re: Stop Katanas from Breaking
Post by: Vanya on February 16, 2010, 08:32:16 am
Feel free to post any discoveries in the unknowns thread I made a while back.
It's already set up to receive any new data and have it nicely organized. ^_^