Author Topic: How define playable character in FFVII?  (Read 5510 times)

Akari

  • *
  • Posts: 766
    • View Profile
How define playable character in FFVII?
« on: 2006-10-06 14:07:50 »
I knew it must be PC opcode, but can someone give me description of this opcode?

Vehek

  • *
  • Posts: 218
    • View Profile
Re: How define playable character in FFVII?
« Reply #1 on: 2006-10-06 22:07:23 »
Well, the PC opcode has 1 parameter. That parameter says what playable character it is. 00 is Cloud, 01 is Barret, etc, same as the character portraits values in savegames.

Akari

  • *
  • Posts: 766
    • View Profile
Re: How define playable character in FFVII?
« Reply #2 on: 2006-10-07 07:39:39 »
Well, the PC opcode has 1 parameter. That parameter says what playable character it is. 00 is Cloud, 01 is Barret, etc, same as the character portraits values in savegames.

Then question is - in STARTMAP location and many others we see PC(0),PC(2),PC(8) opcodes that define cloud tifa and sid, but we can only play as cloud and only move can move around..

Vehek

  • *
  • Posts: 218
    • View Profile
Re: How define playable character in FFVII?
« Reply #3 on: 2006-10-07 15:13:06 »
I'm no programmer, but if you switch Cloud out of the party, then it'll use the character you replaced Cloud with as the character to show on the field.

Synergy Blades

  • Guest
Re: How define playable character in FFVII?
« Reply #4 on: 2006-10-07 15:55:40 »
The argument follows the character IDs. I don't exactly know how it works because it seems to override the model details you provide for the entity's field object and I never really did any more investigation into it. I may have another play if you're still stuck.

Akari

  • *
  • Posts: 766
    • View Profile
Re: How define playable character in FFVII?
« Reply #5 on: 2006-10-07 18:24:23 »
I may have another play if you're still stuck.

This is the main point for now. It will be great if you solve it.

Synergy Blades

  • Guest
Re: How define playable character in FFVII?
« Reply #6 on: 2006-10-09 12:34:43 »
Well, from testing in uutai1, it seems fairly easy to work out what it's doing. PC informs the system of which entity, and hence which field object, animations and scripts represents which character ID, since it needs to know, for example, which entity is to represent Cloud (PC 0). The argument, then, is just the standard character ID that the entity is to represent.

If you switch, for example, Cloud's PC argument with Cait Sith's (0 to 6 for Cloud, 6 to 0 for Cait), then Cait Sith becomes the controllable character with all the correct animations (he bounces as he walks rather than uses Cloud's running anims). This is because instead of the CLOUD entity, field object, and all its animations being the main playable character, the system recognises the KETCY entity, with its field object and animations (and scripts, I would assume) as the main playable character since the current leader is set (again, I would assume within the kernel or some such) to be PC 0, due to the fact that the PC (0) opcode now resides in the KETCY entity. This is obviously not just "who is in the top row of the party" since Cloud can be moved up or down the list and he is still recognised as leader.

During the times when Cloud is not the team leader, either Tifa or Cid becomes the playable character. Presumably this is set somewhere within the system such that PC (2) or PC (8 ), respectively, is the team leader rather than Cloud's PC (0). So let's say Tifa is now the leader; when a field is entered, the field module knows that it should look for the entity with PC (2) to be the leader. When it finds this opcode/argument, it then knows to use this entity's field object and animation set (as well as script set) to be the controllable character.

Make sense?  :-)

[Edit] Silly smiley 8)
« Last Edit: 2006-10-09 12:43:16 by Synergy Blades »

Akari

  • *
  • Posts: 766
    • View Profile
Re: How define playable character in FFVII?
« Reply #7 on: 2006-11-03 03:20:45 »
Mmm I found that all blackbg1-blackbgx have no PC opcode at all, but cloud entity is still playable entity....
How can you explain it?  :-P

Synergy Blades

  • Guest
Re: How define playable character in FFVII?
« Reply #8 on: 2006-11-03 07:18:09 »
Hmm, fair point. At a guess, if no PC is found it'd use CHAR(0). It seems a bit hit and miss since in the debug rooms since some of them do have PC, blackbg4 uses CC and some just plain don't have a character opcode.
« Last Edit: 2006-11-03 07:27:23 by Synergy Blades »