øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;u=278;area=showposts;start=645e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index2bd9-2.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;area=showposts;u=278e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index2bd9-2.html.zxÌåg^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ0P.ß*OKtext/htmlISO-8859-1gzip8:Öß*ÿÿÿÿÿÿÿÿTue, 10 Mar 2020 19:25:23 GMT0ó°° ®0®P®€§²ð®Ëåg^ÿÿÿÿÿÿÿÿ‚1ß* Show Posts - chillyfeez

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 - chillyfeez

646
Well, it wasn't simple.
The problem with Sneak is that it doesn't ever have a chance to affect the target, so the data from 7E:2700 is never copied back to the monster's primary data entry (2000,x).
The primary data entry will keep any changes you make to it, but there is no easy way (like "A6 A6") to get an X value to index to the right monster.
So, I had to devise a long and arduous method based on the stealing character's "enemy target" byte - which wasn't easy, because for some silly reason, higher target values correspond to lower X values.
Unfortunately, this is another one where I didn't really keep track of where I put all the custom stuff, but if you were to put a breakpoint on the steal routine and watch a live disassembly against a boss, it would all come out. There's nothing going on in the background like in some of my other mods.

647
I was just looking through my files and I came across this patch I made back in early November when Slick was down.
It's another thing I developed for use in my own hack, but it could be used by anyone who wants this feature.
I call it "Unique Steals."
What it does is, when Stealing is successful against a boss monster, it changes the monster's item byte to 00 (Cure1,Cure1,Cure1,Cure1).
This allows you to have boss monsters that can hold unique items to steal, without the pitfall of infinite acquisitions that normally comes with steal-able items.

648
Final Fantasy IV Research & Development / Re: Graphics info
« on: January 07, 2015, 08:08:02 PM »
Unfortunately, the AI sequence is part of the monster data table, and not in a table by itself - and attack sequences are enormously complicated.

Grimoire LD did some super-helpful research, though, that, among other things, lists each monster that uses each AI component.
http://slickproductions.org/forum/index.php?topic=1893.0

