Please login or register.

Login with username, password and session length
Advanced search  


Don't be hasty to start your own mod; all our FFT modding projects are greatly understaffed. Find out how you can help in the Recruitment section.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Glain

Pages: [1] 2 3 ... 25
Help! / Re: Unaligned offset at address xxxx
« on: October 11, 2018, 08:40:11 PM »
This will cause the game to crash on console.  Some emulators may allow it.  Use at your own risk.

EDIT - The hardware doesn't allow doing unaligned loads and stores using lw/lh/lhu and sw/sh.  I wouldn't recommend using any hack that does it.  Any emulator that does allow it is not emulating the hardware correctly.
Unaligned loads/stores of 4-byte values can be done with lwl/lwr/swl/swr but you need to use 2 instructions a shot.

EDIT - Event Instruction Upgrade v1.13 doesn't have unaligned loads/stores.

PSX FFT Hacking / Re: ASM Requests
« on: October 01, 2018, 11:03:31 PM »
Instead of, or in addition to, using MA Factor as a label (and actually i'd use .eqv if you want a constant... labels are for addresses), you could set it up as a variable at RAM 0x176C64 = BATTLE.BIN 0x10FC64.  Clever using 8/80 instead of 10/100 to gain space in the code, but then why not just do 1/10 and not shift at all?

It also might make sense to multiply by the variable then divide by 128 so you could effectively divide by something like 2.5...

Help! / Re: Zodiac Compatibility Modify?
« on: September 25, 2018, 01:11:40 PM »
Yes the final XA*whatever is the percentage, so if whatever is  25 then 25%, if is 13 =13%. For Bad and Good. Worst and Best doubles the percentage, so 25% goes to 50%, 13% goes to 26%, 10% goes to 20%.

 "addu a1,v1,v0" doesn't do XA*10 by itself, is more like "addu r5,r3,r2" == "r5=XA*9+XA", that is why previous line was XA*9.

It may be confusing, but is a low level language not like 'python' or 'ruby' or 'c#', what you are searching is this:
mult r5,r2,10 --> r5=r2*10, where r2=XA

Sadly there is no mult like that in MIPS (psx hardware, to put it simple). Before someone shouts, i know, there is a mult instruction in MIPS set but it doesn't behave with that simple syntax. You could use it nonetheless but in this low level language is easier to write this:
Than this:

It's not that mult or multu is hard to use.  This is how it would look:

li         v1, 10
multu  v0, v1
mflo    a1

You could even use a variable for the first line that defaults to 10 or whatever.

The reason that you often see bit shifts and adds/subtracts instead of mult or div is that they run faster... but in this case you wouldn't notice a difference anyway.  The same can be said about mult being faster than div.

PSX FFT Hacking / Re: ASM Requests
« on: September 15, 2018, 05:17:38 PM »
Interesting routines/code:

Routine 0x8008e468 might be initializing the battle camera.  Particularly interesting:
Code: [Select]
8008e488: 3c04800c lui r4,0x800c
8008e48c: 24847ca0 addiu r4,r4,0x7ca0
8008e490: 34051000 ori r5,r0,0x1000
8008e494: 34061000 ori r6,r0,0x1000
8008e498: 0c010acb jal 0x80042b2c
8008e49c: 34071000 ori r7,r0,0x1000

Sets the camera zoom values to default zoomed-in value 0x1000.

Further in the same routine:
Code: [Select]
8008e4a0: 3c04800a lui r4,0x800a
8008e4a4: 24847784 addiu r4,r4,0x7784
8008e4a8: 3405012e ori r5,r0,0x012e
8008e4ac: 34060e00 ori r6,r0,0x0e00
8008e4b0: 0c010ac7 jal 0x80042b1c
8008e4b4: 00003821 addu r7,r0,r0

Copying some more values, including 0x12e which is what you listed as the default angle-in value.

Routine 0x8012dde8 is also playing with some camera values, including here:
Code: [Select]
8012dee4: 34021000 ori r2,r0,0x1000
8012dee8: ac620080 sw r2,0x0080(r3)

Hacking/Patching Tools / Re: FFT Patcher .478 Source Code
« on: September 13, 2018, 06:21:23 PM »
Regarding BONUS.BIN: All the images in that file are found by Shishi using the same procedure; there's nothing different about image number 2.  Seems farfetched that part of the image would be right and another part wouldn't.

As for maps, it appears that the number is off by one in the XML file.  Try finding /Resources/PSXFiles.xml within the FFTP directory, and edit this line (line 2439):
<Repeat Number="119" Offset="2560"> and change the Number from 119 to 120.

EDIT: Apparently I'm full of it and that file is compiled directly into the Shishi EXE so you can't edit it! Here's an updated EXE.
EDIT: It's also stored as plain ASCII text in the EXE so you could hex edit it.

PSX FFT Hacking / Re: ASM Requests
« on: September 12, 2018, 08:57:59 PM »
Thanks Glain,  ;)  i will test it asap.

