Author Topic: Unused/useless variables safe to use in savemap? (PSX)  (Read 27400 times)

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #25 on: 2014-10-25 19:49:50 »
They are all unused... since they reset to 0 every time.  To avoid conflicts you should check the script with Makou.

Roden

  • *
  • Posts: 125
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #26 on: 2014-10-25 19:56:10 »
Haha, ah right.. they're field-only vars, that's cool! I just wasn't sure if something else was writing to it outside the script. Good to know :)

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #27 on: 2014-10-25 20:17:51 »
I'm not sure...  it could and probably should be that world map can use it too.  But it wouldn't matter since vars are returned to zero every time you enter a new field.

Tenko Kuugen

  • Public Enemy
  • *
  • Posts: 1416
    • View Profile
    • Twitter
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #28 on: 2014-10-25 22:32:15 »
They are all unused... since they reset to 0 every time.  To avoid conflicts you should check the script with Makou.

Bank 5 gets used in basically every question in the game to short-store the answer. You obviously can't leave the field while you're answering a question dialogue.
I don't remember if I've seen bank 6 used but I believe so, again, for temporary stuff just for that field.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #29 on: 2014-10-25 23:20:58 »
That's not a bank.  A field var ID is what you mean.  5 and 6 are both the same temporary bank (or let's just say using same 256 bytes). See the previous posts.

Whenever you enter a new field, the entire bank is reset to 0 (256 bytes are reset to 0).

If you look at the savemap, banks 1-5 are listed there since they are the only ones saved.  As you noted, [5] is usually used for questions, since it is a one-byte write var (and no option cursor in the game requires over 256 responses. If it did, you'd see the 2-byte [6] location used as well).  One-byte writes are far more frequent than two, hence the frequency of [5].

Hopefully, Mystere will agree with my solution to this nonsense, and in the future, we'll have BANKS 0-6 referenced in Makou Reactor only.
« Last Edit: 2014-10-25 23:37:02 by DLPB »

Tenko Kuugen

  • Public Enemy
  • *
  • Posts: 1416
    • View Profile
    • Twitter
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #30 on: 2014-10-26 01:33:26 »
Technically I meant that Bank 5 is used since Var 5:10 (usually 5:10 or 5:8 or something like that, you know what I mean) is used in questions.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #31 on: 2014-10-26 10:38:49 »
I know what you mean, but Bank 5 isn't the temporary bank.  Bank 5 is Field [7] and [15].  Temp bank (Field [5] and [6]) doesn't have an ID on the savemap (which we named anyway, let's face it).  Temp bank should probably be called Bank 0 or Bank 6 for clarity (or just Temp Bank).
« Last Edit: 2014-10-26 13:26:57 by DLPB »

Roden

  • *
  • Posts: 125
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #32 on: 2014-10-26 13:55:02 »
DLPB: Do you think it would be possible to set a variable in the field that's used in a battle? For example, the next enemy's HP or something. Probably a long shot, but you never know :)

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #33 on: 2014-10-26 14:27:52 »
The battle script can set bytes in Bank 1.  NFITC knows about battle script. :)

Sega Chief

  • *
  • Posts: 4086
  • These guys is sick
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #34 on: 2014-10-26 15:43:22 »
@Roden
This thread might be handy: http://forums.qhimm.com/index.php?topic=15445.0

Sithlord and NFITC1 recommended using Battle Love Points, which function but aren't actually used for anything (it's used by character AI which can be edited/removed in Wall Market). If they can't store a big number for an enemy's HP value, then you could instead have the HP values/HP multiplier stored in pre-battle AI with the variable triggering which value gets pushed into the monster's actual HP before the fight starts.

Roden

  • *
  • Posts: 125
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #35 on: 2014-10-26 20:08:36 »
@Roden
This thread might be handy: http://forums.qhimm.com/index.php?topic=15445.0

Sithlord and NFITC1 recommended using Battle Love Points, which function but aren't actually used for anything (it's used by character AI which can be edited/removed in Wall Market). If they can't store a big number for an enemy's HP value, then you could instead have the HP values/HP multiplier stored in pre-battle AI with the variable triggering which value gets pushed into the monster's actual HP before the fight starts.
Very interesting, thanks. Battle love points, hey, never knew that.. kind of shows how ambitious FF7 developers were about this dating game. I'm with you about not editing scene.bin (especially since I'm developing only for PSX), did you find a way to effectively have any affect on the battles through field vars only?

