Final Fantasy Hacktics

Modding => PSX FFT Hacking => Topic started by: Xifanie on September 29, 2014, 05:09:19 PM

Title: Soldier Office Upgrade
Post by: Xifanie on September 29, 2014, 05:09:19 PM
(http://xifanie.ffhacktics.com/SOU.png)
Soldier Office Upgrade 1.02
~works on console~

Requires:
Microsoft Excel 2007 or equivalent

This hack allows you to set a price in the Soldier Office, and a unit will be generated given variables specified in the provided spreadsheet. It is highly customizable, and has been tested on console. There are 2 main sheets which will be explained in detail to give you a better idea of how to configure the spreadsheet for your ideal Soldier Office. You can find the download link at the bottom of this post.

FFTactext Edits

Release Information
1.02 (2015/04/02)
- Fixed a bug where the shop progression required was 1 point higher than specified in the spreadsheet
- Fixed a bug where you could still hire generic male/females squires even though no units were available to purchase
- Fixed a bug in the spreadsheet where the "Max Price" specified in the spreadsheet was ignored and set to 99,000,000
1.01 (2014/09/30)
- Reversed buttons to increase the price with R1/R2 and decrease it with L1/L2
1.00 (2014/09/29)
- Initial release
   
Known Bugs
- You might end up with a Chemist with Throw item equipped, Ninja with Two Swords equipped and the like. There are no plans to fix this.
Title: Re: Soldier Office Upgrade
Post by: Xifanie on September 29, 2014, 05:09:56 PM
Help Information

Legend
Price
Specified amount of gil that the player is spending to acquire a unit, be it a male/female recruit or a monster. It cannot go below the cheapest unit and cannot go above the Maximum Price (#post_MaxPrice). Using L1/L2/R1/R2, the player can edit this value to determine how much they are willing to spend.
L1: Current Price - 1 second digit*
R1: Current Price + 1 second digit*
L2: Divide current Price by 10
R2: Multiply current Price by 10
*The second digit represents the 2nd number from the left in a number. In 17000, that second number would be 7, which represents the thousands. When the price is increased, it would be increased by 1000. Ex: 17000, 18000, 19000, 20000, 21000, [...], 98000, 99000, 100000, 110000, 120000, [...], 980000, 990000, 1000000, 1100000, etc.

Bonus Points
They are used to calculate all the non-standard bonus parameters of a unit. Let's say you pay 100,000 gil for a unit with a Base cost of 25,000 gil and a cost of 100 gil per bonus point.
100,000 - 25,000 = 75,000
75,000 / 100 = 750 Bonus Points

At their full potential, each parameter will be able to reach at most about 750 points. It can go a bit beyond that because of how the hack was designed in order to balance things out, but it wouldn't be by much. This is only possible with parameters that are partly or fully randomized so that the total amount of points used on a unit remains the same to have as little waste as possible. So even though parameters can be random, you still get what you're paying for!

How much you get for your bonus points is specified in the Configuration Sheet (#post_Config).

Derandomization
Derandomization will affect certain stats to help push them towards their natural limit. It cannot go over 100%.
Let's generate a monster, which will have stat derandomization and brave derandomization allowed.

5000/20000 Stat derandomization, or 25%
10000/25000 Brave derandomization, or 40%

Stat Ranges:
Brave: 40-70
HP: 35-38
MP: 8-9
SP: 5
PA: 5-6
MA: 5-6

Now here's our monster:
53 Brave
36 HP
8.2 MP
5 SP
5.4 PA
5.7 MA

Now, it is simply calculated by applying the maximum randomized stat, minus the current stat, multiplying that by the derandomization amount, and adding back the originally generated stat:

70 - 53 = 17 17 * 40% = 6 (6.8) 53 + 6 = 59 Brave
38 - 36 = 2 2 * 25% = 0.5 36 + 0.5 = 36.5 HP
9 - 8.2 = 0.8 0.8 * 25% = 0.2 8.2 + 0.2 = 8.4 MP
5 = 5 SP 5 = 5 SP 5 = 5 SP
6 - 5.4 = 0.6 0.6 * 0.25 = 0.15 5.4 + 0.15 = 5.55 PA
6- 5.7 = 0.3 0.3 * 0.25 = 0.075 5.7 + 0.075 = 5.775 MA

Stat Bonuses
Stat Bonuses are available for HP/MP/SP/PA/MA. They are based on the Job's Stat Bonuses (#post_Unit_StatBonuses) on the Units sheet (#post_Units), as well as the Stat Bonus Multiplier (#post_StatBonusMult) on the Configuration Sheet (#post_Config).
This is the Formula, which applies to each individual stat:
√(X Bonus Points) * X Bonus / 15 * X Bonus Multiplier

Let's try it with 160,000 bonus points for HP Bonus, 9/15 HP Bonus, and 300 HP Bonus Multiplier:
√(125000) * 9 / 15 * 300
353 * 180
63540

63540 is the equivalent of 3.88HP bonus per level at level 1... For a unit generated with 32HP, we're talking about 35.88/32 = 112.12% HP. For those that don't know, that means 112% at level 1 all the way through to level 99.

Randomization Adjustment
This only affects non-Passive parameters.
Essentially what this does it make sure your bonus points don't go to waste because you're being unlucky, or get a huge amount of points from being lucky. You'll never get more or less for your money.

Let's take 5 non-Passive parameters with 30000 bonus points:
Parameter A: 32/63 guaranteed, 23504 points  (15238 guaranteed, 8266 randomized)
Parameter B: 16/63 guaranteed, 8506 points (7619 guaranteed, 887 randomized)
Parameter C: 0/63 guaranteed, 28390 points (0 guaranteed, 28390 randomized)
Parameter D: 63/63 guaranteed, 30000 points (30000 guaranteed, 0 randomized)
Parameter E: 0/63 guaranteed, 4573 points (0 guaranteed, 4573 randomized)
Total randomized points: 42116/97142

This number is the total amount of random points that could possibly be generated by all parameters, divided by 2. Essentially, it is a target average of 50%.
Random Adjustment: 97142 / 2 = 48571

Let's "adjust" our randomization numbers:
Parameter A randomization: 8266 * 48571 / 42116 = 9532
Parameter B randomization: 887 * 48571 / 42116 = 1022
Parameter C randomization: 28390 * 48571 / 42116 = 32741
Parameter D randomization: 0 * 48571 / 42116 = 0
Parameter E randomization: 4573 * 48571 / 42116 = 5273
Total randomization: 48568/48571

Now let's recalculate the points adding the new randomization numbers:
New Parameter A points: 15238 + 9532 = 24770
New Parameter B points: 7619 + 1022 = 8641
New Parameter C points: 0 + 32741 = 32741
New Parameter D points: 30000 + 0 = 30000
New Parameter E points: 0 + 5273 = 5273

As you can see, there is one parameter with over 30000 points. This can happen, and while more or less uncommon, shouldn't be much higher than your number of bonus points.


Units Sheet
Base Cost
Can range from 100 to 6,553,500 only in increments of 100.
Since this hack only increases the price with 2 non-zero digits (see Price (#post_Price)), I really recommend that you keep it the same way for the base price.

Cost per Bonus point
Can range from 1 to 65535.
This will determine the amount of bonus points you will get for any gil exceeding the Base Cost (#post_BaseCost). Even if you pay only the Base Cost, you still get a free bonus point, yay! See Bonus Points (#post_BonusPoints) for more information about how it is calculated.

Gender
Determines under which category a unit can be generated, as well as which gender said unit will be assigned.
Male: lists under Male Recruit
Female: lists under Female Recruit
Monster: lists under Tamed Monster

Job Unlock
Determines which job will be unlocked. It is highly recommended to not change this setting for human generics.
For example, if you have a Cleric with Time Mage as the Job Unlock, under vanilla circumstances this Cleric will gain 100JP for her Chemist and Wizard jobs which will allow her to unlock Time Mage. This process does not cost any bonus points, and the extra cost is assumed to be included into the Base Cost (#post_BaseCost).

Derandomization (See Derandomization (#post_Derandomization))
Stat Derandomization
Allows derandomizing HP/MP/SP/PA/MA for the given unit.

Brave Derandomization
Allows derandomizing Brave for the given unit.

Faith Derandomization
Allows derandomizing Faith for the given unit.

Allow Serpentarius
Allows given unit to be potentially generated with a Serpentarius/Ophiuchus zodiac sign.

Stat Bonuses (See Stat Bonuses (#post_StatBonuses))
Values from 0 to 15.
Applies to HP/MP/SP/PA/MA.
15/15 will receive 3 times as many extra stat points than 5/15. 0 means the unit can't receive a stat bonus.

Shop Availability
Determines when the unit can be potentially randomly generated. If this value is greater than or equal to the Shop Availability variable (0x006F), then the unit will be available.

Town Availability
Determines in which towns/castles the unit can be potentially randomly generated.

Configuration Sheet
*On this sheet, cells in grey are not editable and only meant to be used as reference!
To generate a new unit with little effort, select an empty cell and press "delete" on your keyboard.

Parameters (See Stat Bonuses (#post_StatBonuses))
Disable
True or False.
Disable this parameter completely. If it shows that you cannot disable a parameter and you want to, simply remove all its instances in the Units Sheet.

Passive
True or False.
The randomized amount of this parameter will not affect other parameters in any way. (see Randomization Adjustment (#post_Random))

# Points for Full Potential
Determines how many points are needed to reach 100% of the potential of the parameter. If the generated value for the parameter is half this value, only 50% of the potential of this parameter will take effect. It cannot go beyond 100%.

Guaranteed Amount
Let's say your unit is generated with 10000 bonus points. Your parameter is set to 16/63 guaranteed amount. This means that 16/63 out of 10000 will be static (2539), and 47/63 out of 10000 will be randomized. In this case you will end up with a generated value between 2539 and 10000.
0/63 means the value is completely randomized; you could potentially end up with 0 generated points even if you have 5,000,000 bonus points... or 5 million points.
63/63 means that no randomization takes place whatsoever. The generated points will be equal to your bonus points.

% Equivalent
You cannot edit this value. It is simply there to give you an idea of how much your guaranteed value is worth /100 instead of /63.

Brave/Faith ranges
These are of course not limited to 0% and 100%. The more Brave/Faith cap points you have, the closer you will get to the new Brave/Faith ranges.
Brave & Faith
Value from 0 to 100.
This determines the generated Brave/Faith ranges with 0% Brave/Faith cap points.

New Brave & New Faith
Value from 0 to 100.
This determines the generated Brave/Faith ranges with 100% Brave/Faith cap points.

Stat Bonus Multipliers (See Stat Bonuses (#post_StatBonuses))
Values from 0 to 65535.

Bonus JP
Values from 0 to 65535.
Can generate up to 65535 JP per job, which after spending JP, will be at most 9999JP. You could have a job with 23000 JP, 8000 lost through buying abilities, and then it would drop to 9999 JP upon leaving the shop.
Main Job JP
Divided by 100.
For example, if you have 10000 Main Job Bonus JP points with this value set as 50;
10000 * 50 / 100 = 5000 points will be added to this unit's Unlock Job (#post_UnlockJob).
There is a checkbox to use as an exception for Unique jobs though:
Special Units' Main Job Bonus JP goes to the Base Job and not the Unlock Job
[ :v/: ] : Calculated JP goes to the Base Job; Holy Knight if Holy Knight, Dragoner if Dragoner, etc.
[ ---] : Calculated JP goes to the Unlock Job, which could be the base job depending on what you set it to.

Distributable JP
Divided by 100.
For example, if you have 10000 Distributable Bonus JP points with this value set as 150;
10000 * 150 / 100 = at least 15000 points will be gradually distributed among unlocked jobs, with many cycles allowing even a Squire to unlock Mime if enough points are available.

Serpentarius
If the unit is allowed to generate a Serpentarius zodiac sign, it will be under one of these three conditions:
0/12th OR 1/13th
Serpentarius may only appear 1/13th of the time, and ONLY if you have at least the Serpentarius Full Potential.

0/12th to 1/13th
Serpentarius will appear at most 1/13th of the time, otherwise it can still appear the more Serpentarius points you have.

0/12th to infinite
The more Serpentarius parameter points you have, the more likely you are to end up with the zodiac sign. If you have 4 times the amount of points for Serpentarius Full Potential, you will have 4/16th chance of generating a Serpentarius zodiac sign.

# JP Spending Cycles
Value from 0 to 255.
If set to 0, no ability will be purchased. Otherwise, it will go through every unlocked job X times trying to spend JP on random abilities, and attempt to learn based on their Learn % if there are enough JP available.
Bypass "Cannot learn with JP"
[ :v/: ] : Abilities that are flagged with "Cannot learn with JP" in FFTPatcher will become purchasable with JP. In vanilla, we're talking about Zodiac and Ultima, but remember that by default those abilities are set to cost 9999JP by default; you won't get a vanilla Summoner with Zodiac for cheap.

Last cycle: 1%+ = 100% learn
[ :v/: ] : Some abilities have a low learn %, and thus even with many cycles and enough JP to buy the skill, it might still be ignored... unless you check this box, which will ensure that if the skill isn't 0% learn, it will become 100% learn on the last JP Spending Cycle.

Levels
Formula
Here you can create your own formula to calculate how many bonus points are required for each level (2 to 99; Level 1 always costs 0 points), or simply enter a static number for each of them.
Compensated Amount
You cannot edit this value; it is the value that will be stored and used by the hack, recalculated to ensure that the amount of points for level 99 is the same as the amount of points for full potential for Level: 1 to 99. Basically what this means is that if your full potential is 50,000 and in your formula column level 99 requires 200,000, it will divide all values from level 2 to 99 to 1/4th of the value in the formula column.

Max Level = Max Party Level
[ :v/: ] : Let's say your party has units of levels 56, 61, 47 and 49. 61 is the highest level. The hack will take the amount of points required for level 62 and reduce it by one to give you the best chances of getting level 61, if you still have some randomization set for the Level: 1 to 99 parameter. On the other hand, if you have 63/63 guaranteed, you will simply always get level 61 units.
WARNING : This option might not behave properly if you don't have Level: 1 to 99 set to Passive!

Max Price
The player will not be able to set the price higher than this value. It should never be set under the Base Cost of any purchasable unit, or above 99,000,000.
You should also always keep all the digits except the first two as zeros. (see Price (#post_Price))

Title: Re: Soldier Office Upgrade
Post by: Angel on September 29, 2014, 07:35:11 PM
Quote
L1: Current Price + 1 second digit*
R1: Current Price - 1 second digit*
L2: Multiply current Price by 10
R2: Divide current Price by 10
I'd suggest having the L buttons decrease and R buttons increase, since left decreases the item amount to be purchased and right increases the amount, not just in FFT, but in every Final Fantasy that lets you purchase more than one item at a time. Sorry, thought you understood that when we made the button suggestions. x.x

That aside, this is super impressive, and I so need to try this out! :D
Title: Re: Soldier Office Upgrade
Post by: Xifanie on September 30, 2014, 12:04:20 PM
Fixed; please redownload whoever downloaded it in the first place.
Title: Re: Soldier Office Upgrade
Post by: Timbo on October 01, 2014, 12:22:40 AM
Such a fast turn around. Very Impressive.
Title: Re: Soldier Office Upgrade
Post by: Eternal on October 01, 2014, 03:58:22 AM
Just a few images for those wondering if special units can be recruited fairly stable:


EDIT: Naturally, if a unit has no unit.bin sprite, it won't display properly in the formation screen.
Title: Re: Soldier Office Upgrade
Post by: BlankM on December 17, 2014, 06:21:05 PM
This is amazing. I have a question about using it though. When you get a unit thats leveled up, do its stats take into account in-game stat growths as if they were leveled as that Class? Or does it only take into account bonus points? Example if I edited growths of a job, would this work seamlessly with the new growths I made?
Title: Re: Soldier Office Upgrade
Post by: Xifanie on December 17, 2014, 06:56:50 PM
Yes it would. Growth and bonuses are completely independent, and without any bonus, a unit created by this hack would be the same as a unit found in in a random battle.
Title: Re: Soldier Office Upgrade
Post by: Koruten on April 01, 2015, 06:36:16 AM
Hey. I've applied the patch and everything, but I cannot seem to set the price in game. It remains at a flat 0 and buying a Male costs 500, buying a Female costs 400. Did I miss something?

EDIT: Thanks for updating the ASM, Xifanie. It works properly now and It's quite impressive.
Title: Re: Soldier Office Upgrade
Post by: Xifanie on April 02, 2015, 07:56:50 PM
Updated~

Just a few bugfixes, but still pretty important ones.
Title: Re: Soldier Office Upgrade
Post by: Quillbeatssword on January 27, 2018, 02:22:22 AM
How do I get it to work in FFTORGASM?
I Opened it in Excel and tried to find a way to convert it into the correct format. Im not that familiar with the program.
Title: Re: Soldier Office Upgrade
Post by: Aiolon on January 27, 2018, 02:52:09 AM
after finishing your edits go to the .xml Tab and copy the entire column of text then paste it in notepad and save as a .xml file then  place that file in your fftpatcher folder and it should appear in FFTORGASM.
if you are using v.492 you should be able to find it right away.
Title: Re: Soldier Office Upgrade
Post by: Quillbeatssword on January 27, 2018, 02:34:29 PM
Thanks a bunch ;)
Title: Re: Soldier Office Upgrade
Post by: Quillbeatssword on February 01, 2018, 12:26:27 AM
One more question. In the spreadsheet there's a spot to paste info relating to job levels. Where do I locate that data within my patch? I used custom job levels and JP levels. I need to make them work with this. Thanks.
Title: Re: Soldier Office Upgrade
Post by: Xifanie on February 01, 2018, 09:04:27 AM
Open you SCUS_942.21 with a hex editor, select bytes from 0x4F000 to the end of the file, copy (as a block), paste in the spreadsheet.
Title: Re: Soldier Office Upgrade
Post by: Quillbeatssword on February 01, 2018, 11:00:18 AM
Thank you ;)
Title: Re: Soldier Office Upgrade
Post by: RavenCurow on April 12, 2018, 05:55:29 AM
I recently found this hack and I have to say it is awesome. However, when I plug the xml into FFTorgASM it gives a warning that a branch command is in the branch delay slot. Is this something I should be concerned with or is it functioning as it should?

Edit: I went ahead and tried to use this patch and I can't seem to get it to functions at all. I copy the xml without any modifications to an xml and put that into FFTorgASM and patch a clean ISO. After booting up the game I go to the soldier office and all options are blank and monsters cannot be hired.
Title: Re: Soldier Office Upgrade
Post by: supercala on April 12, 2018, 11:18:23 PM
When I input everything into fftactext I keep coming up with DTE for world.bin 08 failed. I followed the rules exactly.

Edit: line number 19 wasn't working for some reason, but the rest of them patched through.

Another side note, this program seems to work for character recruiting of those above like 18k. I went to recruit at start, Dorter, and it just freezes; otherwise, I'm getting level 3 recruits. Not certain if due to not being able to have the text saying that there isn't a recruit available at this time, but will assume
Title: Re: Soldier Office Upgrade
Post by: supercala on April 12, 2018, 11:37:03 PM
I recently found this hack and I have to say it is awesome. However, when I plug the xml into FFTorgASM it gives a warning that a branch command is in the branch delay slot. Is this something I should be concerned with or is it functioning as it should?

Edit: I went ahead and tried to use this patch and I can't seem to get it to functions at all. I copy the xml without any modifications to an xml and put that into FFTorgASM and patch a clean ISO. After booting up the game I go to the soldier office and all options are blank and monsters cannot be hired.

Did you try typing in the info into FFTacText? I see all of the information, but I had your problem before because I overlooked that step
Title: Re: Soldier Office Upgrade
Post by: RavenCurow on April 13, 2018, 12:27:14 AM
It says at the top its supposed to have it in program so I didn't do that. Even then it isn't working right. Like I can't hire monsters. That should work even if the localization isn't there.
Title: Re: Soldier Office Upgrade
Post by: Xifanie on April 13, 2018, 06:27:54 PM
I made this thing so long ago, and tested it myself on console, plus there are others who have confirmed it worked... so, there has to be a reason why it's freezing, and I'm not sure why. I do know that you really should make the text edits.

As far as the DTE issue is concerned, this confuses me because I never had this issue. Try to trim some text in that section a bit?

And FFTOrgASM saying there's a problem with my hack is just a false alert. It would be parsing the data you generated with the spreadsheet as opcodes, and it shouldn't do that since those bytes were never meant to be opcodes.
Title: Re: Soldier Office Upgrade
Post by: RavenCurow on April 14, 2018, 01:20:09 AM
I finally got it to work. I made the text edits and switched emulators to pSX and now it runs fine.
Title: Re: Soldier Office Upgrade
Post by: Glain on April 14, 2018, 10:53:10 PM
As an aside, if you want to get rid of the warning in FFTorgASM, you can add mode="DATA" to the relevant <Section> tag in the XML.
Title: Re: Soldier Office Upgrade
Post by: supercala on April 15, 2018, 04:58:48 PM
I can hire monsters once they are unlocked after Igros Castle in chapter one. Are you doing it after that first Igros scene?