649
SUCCESS!
So here's what we're looking at in terms of functionality...
Salve is now a command that, when selected, opens the item menu. All of the same items will be available as if you had selected Item.
If you choose an attack item (anything that by default targets one or all enemies), the targeting will be All Enemies.
If you choose a healing/support item (anything that by default targets one or all allies), the targeting will be All Allies.
If you choose a weapon from your left or right hand, there will be no difference than if you had selected it from item (no idea why, but I consider this among the best-case scenarios, so I'm not going to look into it)

In the end, not a whole lot of complicated changes had to be made, but it's all custom. I am 99% sure that it doesn't use any of the same space as any of my other stuff, but I'm only posting code here and no patch.

The original block of code that makes the game open a sub-menu is here:
Code: [Select]
$02/B9B9 FA          PLX                     A:0000 X:0000 Y:0000
$02/B9BA BD 03 33    LDA $3303,x[$7E:3307]   A:0000 X:0004 Y:0000 ;LOAD COMMAND SELECTED FROM MAIN COMMAND MENU
$02/B9BD C9 16       CMP #$16                A:0001 X:0004 Y:0000
$02/B9BF F0 1D       BEQ $1D    [$B9DE]      A:0001 X:0004 Y:0000 ;IF IT'S DART, JUMP TO SPECIALIZED DART SUB-MENU ROUTINE
$02/B9C1 C9 18       CMP #$18                A:0001 X:0004 Y:0000
$02/B9C3 F0 64       BEQ $64    [$BA29]      A:0001 X:0004 Y:0000 ;IF IT'S NINJA, JUMP TO THE BLACK MAGIC SUB-MENU ROUTINE
$02/B9C5 C9 05       CMP #$05                A:0001 X:0004 Y:0000
$02/B9C7 90 03       BCC $03    [$B9CC]      A:0001 X:0004 Y:0000 ;IF IT'S ANYTHING ELSE DARK WAVE OR LATER, JUMP BEYOND THE SUB-MENU ROUTINES
$02/B9CC 0A          ASL A                   A:0001 X:0004 Y:0000
$02/B9CD AA          TAX                     A:0002 X:0004 Y:0000 ;IF IT'S FIGHT, ITEM, WHITE MAGIC OR BLACK MAGIC, TURN THE COMMAND NUMBER INTO AN INDEX TO REFERENCE CODE POINTERS (2B9E6-2B9EF)
$02/B9CE BF E6 B9 02 LDA $02B9E6,x[$02:B9E8] A:0002 X:0002 Y:0000
$02/B9D2 85 0E       STA $0E    [$00:000E]   A:0005 X:0002 Y:0000
$02/B9D4 BF E7 B9 02 LDA $02B9E7,x[$02:B9E9] A:0005 X:0002 Y:0000
$02/B9D8 85 0F       STA $0F    [$00:000F]   A:00BA X:0002 Y:0000
$02/B9DA 6C 0E 00    JMP ($000E)[$02:BA05]   A:00BA X:0002 Y:0000 ;JUMP TO THE APPROPRIATE CODE BASED ON POINTERS

The first step here was to get the game to behave like Item if the command selected was Salve, so enter some custom code:
***
Code: [Select]
$02/B9BA 20 C3 9A    JSR $9AC3  [$02:9AC3];JUMP TO SUBROUTINE AT $02/9AC3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$02/9AC3 22 80 8D 14 JSL $148D80[$14:8D80];JUMP TO SUBROUTINE AT $14/8D80 (BECAUSE THERE REALLY ISN'T ENOUGH ROOM IN THE 28000 BLOCK FOR THIS)   
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$14/8D80 BD 03 33    LDA $3303,x[$00:342F];LOAD COMMAND SELECTED FROM MAIN COMMAND MENU
$14/8D83 C9 01       CMP #$01             
$14/8D85 F0 04       BEQ $04    [$8D8B]     
$14/8D87 C9 0A       CMP #$0A               
$14/8D89 D0 04       BNE $04    [$8D8F]   ;IF IT'S NOT SALVE OR ITEM, THEN LEAVE THIS ROUTINE   
$14/8D8B 85 F0       STA $F0    [$00:06F0];IF IT IS SALVE OR ITEM, STORE WHICH ONE INTO (NORMALLY UNUSED BYTE) 00F0 IN RAM - THIS WILL BE IMPORTANT LATER
$14/8D8D A9 01       LDA #$01             ;IF IT IS SALVE OR ITEM, CAUSE THE GAME TO BEGIN ACTING LIKE ITEM
$14/8D8F 6B          RTL                  ;RETURN
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~               
$02/9AC7 60          RTS                  ;BACK TO OUR REGULARLY SCHEDULED PROGRAM

So that makes it so selecting Salve is like selecting Item... except that makes it so selecting Salve is exactly like selecting Item. That's where storing that command into 00F0 comes into play...

For targeting:
Normally, item targeting is generated from the op code at $02/B606 - BD 1A 32    LDA $321A,x[$7E:321A]
Well, we need the game to act differently if Salve is the active command, so, enter more custom code:
***
Code: [Select]
$02/B606 20 B7 9A    JSR $9AB7  [$02:9AB7];JUMP TO SUBROUTINE AT $02/9AB7   
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$02/9AB7 22 90 8D 14 JSL $148D90[$14:8D90];JUMP TO SUBROUTINE AT $14/8D90 (STILL NO ROOM IN THE 28000 BLOCK)   
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$14/8D90 A5 F0       LDA $F0    [$00:00F0];LOAD WHETHER THIS IS ITEM OR SALVE   
$14/8D92 C9 0A       CMP #$0A               
$14/8D94 D0 0D       BNE $0D    [$8DA3]   ;IF NOT SALVE (AND THEREFORE ITEM) THEN LEAVE THIS ROUTINE
$14/8D96 BD 1A 32    LDA $321A,x[$7E:321A];OTHERWISE, LOAD ITEM'S TARGETING
$14/8D99 C9 40       CMP #$40               
$14/8D9B B0 03       BCS $03    [$8DA0]   ;IF IT'S AN ATTACK ITEM, SKIP AHEAD   
$14/8D9D A9 20       LDA #$20             ;IF IT'S A HEALING/SUPPORT ITEM, LOAD 20 (ALL ALLIES) INTO TARGETING   
$14/8D9F 6B          RTL                  ;AND RETURN
$14/8DA0 A9 60       LDA #$60             ;IF IT'S AN ATTACK ITEM, LOAD 60 (ALL ENEMIES) INTO TARGETING   
$14/8DA2 6B          RTL                  ;AND RETURN   
$14/8DA3 BD 1A 32    LDA $321A,x[$7E:321A];IF IT'S ITEM (COMMAND), LOAD ITEM'S NORMAL TARGETING INTO TARGETING   
$14/8DA6 6B          RTL                  ;AND RETURN
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
$02/9ABB 60          RTS                  ;BACK TO OUR REGULARLY SCHEDULED PROGRAM

The truth of the matter is that all of that targeting stuff is just for show. The Salve code is what actually assigns targeting to the command, but I needed to do this to make it look natural.

So now we have selected our item and targeting. Somewhere along the lines here, the game takes care of subtracting 1 from the item quantity, so we can remove that from the regular Salve code entirely.
Now, however, the game will still proceed as though the command was Item, meaning the Life item won't be split properly, so we still need whatever the Salve code does to make things work properly, and in order to do that, we need to tell the game to execute Salve if we chose Salve.

So, a bit of background code that normally takes place shortly after this is here:
Code: [Select]
$03/A6AD A9 01       LDA #$01This 01 will get loaded into the character's "next action," even if the action selected was Salve.
So, we're gonna use that 00F0 value again here:
***
Code: [Select]
$03/A6AD A5 F0       LDA $F0Now, instead, whichever action we really chose will be loaded into A and stored in the character's next action.

And finally, we have to change the Salve routine around so that it pays attention to the new stuff we just did, so now it will look like this:
***
Code: [Select]
$03/E2E4 A6 A6       LDX $A6    ;LOAD CHARACTER SLOT INTO X
$03/E2E6 BD 52 20    LDA $2052,x;LOAD ITEM SELECTED INTO A
$03/E2E9 85 FE       STA $FE    ;STORE A INTO 00FE
$03/E2EB 4C 24 E3    JMP $E324  ;JUMP TO $03/E324 (SKIPPING OVER THE NO-LONGER-RELEVANT QTY REDUCTION ROUTINE, SINCE ITEM SELECTION TAKES CARE OF THIS. REPLACED WITH EMPTY SPACE... PERHAPS FOR LATER USE!)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$03/E324 98          TYA       
$03/E325 85 01       STA $01   
$03/E327 A9 06       LDA #$06   
$03/E329 20 85 80    JSR $8085 
$03/E32C A9 F8       LDA #$F8   
$03/E32E 8D D4 26    STA $26D4  ;TARGETING STUFF, SINCE WHAT WE DID DURING ITEM SELECTION WAS REALLY JUST FOR SHOW
$03/E331 A5 FE       LDA $FE   
$03/E333 8D D2 26    STA $26D2  ;LOAD ITEM INTO NEXT ACTION TO TAKE
$03/E336 EE 2A 35    INC $352A 
$03/E339 20 3E CD    JSR $CD3E  ;MAGIC CALL
$03/E33C A5 FE       LDA $FE   
$03/E33E 8D C5 33    STA $33C5  ;MAGIC GRAPHIC
$03/E341 A9 0A       LDA #$0A   
$03/E343 8D C8 34    STA $34C8  ;LOAD "SALVE" INTO SMALL COMMAND DISPLAY WINDOW
$03/E346 A9 10       LDA #$10   
$03/E348 8D C7 34    STA $34C7  ;(DON'T KNOW)
$03/E34B 60          RTS        ;RETURN

And there you have it!
I can't really make a patch of this, because I don't have a clean base to work from for reference, but if you want this new Salve in your ROM, just write in the sections of code in this post that are preceded by three asterisks (***).

650
Ooh, I hadn't thought about left and right hands. Well, I'll stick with the original plan and see what happens.
I'm thinking that choosing a weapon would just do nothing, but we'll see I guess...

Re: Coat Hammer... It would probably be OK, then, with the exception of the homing wrench. It's not a "usable" item, right? So then it would be grayed out by the method I'm employing.

651
That's a clever idea about experience, but you should try multiplying by 9 or 13/5 or 9/5, not 13.

The reason (again) is to curtail grinding abuse.

Let's use the hypothetical example of a battle that yields 100 exp...

In the original game, this would get divided by as much as 5 (depending upon the amount of living active party members), then the result would be distributed to all living members and the entire shadow. An enterprising grinder could, though, kill off four party members. Then the one living character and the entire shadow gets 100 each.

Now, let's look at what would happen in the shadow hack...
With all members alive or in the shadow (that is, nobody dead or not yet activated), each character would be awarded 7 or 8 exp (100/13).
Well, you wouldn't want to multiply by 13, because then everyone gets 100, and if there are four dead party members, then everyone gets 144.

If you multiply by 9 (900), then a full party gets 69 and 100 with four dead bodies.

9/5 (180) yields 13 and 20 respectively

13/5 (260) yields 20 and 28.

Or you could try some other "improper" fraction...
9/2 (450) yields 34-50
13/2 (650) yields 50-72

It depends on what you want the upper and lower limits to be, I guess, but you don't want your balancing attempt to give the player an unfair advantage.


652
So I have a week off starting today. I'm going to visit family over the weekend, but I have big plans about actually finishing up the second chapter of A Threat from Within.

So naturally, today I worked on it for about 45 minutes then got distracted by some far more complicated hacking research.

You'll love this one, Grimoire - I am very close to devising a method by which other commands (besides Item, Dart and magics) can open a sub-menu. This is actually a potentially productive diversion, because I use Grimoire's custom Salve command in my hack, and if I can get this to work then I can modify it so that the player actually gets to choose which item is used (instead of it being the first item in the inventory every time).
It's kind of a minor thing in the end, but it'll give the custom command a more polished feel.

And of course, if it can be done with Salve, then it can also be done with Coat Hammer, though I'm not completely positive about how well it'll work, because I believe that one has its own set of valid choices (separate from what is a valid choice for Item), and this little trick I plan to devise involves a trip through the same routine Item uses to select an item. And I don't know how to conditionally gray-out items in the menu.

Anyway I'm turning in for the night, but there's what I hope to get done tomorrow.

And maybe finally finish the bosses at the end of chapter 2.

Maybe.

653
I don't remember specifically which parts of his character are left out, but I don't think it's much beyond graphics and level up chart. For a while, I was using his character for Blank in TfW (why? ...can't remember).
The graphics would be a big issue, because they take up so much data. Wouldn't be impossible, though, just... a lot of work.
There's also the problem that FF4kster doesn't like Golbez, so you can't really do much with him unless by hand. That's why I eventually stopped using him for Blank.

654
You could also have an autobattle of Bard vs. Smaug using Golbez's battle sprites.

If I was doing this, I'd have to resist the overwhelming temptation to throw in a "spoony" joke  :laugh:

655
Haha funny you should mention increasing speed.
In TfW, there is one monster (a tree type) that I wanted to be slow, but strong (you know, cuz it's a tree). Problem was, I didn't put a lower limit into this code, so whereas the tree started with something like 2 speed, when it was leveled down, its speed actually increased to something astronomically high.
So that is definitely something to watch out for...

656
No. Sorry, some stats affect all monsters, speed is among them. I can't recall specifically why I chose to do it that way, but I think part of it was to help level the playing field for monsters against major grinding... Which might have been silly.
The good news is that I did keep accurate notes about that patch, so reworking it is entirely possible if it's making things difficult. But as with other monsters, you can also try adjusting down the starting level in FF4kster if he's coming out too slow.

Indeed the clear reasoning why Speed would be affected is fully obvious, but I had thought that Bosses weren't supposed to be affected by the modding process? Was that a misunderstanding on  my part?
Well, yes.
I left bosses largely unaffected so that they wouldn't be too easy or too hard during normal gameplay (read: not a speed-run and not overgrinding), but I also didn't want a situation where you go through a gauntlet of super powered regular foes only to fight a boss who dies in one round.
I'm not quite sure how I decided which stats would increase for bosses, though. It looks like speed and defense (base and multiplier, physical and magical) are affected regardless of whether the enemy is a boss, according to what I posted here:
http://slickproductions.org/forum/index.php?topic=1940.msg20858#msg20858
But the code also skips the stats it does by way of several branch Ops, so this can be adjusted easily, simply by changing some branch parameters.

657
Final Fantasy IV Research & Development / Re: Vehicle event flags
« on: January 05, 2015, 11:26:48 PM »
Sorry, LordGarmonde. Personally, I'm kinda pro-zot in general.
But you can do whatever you see fit in your own hacking endeavors, and I don't entirely dislike your idea. After all, the clerics "lend" you their crystal (so you can trade it for your girlfriend... I wonder is they really knew what the whole plan was), so you could initiate the trip to zot by taking thee cryasta. That makes sense, but yeah, in that case I think you shouldn't be able to leave after that.

658
No. Sorry, some stats affect all monsters, speed is among them. I can't recall specifically why I chose to do it that way, but I think part of it was to help level the playing field for monsters against major grinding... Which might have been silly.
The good news is that I did keep accurate notes about that patch, so reworking it is entirely possible if it's making things difficult. But as with other monsters, you can also try adjusting down the starting level in FF4kster if he's coming out too slow.

659
Final Fantasy IV Research & Development / Re: Vehicle event flags
« on: January 05, 2015, 07:35:58 PM »
Not positive about this, but the routine may not repeat if a certain flag is set.
That's the way the tower of zot works.
Giving the crystal to the clerics sets the flag that makes Kain take you to zot.
During that event, another flag is set that makes that event not happen again, but when both are set the enterprise automatically goes to zot.
At the top of the tower, that first flag gets cleared, and without the first flag set, the second flag won't make you go to zot.

So if I had to guess, I'd say the "fixing the enterprise" flag negates a repeat of the initial descent event.

660
Final Fantasy IV Research & Development / Re: Damcyan border tiles
« on: January 05, 2015, 01:38:52 PM »
Yeah, but what was silly of them was to put in "return" tiles at town entrances. Agart is a good example of this: three return tiles at the entrance, when walking one tile further would trigger a return anyway. The grass return tiles really are a waste of tile.
Though the town tileset has several entirely unused tiles, I believe.
... Or maybe that's the town interior tileset. Sorry, This is all from memory - I'm at work right now so can't check my answers.