Is pre-battle/post-battle AI editable in Makou Reactor/field? Or only Proud Clod? I don't really like using Proud Clod as its not 100% compatible with Japanese versions of game :(

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #36 on: 2014-10-26 20:22:10 »
Makou Reactor is for field edits.  Proud Clod is for battle.  There's no way around that :)

Sega Chief

  • *
  • Posts: 4086
  • These guys is sick
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #37 on: 2014-10-26 20:23:59 »
Like Dan says, I'm afraid you might be stuck; as far as I know, Proud Clod is the only tool capable of editing enemy AI (the other editor, Hojo, can't do it) and it can't be done through Makou.

Is editing the Kernel, as in the character AI, an option? There might be a round-about way to make this work by having a routine where the player character pre-battle AI checks for a specific enemy ID instead and, if true, adjusts that enemy's HP based on the aforementioned variables. Cloud would be the best bet as he's usually in the party. You could also put in several checks if it needs to happen with a few different enemies, but I'm not sure how size affects the kernel and how strict it is for PSX.

I have a working prototype for using these variables in fights, I'll dig it up if you want to have a look? It could be copied out and placed in the PSX kernel (Wall Market doesn't have a copy-paste function for it's AI editing if I remember right). But I'd maybe get some opinions about Kernel size first if you haven't already; I've not worked with the PS1 files but what I know about it is that changes in file size can derail the game. Also, if the kernel falls 'out of synch' with the scene.bin then problems like wrong encounters being referenced will start to appear.

Roden

  • *
  • Posts: 125
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #38 on: 2014-10-26 20:34:25 »
Like Dan says, I'm afraid you might be stuck; as far as I know, Proud Clod is the only tool capable of editing enemy AI (the other editor, Hojo, can't do it) and it can't be done through Makou.

Is editing the Kernel, as in the character AI, an option? There might be a round-about way to make this work by having a routine where the player character pre-battle AI checks for a specific enemy ID instead and, if true, adjusts that enemy's HP based on the aforementioned variables. Cloud would be the best bet as he's usually in the party. You could also put in several checks if it needs to happen with a few different enemies, but I'm not sure how size affects the kernel and how strict it is for PSX.

I have a working prototype for using these variables in fights, I'll dig it up if you want to have a look? It could be copied out and placed in the PSX kernel (Wall Market doesn't have a copy-paste function for it's AI editing if I remember right). But I'd maybe get some opinions about Kernel size first if you haven't already; I've not worked with the PS1 files but what I know about it is that changes in file size can derail the game. Also, if the kernel falls 'out of synch' with the scene.bin then problems like wrong encounters being referenced will start to appear.
Actually, editing the Kernel might be fine, good that you remembered - Wallmarket works somewhat so far with my Japanese versions, so I'd definitely be interested in that prototype. Though just having a look at the character AI tab in Wall Market now (under Initial Data), it appears only Barret, Tifa, Yuffie have any data for "pre-battle", Cloud has none, and if you double click it (even in the US version) it just gives me "System.ArgumentOutOfRangeException: Index was out of range. ", though Barret's pre-battle AI seems perfectly editable (not that I understand whats it doing yet). How did you add stuff to Cloud's pre-battle without crashing it?

Roden

  • *
  • Posts: 125
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #39 on: 2014-10-26 20:40:36 »
Actually, I take that back, even the other character's AI is extremely buggy (typing anything brings up .net framework error - even though I've verified .net is perfectly fine with microsoft developer tool). Is it problem with PSX kernel?

Sega Chief

  • *
  • Posts: 4086
  • These guys is sick
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #40 on: 2014-10-26 20:44:07 »
Usually to start editing, I click once on the group and then hit 'Enter'. I try to avoid double-clicks because things can go wrong from that sometimes. That said, I tried double-clicking on Cloud's pre-battle but there was no error message so it might be the way your tool is set up or the kernel itself (more likely it's the kernel itself). Try single-click and then hitting Enter to start a new AI in there, though; see if that works (a 73 should appear).

