Author Topic: Scene.Bin editing  (Read 31244 times)

mav

  • *
  • Posts: 239
  • The Sauce team
    • View Profile
Scene.Bin editing
« on: 2005-07-15 10:39:40 »
Ok, I got some time today so I wrote this little program.
It let's you edit files from Scene.bin file so you can change monster values such as:

- Monster name
- HP & MP
- Stats: Strength, Defense, Magic Power, Magic Defense
- Exp, AP & Gil for winning
- Win, Steal and Morph Items [updated, see post below]

Here's a screenshot from 1st boss fight, monster name changed to "Skorpionik" and his strength greatly reduced so Scorpion Tail attack did only 7 HP.



Link: Scene Edit v1.0.0
Note: This program works with unpacked scene.bin files. To unpack/repack this archive you can use another program of mine - Scene.Bin Explorer

Suggestions are apprieciated ;).

Edit: Just to see if everything works I opened "Hardcore version" of Scene.Bin from the other project, here are the results, it seems that everything works fine:


Aaron

  • *
  • Posts: 2818
    • View Profile
    • http://aaron-kelley.net/
Scene.Bin editing
« Reply #1 on: 2005-07-15 12:06:30 »
If you want it to be harder, do you really want to increase the gil, exp, and AP rewards?  :-P

ice_cold513

  • *
  • Posts: 494
    • View Profile
Scene.Bin editing
« Reply #2 on: 2005-07-15 12:09:55 »
Quote from: Aaron
If you want it to be harder, do you really want to increase the gil, exp, and AP rewards?  :-P


I was thinking the same thing there

mav

  • *
  • Posts: 239
  • The Sauce team
    • View Profile
Scene.Bin editing
« Reply #3 on: 2005-07-15 13:41:16 »
You should ask this question to Elentor, author of Hardcore Project. I'm only a small programmer ;).

New version released!

