Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Roden

Pages: 1 2 3 4 [5] 6
101
It might be the method being used to adjust HP. One thing you should do is have an English scene.bin you can open up and have a look at the AI in; I learned a lot from looking at the default game's enemy AI and how they work. So for HP, I looked at how Bizarro and Safer determine and adjust their HP before the battle starts (because it rises/drops depending on previous battles, player level, etc.)

This is a portion from a test group I had for adjusting enemy stats; I can confirm this works in the scene.bin, but the enemy is applying this to itself (which is why it uses Self.) so you'd need to use a different mask.

Code: [Select]
13 01A0
61 2710
90
12 2060
13 4180
80
03 01A0
90
12 2060
13 4160
80
02 2060
03 4180
80
90

Which looks like this:
LocalVar:01A0 <- 10000
Self.MHP <- LocalVar:01A0
Self.HP <- Self.MHP

Thing to note there is that we're using 61 instead of 60 for the number being pushed into 01A0. We can't put a number like that into [1][80] because it's a one-byte address (and we can't get battle to read [2], which is where 2-byte stuff is read from). For stats like Strength and Magic Attack, you can apparently just push a value in directly but enemies I've seen do it this way for HP. What we need to do now is change the mask so that it applies to the enemy. There's two ways to try, but one I've not tested yet:

Code: [Select]
Enemy ID
12 0100
02 2050
02 4120
80
60 16 [Scorp's Enemy ID]
40
90

By Bit (untested)
12 0100
60 03
87
90

With that loaded into the 0100 variable, you'd then replace the 2060s in this code with 0100 for:
LocalVar:01A0 <- 10000
LocalVar:0100.MHP <- LocalVar:01A0
LocalVar:0100.HP <- LocalVar:0100.MHP

Ideally, if the second one works (Bit) then it could be applied to any single enemy. Give it a whirl and see what happens; but if it doesn't work inside the IF thing then there must be something wrong with the way I set it up originally. You could perhaps get rid of the top IF bit because pre-battle only runs once so that part is now obsolete.
Thanks for the code, many cool things to learn from trying this out! I'll do it shortly.

And yes, I'm already looking through scene.bin. I'll also just mention again that the Guard Scorpion's HP WAS lowered when I didn't use your If statement, does this still fall under "It might be the method being used to adjust HP?" would it need to be different method just because its in that if statement?

102
then you better put two bytes together to make it 16 bit in size. ;)
Well I haven't got to that part yet, I'm just trying to get the If statement working for that assignment statement first. Maybe I screwed up something in-between the lines or something, as when I was removing the multiplication symbol from Sega Chief's code, I might of took something necessary out, even though the decompiler still reads it OK. That might explain why the display message part works OK as its just one line (93) hard to screw that up :P

103
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
Thanks, that list is awesome. Yeah it would definitely be via field criteria so I need the variable.

I've been trying to code it  (while looking at Proud Clod AI to get some ideas), but having some problems:

For example, if I set this command at the top of the If statement:  "AllOpponentMask.HP <- 82"  like so:

AllOpponentMask.HP <- 82
If ( (LocalVar:01C0 == 0) )
{
   LocalVar:0000 <- 80
   TempGlobal <- &GlobalVar(0000)
   Unknown(2018) <- GlobalAddress
   If ( (GlobalAddress > 50) )
   {
      Self.HP <- 82     //just ignore this test one obviously
      LocalVar:01C0 <- 0
   }
   SCRIPT END

It works fine and guard scorpion dies quickly. But if its inside the If statement it doesn't work, only the display message works. If I put self.hp = 255, for example, works fine outside if statement, but inside it doesn't work. Is it something to do with Unknown(2018)? Or have I screwed up a line somewhere? Seems odd only the display message works..

Of course this script is just for testing, I will want to use a global variable not hardcoded value, I assume that will let me drop in a higher value 16 bit number rather than 255?

104
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.

105
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.

106
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?

107
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.

108
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?

109
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?

110
@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 :(

111
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 :)

112
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 :)

113
5/6 are temporary vars in game and not saved.  They reset to 0 every time you enter new field.
Actually this one seems very handy for certain rooms - do you know which ones are unused (or if someone has documented it?)? It seems a better alternative than trying to set a variable from other banks to 0 whenever you exit a room :P

114
Please make a gui version when you have time. I'm having difficulty working with command line. Thanks!
Seconded.. Yeah, it doesn't really work for me... Does anyone know how to use it? It converts the tim into PNGs well enough, but when I try to get the png back into the tim. All I can get out of it is "QImage::pixelIndex: Not applicable for 32-bpp images (no palette)" even though the palette is right there and I provided the argument..

C:\ff7\tim\font\a>tim --if png --of tim -p 0 --input-path-palette ff7.tim.palette.png ff7.tim.0.png test

All I want to do is insert a new tim for windows.bin - is there an easy tool out there for this?

115
Have you tried his program Mass Field Update?

http://lasyan3.free.fr/index.php?page=ff7-outils&lang=en

You can find it in his website and I tested and the fields works in psx real.

Regards.
I found Mass Field Update (well Mass Iso Update) works great, especially for testing new builds quickly. All I have to do is click Execute and it adds only the files I want.. Haven't tested on a real PSX though. If it supports FF7i even better :)