Roden

  • *
  • Posts: 125
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #41 on: 2014-10-26 21:02:09 »
Usually to start editing, I click once on the group and then hit 'Enter'. I try to avoid double-clicks because things can go wrong from that sometimes. That said, I tried double-clicking on Cloud's pre-battle but there was no error message so it might be the way your tool is set up or the kernel itself (more likely it's the kernel itself). Try single-click and then hitting Enter to start a new AI in there, though; see if that works (a 73 should appear).
Alright, thanks - I just tested on an unmodfied and modified kernel on two Windows 7 PCs, I can get the 73 to appear by hitting ENTER on both of them. I imagine there is some sort of trick to inputting the data in the correct format it needs? I managed to create a bunch of white boxes, and get 0000 to appear in some of them, and then when I click on another option and come back it just gives an index error (doesn't crash) and all the white boxes are gone and its just 73 again.

Sega Chief

  • *
  • Posts: 4086
  • These guys is sick
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #42 on: 2014-10-26 21:18:20 »
Edit: It's not as easy to show this visually as I thought it would be. Here's how I generally do it:

I single-click the empty AI group and hit Enter twice. That gets the 73 and an empty block (it behaves slightly differently in older builds of ProudClod though). I then click on the empty block and enter the value before hitting the Down-Arrow key to move to the next cell. As a general rule, I try to write it out all in the one go, copying from a Notepad, and avoid clicking away until it's all in. Then I can save it and make adjustments without risking lost time.

And one thing to try and avoid is actually highlighting the numbers themselves; you want to have the whole cell itself highlighted when you start typing. It usually tricks out otherwise, especially if you try to move to the next cell. And sometimes, when you enter numbers in wrong, it can bug out then too so try to avoid mistakes.

Try this to start with; it's the first part of the test AI I had:
Code: [Select]
01 01C0
60 00
40
70 0009
11 0000
60 50
90
73

It should look like this in the decompiler when it's done:
If ( (LocalVar:01C0 == 0) )
{
   LocalVar:0000 <- 80
« Last Edit: 2014-10-26 21:52:04 by Sega Chief »

Roden

  • *
  • Posts: 125
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #43 on: 2014-10-26 23:08:08 »
Thanks! Kind of strange but I got it inputted eventually! After I click disassemble it says:

If ( (LocalVar:01C0 == 0) )
{
   LocalVar:0000 <- 80
}
SCRIPT END

Which is great as it matches what you said, but what does this code do (i.e. how do I use/modify it?)? Localvar 01C0 refers to which variable in Makou?

Sega Chief

  • *
  • Posts: 4086
  • These guys is sick
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #44 on: 2014-10-26 23:59:04 »
It doesn't do much on it's own, it was just a practice to get used to inputting AI without problems popping up. The whole code was:

Code: [Select]
01 01C0
60 00
40
70 00##*
11 0000
60 50
90
60 00
01 0000
95
11 2018
01 2010
90
01 2010
60 32
44
70 00##*
11 01A0
03 2050
02 42E0
80
90
11 01C0
03 2050
02 42E0
80
90
11 2050
03 42E0
80
01 01A0
60 02
32
90
11 01C0
60 00
90
93: **
73

*: Set this to the current cell value of 73/End Script; it auto-updates as the script gets shorter/longer, at least in simple scripts like this.
**: The 93 here is optional, I use it to check if something is triggering. In the ** cell you'd enter a bit of text, like 'test' or something.

Which in the decompiler looks like:

If ( (LocalVar:01C0 == 0) )
{
   LocalVar:0000 <- 80
   TempGlobal <- &GlobalVar(0000)
   Unknown(2018) <- GlobalAddress
   If ( (GlobalAddress > 50) )
   {
      LocalVar:01A0 <- ActiveMask.Exp
      LocalVar:01C0 <- ActiveMask.Exp
      ActiveMask.Exp <- LocalVar:01A0 * 2
      LocalVar:01C0 <- 0
      Display String: ""EXP sum triggered""
   }
   SCRIPT END

One thing to note is that while this script did appear to trigger in battle, it was a half-finished prototype where I essentially gave up on the EXP thing and was just trying random combinations to get it working so don't worry about that bit where it says Active Mask or EXP. The '0' at [LocalVar:01C0 <- 0] was supposed to be a 1 too, can't remember why I wanted the script running every time I attacked.

I'll get yelled at again for being hazy on the actual details, but here's what the things in this script sort of are:

LocalVar: 0000, 0020, ..., 01C0
These are like temporary variables the battle engine uses. They're not related to the field variables, I don't think. Most of the enemies of the game use these to determine their attacks. They go up in 20's but I've seen Gjoerulv use 0010, 0030, etc. for his AIs so y'know. I generally use high numbers to avoid conflicts, so I'm using that 01C0 up there to shut it down after it's been run once (or at least, it would if that 0 toward the end was a 1).

GlobalVar: These are the ones that access field variables. Only Bank 1 is accessed, so first we need to specify which variable we want to read in this bank and we can use the battle engine's temporary variables to carry the numbers about. We want [80] in Bank 1, so:
LocalVar:0000 <- 80

My memory is very hazy at this point, but I most likely copied this from Jenova SYNTHESIS or Zombie Dragon who both use Global variables:

   TempGlobal <- &GlobalVar(0000)
   Unknown(2018) <- GlobalAddress

I'm not sure what that does, I'm afraid. But it seems to enable the If string that follows, and I think it didn't trigger whenever the value of [1][80] was set below 50; it's been a while since I used the script:
   If ( (GlobalAddress > 50) )

So with the IF string triggering based on the value loaded from the variable, you can now adjust things like HP for enemies and other things. Now if you'll excuse me, I'm going to go hide before certain scary people find this post.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #45 on: 2014-10-27 00:08:06 »
I've already explained this. Battle script can only write (and read from?) to the first 256 bytes of the save map.  That's what we are calling Bank 1 (which in the field script is [1] / [2].  0000-00FF (0-255).

A battle write to Byte 0 is equal to [1][0] in Makou.

A battle write to Byte 255 is equal to [1][255] in Makou.

That's its whole range.  In battle there is no "field var".  In fact, there is no "field var" full stop.  In reality there is one lump of data that can be written /read at 0000-04FF  (the 5 "banks").  And battle can only write from 0000 to 00FF.

« Last Edit: 2014-10-27 00:12:09 by DLPB »

Roden

  • *
  • Posts: 125
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #46 on: 2014-10-27 01:38:12 »
It doesn't do much on it's own, it was just a practice to get used to inputting AI without problems popping up. The whole code was:

Code: [Select]
01 01C0
60 00
40
70 00##*
11 0000
60 50
90
60 00
01 0000
95
11 2018
01 2010
90
01 2010
60 32
44
70 00##*
11 01A0
03 2050
02 42E0
80
90
11 01C0
03 2050
02 42E0
80
90
11 2050
03 42E0
80
01 01A0
60 02
32
90
11 01C0
60 00
90
93: **
73

*: Set this to the current cell value of 73/End Script; it auto-updates as the script gets shorter/longer, at least in simple scripts like this.
**: The 93 here is optional, I use it to check if something is triggering. In the ** cell you'd enter a bit of text, like 'test' or something.

Which in the decompiler looks like:

If ( (LocalVar:01C0 == 0) )
{
   LocalVar:0000 <- 80
   TempGlobal <- &GlobalVar(0000)
   Unknown(2018) <- GlobalAddress
   If ( (GlobalAddress > 50) )
   {
      LocalVar:01A0 <- ActiveMask.Exp
      LocalVar:01C0 <- ActiveMask.Exp
      ActiveMask.Exp <- LocalVar:01A0 * 2
      LocalVar:01C0 <- 0
      Display String: ""EXP sum triggered""
   }
   SCRIPT END

One thing to note is that while this script did appear to trigger in battle, it was a half-finished prototype where I essentially gave up on the EXP thing and was just trying random combinations to get it working so don't worry about that bit where it says Active Mask or EXP. The '0' at [LocalVar:01C0 <- 0] was supposed to be a 1 too, can't remember why I wanted the script running every time I attacked.

I'll get yelled at again for being hazy on the actual details, but here's what the things in this script sort of are:

LocalVar: 0000, 0020, ..., 01C0
These are like temporary variables the battle engine uses. They're not related to the field variables, I don't think. Most of the enemies of the game use these to determine their attacks. They go up in 20's but I've seen Gjoerulv use 0010, 0030, etc. for his AIs so y'know. I generally use high numbers to avoid conflicts, so I'm using that 01C0 up there to shut it down after it's been run once (or at least, it would if that 0 toward the end was a 1).

GlobalVar: These are the ones that access field variables. Only Bank 1 is accessed, so first we need to specify which variable we want to read in this bank and we can use the battle engine's temporary variables to carry the numbers about. We want [80] in Bank 1, so:
LocalVar:0000 <- 80

My memory is very hazy at this point, but I most likely copied this from Jenova SYNTHESIS or Zombie Dragon who both use Global variables:

   TempGlobal <- &GlobalVar(0000)
   Unknown(2018) <- GlobalAddress

I'm not sure what that does, I'm afraid. But it seems to enable the If string that follows, and I think it didn't trigger whenever the value of [1][80] was set below 50; it's been a while since I used the script:
   If ( (GlobalAddress > 50) )

So with the IF string triggering based on the value loaded from the variable, you can now adjust things like HP for enemies and other things. Now if you'll excuse me, I'm going to go hide before certain scary people find this post.
Not sure what surprises me more - that you actually came up with that code or that it works on FF-J original version :P Great job! I assigned one high 16-bit number and one low in init of two rooms and walked between each and it worked as expected. I noticed the string didn't appear for enemies that say stuff though such as "intruders" in the first reactor. Also by default it seems to be over 50..

Just a few more questions - if its OK!  :D

1. So Bank [1] 80 is the battle points love variable? Is this the only one we can use? Or is there a few like 81, 82? Also, is it overwritten (or increased?) when the battle is finished (so we need to overwrite it to 0 again?)
2. How would I begin experimenting and adjusting HP values? I'm not familiar (at all) with the opcodes FF7 uses.. I think basically I would want it to read if the variable is higher than 50 (or whatever to trigger it), and then have another variable act as the HP value (i.e. so it doesn't set the HP variable everytime, only when I tell it).
3. If Cloud is not in the party, does it all fall apart, or can I add it to all party members somehow?
4. Could you pass a string "variable" to say different things? I think the string function is kind of cool as well.

Sega Chief

  • *
  • Posts: 4086
  • These guys is sick
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #47 on: 2014-10-27 02:13:41 »
Not sure what surprises me more - that you actually came up with that code or that it works on FF-J original version :P Great job! I assigned one high 16-bit number and one low in init of two rooms and walked between each and it worked as expected. I noticed the string didn't appear for enemies that say stuff though such as "intruders" in the first reactor. Also by default it seems to be over 50..

I had a bunch of help from NFITC1 and Sithlord getting that together (well, that and the code already in the game). I was told that there's four variables used for B. Love Points: 80, 81, 82, 83 and that they're set to start at 100. In Makou I set it to 0 and tried it at above 50; I remember testing it and I think it worked (triggers above 50, doesn't trigger below 50), but I can't commit to that because it was a while ago. Not sure about the text string interference either, you might need to test it at different points of the game to make sure.

1. So Bank [1] 80 is the battle points love variable? Is this the only one we can use? Or is there a few like 81, 82? Also, is it overwritten (or increased?) when the battle is finished (so we need to overwrite it to 0 again?)
2. How would I begin experimenting and adjusting HP values? I'm not familiar (at all) with the opcodes FF7 uses.. I think basically I would want it to read if the variable is higher than 50 (or whatever to trigger it), and then have another variable act as the HP value (i.e. so it doesn't set the HP variable everytime, only when I tell it).
3. If Cloud is not in the party, does it all fall apart, or can I add it to all party members somehow?
4. Could you pass a string "variable" to say different things? I think the string function is kind of cool as well.

1. Sith told me that 80, 81, 82, and 83 are used and that they're set to 100 by default. You can set them lower through Makou; I usually give random NPCs on the Highwind codes like this in their talk script to quickly trigger it. As far as using others go, I guess any can be used so long as they're not already in use (I'm still trying to clean that up in my mod).

2. There's an OPCode list but I think the one I snagged is out of date by now. As far as adjusting HP goes, it depends on what you want to do; what is it specifically you're after? Because the HP value will generally be bigger than 255, it needs to be stored in the actual AI somewhere and pushed into the enemy from there (unless we're multiplying Enemy HP, but I've never had much luck with multiplying and multiplying enemy HP tends to go south eventually). I'll upload that OPCode file in any case.

3. There are scripts in there that 'link with scripts on character 0' (Cloud being Character 0) that should have other characters run his scripts whether he's in the current party or not. NFITC1 warned me that I'd need to find a way to make this only run once, but there might be ways to make it so that it doesn't matter if the script is run 2-3 times in one battle. You'd want:
60 00
75
73
In Barret, Tifa, Cid, and Yuffie pre-battle AI. I think that covers everyone. Also, I'm not sure if pre-battle runs if a character starts a fight dead; assuming there's no kernel mishaps, if you can put that small code into all 9 characters then I guess that'd completely cover it.

4. Dunno what you mean, it's just for making text appear. If you want the string to have a pause after it displays, then enter it like this:
93 TEXT
60 24
60 00
92
Seems to do the trick. To have a character's name appear, it's {EA000#H} where the # replaces the character's ID (Cloud is 0, Barret is 1, etc.) So it'd be written as: '{EA0000H}: "{EA0001H}! Attack while it's tail's up!"' However, using EAs makes a bunch of 60 00s appear for some reason. Probably to handle space or something. Not sure how the character AI will react to it either, it handles differently from the older Proud Clod versions I use.

Roden

  • *
  • Posts: 125
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #48 on: 2014-10-27 02:46:14 »
I had a bunch of help from NFITC1 and Sithlord getting that together (well, that and the code already in the game). I was told that there's four variables used for B. Love Points: 80, 81, 82, 83 and that they're set to start at 100. In Makou I set it to 0 and tried it at above 50; I remember testing it and I think it worked (triggers above 50, doesn't trigger below 50), but I can't commit to that because it was a while ago. Not sure about the text string interference either, you might need to test it at different points of the game to make sure.

1. Sith told me that 80, 81, 82, and 83 are used and that they're set to 100 by default. You can set them lower through Makou; I usually give random NPCs on the Highwind codes like this in their talk script to quickly trigger it. As far as using others go, I guess any can be used so long as they're not already in use (I'm still trying to clean that up in my mod).

2. There's an OPCode list but I think the one I snagged is out of date by now. As far as adjusting HP goes, it depends on what you want to do; what is it specifically you're after? Because the HP value will generally be bigger than 255, it needs to be stored in the actual AI somewhere and pushed into the enemy from there (unless we're multiplying Enemy HP, but I've never had much luck with multiplying and multiplying enemy HP tends to go south eventually). I'll upload that OPCode file in any case.

3. There are scripts in there that 'link with scripts on character 0' (Cloud being Character 0) that should have other characters run his scripts whether he's in the current party or not. NFITC1 warned me that I'd need to find a way to make this only run once, but there might be ways to make it so that it doesn't matter if the script is run 2-3 times in one battle. You'd want:
60 00
75
73
In Barret, Tifa, Cid, and Yuffie pre-battle AI. I think that covers everyone. Also, I'm not sure if pre-battle runs if a character starts a fight dead; assuming there's no kernel mishaps, if you can put that small code into all 9 characters then I guess that'd completely cover it.

4. Dunno what you mean, it's just for making text appear. If you want the string to have a pause after it displays, then enter it like this:
93 TEXT
60 24
60 00
92
Seems to do the trick. To have a character's name appear, it's {EA000#H} where the # replaces the character's ID (Cloud is 0, Barret is 1, etc.) So it'd be written as: '{EA0000H}: "{EA0001H}! Attack while it's tail's up!"' However, using EAs makes a bunch of 60 00s appear for some reason. Probably to handle space or something. Not sure how the character AI will react to it either, it handles differently from the older Proud Clod versions I use.
Thanks for the detailed reply.
2. Use case would be to set certain enemies HP higher, thats all really. If it can't be set to a certain value, then I guess I could take a shot at multiplying it somehow as I don't want to edit enemy stats directly..
3. Understood, that's handy. I noticed they're linked to character 3 at the moment, so it would just be a one digit change.

Sega Chief

  • *
  • Posts: 4086
  • These guys is sick
    • View Profile
Re: Unused/useless variables safe to use in savemap? (PSX)
« Reply #49 on: 2014-10-27 03:24:22 »
If you're just setting HP to a certain amount for specific enemies then that's probably the easiest thing. If Enemy ID = #### would probably do the trick; actually, if that works then you might not even need the globalvar thing after all (unless they're only to get more HP after a certain criteria is fulfilled on the field).

Here's that OpCode list: http://www.mediafire.com/view/umiqacyau66u9c9/opcode_list.txt