A silly question if u recommend same values why zoom out have c00 and c01?

The comparison it's doing is whether the current zooming value is >= 0x0c01.  By contrast it checks for zooming value < 0x1000 when going the other way.  I guess it's so that the zooming will stop in the case of the value being exactly equal.  It's probably not a big deal either way.


a) 0- 15 sec it is controlled by EVT_010
b) 16- 57 sec i dont know what controls it...
c) 58- 72 sec it is controlled by EVT_011
d) 73- end sec controlled by player... (yet it still resets)

For scenarios (b) and (d) it's the battle engine controlling the camera since the event has already played.

PSX FFT Hacking / Re: ASM Requests
« on: September 12, 2018, 08:14:32 PM »
This patch changes what the camera zoom values are when you press L and R.

The values for both zoom-in and zoom-out are hardcoded in two places (each).  One place is for how far in/out the camera goes while zooming, and the other is where the camera stays after zooming.  That's for both zoom-out and zoom-in, so there are four variables total in this patch.  You'll probably want to make the zooming and fixed values for each set the same but you don't have to.

PSX FFT Hacking / Re: ASM Requests
« on: September 12, 2018, 02:14:47 PM »
Yeah, what interests me about this is more the idea of having free rotation/zoom with the L and R buttons.  I think what is to be done with the camera at the start of the battle (if anything) would depend on where that leads me.

Ability effects do reset the camera zoom, but I think we can change the value it resets back to.  I ran into this when I was figuring out how to skip ability effects...  if you skip Galaxy Stop, for example, the camera would stay zoomed really far out, so I had to figure out how to reset the zoom.  That in turn led me to find some of the values controlling zoom and rotation, and through the debugger I was doing some pretty crazy things (zooming in ridiculously far, zooming out so far you could barely see the map), so allowing the player more control over zoom and rotation mid-battle could be interesting... and might finally provide an out for the scenario where you can't quite get the view you want in the middle of a battle.

I've also seen that a weird camera can cause ability effects to get messed up though, doing huge rotations that look really weird... so in theory we would want to avoid that as well.  Not sure how this would all pan out but it does at least seem interesting.

PSX FFT Hacking / Re: ASM Requests
« on: September 12, 2018, 05:26:46 AM »
...A camera hack would be interesting... hmm...

Looking over the code again, it should only work for non-guests (first 16 slots).  The unit backfill hack will change unit numbers of guests however (when a guest leaves the party).

Completed Patches / Auto-SCC Patch
« on: September 07, 2018, 11:25:01 PM »
This patch makes the game a Straight Character Challenge (SCC) immediately from the start of the game.  In the opening sequence, the player chooses an initial job.  Your starting characters are automatically in that job (and will have appropriate equipment).  You even start the opening battle with Ramza as the SCC job.

This eliminates the tedium of unlocking the job you want to play as, but also forces the player into that job earlier than normal.

At the start of the game, there's a job to select...

Looks like we're starting in the Geomancer Academy.

Since you only have access to your chosen job, there's no need to see all kinds of other jobs in the job list...

And, well... you can't change jobs.  This is an SCC.

Also, the only selectable abilities are the ones from your job.

The soldier office appears to now be the Geomancer Office.

Note: Soldier office prices will vary based on whatever equipment is rolled for the unit!  The calculation for the hiring price is actually 1000 + (Equipment Cost).  Since equipment can vary, the price will read 1000 until either Male Fighter or Female Fighter is selected (and the equipment is determined), at which point the price will update with an increased value.

Characters will still join the party as normal... but will be in the SCC job, and cannot be changed out of it.  This applies to special characters as well as generics!  Monsters can join the party, but will not create eggs and cannot be fielded in battles.

Level caps are automatically enforced, and use the standard:
    Chapter 1: 20
    Chapter 2: 35
    Chapter 3: 50
    Chapter 4: 70 (Before Orbonne)
This means you actually don't have to worry about a unit going over the level limit because they just won't be able to level if they would normally have done so.

Abilities to be learned from crystals only include abilities for your job.
Invited units will not join the party at the end of the battle, but their equipment will silently be added to your inventory (much like what happens with a dismissed unit).

