• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
April 27, 2024, 06:44:21 pm

News:

Please use .png instead of .bmp when uploading unfinished sprites to the forum!


ALMA 4: Excalibur grants Forever: Orlandu

Started by pokeytax, February 07, 2011, 06:01:18 pm

Argy

Thank you Pokey!!
I will try this out tonight along with a few other things. I love that we can give items different attributes etc. Also I think in terms of event editing, I would love to have the time to tinker with the program and learn the fundamentals of it and try to create something!! It's the real world commitments (job, family etc) that take precedent in many peoples lives. Though any opportunity I get, I am working on shishi or using the patcher or now going to be playing ALMA!!

Once again thank you for your help!
Argy
  • Modding version: PSX
Kotetsu Quad Killer!!

pokeytax

Quote from: RavenOfRazgriz on July 05, 2011, 08:15:44 pm
Random thing while you're doing that: Celdia reported that her Item that had innate: Half of MP wasn't working correctly with ALMA as well.  Any idea what's causing that?


I just tacked it on a Dagger and it's working fine, although I did it by editing tables, not the spreadsheet. I'll do the whole kit and kaboodle tomorrow and see if that causes a problem - if that doesn't work, I'll have to ask for an .xml or .xls.

Dome I made you an .xml!!!
  • Modding version: PSX

Eternal

Question: what does the HPM/MPM/etc. column do? I assume it has to do with multipliers, but I'm not sure.
  • Modding version: PSX & WotL
"You, no less human than we? Ha! Now there's a beastly thought. You've been less than we from the moment your baseborn father fell upon your mother in whatever gutter saw you sired! You've been chattel since you came into the world drenched in common blood!"
  • Discord username: eternal248#1817

MysticKnightFF5

...HP Multipliers...MP Multipliers....? >.>

pokeytax

Quote from: Eternal248 on July 07, 2011, 10:18:09 am
Question: what does the HPM/MPM/etc. column do?


It adds a minimum multiplier. If Battle Skill grants HPM 100 (i.e. by setting such an attribute to cells Y4:AB4 and cell D26 to "Yes" in the 'Passive Abilities' tab) , then a Time Mage (HPM 75) with Battle Skill secondary will have Squire-level HP, but a Monk with Battle Skill secondary will see no difference.
  • Modding version: PSX

Dome


"Be wise today so you don't cry tomorrow"

Celdia

Quick bug report for you, pokeytax. Just did about 2 hours of testing and came to this odd conclusion: I made an attribute of Weak/Half/Absorb: Holy and applied it to the Fly move skill. When encountering Zalera, who has innate Fly, it jacked up his MA score from about 16 to 50 (though I assume it was trying to go higher). This boost did not occur if he was not flagged for ??? stats. I'm not too worried about losing Fly on him (Teleport 2 will do just fine as a stand in ^_^ ) but I don't know if this bug will repeat itself elsewhere.

Oh, and in regards to that Half of MP problem I was having, it was user error. I had made the attribute for it but never set it to the item like I'd thought I'd done.
  • Modding version: PSX
  • Discord username: Celdia#0

pokeytax

This should be fixed now (it would have applied to everything with ??? stats and an ALMA attribute, so... yeah). Thanks for beta testing my hack - if there's anything I can hack for CCP, ALMA or otherwise, let me know, it's the most active patch so I would be happy to be of service. But if not ALMA 4 will have some new toys (and be tested more thoroughly!).
  • Modding version: PSX

Celdia

Between ALMA and ARH 1.2 you've already done more for CCP than I could quantify, pokeytax. I'll just keep making use of your awesome tools and updates. :D
  • Modding version: PSX
  • Discord username: Celdia#0


pokeytax

Quote from: pokeytax on June 14, 2011, 06:07:28 pm
ALMA 3 in the original post now has limited previewability: for items only, constant HP/MP/PA/MA/SP/MOV/JMP bonuses and penalties will show up. Of course I'm going to work on the crazy multiplier stuff and R/S/M preview later, but at least you can put HP on a shield now without wincing.
  • Modding version: PSX

pokeytax

