• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
March 28, 2024, 04:11:46 am

News:

Use of ePSXe before 2.0 is highly discouraged. Mednafen, RetroArch, and Duckstation are recommended for playing/testing, pSX is recommended for debugging.


Need formulas or spreadsheets to calculate stat gains and damage

Started by nitwit, September 06, 2016, 04:02:59 pm

nitwit

Thank you again for that!




The first four parameters work:
args[]
0: The first level to print, inclusive
1: The last level to print, inclusive
2: The first job to print, inclusive
3: The last job to print, inclusive
4: The first ability to print, inclusive
5: The last ability to print, inclusive

Inclusive means that it includes the value you feed to it.
java StatCalc 10 20 74 74 a a
Would print the stats for Squire (job number 74) from level 10 to level 20, including both level 10 and level 20.  Most parameters are inclusive on the beginning value and exclusive on the second value - but I think that's dirty, so all my parameters are inclusive on both ends.

This makes for some odd things like the second 2 parameters, which state, "Start at job 74" and "End at job 74".  Seems like an odd way to say "Print only job 74", but it's less odd than the normal way of doing things IMO.


nitwit

Printing off the rest of the stat values, then working on the conditionals to select the appropriate raw stat.




The stat printing and gender selection is mostly done.  Only thing left to do is account for HP and MP that are 1 digit long for some monsters and dummy classes.  Maybe I should account for HP and MP that are over 3 digits long too and give the Zodiac monsters their *10 bonus to HP and MP...

Back to 7 parameters:
**Required Parameters**
1st: The first level to print, inclusive
2rd: The last level to print, inclusive
3th: The first job to print, inclusive
4th: The last job to print, inclusive
5th: The gender you want generics to stat as: 0 for male, 1 for female, 2 for Ramza, 3 for monster
6th: The first ability to print, inclusive //NOT IMPLEMENTED YET, USE A DUMMY VALUE
7th: The last ability to print, inclusive //NOT IMPLEMENTED YET, USE A DUMMY VALUE

If for some reason you want a different gender for a specific job, you may edit them at your leisure in jobNames.csv.  The 3rd value (the one after the second comma) is the gender.  0 for male, 1 for female, 2 for Ramza, 3 for monster, or 4 if you want the gender to be determined by the command line parameter you pass in above.

If you want to print levels 1 through 99 of all the jobs (with all the non-gender specific generics as females):
java StatCalc 1 99 0 159 1 e f

Linux users, you can pipe it to less (or your favorite text editor) if you want to scroll through everything.
(java StatCalc 1 99 0 159 1 e f) | less

You can also send the output to a text file, it might work on Windows.
(java StatCalc 1 99 0 159 1 e f) > GETAJOBHIPPY.TXT




Time for me to work out, I'll fix the 1 digit thing tonight then work on the ability printing tomorrow.




I need to know more about how the Zodiac beasts get their HP and MP boosts.  I can't find it on the wiki, anyone have a link?

Other than the Zodiac beast thing, the ability printing is 100% done.  I might have to revise the parameter and the looping to add in a viable ability printing tomorrow, but that's it.

nitwit

Could someone with a gameshark or debugger available tell me what the MP values are for any zodiac beast at any specific level?




Started work on the ability output printing.  Might need more parameters for weapon type, brave, and faith.

Also I just remembered that there's an additional step that Windows users need to take to get the JDK and possibly the JRE to run, I'll get on it tomorrow.

3lric

  • Modding version: PSX

nitwit

Having driver issues on my Windows machine, hence the request.  I can calculate the level myself, I just need to see any MP value and level.  My results differ from Raven's spreadsheet, but only in regards to zodiac monster MP.




Found the first thread I made a few years ago about the same driver issues, expect I'll have them fixed soon.

Plugging away at the massive switch-case conditional for ability printing.  Progress saved here in case my hard drive crashes.

Actually going through all the formulas it's astounding how much waste there is.  You could reduce the number of formulas by 1/2 if they used flags already present in FFTPatcher, more if you redesignated unused flags and bits in the X/Y abilities values.  No one would ever have an ability that breaks SP/PA/MA by more than 4, the remaining bits in X and Y could be used to determine what stat an ability breaks.  The only question is would you actually save space if you read ability flags and bytes?




Holy crap, that only took forever.  Finally done with that switch-case block.  Probably doesn't compile, just archiving it for now.  Next I'll get it to compile and work on ability printing per level.




It compiles!  I'll check for run-time errors and get the final print statements working soon.




It's done, and looking pretty.  Just need to make some documentation - harass me if you want it sooner.




May as well get started on the documentation.

Windows
If you don't want to do any java development at all - you want it to Just Work - follow these instructions.

1. Google "java runtime environment".  The first link should be from Oracle.  Here's the link for JRE 8, which is also sometimes called java 1.8.  You should see something like the first attached image below.  In general you want the most up-to-date one, so if there are two options pick the one with the highest number (Java SE Runtime Environment 8u112, in this case as presented in the image).  From there select the download appropriate to your operating system and architecture (for most of you this is Windows x64, while those with older computers that have less than 4 gigabytes of RAM and run Windows 7 or older should probably select Windows x86).  I prefer the *.exe download and the offline download, so if you don't know what you're doing get those.  Make sure you click "Yes" on the agreement too before you try to download it.
2. Follow the instructions in the JRE *.exe installer.  Be careful what you click, because Oracle in their infinite wisdom packages the Ask.com toolbar and some other crapware with Java, their sole programming language product.  If you see things with the word "Java" in them its probably safe to click yes, install this.
3. If you're having trouble, watch this video:
https://www.youtube.com/watch?v=EfPE--hWjGY
4. Actually, just watch that video, it explains how to set the PATH variable too.

...

If you do want to develop with Java, you need the JDK - the Java Development Kit.  The JDK comes with the JRE, you don't need to install both.  The JRE is the program executor - it runs the programs.  The JDK is the program compiler - it turns code into valid Java programs (or it gives you errors if it's not valid).

Again, watch the video I linked to above:
https://www.youtube.com/watch?v=EfPE--hWjGY

Now you should check if the path to the java binaries (the bin folder in the video above) is set in the PATH variable.  Do this by typing:
echo %PATH%
in a console (cmd.exe, aka the command prompt or a terminal).  This should output a bunch of text.  The text is a list of paths to various things, and one of them - probably the last one - should be the path to the Java bin folder you just installed.  If it's not, simply get the path to that folder and then type:
Set PATH = %PATH%;C:\...
where "C:\..." is the path to the java bin folder.

If you're still having trouble, watch this video:
https://www.youtube.com/watch?v=FzKcJK68z2k

...

http://www.bluej.org/

If you are really lazy, you're a Mac user, or you want a newbie friendly tool for developing Java programs, download BlueJ.  Specifically, the version of BlueJ that comes bundled with the JDK.  You can do this instead of installing the JRE if installing the JRE manually is scary, but be aware that you'll install a decent sized program along with Java, and you'll still need to deal with the PATH variable (which is covered in either of the above videos).

If the PATH isn't showing up after setting it, close out of a console and open a new one, then type echo %PATH% again.