Author Topic: [PSX/PC] LImit BReak Editor (Version 0.3)  (Read 57203 times)

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
[PSX/PC] LImit BReak Editor (Version 0.3)
« on: 2010-03-19 14:08:16 »
LIBRE for Final Fantasy 7 is here! No more fiddly hex editing to change the properties of limit breaks!

EDIT - Updated to version 0.3: PC support added!

NOTIFICATION (08/2012): LiBrE does not currently support the 2012 PC re-release. I will work on this for the next version.

Overview:
  • Features
  • Screenshots
  • Choosing a version
  • Download links
  • Bug reports and issues
Features:
  • Full editing of Limit Break attacks - statuses inflicted / toggled / cured, power, damage calculation, special attack flags, elements, animations, sounds, MP cost, targetting data - you name it.
  • A Wallmarket-like interface that makes it intuitive to use
  • PC version support added
  • Extract data from one version, modify, and patch another
  • Files produced tested and verified to be reliable
  • Fully explained damage algorithm and additional effect flag choices
  • Short load, save, and boot times
  • Accesses data to all limit breaks, including Cait Sith / Vincent's 'general' limits, the secondary parts of Finishing Touch / Satan Slam
  • Non Windows-functionality in the form of a Python package - work on Mac and Linux
  • Standalone EXE download that needs no extra packages nor installation
  • Supports Windows 95 / 98 / 2000 / XP / Vista / 7
Screenshots:

- WinXP -


- Linux -


Choosing a version

This depends on your operating system, really. You have either a standalone Windows Executable that should work for Windows 95+, or a Python File Directory. Python is a programming language integrated into most Linux and OS X distributions. If you have Python 2.5 and the WxPython (a small download) for your operating system, you can just run the 'Libre.pyw' file from either command line or IDLE and work away.

The executable comes as a five megabyte 7z file. The Python version is a mere 15kb.

To run the Python version on Linux, you will need python-wxgtk2.5+ and python-wxversion. You should be able to find these easily with a package manager.

Below:Install the top two packages for Ubuntu


Download Links

WINDOWS VERSION 0.3:

Mediafire: http://www.mediafire.com/file/nkvzz4mhfgy/Libre 3 for Windows.zip

Mirror: http://libre-limitbreakeditorforff7.yolasite.com/resources/Libre%203%20for%20Windows.zip

PYTHON FILES FOR PYTHON 2.5 AND WXPYTHON, VERSION 0.2:

Mediafire: http://www.mediafire.com/file/errtiyomriy/Libre 3 for Python.zip

Mirror: http://libre-limitbreakeditorforff7.yolasite.com/resources/Libre%203%20for%20Python.zip

Bug reports and issues

Fixed in 0.3:
- HP Absorb flag issue resolved
- Can work without loading data

Current issues remaining:
- It's still a bit ugly on certain Windows installations thanks to the shortcomings of WxPython.
- Executable doesn't yet play well with WINE. I need to investigate this, but I suspect it's to do with the dlls that make the program work with the Windows environment. In which case, there's not much that can be done. Confirmed to run in WINE. See Kranmer's post below:


http://www.youtube.com/watch?v=kjymmGvG4B8

its ububtu 9.10 with the latest version of wine (i think its 1.1.43 or somthing like that) and VC++ redists for 03,05 and 08 installed and then it worked. Please note i havent fully tested it, just wanted to let you know it runs on wine.


Bug reports can be posted here. Or you can email me at the details listed in the helpfile.

Oh, and another thing. Limits that are stored in the KERNEL.BIN probably trump Limit Break attacks in the LIMITMENU.MNU, so you will likely need Wallmarket to edit them all. I need to confirm this.
« Last Edit: 2018-04-24 18:18:48 by Covarr »

RoxaSoraX

  • Guest
where do i find my MNU file, i searched everywhere and i cant find it. my game works fine as well.

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
It is in the MENU directory of the FF7 PSX disk folder.

For instance, try X:\MENU\LIMITMENU.MNU, where X is the letter of your CD-ROM drive.
« Last Edit: 2010-03-20 22:27:56 by Bosola »

AngeBleu

  • *
  • Posts: 68
    • View Profile
Can you make a tuto on: How to use Libre for FF7. please  ;)

