øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1510.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexee29.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&board=8.260e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexee29.html.zx8'h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈЋ�ù�OKtext/htmlISO-8859-1gzip8:Öù�ÿÿÿÿÿÿÿÿWed, 11 Mar 2020 00:04:32 GMT0ó°° ®0®P®€§²ð®7'h^ù� Same command byte does two different things??

Author Topic: Same command byte does two different things??  (Read 1909 times)

xJCSx

  • Karlabos
  • *
  • Posts: 35
    • View Profile
Same command byte does two different things??
« on: December 13, 2010, 01:49:06 PM »
Hey guys,
Well what I'm trying to do is alter the sequence at Figaro where you meet Edgar and they talk and then Locke walks away and leaves the party.
I was gonna change that and make Locke stay in the party, and then also assign Edgar to the party.
It sounded so easy. Until I found the command to assign a character to the party.
It's $3F. But here's the weird thing. In all instances of the event script, it's random. 3F either means to assign a character to the party or REMOVE them from the party. That couldn't be any more weird! I understand Square not having a million commands, but this one's confusing.
So for my sequence, I filled the bytes that removed Locke from the party with FD. That way Locke still stays. I still have a good bit of room to add a few more bytes. That's where I wish to assign Edgar to the party.
Then I did some more digging, and maybe this is correct:
To assign a character to a party, they must have already been created. So in that blank spot I put 3D 10 (that was Edgar's NPC byte) and then followed with 3F 10.
But he wasn't assigned  :sad:
But then I thought about it - what if I wished to remove a character from the party? That means my theory must be wrong, less the game wouldn't know to either assign or remove.
So maybe I did something wrong? Probably the wrong byte for Edgar, but something I've noticed is that certain characters have different ID's for various maps..Like I've seen Kefka's ID change from 04 to 1A on different maps. If so, how do you know a character's ID for a different map?
And maybe I just need to use a $3C command to set up the party? I'll need to find some more room, however.
Sorry for all the questions..it's all just a little confusing.

Lenophis

  • Forum Overlord
  • *
  • Posts: 1,688
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: Same command byte does two different things??
« Reply #1 on: December 13, 2010, 05:09:33 PM »
It's $3F.
Code: [Select]
Assign character XX in party YY
(if yy == 0, remove character from party)
(gen. act. 3F)

C0/9D3B: 207770  JSR $7077
C0/9D3E: A5EC    LDA $EC
C0/9D40: 20A29E  JSR $9EA2
C0/9D43: 05EC    ORA $EC
C0/9D45: 851A    STA $1A
C0/9D47: 20F09D  JSR $9DF0
C0/9D4A: B96708  LDA $0867,Y
C0/9D4D: 29E0    AND #$E0
C0/9D4F: 051A    ORA $1A
C0/9D51: 996708  STA $0867,Y
C0/9D54: 851A    STA $1A
C0/9D56: 7B      TDC
C0/9D57: 997D08  STA $087D,Y
C0/9D5A: 20D870  JSR $70D8
C0/9D5D: A5EB    LDA $EB
C0/9D5F: A8      TAY
C0/9D60: A51A    LDA $1A
C0/9D62: 995018  STA $1850,Y
C0/9D65: 20F36C  JSR $6CF3
C0/9D68: A903    LDA #$03
C0/9D6A: 4C5C9B  JMP $9B5C
* Lenophis whistles

119 bugs fixed and counting.

xJCSx

  • Karlabos
  • *
  • Posts: 35
    • View Profile
Re: Same command byte does two different things??
« Reply #2 on: December 13, 2010, 05:46:36 PM »
Ah! I see, thanks Lenophis. But now I'm having a little bit of a problem.
I'm thinking it's not possible to add an NPC to the party. In this sequence at Figaro, Edgar's NPC byte is 10.
Well I guess to place him in the party, I need to create him? I'm not going off my old theorY; NPC's can't be in parties. Atleast it doesn't work whenever I try it.
So if I need to create him, I don't know his ID for that map. I tried 04 which is generally the most used one for Edgar but that didn't work, even after following a 3D 04.
So how do you determine a character's ID for a given map?
Thanks man.

Lenophis

  • Forum Overlord
  • *
  • Posts: 1,688
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: Same command byte does two different things??
« Reply #3 on: December 13, 2010, 05:59:43 PM »
So how do you determine a character's ID for a given map?
Character ID never changes. Terra is always 0, Locke is always 1, etc etc. NPCs cannot be party members. Adding party members is completely separate from NPCs in a given map.

119 bugs fixed and counting.

xJCSx

  • Karlabos
  • *
  • Posts: 35
    • View Profile
Re: Same command byte does two different things??
« Reply #4 on: December 13, 2010, 06:49:21 PM »
Perfect!
It worked like a charm ha. This is what I did to get Edgar in the party perfectly:

40,04,04,88,04,08,40,8B,04,7F,3D,04,3F,04,01

Kinda weird that you do all the assigning and status ailment removal stuff BEFORE you create his object and assign him to the party. But hey whatever it takes ha.
But man maybe I'm seeing things wrong, but I'm fairly sure that certain ID's for characters change on different maps. Take for instance this place in the game concerning Kefka:
CC/A43A: 6B    Load map $00FA (Imperial Castle, most rooms (including Terra's flashback)) instantly, (upper bits $2000), place party at (112, 49), facing down
CC/A440: 42    Hide object $31
CC/A442: 45    Refresh objects
CC/A443: 38    Hold screen
CC/A444: F1    Fade in song 27 (The Empire Gestahl) (high bit clear) with transition time 64
CC/A447: 61    Colorize color range [$04, $77] to color $03
CC/A44B: 61    Colorize color range [$80, $FF] to color $03
CC/A44F: 3D    Create object $1D
CC/A451: 3D    Create object $1A

Kefka's ID on this map is $1A.

But take for instance, this map: (It's the map at Figaro where Edgar jumps on a chocobo whenever Kefka talks to him)
CA/608F: 14    Begin action queue for character $14 (NPC $14), 4 bytes long (Wait until complete)
CA/6091: E0        Pause for 4 * 8 (32) frames
CA/6093: CE        Turn vehicle/entity down
CA/6094: FF        End queue

Kefka's ID is 14..
Maybe I'm getting the wrong idea or something lol but idk kind of confused...
But the assigning-characters-to-party-problem is solved!  :happy: