øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1618.0;prev_next=preve:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexa87d-2.htmllayedslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1618.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexa87d-2.html.zx±hg^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈàHwO¸OKtext/htmlISO-8859-1gzip@øÕO¸ÿÿÿÿÿÿÿÿÑHTue, 10 Mar 2020 10:31:36 GMT0ó°° ®0®P®€§²ð®°hg^ÿÿÿÿÿÿÿÿª!O¸ Character names and Job names (changing pointers)

Author Topic: Character names and Job names (changing pointers)  (Read 2708 times)

Zozma

  • FF4 Hacker
  • *
  • Posts: 120
    • View Profile
Character names and Job names (changing pointers)
« on: June 09, 2011, 04:17:45 PM »
Ok, I need to add in some more actor names about 5 more or so
and 7 job names (since Golbez and Anna never had job names)

I'm removing the ability to rename your characters, so I'm wondering if anyone knows where I would have to set the pointer that says "the string of names starts here" and "the string of jobs names starts there" in order to have exactly this much available, Im not so great at reassigning some pointers but I Know there is some extra space to bump back. I'm using a 1.0 headered file...

This is what I have and the "?" are the amount I actually need...

Cecil*
Kain**
Rydia*
Tellah
Edward
Rosa**
Yang**
Palom*
Porom*
Baigan
Cid***
Edge**
Anna**
Golbez
?????? (FuSoYa)
?????? (Sandy*)
?????? (Cindy*)
?????? (Mindy*)
?????? (extra*)

DKnight
Dragoon
Caller*
Sage***
Bard***
Archer*
Monk***
Wizard*
Priest*
Paladin
Chief**
Caller*
Ninja**
??????? (BKnight)
??????? (Dancer*)
??????? (Lunar**)
??????? (Magus**)
??????? (Magus**)
??????? (Magus**)
??????? (extra**)

Is this actually possible? Could someone point me in the right direction if this info exists? maybe I overlooked it... Whenever I try to overlap the extra names into the job names area I just get blank space as if there is a cap to how many available actor names I can actually use. (i do not need them to be renameable so thats a non issue...)


eh, what do I care...

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Character names and Job names (changing pointers)
« Reply #1 on: June 10, 2011, 03:13:17 PM »
I've never really looked into this because I never needed to add more characters/classes. It's pretty strange that it won't read any data beyond the normal range of the names. I guess the code for them does some sort of range check on the names, but I remember classes at least picking up invalid text from my GG days.