Thanks in advance.

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Well, it's *very* similar to Wallmarket, and most people with Libre will have it, so I'm guessing that most I would say is redundant. You do the same as you would when editing spells in WM or attacks in Proud Clod - rip the file from disc, set power, algorithms and statuses etc., then use something like CD Mage beta to reinsert the files. Information on what the controls all mean is in the help file.

Here's its contents:

Quote
Libre - Limit Break Editor for FF7 (PSX) : Help File

CONTENTS:
  1. Obtaining and installing Libre
  2. The window layout. What it all means.
  3. Opening and saving, selecting limits
  4. Help and About
  5. Bug reports and feedback
  6. Copyright, disclaimer (IMPORTANT!) etc.

**************************************
 1: Obtaining and installing Libre
**************************************
Seeing as you're reading this, there's a good chance
that you've already downloaded the program.
However,
it's always possible that you'll want another copy,
especially when bugs are fixed. You have two options:

1. Go to the QHIMM forum thread for "Libre: FF7 Limit
Break Editor", or,

2. Visit http://libre-limitbreakeditorforff7.yolasite.com/
for both the most recent and older versions.

Depending on your operating system, you have two choices

1. WINDOWS 95/98/2000/XP/VISTA/7:
 Download the PC executable file, 'Libre FF7 for Windows'.
 Unzip and double-click 'Libre.exe'.

2. ANY SYSTEM with PYTHON and WXPYTHON (Linux and OSX
have the first by default:
 Download the Python directory files. Unzip and run
 Libre.pyw

**************************************
**************************************
 2. The Window Layout
**************************************
**************************************
If you've used NFITC1's WALLMARKET or PROUD CLOD programs,
you should recognize the basic setup. We can split the
controls into top-left, top-right, centre, targetting,
elemental and miscellaneous (at the bottom).

TOP LEFT:

*****
ATK%:
*****
This determines the accuracy of the limit break. Most are set
to 255% by default.

******************************************
Impact / Target Animation / Impact Sound :
******************************************
These are three HEXADECIMAL values, each two bytes
(0-FFFF). These determine the graphical effects of the
hit, the  target's flinching moves and the sound the
attack makes on impact. You should check the QHIMM
wiki for more info.

CAUTION: If you type in an invalid hexadecimal value
(for instance, '11GG'), it will instantly revert to
'FFFF'.

**************
Animation ID:
**************
A single hex value that determines the animation used.
Very little experimentation has been done with this, so
expect lots of glitches in-game if you alter this carelessly.

CAUTION: If you type in an invalid hexadecimal value
(for instance, '1G'), it will instantly revert to
'FF'.

**************************
Camera Single/ Multiple:
**************************
These are two HEXADECIMAL values, each two bytes (0-FFFF).
These determine the way the camera moves during the limit,
depending on whether one or more enemies are being hit.

CAUTION: If you type in an invalid hexadecimal value
(for instance, '11GG'), it will instantly revert to
'FFFF'.

TOP RIGHT:
****************
Status Effects:
****************
These are the active status effects that the limit will
inflict, cure, or toggle. Explanations for each can be
found in Terrence Ferguson's Battle Mechanics FAQ over
on GameFAQs. A few caveats, though:

- in game, if an entity has dual WITHOUT dualdrain, or
  vice-versa, it will crash.
- don't inflict 'opposing' statuses (sad/fury;haste/slow
  etc.)

At the bottom is a 'status chance' control, that goes from
zero to sixty-three. This determines the chance of inflicting
a negative status in 'inflict' mode.

'Status Mode' can have three settings:
- INFLICT: Inflicts status (+ve or -ve) at the rate determined
  by 'Status Chance'
- CURE: Removes statuses. Doesn't miss.
- TOGGLE: Turns the selected statuses on if they're off, or off
  if they're on (e.g. - Mini can cause or cure a 'small' state)

CENTRAL:
*******************
Power / Algorithm:
*******************
Power is a value from zero to 255, that modifies the algorithm
chosen. Algorithms determine how damage is calculated.

TARGETTING:
******************
Enable Selection:
******************
Lets the players choose a target.

*********
One Row:
*********
If the cursor is by default on either enemies or allies, you're
bound by that choice. Summons, for instance, which can't be used
on the party, have the 'One Row' flag.

******************
Start on enemies:
******************
If true, the cursor starts on enemies. If not, it doesn't.
Important if you plan to use One Row (above).

**********
Unranged:
**********
If this is a physical attack, is it short range?

*******************
Start as multiple:
*******************
Does the cursor target the whole group of enemies / allies by
default?

