Users browsing this thread: 1 Guest(s)
ASM Requests

#1
Posts: 2,549
Threads: 98
Thanks Received: 147
Thanks Given: 158
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
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.
Quote  

#2
Posts: 290
Threads: 3
Thanks Received: 40
Thanks Given: 1
Joined: Apr 2012
Reputation: 9
Status
None
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
  Find
Quote  
[-] The following 1 user says Thank You to Synchysi for this post:
  • Gi Nattak (08-11-2013)

#3
Posts: 2,549
Threads: 98
Thanks Received: 147
Thanks Given: 158
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
Right on, thank you very much Synchysi.


We are born, live, die and then do the same thing over again.
Quote  

#4
Posts: 290
Threads: 3
Thanks Received: 40
Thanks Given: 1
Joined: Apr 2012
Reputation: 9
Status
None
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
  Find
Quote  
[-] The following 1 user says Thank You to Synchysi for this post:
  • Gi Nattak (08-20-2013)

#5
Posts: 763
Threads: 83
Thanks Received: 55
Thanks Given: 7
Joined: Apr 2015
Reputation: 22
Status
Obliviscence
(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.
  Find
Quote  

#6
Posts: 290
Threads: 3
Thanks Received: 40
Thanks Given: 1
Joined: Apr 2012
Reputation: 9
Status
None
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
  Find
Quote  
[-] The following 1 user says Thank You to Synchysi for this post:
  • Gi Nattak (12-05-2013)

#7
Posts: 290
Threads: 3
Thanks Received: 40
Thanks Given: 1
Joined: Apr 2012
Reputation: 9
Status
None
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
  Find
Quote  
[-] The following 1 user says Thank You to Synchysi for this post:
  • Gi Nattak (12-05-2013)

#8
Posts: 2,549
Threads: 98
Thanks Received: 147
Thanks Given: 158
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
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.
Quote  

#9
Posts: 2,549
Threads: 98
Thanks Received: 147
Thanks Given: 158
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
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.
Quote  

#10
Posts: 175
Threads: 11
Thanks Received: 10
Thanks Given: 8
Joined: May 2013
Reputation: 13
Status
Well-Fed
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
  Find
Quote  
[-] The following 1 user says Thank You to GrayShadows for this post:
  • Gi Nattak (03-28-2014)



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite