Author Topic: Stealing Rates  (Read 11270 times)

Salk

  • *
  • Posts: 608
    • View Profile
Stealing Rates
« on: 2006-01-02 17:24:07 »
Hello!

I am curious to know how many of you, like me, find that the most frustrating part of the game is to prolong - and sometimes it becomes unbearable - fights in order to steal something from en enemy...

Well...I believe that it's possible, through an editor, to change the stealing rate for monsters and I wonder if anybody who would know how to do it, would not mind making a mod like this.

If nobody is interested, can perhaps somebody tell me if I could do it myself despite my absolute ignorance about computers ?  :oops:

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Stealing Rates
« Reply #1 on: 2006-01-02 17:39:04 »
You can use some scene.bin editor (Compilation of programs) and edit the rates for some monsters. Modding exe is also possible (so you'll always steal, unless there is nothing to steal) but that's just cheating :P

dziugo

Salk

  • *
  • Posts: 608
    • View Profile
Stealing Rates
« Reply #2 on: 2006-01-02 23:52:20 »
Thanks for your suggestion, dziugo and compliments for your latest Multimod release. I do appreciate it.

Surely even if I had the capability, I'd not want to set the stealing to be always successful. I kinda of hate cheating.

But to make the stealing rate more reasonable, yes...I think it's fair so I will follow your advice and try editing the scene.bin

Is it something that anyone can do ?

As I mentioned, I have no modding experience nor any special feeling with the PC...

Thanks!  :love:

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Stealing Rates
« Reply #3 on: 2006-01-03 00:00:37 »
Quote from: Salk
Is it something that anyone can do ?
Yes :) No tech knowledge required.

dziugo

zero88

  • *
  • Posts: 257
    • View Profile
Stealing Rates
« Reply #4 on: 2006-01-03 11:27:21 »
It is extremely simple using Scenester and Scene Reader.

Open up Scene Reader. Extract your scene.bin file and put it into its own directory.  Open up Scenester. Use it to edit enemy steal rates by selecting the different "scenes".

It is really easier than it sounds. It is almost all self-explanatory and easy to figure out. If, however, you can't figure it out, I might be able to get a patch for you in maybe a week, or more, and considering that it is just easier for you to do it, I recommend you do it. :lol:

The Skillster

  • *
  • Posts: 2284
  • Loving every Final Fantasy
    • View Profile
Stealing Rates
« Reply #5 on: 2006-01-03 11:45:22 »
As a word of warning, I cannot remember if it was Scene Reader or Scenster that would (I think it is Scene Reader) change the items stealed into Potions.

Salk

  • *
  • Posts: 608
    • View Profile
Stealing Rates
« Reply #6 on: 2006-01-04 06:53:04 »
Well...The warning of The Skillster worries me...Can anybody confirm what he's saying ?  :-?

-gone away-

  • *
  • Posts: 385
    • View Profile
Stealing Rates
« Reply #7 on: 2006-01-04 11:15:14 »
Quote from: The Skillster
As a word of warning, I cannot remember if it was Scene Reader or Scenster that would (I think it is Scene Reader) change the items stealed into Potions.


That is and old bug no longer valid, and was in fact neither of the two programs that you mentioned that caused it. An early version of SceneEdit used to not read/export the steal items correctly. And resulted in, as you said players spending half an hour just to steal a potion rather than clouds hardedge.

Elentor never got around to correcting that problem with his hardcore mod, thats why i always start from scratch rather than building off his. At the moment i like mine better anyway :wink:.

So, dont worry about it salk. However here is a fix in advance, scenes 110-111 have to be exactly identical. problems always occur with these two files. So after you have finished modding delete one of them and replace it with the other.

And also someone a while back placed a link to a hacked version of scenereader which will fuck your mod up, so when downloading make sure that it is comming from elentors server which ive checked to make sure its safe.

The Skillster

  • *
  • Posts: 2284
  • Loving every Final Fantasy
    • View Profile
Stealing Rates
« Reply #8 on: 2006-01-04 16:03:00 »
Your Right, It wasnt Scene Reader (that just extracts the scenefiles  :oops: ) it was SceneEdit.

And it does still happen with SceneEdit as I found out after editing 20 or so Scenes.

