ASM Requests
#1
If any of you coders is up to the task, what I'm looking for is a new event command that gives a PC xx level(s) up, or even just a normal +1 level to a character like a normal level up, either or.
It would have to work the same as real level up, with the stat boosts accounted for.

example of the command: 9E 00 01
9E (unused command) 00 (Terra) 01 (+1 levels)

I seen this in another RPG the other day and thought it would be a nice command to have at one's disposal for things like NPC side quests, or character evolving ala Paladin Cecil-type events. It would also work as a fun alternative than having to fight monsters to gain levels, and be a great replacement for level averaging if one has taken that out and does not like having some characters join at such low levels. This would most likely piss off any LLG'ers lol, but it is what it is.

I'm not sure how hard of a code this would be to write, I hope it's not too unreasonable or mind-numbing of a request.
We are born, live, die and then do the same thing over again.
Reply
#2
The hard drive with all my hacking tools/documents/whatever else is currently out of commission, but as soon as I get a replacement up and running, I'll give this a shot.
GET A SILK BAG FROM THE GRAVEYARD DUCK TO LIVE LONGER.

Brave New World
Reply
#3
Right on, thank you very much Synchysi.
We are born, live, die and then do the same thing over again.
Reply
#4
So, I didn't forget about this. Sweat Sorry for the delay; I've been quite busy lately, in addition to my hard drive being dead (which it still is).

In any event: http://www.synchysi.com/ff6h/manual_levels.rar

There are two patches in there; one for headered ROMs (-h.ips) and one for non-headered ROMs (-n.ips). They were only tested on version 1.0, but I don't see any reason they wouldn't work on version 1.1. I'm sure I'll release the source at some point, but for now it's just a patch.

The event to activate it is identical to the example you have in the original post, but I'll expound for the sake of posterity (and for material to add to a Readme I'll make later on).

The command works thusly:

9E xx yy

9E is the event command to manually grant levels to a character of your choice.
xx is the character ID (0 = Terra; 1 = Locke; etc.)
yy is the number of levels to raise the character. Leaving this at zero should result in the specified character gaining zero levels, but I didn't have the time to test this.

It will level up anyone whether they're in the party or not, complete with any applicable esper bonus. I don't see why it wouldn't level characters you have yet to recruit, but I didn't have a chance to test that particular possibility.

Free space used:

42 bytes at C0/D613.
2 bytes of space at C2/FCA4 due to Eggers' sexy little long jump routine. I can move this if you need me to.

Something I thought of on my way home is that I don't think the patch will recalculate experience values after gaining levels in this way.

I'll work on that tomorrow.
GET A SILK BAG FROM THE GRAVEYARD DUCK TO LIVE LONGER.

Brave New World
Reply
#5
(08-20-2013, 07:38 PM)Synchysi Wrote: I don't see why it wouldn't level characters you have yet to recruit, but I didn't have a chance to test that particular possibility.

If you didn't change any other code, then you can use this on any actor that has already had its properties assigned with event command 0x40. Technically, you can do this without having assigned properties, but when you do assign properties the game will re-average the characters level anyway making any bonus levels pointless. So in practice, once you've assigned properties to an actor, you can use this to your hearts content.
Reply
#6
All right, I updated the patch so it should now re-calculate experience when a character is granted a level. I also took the opportunity to make it a bit more efficient.

http://www.synchysi.com/ff6h/manual_levels.rar

It now uses 46 bytes of free space at C0/D613.
GET A SILK BAG FROM THE GRAVEYARD DUCK TO LIVE LONGER.

Brave New World
Reply
#7
And one final update. Sweat

The non-headered version of the patch has been removed from the archive (for distribution purposes; I can re-create it if needed), and it now contains the assembly source and a Readme.

I tested a few more potential issues and had no problems, so I think it's working fine. Let me know if you find any issues.
GET A SILK BAG FROM THE GRAVEYARD DUCK TO LIVE LONGER.

Brave New World
Reply
#8
Just wanted to say, I finally got around to using this code/patch, and it works like a charm! ^_^ Thanks again Synchysi.
We are born, live, die and then do the same thing over again.
Reply
#9
Next on my list of needed assembly work is a command that will grant any playable character any spell. Apparently there is already code for this, but no event command assigned to it. Hopefully that would make it a lot easier:

C0/AE0D: A5EB LDA $EB (load parameter, character)
C0/AE0F: 8D0242 STA $4202 (save as a multiplier)
C0/AE12: A936 LDA #$36 (54...)
C0/AE14: 8D0342 STA $4203 (save as the other multiplier)
C0/AE17: A5EC LDA $EC (load another parameter, the spell number)
C0/AE19: C221 REP #$21
C0/AE1B: EA NOP
C0/AE1C: 6D1642 ADC $4216 (add the result of the multiplication)
C0/AE1F: AA TAX (new index)
C0/AE20: 7B TDC
C0/AE21: E220 SEP #$20 (8 bit accum./memory)
C0/AE23: A9FF LDA #$FF (empty slot in most cases, but for this...)
C0/AE25: 9D6E1A STA $1A6E,X (set spell as learned)
C0/AE28: A903 LDA #$03 (Advance the script pointer by 3)
C0/AE2A: 4C5C9B JMP $9B5C

I am already using unused commands 9E, 83, and A3, so it can't be one of those. Many thanks to anyone who will do this and will credit of course. I swear I will try and learn assembly one of these days when I can devote time solely to it, so I can do this stuff myself and feel proud! I am still getting familiar with the most basic commands...

Example of the command: 9F 02 01
9F (unused command) 02 (Cyan) 02 (grants spell 00 Fire)

P.S. In case it is to tedious to make a command that will give any character a spell, I really just need something for character 02, like how Sabin is granted the Bumrush, but it would be nice to have it for every PC for other hacks or w/e.
We are born, live, die and then do the same thing over again.
Reply
#10
I'll point you to this helpful thread! Laugh https://www.ff6hacking.com/forums/showth...hp?tid=903

It uses command 8F (which unlocks all of Cyan's SwdTechs) instead of a free event code, but the principle stays the same; you just need to change the pointer somewhere else in the table. For event code 9F, you'd change the '1AB9' at C0/9998 to '0EAD', and then use 9F as you outlined -- 9F 02 00 would teach Cyan the Fire spell, or 9F 00 0F would teach Terra Flare.
Current Project: FF6: Tensei | Discord ID: TristanGrayse
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Final Requests for Help PowerPanda 54 33,649 05-15-2021, 11:36 AM
Last Post: MysticLord
  Some final code requests (and screenshots) Lightning 178 147,726 03-03-2021, 03:39 AM
Last Post: Lightning
  FF6LE Requests & Suggestions Zeemis 1 2,821 03-02-2012, 02:35 PM
Last Post: madsiur

Forum Jump:


Users browsing this thread: 1 Guest(s)