**********
All rows:
**********
Attacks with this property target friend and foe alike.

*****************
Toggle multiple:
*****************
Does the cursor allow you to choose multiple or single enemies?

********
Random:
********
If this is on, the attack will hit a single, randomly selected
target from the group selected. Ahriman's Roulette has this.

MIDRIGHT:
**********
Elements:
**********
Assign the elements of the attack. 'Health' is used by curative
magic. Cut/shout/etc. are elements of particular weapons.

MISCELLANEOUS:
******************************
Additional Effect / Modifier:
******************************
Additional effects are... well, miscellaneous. They include things
like multiple hits (Omnislash) or Vincent's transformations. They
can modify the stats of those hit (like Dragon Force, or Hero
Drinks).

Some effects have a modifer, 'M'. This is set in the '[M]' control
to the right.

***************
Special Flags:
***************
- Affect MP:
  Damage is done to MP rather than HP.
- Drain damage:
  10% of damage is done is drained by the caster/ user.
- Ignore status def:
  Will inflict statuses, even if enemy is immune.
- Drain HP/MP:
  Will drain both HP and a little MP.
- Reflectable:
  Attack can be reflected.
- Miss if alive:
  Most attacks can't hit the dead. Life / Life2 have 'Miss if alive',
  which ensures the opposite: it hits the KOed, but not the living.
- Ignore Def:
  Piercing, i.e. ignores Vitality / Spirit.
- No retarget:
  If the target becomes unhittable between being selected and being
  cast (ie if Tifa was killed before you get to cast Cure on her),
  'no retarget' prevents the usual retargetting of another valid entity.
- Critical:
  Hits are always critical. Omnislash has this.
- Force phys:
  Unused flag that forces attacks to be considered as physical, even
  if magical.

**************
Restore Type:
**************
If your attack restores HP, MP or status, you should set 'Restore Type'
accordingly, though it doesn't really seem to matter.

*********
MP Cost:
*********
It's the move's MP cost.

************************************
************************************
3. Opening/Saving/Selecting Limits
************************************
************************************
When Libre starts, you'll have a file dialog appear that allows
you to select a LIMITMENU.MNU file to work on. If you cancel,
you can still load up a new one, but it won't work until
you select a file.

You can select the limit you want to work on with the drop-
down menubox at the top of the Window. If you switch limits,
then switch back, your changes will still be in memory.

To save, select, uh, save. You need to select a LIMITMENU.MNU
file to apply changes to. You don't have to save to the .MNU you
loaded, but you DO have to save to a pre-existing file. Libre
can't build a .MNU from scratch.

At the moment, 'Load FF7.exe' does nothing. Expect this to
change in the next release.

WARNING: ALWAYS BACKUP THE FILES YOU ARE WORKING ON.
I AM NOT RESPONSIBLE FOR ANY DATA LOSS, BE IT DOWN TO YOU
OR THE PROGRAM. YOU HAVE BEEN WARNED.

NOTE: The 'ALT' limit breaks are the secondary parts of Cloud's
Finishing Touch and Vincent's Satan Slam. Both are actually linked
pairs of attacks.

******************
******************
4. The Help Menu
******************
******************

'Help' just brings up this file. 'About' tells you a little about
the program. There's not much else to this : /

*****************************
*****************************
5. Bug Reports and Feedback
*****************************
*****************************

Being in 0.1 version, Libre's still a very young program. And bugs
happen, even in the simplest of programs. Thankfully, you can
contact me and I can clean up any errors. You can either send me
a PM / reply to the LIBRE thread on QHIMM, or send me an email at

[email protected]

I will answer and respond to emails at my own discretion. Mails in
txt spk or peppered with abusive language get deleted right away.
That said, I DO check my email, so DON'T BE PUT OFF if you notice
a bug. Make sure 'Libre' is in the topic, and include the following:
 - Your Operating System (XP, 7, Ubuntu, Arch, OS X Snow Leopard, etc)
 - Your Service Pack (Windows users) and Window Manager (Linuxers)
 - How you are running Libre (as EXE? Through WINE? as PY script?)
 - What happened, and what you had been doing beforehand
 - Did you cancel any operations?
 - Versions of Python, WxPython etc. used if appropriate

*********************************************
*********************************************
6. The Small Print: Copyright and Disclaimer
*********************************************
*********************************************