A quiddity from today:

This code crashes pSX in runtime, but not in stepthrough:

lui r3, 0x8015
sw r4, 0xA820(r3)
sw r5, 0xA824(r3)
nop
sltiu r3, r2, 0x0050
bne r3, r0, 0x0BC4
sltiu r3, r2, 0x0079
bne r3, r0, 0x0CA0


This code works fine:

lui r3, 0x8015
sw r4, 0xA820(r3)
sw r5, 0xA824(r3)
nop
nop
nop
nop
nop
sltiu r3, r2, 0x0050
bne r3, r0, 0x0BC4
sltiu r3, r2, 0x0079
bne r3, r0, 0x0CA0


But the other code was working fine for a while. The moral of the story is, who even knows. pSX seems to behave oddly at times - the rational explanation is that something else in my code is causing an issue, but I looked it over, believe me, and that would cause issues in stepthrough too, not just runtime.

(ALMA 4 is doing okay and there should be a buggy alpha available soon.)
  • Modding version: PSX

RandMuadDib

July 25, 2011, 12:55:41 am #192 Last Edit: July 25, 2011, 12:59:44 am by RandMuadDib
Quote from: pokeytax on July 24, 2011, 11:32:21 pm
This code crashes pSX in runtime, but not in stepthrough:
lui r3, 0x8015
sw r4, 0xA820(r3)


Isn't this one of those 'load delay' problems i've heard about? granted i know very little (okay almost nothing) about asm or mips, but that's my guess from what i've seen people talk about.

(P.S. feel free to flame the asm noob for being presumptive)
I will show you the power of SARDIIIIINES!!!!

Glain

July 25, 2011, 12:37:17 pm #193 Last Edit: July 27, 2011, 04:23:55 pm by Glain
Nah, the [lui] instruction doesn't actually load anything from memory (it's like the only command starting with 'load' that doesn't), so there's no load delay slot in play here.

I gotta say, that is something. I wouldn't have thought there was anything wrong with that code either... I can only throw out some half-baked theories:
1. Doing a comparison in a branch delay slot that changes one of the registers being compared in a conditional branch is somehow a problem? (lines 6 and 7)
2. Attempting to save to those memory addresses (0x8015A820, 0x8015A824) is somehow a problem? (lines 2 and 3)
3. Logic: r3 being set to (r2 < 0x79) instead of (r2 < 0x50) if the first branch is taken is somehow a problem? (unlikely as you probably already considered this)

The thing is, none of it seems likely. The huge list of [nop] fixing the problem is reallllllly bizarre. I actually think the [nop] in the original code is unnecessary (not sure why it's there).

EDIT: beq r0, r0? Don't you mean j?
Also, even though branch delay and load delay are similar, one is branching and one is memory loading, so it's probably better if we differentiate, i.e. beq/bne have a branch delay slot, not a load delay slot. But anyway.
  • Modding version: Other/Unknown

formerdeathcorps

July 26, 2011, 06:15:26 am #194 Last Edit: July 26, 2011, 06:15:47 am by formerdeathcorps
Pokeytax, at what offset did you put your test code?  At what offset does your routine crash during run-time?

EDIT: 4) This is part of a infinite loop.  Either r3 is improperly modified so you always branch back to line 5, or you are doing:

branch Line5
lbu r3, SOMEPLACE

somewhere in the code.
The destruction of the will is the rape of the mind.
The dogmas of every era are nothing but the fantasies of those in power; their dreams are our waking nightmares.

pokeytax

July 26, 2011, 08:29:39 pm #195 Last Edit: July 27, 2011, 11:06:53 pm by pokeytax
A buggy alpha of ALMA 4 is posted to the OP. I haven't debugged the scripting yet or thoroughly debugged much of anything, but it runs the core code without crashing so I'm going to post it for the curious. I still have a ton of debugging to do, so while I appreciate every comment beta testing isn't a priority yet.