How to fix ECC in CDMage though?

116
In fact, maybe this thread needs stickying somewhere under "Read this before attempting to edit field script vars"  or something.
Good idea, but may I suggest a more simpler title? Rename the thread to something like "variables safe to use in your savemap, read before editing" or something. I tried searching google but couldn't find anything so I made this thread. :)

117
Hack7 is a useful tool and supports physical consoles but never use the ISO save function but insert the files manually using cdprog.

Hack7 doesnt check for sector sizes but just extends and thus brakes the ISO if a file got larger than the original. ISOs will end up larger than before and with messed up LBAs, use cdprog to insert the files. If a file should really get too large to fit into the sector you get an error message and must delete or shorten some dialogue.

Anyway I think that the latest Makou Reactor release pretty much obsoletes this ;)
Useful information , thanks! I like Mass Iso Tool for quick testing. What is this "cdprog"? My field dat files are often different sizes (bigger and smaller), how do I put them into an ISO so it doesn't mess up without Mass Iso Tool? I tried using "CDmage" but it wants to "truncate" all the time. And what would be too large? Can you fix the sectors to contain bigger amount of data? PSX ISOs are confusing :P

118
Use touphScript.

See tools.
Though it doesn't work with PSX... :( yet.
Yeah, I would of thought text formats would be quite similar. Though no idea to be honest. Well, I hope someone can do it sooner or later. As well as maybe font extract/importation, don't think that can be done on JP version either with current tools..

119
Ah, I see 1/35 Soldier? Haha, in the days of old it was said you could rebuild Sephiroth with 99 of those and a masamune!

120
By the way, your Japanese encoding is great myst6re, its the only program I can use for changing text in the JP versions. I know its only a field editor, but is there a way to also change the text for items & menus without corrupting everything (while wallstreet is great, it can't be used with JP versions)?

121
Thanks guys, I understand it a hell of a lot better now :)

DLPB: What's this SOLDIER mod your working on?

Vayneruel, your example for the labels (8-bit/16-bits jumps) is just to do with the field map scripting and nothing to do with variables, right? I already changed a few to long jumps. Hope that didnt screw anything up! :)

122
http://wiki.qhimm.com/view/FF7/Savemap

I'll also send you a list of bytes that Aali sent me detailing what the world map uses.  Battles can only affect bank 1 (field 1/2). Field can be seen with Makou.
Remember that Field vars:

1/2 are Bank 1
3/4 are Bank 2
5/6 are temporary vars in game and not saved.  They reset to 0 every time you enter new field.
8/9 & A cannot be written to. 
B/C is Bank 3
D/E is Bank 4
7/F is Bank 5

Field vars 1,3,5,7,B,D are for one-byte writes
Field vars  2,4,6,C,E,F are for two-byte writes

Remember that 1/2, 3/4, 5/6, B/C, D/E and 7/F share the SAME 256 bytes.
So if you write to var [1][10] you are ALSO writing to [2][10].
And if you write two bytes to [2][10] you are ALSO writing to [1][10] and [1][11]

From my own tests, Field B/C (Bank 3) is the safest bet.  I am using [B/C][243] through to [B/C][255]
For my Soldier mod.  So if you want your mod to remain compatible with mine, avoid those and
start at [B/C][242]  I am pretty sure a lot of those bytes down are unused. 

edit.

Oh... PSX again.  I keep assuming PC.  Well, you are free to use B/C[255] down really.  Can't see my Soldier mod being used in PSX game, though you never know.
Thanks for the great reply, DLPB. That makes a lot of sense - I was looking for that "safebet" list! Does B/C refer to VAR{11}{255}/VAR{12}{255} in Makou?

Only thing I don't quite get (because I don't usually work at this level) is the whole writing one-byte/two-bytes thing? Why would I need one or the other?  For example in the first very field map in the initialization is:
Var[6][9] = 12 (16-bit)

Why not Var[5][9] = 12 (8-bit)?
Or Var[6][9] = 12 (8-bit)

Though actually I have no idea what that is trying to set. Most of the things I would be adding is simple "switches" (such as the BITON/OFFs I find in the code?)

Also I removed those potions from the start of the game, is OK to use those bits for my own purposes now?

123
Here's something for the Xenogears fans... something I cooked up quite a few months ago when analyzing hidden changes from Xenogears Demo to Retail.

https://www.youtube.com/watch?v=DVrJstmbmdY

124
Hey Lasyan3,

Sorry to bring this topic up but can't reply via PM (my PMing ability has been disabled as a new user here I guess)!

The error I get when using Mass ISO Update is "Not supported file [SLPS_010.57]" and some failure messages at UpdateFAT_Init.

As you can see on here: http://www.gamefaqs.com/ps/197341-final-fantasy-vii/data
This is the Japanese FF7 International version (SLPS-01057~60). This version should be the same as the FF7 International re-releases SLPS-91440~3, SLPM-87380~3

As you already support Original Japanese FF7 (SLPS-00700~2) I imagine the change shouldn't be too difficult? :)

125
when i get a chance i will write you a correct responce to that above message.
Thanks, man. Really appreciate it!

Pages: 1 2 3 4 [5] 6