This patch uses the "Random unit equipment more selective" ASM patch, and modifies the levels of some equipment so that the AI will, in general, have access to more varied equipment but not equipment that's obsolete.

There are also a few scattered changes:
    Gafgarion at Zirekile doesn't load from the party
    Rubber Shoes become available in Chapter 3
    "Defeat Dycedarg!" at Igros Chapter 4

In addition to employing its own extensive ASM changes, this patch also makes use of the following ASMs:
    Random unit equipment more selective
    Fix Reraise Graphic Width
    Start button skips events, effects, battle and event text, etc.
    JP scroll glitch actual fix (Disable paging on confirm menu)
    Unit slots backfilled when unit is removed from party
    Speed up text crawls
    Switch unit number with L1 and R1 buttons (formation)
    Equipment duplication glitch fixes
    Level down fix
    Crits always deal bonus damage
This patch is actually completed, as far as I'm aware!  The PPF is attached.  I've played through on console without issue.
Feedback is welcome!

PSX FFT Hacking / Re: How to make Wish revive?
« on: August 29, 2018, 01:33:31 PM »
Glain, would that still allow Normal-Wish to function, or would it then only work on KO'd units?

Just wondering because I know a lot of ability formulas that affect both HP and status tend to fizzle out if they can't apply or remove the status they're trying for. May as well preempt the next question if Wish is one of those formulas too :P

It should, although I haven't tested it.  That routine should just add the status infliction/removal to the action.  By contrast, for example, the formula that Raise uses (0x0D) has logic for skipping the healing portion if the status isn't added.

The spreadsheet had some bad default values.  Holy Dragon Reis's value needed to be 0x18, not 0x00.  That's just been broken this entire time, apparently.  I also added in some other default values that are probably inconsequential, but are in some of the vanilla tables.  I'm replacing the spreadsheet in the original post with an updated version.

PSX FFT Hacking / Re: How to make Wish revive?
« on: August 29, 2018, 01:39:22 AM »
You would need to ASM hack the Wish routine as it's not normally capable of applying/canceling a status.  Luckily it should be a fairly simple modification.  For reference, this is the formula in question. 
Changing the instruction at 0x80186e20 from jr r31 to j 0x80187f24 should do it.

Would I be able to get a pSX savestate that reproduces this? Would save a lot of time playing through everything.

In the meantime I can try to figure out what's going on.  My guess is there's another similar table somewhere; I'm betting on REQUIRE.OUT.  Let's see...

EDIT: Ha, yes.  REQUIRE.OUT, 0x11B3C.  Making an updated version of the spreadsheet...
EDIT: Attaching updated spreadsheet.  Just try and see if this works?
EDIT: Removing attached spreadsheet.

Help! / Re: Help coding new stealing/breaking routine
« on: August 27, 2018, 12:58:46 PM »
Oh right, there should have been a jump there.  That way will work but it's good form (although not required) to have one jr r31 per routine.  The way it should be is:

li      t2, 0x10                #   Special flag -Steal-
j      end
sh    t2, 0x10(t0)           #   Store as steal item

Event Editing / Re: Bravestory Shenanigans
« on: August 26, 2018, 10:05:59 PM »
Awesome, looks like that was it, then!

Event Editing / Re: Bravestory Shenanigans
« on: August 25, 2018, 11:52:58 PM »
Testing it, the variable wasn't being unset, like I thought.  I found the code that closes the menu... it's in the same routine that launches the event from the brave story (0x830a8).  I wrote a patch to have it set variable 0x1fc to 0.  I tested it in a save state and saw that the variable wasn't changing without the patch and does change with it, so hopefully this will fix the other issue.

The patch also includes the previous change.  Most of it is actually just moving code down a line or two to make way for the new call.

Event Editing / Re: Bravestory Shenanigans
« on: August 25, 2018, 07:30:31 PM »
Ha, well I guess now there's a scenario where variable 0x1FC isn't being set to 0 when it actually needs to be.  It probably just needs to be set back to 0 before you leave the brave story...  maybe when you come back to the brave story menu from the event, or when you X out of the Records menu or something like that.  I'll have to delve into the ASM/debugger to figure out where that code is, but that's the general strategy, anyway.

Event Editing / Re: Bravestory Shenanigans
« on: August 24, 2018, 01:53:10 PM »
Nice!  This should solve the variable issue too, so in theory the extra event commands shouldn't be needed.

Pages: [1] 2 3 ... 25