Version: 1.1.0
Changes:
- added win, steal and morph item editing along with item list (from Qhimm's Jenova)
- some gui changes
Link: Scene Edit v1.1.0
Screenshot: Edited Guard Scorpion to drop Atomic Scissors instead of Assault Gun


Elentor

  • *
  • Posts: 81
    • View Profile
Scene.Bin editing
« Reply #4 on: 2005-07-15 15:45:22 »
Great job there, M4v3r. Simply great. This is going to ease my work in such a way you cannot imagine. No more evil Hex-Editing!

About the coments of Aaron:
The Gil extra-rewards I did is because I'm planning on changing, after the monster status, the whole economy of the game too, just because I think items ARE too cheap as they are now. So, the extra-rewards, while making things easier for now, serves a later purpose, which I was planning from the beginning.
Now, about the AP extra rewards: These will follow a diminishing curve through the game. While I was chatting with Alhexx, we found that a very bad gameplay aspect is the fact that, while the first city (Midgar) serves the purpose of teaching you how to play the game (i.e.: easy bosses etc), the main magic system of the game remains untouched until far later. The sooner I could level my Fire Materia was in the caves near Midgar Zollom. Later, when you have access to Midel, gaining AP gets very easy, and you can easily outbalance the game to your favor by leveling your materias more than you should. Later, I'm going to reduce the AP gains, because of this. Again, it's all Beta.
About the Experience extra rewards: The absolutely same thing, plus I will also be fixing the ridiculous experience spots (a.k.a. Junon after you get the buggie, Middel etc) which allows you to get to Level 50 before finishing the first CD, but won't give you freedom to level up when two or three levels make absolutely no difference (anyone who have read the formulae knows that the first levels changes as much in your attributes as your acessories affect your magic defense). Not only that but really, 25 points, while a 25% extra bonus, still will not affect the total of difficulty, and even if it did (for example, making you level up) the difference doesn't overweight the challenge added.

It is the same thing as the first two bangles: What difference makes two points, after all? The difference here is that I'm not taking any base of comparation within the game (after all, you won't fight two different guard scorpions in the same patch), instead just balancing the experience gains.
Increased 25% of experience will not make the game cheaper. Supposing this 25% applied to the whole game, AND it meant y ou was supposed to get 1/4 more levels than you should (which we know the two affirmations are wrong), and supposing Cloud is in an area where his average level is 11 (and I will suppose that you will fight Guard Scorpion by level 11, which we all know it's possible, with patience, but I doubt anyone other than me keeps leveling up), that means his level will now be (rounding up) 14 (which would never be).
If by some ungodly reason you manage to get the maximum bonuses per level, and supposing your original Strength was 26, this means you will have a damage enhancement of (not counting weapons).
Original: 26 + 11+26/32 * 11*26/32 = 26 + 1,15*8,9  = 26+10 = 36
"Added" Experience: 35 + 14+35/32 * 14*35/32 = 35 + 1,5*15 = 57

Difference: 1,6x or an additional 60% damage.
Now compare his HP, which changed from 800 to 2000, an additional 150% value. The difference between this and the damage is of 120%, or more than the double. The "statistical" difference still overweights the "extra bonus", even if he, somehow, managed to give you a full effect through the whole. But this is all theorical. In the game, it won't even make that 60% different, or any at all.
Not only that, but while some critters have a minimal experience increased, others have the experience reduced. M4V3R just happened to pick up a very famous example, which I happened to rise the experience gained.

Hope I answered the question. Sorry for taking so much space from your topic, M4V3R, I just liked to set clear how these bonus won't affect the game overall.

Cheers!

Edit:
Suggestions: It would be nice to edit Evasion, Luck and mainly Speed.
Also, some enemies can drop more than one item when killed. I may not be sure, but I think it uses the same allocation in the hexadecimals of "steal" when this happens, and steal uses morph and so go on. I will confirm this.
Because of this, a better item editor with chances to get item and multiple options when necessary would be great.

Aaron

  • *
  • Posts: 2818
    • View Profile
    • http://aaron-kelley.net/
Scene.Bin editing
« Reply #5 on: 2005-07-15 15:53:03 »
Yeah, that makes more sense now.
Looks cool... I'll try it sometime.

mav

  • *
  • Posts: 239
  • The Sauce team
    • View Profile
Scene.Bin editing
« Reply #6 on: 2005-07-15 15:53:24 »
Elentor, if you have some feature request for this prog, please let me know. If I'll have time then I will program whatever you want :).

Elentor

  • *
  • Posts: 81
    • View Profile
Scene.Bin editing
« Reply #7 on: 2005-07-15 16:24:43 »
Woops, didn't read your reply.
Well, like I said:

Quote
Suggestions: It would be nice to edit Evasion, Luck and mainly Speed.
Also, some enemies can drop more than one item when killed. I may not be sure, but I think it uses the same allocation in the hexadecimals of "steal" when this happens, and steal uses morph and so go on. I will confirm this.
Because of this, a better item editor with chances to get item and multiple options when necessary would be great.


I just confirmed this. There is a bug happening with this. Try loading, for example, Mono Drive on your program. For example, in the file 77, I'm very sure you are picking up the "steal" items from x0496, but the whole item series which is 00000300FFFFFFFF, the first 8 digits are refering to items dropped (with 8/2 chances of gaining, respectively).

I have no idea how you can fix this. This is going to be coded manually for each enemy, in the worst scenario.

Edit: Or you can just forget about this bug, I'm pretty sure anyone going to edit these files are aware of each items are "steal" and each items are "drop". I just think that editing the chances would be great (Sometimes I have to do it)
By the way, if you want a cool layout, symbol or icon, just ask me, and I will do it in my free time.

Cheers

EmperorSteele

  • *
  • Posts: 933
    • View Profile
Scene.Bin editing
« Reply #8 on: 2005-07-15 19:03:14 »
Not to threadjack, but Elentor, have you read Terrance Fergusence Battle mechanics document?  It already has the drop and steal rates for all the enemies, and lists any and all bugs assoicated with them.

It's on gamefaqs if you want to scope it out.

Elentor

  • *
  • Posts: 81
    • View Profile
Scene.Bin editing
« Reply #9 on: 2005-07-15 19:43:47 »
EmperorSteele Yea I did. I'm talking about some bugs regarding the way Scene Edit is collecting information from the hexadecimal system, not about flaws within the game itself.

About the rates, the problem is having to edit them in the hexadecimals. I'd rather have a program to do it for me :D

Edit to avoid Double-Posting: Found another bug.. I'm not being able to edit SwordDance (files 107 and 108).
When I click on it, it loads blank information. Any way to fix it?

mav

  • *
  • Posts: 239
  • The Sauce team
    • View Profile
Scene.Bin editing
« Reply #10 on: 2005-07-16 07:06:04 »
Evasion, Luck and speed can be very easy implemented, I will do this in next release.

I wrote this program using scene.bin format described in Gears, maybe this description isn't complete. I'll have to take a look on it again.

Part of post cut out, not valid info

If you have better description of this section then please let me know.

If you're good at graphics then sure, I'd like to have a nice icon for my program, because Delphi's default icon is ugly as hell :P.

Edit: I think that Terence Fergusson could help us, however I think that he is hard to catch lately :).