I 2nd word of warning (I love these), I found this out from my own mod, (The Skillster's FF7 Hardcore Mod, never finished of course):
Editing elemental properties of an enemy (like absorbs fire, weak against water etc) results in some issues.
If you set say Earth to do "double damage" (like I did for Jenova*Birth) and Save it and close Scenester. Now reopen Scenester and check the elements again you will notice it is still the same "double damage" but open the scene file with a hex editor and you will find the value for double damage is incorrect.

As in my FF7 Hardcore mode thread:
Quote
I did find a bug in scenester:
When setting a element to do double damage, it should be stored as 0x02 but in Jenova and Thunder Kiss they are stored as 0x03 which isnt anything to FF7!
So this is going to be quite difficult to debug  
Thank God I have only done like 15 scene files...


http://forums.qhimm.com/viewtopic.php?t=4795
Have a quick read before you begin, might give you some ideas etc

Terence Fergusson

  • *
  • Posts: 262
    • View Profile
Stealing Rates
« Reply #9 on: 2006-01-04 16:04:38 »
Quote from: smithie
So, dont worry about it salk. However here is a fix in advance, scenes 110-111 have to be exactly identical. problems always occur with these two files. So after you have finished modding delete one of them and replace it with the other.


No, they must not be identical.  While the enemy data is the same (they use the same monster IDs, so the exact same monster data will be stored in those scene files for safe keeping), the *encounter* data is different.

Copying one over the other will at best change some of the encounters at Shinra HQ, and at worst, break Battle Square.

-gone away-

  • *
  • Posts: 385
    • View Profile
Stealing Rates
« Reply #10 on: 2006-01-04 22:52:43 »
Quote from: Terence Fergusson
No, they must not be identical.  While the enemy data is the same (they use the same monster IDs, so the exact same monster data will be stored in those scene files for safe keeping), the *encounter* data is different.

Copying one over the other will at best change some of the encounters at Shinra HQ, and at worst, break Battle Square.


It does change a encounter (Not a noticable change, as its just the same monsters in a different formation, i think it may even be an unused encounter) at shinra HQ, but doesn't effect Battle Square. Its the only fix i know of and if you dont do it the boss fight near Red XIII get messed up. Im not sure where the problem lies but i think it is within scenereader because it happens no matter which editor you use.

Skillster: sorry i thought it was fixed in a newer version (mines v1.2.4 if you want to check), It might just be because i haven't used it since scenester.

---- edit -----

Any insight into this problem is apreaciated as i would much rather fix the problem correctly rather than my rather shoddy method.

Terence Fergusson

  • *
  • Posts: 262
    • View Profile
Stealing Rates
« Reply #11 on: 2006-01-04 23:48:20 »
It most certainly does affect Battle Square if you, say, replace Scene 110's Encounter data with Scene 111.  One of the Group A 4th Battles (1x Moth Slasher) and one of the Group B 4th Battles (2x Moth Slasher) both exist in Scene 110, and the data that tells the game what the next battle *after* those are in Battle Square is also held in the Scene file.  If you overwrite that data, not only will Battle Square have a different fight if you happen to get either of those battles, but it will also quite likely end immediately after that battle (though not having tested fully, I can't be sure how it'll react).  Either way, this is not a desirable outcome, by any means.

Quote from: smithie
Not a noticable change, as its just the same monsters in a different formation, i think it may even be an unused encounter


It's multiple encounters.

Enc #436: 1x Moth Slasher
Enc #437: 1x SOLDIER:3rd, 1x SOLDIER:3rd (2nd Row)
Enc #438: 1x Moth Slasher, 1x Moth Slasher (2nd Row)
Enc #439: 1x Moth Slasher (Back Attack)
Enc #440: 2x SOLDIER:3rd, 1x SOLDIER:3rd (2nd Row)
Enc #441: 1x Moth Slasher, 1x Moth Slasher (2nd Row), 1x Moth Slasher (3rd Row)
Enc #442: 1x Moth Slasher, 2x SOLDIER:3rd (2nd Row)
Enc #443: 2x SOLDIER:3rd (Back Attack)

Enc #436-#439 are all found on Floor 67 (Before Escape).  Enc #436 and #438 are also found in Battle Square.  Enc #436 is *ALSO* on several floors of the 59 Floor Elevator battle.
Enc #440-#443 are all found on Floor 68 (Before Escape).

None of those encounters are unused.

The upshot of this is that, apart from the Warning Boards, you are replacing the encounters on Floor 67 with Floor 68, or vice versa.  And if you copy the wrong one over the other (ie Scene 110 gets overwritten with 111's data), then you break Battle Square as well if they happen to get those particular encounters.

This is not the sort of hidden after-effect I would at all like or expect in any mod, and if this one exists, then you'd have to be doubly sure other problems don't exist as well.  The source of this problem needs to be fixed.[/quote]

-gone away-

  • *
  • Posts: 385
    • View Profile
Stealing Rates
« Reply #12 on: 2006-01-05 00:48:09 »
It doesn't have any nasty effects on battle square. I've tried with a previous mod all the way up to a lvl 90 character, completing everything along the way including battle square. and didn't notice anything out of the ordinary, nor experienced any technical difficulties. There are two main places that the problem occurs (Shinra HQ & Wutia Tower) and is usually/alway's realated to monsters of the same type.

Quote from: Terence Fergusson
This is not the sort of hidden after-effect I would at all like or expect in any mod, and if this one exists, then you'd have to be doubly sure other problems don't exist as well.  The source of this problem needs to be fixed.


I agree with you on this, however its not my software, and i havent seen any post from the creater's since releasing the software so theres not much i can do about it. Im not exactly the file hacking type and its one area of programming im seriously no good at. (I've only got a diploma in Game/Software development, which is more the engine stuff, & currently slowly working on a degree of IT)

The source of the problem still needs to be correctly identified. The problems only occur's after editing the files so that would lead one to assume that it's the editors fault, however replaceing these files with the originals does not fix the problem so either the problem lies with an earlier file, which is unlikely because the rest of the game plays out correctly so then my assumption becomes that it must be the compilers fault, however the compiler/scenereader compilers the original fine - but from a programming perspective that means shit.

...So any suggestions?.

Terence Fergusson

  • *
  • Posts: 262
    • View Profile
Stealing Rates
« Reply #13 on: 2006-01-05 01:17:53 »
Quote from: smithie
It doesn't have any nasty effects on battle square. I've tried with a previous mod all the way up to a lvl 90 character, completing everything along the way including battle square. and didn't notice anything out of the ordinary, nor experienced any technical difficulties. There are two main places that the problem occurs (Shinra HQ & Wutia Tower) and is usually/alway's realated to monsters of the same type.


Just because you didn't see it doesn't mean it's not there.  There are four fights in each Group A and B for the 4th Battle, and you only see the Moth Slasher fights up until you get the Tiny Bronco, at which point they never again appear in Battle Square.  Had you fought enough time in Battle Square to face those particular battles?

Just because something only has a 25% chance of happening at a time that very few people will be doing a lot of Battle Square fighting doesn't mean it isn't a problem and doesn't mean it isn't there.  And like I said, it requires that you copied Scene 111 over Scene 110's data - you will not see it if you left Scene 110 alone and copied that over Scene 111.

 ===

As for where the fault lies, I haven't looked at the problems in question, and don't exactly have lots of time too, but #1 suspect would be whatever's putting the scene files back together again.  Final Fantasy 7 has many expectations on its data and stores some of these expectations in a lot of different places.  It could be something as simple as not packing the file correctly such that one of the compressed files exceeds the size FF7 expects.  Or it could be that the method of putting the files back together into chunks is suspect such that one of the files suddenly finds itself into the next chunk, and unless kernel.bin is also updated, this will effect other things.  (And such an action would effect more than just Gi Nattak's fight)

That said, I'm leery about any Scene Editor that looks at each of the Scene Files individually and not as a whole - really, all the monsters and attacks should be extracted from *all* the files and seperated out, sorted into ID order, and then edited seperately.  From there, you can compile all that back into their relevant Scene files (with the correct attacks and monsters updated exactly the same no matter *where* they appear) and then recompiled, possibly updating kernel.bin at the same time.  Of course, this is a lot more work, but it's the only really sensible way to do it.

-gone away-

  • *
  • Posts: 385
    • View Profile
Stealing Rates
« Reply #14 on: 2006-01-05 01:47:59 »
Quote from: Terence Fergusson
And like I said, it requires that you copied Scene 111 over Scene 110's data - you will not see it if you left Scene 110 alone and copied that over Scene 111.)


Oh right, thats okay then i copied 110 over 111. Not the other way around, still it annoy's me that as a result i will not encounter 3 3rd class soldiers. And yea, i did spend alot of time within battle square.. early on to find out what items were possible to get, and the later on to get the final limit break.

Quote from: Terence Fergusson

It could be something as simple as not packing the file correctly such that one of the compressed files exceeds the size FF7 expects.


Thats my guess, when ever an error occurs the file size exceeds the 264kb limit. thus throwing everything out of whack.

Quote from: Terence Fergusson

with the correct attacks and monsters updated exactly the same no matter *where* they appear


The only problem with this method is that the engine allows for monsters that exist within different scenes to have different stats, so when modding you will not be able take advantage of this.

Another thing about the battle square, you wouldn't happen to know what the bonus is that monsters within the battle square have applied to them. They are deffinatly harder even without penalties, to kill than they're standard form.

The Skillster

  • *
  • Posts: 2284
  • Loving every Final Fantasy
    • View Profile
Stealing Rates
« Reply #15 on: 2006-01-05 09:01:07 »
Would someone like to explain in simple terms what the problem is?
From what I am hearing is you screwed up the editing of a couple of files and it crashed the game?
Remember the Elentor scene file? That is edited as normal at that point.
Why replace the edited scene files with one version?

-gone away-

  • *
  • Posts: 385
    • View Profile
Stealing Rates
« Reply #16 on: 2006-01-05 11:59:41 »
Quote from: The Skillster
Would someone like to explain in simple terms what the problem is?
From what I am hearing is you screwed up the editing of a couple of files and it crashed the game?
Remember the Elentor scene file? That is edited as normal at that point.
Why replace the edited scene files with one version?


Actually elentor's wasn't ok. He encountered the exact same problem with the same boss (Sample:h0512). I posted how to fix it which i think he may of copied, if he didn't copy then i dont have a clue as to how he fixed it but sure would like to know. If you run a search you may be able to find the thread that talks about the problem.

The problem is this, after you have edited all the scene files then go to compile them back together with scenereader. you sometime's encounter fights in the wrong location. e.g. instead of fighting Sample:h0512 you will fight a zenene monster. And so far the only fixes for this problem are not good ones, and shouldn't be used. Unless of coarse someone has come up with a fix and just not bothered to inform anyone else about it.

The Skillster

  • *
  • Posts: 2284
  • Loving every Final Fantasy
    • View Profile
Stealing Rates
« Reply #17 on: 2006-01-05 13:07:34 »
I am really struggling to think where the problem lies.
Try to remember that the field file calls up the IDs for the scene files it wants to use.
From there it uses the Fight IDs/Formation IDs, which are unique.
The only way you DO NOT fight a boss is if you screw those IDs up.
I have my edited scene files here and I am not seeing any similarites to the attack formations in scenes 110 & 111 and remember mines is based on Elentor's and comparing them to the original scene files.

-gone away-

  • *
  • Posts: 385
    • View Profile
Stealing Rates
« Reply #18 on: 2006-01-05 14:41:46 »
Im totally confused as well, everything i test or find out seems to contradict everything else which seems to be true.

If somebody wants me to i can post a file with a deliberate bug so they can then take a look so see where the problem lies.

Maybe the scenereader is adding a extra formations in (for god knows what reasons) to various places in scene.bin.
So for example. From no particular file.

-Scenereader's processes-
Add Scene file (43)
-- Add formation 168
-- Add formation 169
-- Add formation 170
-- Add formation 171, to much data(?) compensate by adding new formation
-- Add formation 172, formation counter now broken

Add Scene file (44)
-- Add formation 173, start from incorrect formation number
-- Add formation 174 ... and so forth,

It would explain why the battles that are out of sync are out by one encounter. But it wouldn't explain the stupidity of useing a counter to increment the formation number rather than just setting the formation number to what was in the file.

Actually i just realised that it would most likely be adding an entirly new scene file rather just a formation, because the difference in file size between a broken file and good file is 272-264=8 which is the same size as a scene file, however it wouldn't explain why the new scene file added isn't compressed where as the others are, i dont know enought about scenereader to say any more than that.

--- btw, sorry salk for turning this into a rather technical bug hunt. i hope we haven't(whoop's wrote have instead of haven't) scared you off into the hills :wink:

Terence Fergusson

  • *
  • Posts: 262
    • View Profile
Stealing Rates
« Reply #19 on: 2006-01-05 14:53:19 »
Quote from: smithie
The only problem with this method is that the engine allows for monsters that exist within different scenes to have different stats, so when modding you will not be able take advantage of this.


The correct method to deal with that is to make a new enemy, not modify a single Scene file.  Modifying encounters to be 'special' when they're not already a unique enemy requires that you know exactly where this encounter appears.  Please note the Battle Square example I've already brought up.  Most encounters that should be unique already use a unique monster anyways.

Quote from: smithie
Another thing about the battle square, you wouldn't happen to know what the bonus is that monsters within the battle square have applied to them. They are deffinatly harder even without penalties, to kill than they're standard form.


Enemy Mechanics FAQ.

Quote from: The Skillster
Try to remember that the field file calls up the IDs for the scene files it wants to use.
From there it uses the Fight IDs/Formation IDs, which are unique.


<sigh>

It really helps if you know what FF7 expects from its Scene.bin file.

Scene.bin contains 256 sub-files, which are compressed and divided up into several 'segments' of 8kb each.

Each 8kb segment contains 16 4-byte offsets at the start, allowing up to 16 files to be allocated to this segment - this offset list takes up the first 64 bytes.  Each offset is multiplied by 4 before used, so the first offset is always 0x00000010.  These files are individually gzip compressed and stored.

So, when FF7 wants a particular scene file, it must know two things: (1) which segment to check, (2) which file in the segment to decompress.

Both (1) and (2) are handled by a table in one of the kernel.bin files, which has the ID of the *FIRST* file in each Scene.bin segment.  FF7 can support up to 64 segments leading to a maximum Scene.bin size of 512kb.  However, the standard English PC version only requires 33 segments, leading to a size of 264kb.  (Note: The French version of Scene.bin requires 34 segments, leading to a larger size and an obvious adjustment in kernel.bin - the two files are thus incompatible without a modification of kernel.bin)

So, when it wants, say, the Sample:H0512-opt fight, it will know it has to look for Encounter 456.  (Note: I am going to use my standard calculation where the first file of Scene.bin is *0*, not 1, which is exactly how FF7 uses its IDs)  The Scene file we need is thus [456 / 4] = 114, and it's the first encounter of that file.  Now, we look up Scene 114.

From the table in Kernel.bin, FF7 knows that Scene 114 is contained in the 14th segment of Scene.bin, and is the *first* file in that segment.  So, FF7 fetches that segment and then fetches the 1st file of that segment and decompresses it.  It now has what it believes to be the correct scene file, and will act accordingly.

If, however, due to editing, one of the previous scene files is just a little bigger after compression than it used to be... you may find that you can't fit the original files back into their original segments.  Not know exactly how the program you're using works, I'm willing to bet it's pushing them into the next segment instead.  Which is all well and good, but without kernel.bin being updated, FF7 will still believe that Scene 114 is the first file in the 14th segment of Scene.bin.

In our possibly not so hypothetical example, Scene 113 no longer fits in the 13th segment, so got shoved into the 14th segment instead.  It's now the first file in the 14th segment.  Scene 113 no longer exists: FF7 now believes that this is now Scene 114.  So it loads up the Sample:H0512-opt fight, and wouldn't you know it?  A Zenene approaches.  Command?

And of course, this creates a domino effect where later encounters from that same segment are also affected.  Instead of Hundred Gunner, say hello to Sample:H0512-opt.  Instead of Rufus, I hope you like having solo-Cloud for a Hundred Gunner/Heli Gunner fight.  Rufus will be ambushing you on the highway *AND* in the swamp, and you'll get random Midgar Zolom encounters in the Mythril Mines.  And all this continues until there's enough space in a segment to fit all the Scene files FF7 expects and the IDs match up again.

So now do you see the problem?

-gone away-

  • *
  • Posts: 385
    • View Profile
Stealing Rates
« Reply #20 on: 2006-01-05 15:13:42 »
I think that nicely explains better what i said directly above it. lol, we must of posted at the same time. However your explanations much better and give's me some idea of how to fix, even if i do not yet know how to edit the kernal.

So its no longer a matter of changing the scenes themselves but the kernal instead. thank god thats sorted out.

The Skillster

  • *
  • Posts: 2284
  • Loving every Final Fantasy
    • View Profile
Stealing Rates
« Reply #21 on: 2006-01-05 16:27:11 »
but more to the point. why is one scene bigger than the next one?

-gone away-

  • *
  • Posts: 385
    • View Profile
Stealing Rates
« Reply #22 on: 2006-01-05 19:11:27 »
Quote from: The Skillster
but more to the point. why is one scene bigger than the next one?


The scenes not actually bigger until after you compress it, well at least all mine appear to be the exact same file size even when its got an error.

It must just go, this value *RndVal* needs four bytes rather than the three allocated. and then automatically make some space.

Either that or the editor's saveing some information thats not needed...

That just reminded me that *i think* scenester does actually cause an error in a file, because when i started using scenester the only reason i kept sceneedit on my computer was to edit the files that scenester caused a problem with. I forgot all about this... well it was about 3 to 6 months ago i think.

We might be able to get around the problem if we use scene-edit to edit the trouble files. I'll give it a test.
-edit-
Test failed.. didn't work, doh.