This is NOT RECOMMENDED as a replacement for ALMA 3 if your patch is running on ALMA 3. It has several known issues (e.g. PA/MA/SP battle buffs/debuffs don't work right) and doesn't have the noncore ALMA 3 stuff like disables and skillsets yet. If you fell for my lies about ALMA 4 resolving your bugs, man, you are a sucker. But I'm working on fixing those and getting it up to speed, and the code should be easier to maintain.

If you do decide to fiddle with it out of morbid curiosity, I suggest you avoid the ALMAscript and ALMAtrait tabs, they're almost certainly too buggy right now to function and the interface is Not Good.

I've also attached my notes, although those are of even less general interest. (fdc, I checked for what you're suggesting, but the constraint that it crash in runtime but not in stepthrough is pretty harsh. A logic error should trip that, and nothing should be branching there. Please don't spend your precious coding time on it unless you really enjoy it, since some nops fixed it, but if it comes up again I'll hunt more intently for it.)


- Set bonuses implemented. An item can belong to two sets (or count twice for one set), e.g. Masamune can be in set 01 ("Genji") and set 05 ("katanas").
- Job level bonuses scrapped and replaced with simple attributes attached to jobs and secondaries. The replaced functionality will be available in ALMAscript.
- Identity attributes; e.g. Ramza (not uberSquire) gains Gained JP Up, Mustadio (not Engineer) gains Equip Gun.
- Revamped passives to work with RAD. Knight ability A4 can apply a passive to Knights and freelancers, A5 can apply to Knights and Battle Skill secondary, and A6 can apply to Knights only. There is more flexibility to give special characters global passives in their base class.
- Added "natural" stat boosts, which are affected by HPM/MPM/PAM/MAM/SPM.
- Added percentage stat multipliers for people who hate the number sixty.
- Fixed the issue where several low multipliers were all rounded down to zero instead of compounding.
- Added bonuses/multipliers for wonky stuff like evasion stats which may or may not work.
- Added brave/faith modification to attributes. YOU MUST DISABLE PERMANENT BRAVE/FAITH MODIFICATION. YOU SHOULD PROBABLY DISABLE IN-BATTLE BRAVE/FAITH MODIFICATION.
- Added the ability to strip RSM/status/elements (e.g. Flame Shield grants Absorb:Fire and Weak:Water, removes Absorb:Water).
- Added the ability to disable, enable, and disable with extreme prejudice equipment types, in that order. Example:
Knights can equip Swords.
If White Magic secondary disables Swords, Knight/White Magic cannot equip Swords.
Knight/White Magic/Equip Sword can equip Swords.
If the shield Escutcheon III hard disables all weapons, Knight/Equip Sword cannot equip Swords.
- There is an equipment check which enforces Two Swords/equipment restrictions, so stuff like Merit Awards and offhand daggers that grant Two Swords should be okay now. Two Hands might still be iffy, we'll see.
- Attributes have limited space now. Attributes 50-77 are "long" and can hold sixteen mods. Attributes 78-EF are "short" and can hold four mods.
- Attributes can be chained together; attribute 50 can hold fifteen mods and then call attribute 51, which can hold fifteen mods and then call attribute 52 to accommodate whatever monstrosities are required. (But don't have attribute 52 call attribute 50...)
- ALMAscript is going to be rad when it's done, but it's not. I'll tease it when it is.
  • Modding version: PSX

formerdeathcorps

July 27, 2011, 02:51:59 pm #196 Last Edit: July 27, 2011, 02:57:12 pm by formerdeathcorps
I just applied your patch without the extra nops.  Nothing froze.  A couple of issues, however:

1) It's never efficient in terms of either space or runtime to use a scripting language, especially if your scripting language is used for only part of your hack because you'll spend more space on interpreting code just for that little section of script.  (Also, you threw out MIPS' system of opcodes only to add your own, which doesn't seem too efficient.)  You literally have to have ALMAscript encompass all of your data tables (wherein 4 byte => 3 byte commands) for it to exhibit any overall space savings.

2) In terms of general efficiency, your code could be improved.  The following are merely examples of what I'm finding throughout your code.

0F78   bne r2, r6, 0x0FA4   
0F7C   nop   
0F80   nop   
0F84   add r6, r17, r7   