Edit2: Update - new release

Version: 1.1.3
Changes:
- added: evade, luck and speed editing
- added: credit to people at Qhimm's forums
- added: readme, history and enemies files to program archive
- changed: 'Author' to 'About'
- fixed: bug when there are 2 monsters but second record is empty

Link: Scene Edit v1.1.3

Edit3: Format update

I think I understand now how this works. I'll write it down here so everyone interested could benefit from it, and so I don't forget how this works :).

------

Offsets here are relative, from the beginning of each enemy's data.

0x88h [4 bytes] - win/steal info & rates

These are chances to get items listed in next section. 1 byte per item. But now comes the tricky part. If the rate is lower than 80h, for e.g. 08h - then this is a drop item and has 8/63 [63 is max] chance for drop. But if rate is higher than 80h, let's say... A0h, then this is an item for steal, and chances for successful steal is A0h - 80h = 20h = 32/63.

0x8Ch [8 bytes] - win/steal item list

This is a list of items described above. 2 bytes per item.

So, if the data is (file 105, Mighty Grunt):

Code: [Select]
08 A0 88 FF 0E 00 0E 00 14 00 FF FF

This means, that this monster drops one item - Tranquillizer [0Eh], with 8/63 chance for drop, and you can steal either a Tranquillizer (32/63 chance) or Grenade [14h] (8/63 chance) from it.

-----

Please correct me if I'm wrong. With this info I'll be able to write item management option in my app, I think It'll be ready tomorrow. Stay tuned :).

Elentor

  • *
  • Posts: 81
    • View Profile
Scene.Bin editing
« Reply #11 on: 2005-07-16 13:19:49 »
Heya, good to see the updates!

Yea, Terence could help us, but he seems to be kinda like a ghost nowadays.
That bug fix and the other stats editing have now filled my needs.

By the way, nice discovery on the win/steal info. I never knew how it worked and thought it was hard-coded on the game and that the first bytes were used only for rates... amazing.

Anyway, what would you like as an icon? I thought of some Barret Gun or a Tifa glove, since it's all about battles :D

mav

  • *
  • Posts: 239
  • The Sauce team
    • View Profile
Scene.Bin editing
« Reply #12 on: 2005-07-16 13:21:25 »
Tifa glove would be nice :). Next version should be ready tomorrow. As for the rates and this win/steal thingy - it's only my guess, but it's true to all files I've checked.

Elentor

  • *
  • Posts: 81
    • View Profile
Scene.Bin editing
« Reply #13 on: 2005-07-16 13:25:47 »
Already tomorrow? Oh my god.
One last request I have would be a mass-modifying feature, to edit the same enemy on multiple files. Would it be too hard to implement?
Besides, are on you on ICQ? I heard you are always invisible, so it's hard to know.

mav

  • *
  • Posts: 239
  • The Sauce team
    • View Profile