FIRSTLY:
I TAKE NO RESPONSIBILITY FOR THE EFFECTS OF LIBRE ON YOUR COMPUTER.
YOU USE THE APPLICATION AT YOUR OWN RISK. IF YOU DO NOT BACKUP FILES
THAT YOU WORK ON, THAT IS YOUR OWN PROBLEM. BY USING THIS PROGRAM,
YOU ACCEPT THIS.

Copyright etc.:
Even though the source is available to view, I still have copyright on
this program. You cannot distribute it without my permission, though you
can modify it for your own use. That said, if you have any suggested changes
either to features or to the code itself, please do email me at the address
above.

« Last Edit: 2010-03-20 20:40:42 by Bosola »

Kranmer

  • *
  • Posts: 766
    • View Profile
Wow this is quite a nice program Bosola. And seems to to be working so far (i will try more later i have only tried it once and it seems to be going well)
Also i would like to ask for permission to create a standalone EXE (one that doesnt need external files like DLL's etc) just to make it a bit cleaner (i personally hate having loads of DLL's and EXE's i find it much more easy to have just 1 EXE file)
im not asking for your source code i am just asking for permission to modify your existing EXE.

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Sure thing. How do you intend to do it?

Kranmer

  • *
  • Posts: 766
    • View Profile
Bosola i have done it using Molebox, it allows the merging of external files into a EXE.
« Last Edit: 2010-03-19 20:15:18 by kranmer »

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
...Any alternatives that wouldn't necessitate a costly Molebox license? I can't afford to pay ~£200 for distribution rights. As for the icon, that's just a matter of making one (that I have the rights to) and passing inclusion as an argument to Py2Exe.
« Last Edit: 2010-03-19 20:13:10 by Bosola »

Kranmer

  • *
  • Posts: 766
    • View Profile
well there are other programs out there that can do the same thing (i dont know them all but you could proberly google for them),
I used to use a trial of a program called "Stand Alone Xpress" which had a fully functional trial (it can be used for 9 days but cant be bought any longer since the company no longer exists so the best way to do it is to remove it then reinstall it after 9 days)
And i have heard good things about "BoxedAppPacker" but i havent ever used it,
EDIT- here is a place where people discuss other programs that can merge DLL's and EXE etc
http://stackoverflow.com/questions/336961/packing-an-exe-dll-into-one-executable-not-net
some are free and some cost money, i couldnt get any of the completely free ones to work right (could be my own problem though) but the trial version of PEbundle which is the cheapest of the programs seems to work alright.
« Last Edit: 2010-03-19 22:42:44 by kranmer »

Tonfa

  • *
  • Posts: 18
    • View Profile
Nice work, I was currently doing the limit editing part in my hack...however, I'll have to keep at hacking at the hex for now, as I found a few bugs at a cursory glance.

Minor: Ignore Def, Critical and Force Phys have display glitches that can appear after you hover over them.



Major: The program seems incapable of distinguishing between Critical and Drain HP/MP, as it keeps alternating which of the effects to have checked for a move with one of them when loading up a move. Flip between default Omnislash(or Dragon, etc.) and another move to see for yourself.

Using Windows XP, for whatever that's worth.

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Another one, too: I've spotted a major flaw that will make limits cost 255 MP if MP cost is touched. I fixed it, but I screwed up, and mixed up the builds. I'll sort it out NOW.

As for the others: I'm on it right now.
« Last Edit: 2010-04-08 00:31:24 by Bosola »

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Fixed! It was a really simple issue! And my own silliness!

I'd simply mixed up the two bytes that control the special flags. Meanwhile, because I was using a command called 'SetInitialSize' to alter the sizes of controls, my attempts to use Constrictor to resize were doomed to fail, because that changes the property 'BestFittingSize'. They were both really simple errors.

I've also changed the way the text controls handle non-hex figures. I am also about to have the program close if you don't initially select a file. I'm really sorry - I compiled the wrong build (DERP!) and I made a silly mistake. I'll have the app and python files rolled out within the hour.

EDIT - First post updated. You should have no more errors. Thank you for highlighting this!
« Last Edit: 2010-03-20 20:37:30 by Bosola »

Ace

  • *
  • Posts: 18
    • View Profile
I'm very impressed! A job well done!

AngeBleu

  • *
  • Posts: 68
    • View Profile
Where is the limitmenu.mnu ?

I searched into FF7 instalation disk or disk 1, 2 or 3, and I don't find it  :-\

Mendelevium

  • *
  • Posts: 222
    • View Profile
Where is the limitmenu.mnu ?

I searched into FF7 instalation disk or disk 1, 2 or 3, and I don't find it  :-\

It is only for the psx version at the moment, I believe.

it does say "Upcoming PC version support" in the features list.

AngeBleu

  • *
  • Posts: 68
    • View Profile
oh ok !! ^^

But will be there it for PC ?

Mendelevium

  • *
  • Posts: 222
    • View Profile
it does say "Upcoming PC version support" in the features list.

*edit*

I feel kinda mean. Sorry if I passed off that way, I am merely trying to help. ^.^
« Last Edit: 2010-03-20 22:19:04 by Mendelevium »

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Sure, there will be. I know the offset for the PC version, so all I have to do is create another 'path' where the different offset is passed as an argument to the 'loader' and 'saver' modules.

In the meanwhile, you could just make a dummy LIMITMENU.MNU, make the alterations and then copy-paste in a hex editor.

The simplest way to make a dummy file is with Python, using the following code.

>>>f = open('{path to file}LIMITMENU.MNU','wb')
>>>f.seek(0)
>>>n = 0
>>>x = '\xFF'
>>>while n < 6916:
>>>    f.write(x)
>>>    n = n + 1
>>>f.close()

You will now have a .MNU full of FF characters. You'll have to make all limits yourself, though, which would be a pain.

Limits will appear at offset 1324h and end at 1B03h in your dummy file. Limit data starts at 51E0D4h in the PC version.
« Last Edit: 2010-03-21 08:39:41 by Bosola »

Auraplatonic

  • *
  • Posts: 68
    • View Profile
This looks pretty sweet :)  Can't wait for the PC compatibility.

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
There's also another issue I've found, recently, that involves the 'HP Absorb' flag not being 'saved' sometimes. It may be simpler just to go for a 'big push' and release a PC-editing version that fixes the bug too. I have a version of FF7 PC... somewhere, and I know the offsets. Now I just have to find the disc, install, and double-check.