For the classes, there should be at least one pointer (probably multiple, but I don't remember, they may have actually been efficient with these) buried in the menu code to the starting offset of the names. From there it just increments by six/seven depending on the version to get the offset for whatever class it needs.

Zozma

  • FF4 Hacker
  • *
  • Posts: 120
    • View Profile
Re: Character names and Job names (changing pointers)
« Reply #2 on: June 10, 2011, 03:58:13 PM »
yeah, it seems to be a range check or something? I know that the names come first and then immediately after comes the class names...

after the class names, comes the battle menu commands. so Golbez, for example, his class name currently shows as "Fight It" since Fight Item White... etc.

I suppose if I'm able to push back command names I can do a workaround here, but I might run out of command name space as a result or simply give myself extra work to do...
-----

I'm attempting to expand on character availability after the Babil Giant quest is completed in order to give the player more to do with this game. Being able to add in new sprites/portraits/palettes wont be easy I'm assuming... It's a side project but i still have hopes of being able to pull this off somehow or at least to some extent.
eh, what do I care...

Vehek

  • Siren
  • *
  • Posts: 75
    • View Profile
Re: Character names and Job names (changing pointers)
« Reply #3 on: June 10, 2011, 05:17:07 PM »
There's more than one place where it does this for some reason, but when a new game is started, it copies the character names to memory.
Code: (New-game names) [Select]
$01/9B36 A9 53 00    LDA #$0053
$01/9B39 A2 10 A7    LDX #$A710
$01/9B3C A0 00 15    LDY #$1500
$01/9B3F 54 7E 0F    MVN 7E 0F
The 0x0053 is how many bytes to copy. In a headered ROM, this code's at offset 9D36.

Zozma

  • FF4 Hacker
  • *
  • Posts: 120
    • View Profile
Re: Character names and Job names (changing pointers)
« Reply #4 on: June 10, 2011, 07:29:57 PM »
"copies the character names to memory".... hmm this could be why one only sees a garbled mess if you assign a character any name past anna's, its just copying junk or nothing at all....? nah thats just a guess...

or is it that the memory itself wont store more than the specified amount...

i wonder if i can simply reassign where the list of names are to a empty location somwhere, so that it displays the set names listed directly instead of the ones loaded into memory at the game start....
eh, what do I care...

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Character names and Job names (changing pointers)
« Reply #5 on: June 11, 2011, 03:11:13 PM »
You'd need to find any code reading the names from RAM (and there will probably be a lot) and have it read from ROM instead. No matter what it's going to take some work, since I'm guessing there's not a convenient block of empty RAM following the names (meaning you're going to need to rewrite some code even if you keep them stored in memory).

Zozma

  • FF4 Hacker
  • *
  • Posts: 120
    • View Profile
Re: Character names and Job names (changing pointers)
« Reply #6 on: June 11, 2011, 07:56:40 PM »
now thats getting into complicated stuff. But then again, who would have ever expected to add in more characters in anyway. too bad i cant just make the last 7 read off off of a seperate list located elsewhere. I might have to put all of that on a long hold from the looks of it.

as far as job names, at the very least i know how to make them hidden completely... not exactly what i want but better than tacky glitched text.
eh, what do I care...

Vehek

  • Siren
  • *
  • Posts: 75
    • View Profile
Re: Character names and Job names (changing pointers)
« Reply #7 on: June 12, 2011, 01:40:51 AM »
"copies the character names to memory".... hmm this could be why one only sees a garbled mess if you assign a character any name past anna's, its just copying junk or nothing at all....? nah thats just a guess...
The game normally only copying the first 14 names isn't the only problem. Have you noticed that the "Name, Battle Commands, Equip able hands." values don't necessarily correspond to the order of the names? The game uses tables to determine which name it should load.

Code: (Menu) [Select]
$01/83B4 BF 57 84 01 LDA $018457,x
$01/83B8 0A          ASL A
$01/83B9 85 45       STA $45    [$00:0145]
$01/83BB 0A          ASL A
$01/83BC 65 45       ADC $45    [$00:0145]
(...)
$01/83CE BD 00 15    LDA $1500,x

Code: (Battle) [Select]
$02/A67E BD 00 20    LDA $2000,x
$02/A681 3A          DEC A
$02/A682 29 3F       AND #$3F
$02/A684 AA          TAX
$02/A685 BF 3F FB 16 LDA $16FB3F,x
$02/A689 85 26       STA $26    [$00:0026]
$02/A68B A9 06       LDA #$06
$02/A68D 85 00       STA $00    [$00:0000]
$02/A68F 85 28       STA $28    [$00:0028]
$02/A691 20 60 85    JSR $8560  [$02:8560]
These tables could be considered to be 1-based arrays. Both have data/code following them, so they have to be moved in order to extend them.

I tried moving the first table elsewhere so I could add more values. Even with the extra values, I only got two additional names working. The range of memory after that was overwritten with other data, making the names there vanish.

Zozma

  • FF4 Hacker
  • *
  • Posts: 120
    • View Profile
Re: Character names and Job names (changing pointers)
« Reply #8 on: June 12, 2011, 02:32:08 AM »
wait, you managed to raise it from 14 to 16 names? that is actually very useful as is! you see, I had originally wanted to make a special side quest that let you get the 3 magus sisters , but in addition to finding a way to add new sprites and palettes, the name thing was more out of reach.

currently by adding Baigan to the game in place of paladin cecil who shares the same name, i bumped FuSoYa's name off.

the main problem this causes me is that in the fight vs zemus where its the only time you see fusoya in battle, youd see no name. so being able to get 16 is perfect... for time being. 16 names, and 16 characters....
eh, what do I care...