Scene.Bin editing
« Reply #14 on: 2005-07-16 14:07:06 »
I disabled ICQ on my communicator, because it was eating my system resources too much. You can catch me on MSN ([email protected]) or IRC (#subarashii @ valkyrie.freedomirc.net) though.

Edit: I enabled my ICQ. Yes, I'm always invisible :).

Elentor

  • *
  • Posts: 81
    • View Profile
Scene.Bin editing
« Reply #15 on: 2005-07-16 14:53:55 »
Just finished the glove.
Here's a full render:


Here is an icon:


Enjoy ;)

Marc

  • *
  • Posts: 445
  • I hear Voices ... in my head
    • View Profile
Scene.Bin editing
« Reply #16 on: 2005-07-16 16:20:12 »
Great little program.  I'm sure it'll be useful.

However I was thinking, would it possible to also be able to edit monster's elemental attributes ?  It'd be nice to be able to make some enemies immune or resistent to some types of elements to make the strategy more important than just using almost any spell.

Also, since it seems possible to edit to steal/morph items and rate, would it be possible to edit the spells and their rate of use by an enemy ?  For example, it'd be neat to give more enemies the ability to use haste or to give them bolt 3 instsead of bolt 2, etc.

Just a thought.

Elentor

  • *
  • Posts: 81
    • View Profile
Scene.Bin editing
« Reply #17 on: 2005-07-16 16:34:11 »
AFAIK, editing an enemy skills list should be a little more complicated. I didn't even TOUCH on that part.
Making the elements editable should be easy, but it's up to him.

I would just like to report a bug I found today:

On file 6, when I edit a Grunt, the other is automatically changed too. Any way to fix that?

Thanks

mav

  • *
  • Posts: 239
  • The Sauce team
    • View Profile
Scene.Bin editing
« Reply #18 on: 2005-07-17 09:04:35 »
New version released!

Version: 1.2.2
Changes:
- added: elements and their effects editing
- added: cute program icon by Elentor instead of old Delphi one :D
- changed: item handling rewritten, now program fully supports all item cases
- fixed: all (I hope) glitches when some records are empty

Link: Scene Edit v1.2.2
Screenshot: Now program looks like this:



------

Bug with Grunt on file 6 was caused by empty record in file, I finally thought a way to bypass them and I hope my program will be handling them all right.

For elements editing - every enemy has 8 slots for element info, each slot can be edited to set values such as Resist, Double Damage, Half Damage, Death and such. Not tested in-game, only by comparing files, *should* work. Updated: Tested, working ;)

And for attack editing - I understand how this work and I *think* that I could swap some enemies attacks. I'm not sure though, I'll have to check this. This is what I know (this is knowledge I've collected myself, I'm pretty sure that Terence know a lot more):