Oh, and change the way it starts up, too, obviously (start with all controls disabled). I may also change the delivery system: at the moment, you can download the executable AND the Py2.5 files AND the Py2.6 files, because there are significant differences (for me) between the two versions of Python, but many distros still include 2.5 by default. I may simply go for the option of 'Freezing' one of the 'forks' into a simple Linux and Mac binary. Oh, I might get round to reading up on how to include an icon, too. If anyone wants to suggest a design, shoot.

Other than that, things seem ok. I haven't seen any other bugs, but remember, I provide an email for feedback with good reason.
« Last Edit: 2010-04-08 00:29:22 by Bosola »

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
I will be frank.

I have no idea why the Drain Damage checkbox status is not being 'remembered'. I've been making changes to try and recognize the issue, but none take effect. Unless there's some quirk to the interpreter (reading cached code, rather than what I've written), I have no other ideas left.

The changes to the limit data made when saving DrainDmg status to the buffer should match the changes the 'updater' expects. I haven't misnamed the control anywhere it seems, nor should any setting on the GUI / spacing be causing an issue. Why is that one checkbox not saving data?

If anyone wants to look at the code and suggest anything, I will gladly credit them.
« Last Edit: 2010-04-24 01:09:51 by Bosola »

Colonel Ramsay

  • *
  • Posts: 114
    • View Profile
wow another great editor :)!

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
...And now it's working completely fine. For some reason, forcing it to print data (which I did for debugging purposes) seemed to sort things out. I had it print the data being saved and the data being loaded for the special flags, and found the results consistent with what they should be... and the mistake cured itself.

Could some more experienced programmer tell me what the hell is going on?

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Oh, and another thing. Limits that are stored in the KERNEL.BIN probably trump Limit Break attacks in the LIMITMENU.MNU, so you will likely need Wallmarket to edit them all. I need to confirm this.

I can mostly confirm that this is true. Data for Vincent's, Tifa's, and Cait Sith's limit attacks including Blade Beam's shockwave (the attack indexes that are less than 128) are retrieved from the KERNEL.BIN. That's how this effect was achieved. I just got in a battle with emerald and began that sequence. She can't hit hard enough to kill in one limit chain. I added the "kill regardless of status effect def" to her Final Heaven and that happened.
That's really the only one I tested. I haven't tested Vincent's and Cait Sith's, but I know Tifa's are taken from that.