A) Why do you have two nops there?  Only one is really needed.  Furthermore, if you're branching to a line that says sll r6, r6, 0x01, can't you do...
0F78   bne r2, r6, 0x0FA4   
0F7C   sll r6, r6, 0x01   
0F80   add r6, r17, r7   
...
0FA4 beq r6, r0, PLACE




10B4   sltiu r7, r4, 0x001E   
10B8   bne r7, r0, 0x0CCC   
10BC   addiu r4, r4, 0x0002   
10C0   lui r3, 0x8016   
10C4   lw r4, 0xF1AC(r3)   
10C8   lw r5, 0xF1B0(r3)   

This is by no means the only place but...
B) You load 0x80160000 to r3 only to change r3's value right after.  The repeated use of (lui r3/r6 0x8016) throughout your code adds up and wastes space.  Shouldn't you just dedicate a register to this value?
C) You can't load 0xF1AC (r3).  Did you mean load -0x0E54 (r3)?


10CC   sltiu r3, r4, 0x0004   
10D0   bne r3, r0, 0x0220   
10D4   nop   
10D8   sltiu r3, r4, 0x0014   

D) There's nothing barring you from compressing the code (unless the recursive code checks the binary value on r3)...
10CC   sltiu r3, r4, 0x0004   
10D0   bne r3, r0, 0x0220   
10D4   sltiu r3, r4, 0x0014   
....


....
10FC   sltiu r3, r4, 0x003A   
1100   bne r3, r0, 0x04E8   
1104   nop   
1108   sltiu r3, r4, 0x008C   
110C   beq r3, r0, 0x05A4   
1110   nop

E) At the end, if r4 can take a value between 0x3A to 0x8B (inclusive), this code won't end.  If not, however, this is a waste of space since...
10FC   sltiu r3, r4, 0x003A
1100   bne r3, r0, 0x04E8
1104   nop   
1108   beq r0, r0, 0x05A4    
110C   nop

...does the same thing



0F84   add r6, r17, r7   
0F88   lbu r7, 0x0046(r6)   
0F8C   ori r2, r0, 0xFFFF   
0F90   xor r2, r2, r5   
0F94   and r2, r2, r7   
0F98   sb r2, 0x0046(r6)   
0F9C   beq r0, r0, 0x10B4   

F) Can't you exploit the load delay and rewrite the end?  Something like...
...
0F94   and r2, r2, r7   
0F98   beq r0, r0, 0x10B4   
0F9C   sb r2, 0x0046(r6)

The destruction of the will is the rape of the mind.
The dogmas of every era are nothing but the fantasies of those in power; their dreams are our waking nightmares.

pokeytax

Quote from: formerdeathcorps on July 27, 2011, 02:51:59 pm
1) It's never efficient in terms of either space or runtime to use a scripting language, especially if your scripting language is used for only part of your hack because you'll spend more space on interpreting code just for that little section of script.  (Also, you threw out MIPS' system of opcodes only to add your own, which doesn't seem too efficient.)


Yes, it sacrifices runtime, and space to an extent. If you know how to ASM you might be better off jumping to freespace, but for the ASM-impaired I think it has some usefulness.

Quoteefficiency


As I'm sure you noticed, I have a mild phobia about branch delay slots, induced by a terrible time fixing a similar bug before. I attributed that to fiddling with a branch variable in the delay slot, but given this recent recurrence that's unrelated to that (and the fact that native code does that all the time with no issues!) I think I'll take your advice.

There is a lot of fat besides that though (e.g. lui r3, 0x8016 being 10% of the hack by weight). I'll take your notes into consideration if/when I go through and rewrite - while in the past I have protested that freespace is basically limitless, things look different now that I am up against the limit!
  • Modding version: PSX

Pickle Girl Fanboy

FDC, did you learn all your asm skills here, with no university classes or anything?  Are you guys going to start the next facebook someday?

pokeytax

Some bug fixes and an ALMAscript tutorial (it seems stable enough to use now). An example script that permits Two Swords gun/gun and crossbow/crossbow, but not sword/gun, is included.
  • Modding version: PSX