In Enemy Data section, at offset 0x48 you can find enemy's Attack ID's (another thing that's not covered by gears, wonder why...). 2 bytes per attack. AFAIK when ID is lower than 0x100 then this is global attack (like magic - that can be used by all enemies), and if its higher, then it's some personal attack of enemies. This ID list is repeated later in file, just before attack names (past Enemy Data). And the last place that these ID's are used is the AI script at end of file. you can clearly see them there, they are often in format: 61 xx xx, where xx is ID. 61 is opcode for using or setting next attack I think.
So... I think if you change these attack ID's to something else, then enemy will be using diffrent attacks. I'll try to check this and tell you if it succeeded.

Edit: Hey, did you ever saw Guard Scorpion using Fire? :P



But now goes the fun part. Scorpion IS using Fire (I think he is because damage is greater than his normal attack), BUT the animation of attack is same as before (I changed Rifle attack to fire). So apart attack ID's there must be some information about animation used somewhere. I'll try to look for it, but it won't be so easy now.

Oh, by the way - when I first changed these values so Scorpion would use Fire I forgot to give him some MP. And I got this info on top "Guard Scorpion's power has used up", or something like that :P.

Elentor

  • *
  • Posts: 81
    • View Profile
Scene.Bin editing
« Reply #19 on: 2005-07-17 13:31:24 »
Well, he is using Fire because he thinks it is Rifle, unless you changed his AI.

Doesn't the Attack ID begins at 0x84? I thought 48 was still enemy data, but nice giving him Fire :D

I will download the new version and will be uploading as fast as I can.

Cheers

mav

  • *
  • Posts: 239
  • The Sauce team
    • View Profile
Scene.Bin editing
« Reply #20 on: 2005-07-17 13:44:40 »
Yeah, I changed his attack ID's and AI so he would use Fire. But the animation is still as Rifle attack. And now I know that info about which animation is used is not in 'Attack Data' section, because I did some brute copy&paste from other file, and there was no change at all.

L. Spiro

  • *
  • Posts: 797
    • View Profile
    • http://www.memoryhacking.com/index.php
Scene.Bin editing
« Reply #21 on: 2005-07-17 13:51:23 »
As for drops/steals, you are correct to assume that a ratio over 0x80 is a steal.
If it is under 0x80, it is a drop.
If over, subtract 0x80 and you get the item that can be stolen in that slot.

After that, add 1 to the number and divide by 64.
This gives the actual percent chance of getting said item.

So for Guard Scorpion, we have 0x3F for Titan Bangle.
It is under 0x80 so it is a drop.
The chance of it being dropped is (0x3F + 1) / 64, or 100%.


When dropping items at the end of a battle, Final Fantasy® VII will go in order through each drop, and each enemy has a chance to drop one of its items.
So, if an enemy has 4 drops, the game will go through each and for each it will calculate the chance of dropping that item.
If that item is dropped, it stops scanning that enemy’s drop list and moves on to the next enemy.

The reason I tell you this is because if you are going to play around with the drop lists for enemies, don’t put something at 100% drop rate with other items.
If you put it in front of other items, the other items will never drop, and if you put it behind other items, it will only drop if the items before it don’t.





As for animations, the animation that will be called per respective attack is listed starting at 0x38.
The following 16 bytes are the animation indexes for each respective animation.

It is a bad idea to edit these, in general, even if only for lack of reason.
Guard Scorpion doesn’t have an animation for casting Fire, and animations are more complex than just motions.
They trigger other events to occur and have some other special abilities as well.
For example, they cause damage print-outs to be shown.
Also, some actions cause other enemies in the area to perform actions as well.

Ruby WEAPON has two tentacles, but these tentacles have no attacks of their own.
Ruby WEAPON invokes the attacks and forces the tentacles into an animation.
If you change animations, be careful and test thouroughly.


L. Spiro

Marc

  • *
  • Posts: 445
  • I hear Voices ... in my head
    • View Profile
Scene.Bin editing
« Reply #22 on: 2005-07-17 15:39:25 »
Wow.  Amazing progress in such a short time.

You were even able to fiddle with the attacks.  As for changing animations, I'm thinking some animations might be used for certain spells even if it's not the intended one.  Sure for Guard Scorpion using fire instead of rifle looks ridiculous but changing a magic for another would still leave a magic animation which could probably fit the bill no ?

Elentor

  • *
  • Posts: 81
    • View Profile
Scene.Bin editing
« Reply #23 on: 2005-07-17 16:37:59 »
Marcis: I think so.
The very problem with Guard Scorpion is that he doesn't have any magic animatino.

mav

  • *
  • Posts: 239
  • The Sauce team
    • View Profile
Scene.Bin editing
« Reply #24 on: 2005-07-17 17:29:22 »
L.Spiro - your description isn't entirely correct, because if drop rate would be 00h then according to your formula the chance would be ((00h + 1) / 64) * 100% = 1.56%, which, of course isn't right :).
There's no need to add 1 to byte readed from file, just divide it by 63 and you have exact chance.

As for battle animations - I see your point. I dug into forums and found some info about battle animations. They are stored in ??da files in magic.lgp. If so, we can't edit the whole attack by only editing scene.bin file, we would also have to edit those files and this is too hard.

Right now I'm working on some tool that would help us edit battle script, so we can change enemy's attitude and basicly every action. It will take some time though.