Author Topic: [PSX/PC] Shop Editor - White Chocobo (v0.7b)  (Read 91182 times)

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
[PSX/PC] Shop Editor - White Chocobo (v0.7b)
« on: 2010-03-05 01:27:20 »
Updated to v0.7b! Alright, LZS decryption is gonna be a tad difficult...

Anyway, this program provides an easy to use GUI for modifying shop data and item prices in ff7! You can add, change or remove items, armor, weapons, or materia to or from any shop in the game, and specify the sale price. There's even a feature to change the Master Materia Price Multiplier. Here's a screenshot:



It's not exactly on par with NFITC1's work, but for my first time dealing with the win32 api, I'm proud of it. I plan on releasing new versions on a fairly regular basis and adding functionality whenever I have the time.

You can download the latest version of the program in .zip format here
[FileFront mirror]

Options:
  • Load FF7.exe - load a copy of ff7.exe, to be modified
  • Load SHOPMENU.MNU - load a copy of SHOPMENU.MNU, to be modified
  • Apply Changes - save changes to SHOPMENU.MNU, or ff7.exe (and create a backup)
  • Save Names - save changes to shop and item names (shop and item names are stored in whitechoco.cfg)
  • Restore Backup - Restore backup ff7.exe made by previous save
  • Shops Tab - Edit shop data
  • Prices Tab - Edit prices of items and materia

Functions:
  • Modify items sold in shops
  • Modify number of items sold in shops
  • Modify shop type (title displayed in shop window)
  • Modify item/materia prices
  • Modify master materia price multiplier

Changelog
v0.7b
  • Added Compatibility for modded/unpatched/international versions of FF7.exe
v0.6.1b
  • Fixed bug with Master Materia Price Multiplier edit box
v0.6b
  • Added PSX SHOPMENU.MNU support! (WhiteChoco no longer prompts you for ff7.exe at startup)
  • Added feature that checks files for a signature if the filesize doesn't match
  • More GUI optimization
v0.5b
  • Added price editing functionality
  • Added master materia price multiplier editing functionality
  • Optimized code and GUI layout
  • Removed "Read Only" option from file open dialog
v0.4b
  • Altered code so that security permissions do not have to be added to files manually
v0.3b
  • Fixed bug that made the program not store materia properly

Known Issues
  • Program sometimes crashes when File...Load FF7.exe is clicked. I don't know why, but if this is happening to you, just hit alt+L instead

Oh, and if anybody would be so kind as to go through and identify and update all of the shop names, and send me your whitechoco.cfg file, that'd be great. This program is confirmed to work in Wine.
« Last Edit: 2018-04-24 18:11:23 by Covarr »

Immortal Damyn

  • *
  • Posts: 432
  • Lord of the Twilight
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #1 on: 2010-03-05 02:34:02 »
Do you have any idea how much I love you? do you?

Cupcake

  • And then it dawned on me, that Satan is also an old fuck.
  • *
  • Posts: 906
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #2 on: 2010-03-05 02:35:12 »
...Thanks to you, I must now change my pants

Immortal Damyn

  • *
  • Posts: 432
  • Lord of the Twilight
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #3 on: 2010-03-05 02:40:02 »
Ok, I'm getting an error when I try to run it telling me it can't find cygwin1.dll

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #4 on: 2010-03-05 02:47:23 »
Okay, try downloading it again. I included cygwin1.dll in the archive.

Immortal Damyn

  • *
  • Posts: 432
  • Lord of the Twilight
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #5 on: 2010-03-05 03:09:28 »
Thank ya kindly

nfitc1

  • *
  • Posts: 3010
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #6 on: 2010-03-05 03:09:39 »
Awesomely awesome! I would have done this but I don't like editing the executable directly myself. Too many things can go wrong.

I'll check it out later, but I have two questions:

1. You're obviously not getting the names of the shops from the executable. That's the easiest way to get them all correct. Do you know where the names are? I found them once and I could probably help you find them too. That even contains things like responses like "You have too many" or "not enough gil" and the like. It'd round-off this nicely if you could do that.

2. Are you pulling the item names from a list in the KERNEL.BIN/kernel2.bin or just an internal list to whitechoco.cfg? I can help you with that too if you'd like.

You beat me to the punch on this one, but I'm glad it exists now. Way to go!! :D

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #7 on: 2010-03-05 03:27:00 »
Awesomely awesome! I would have done this but I don't like editing the executable directly myself. Too many things can go wrong.

I'll check it out later, but I have two questions:

1. You're obviously not getting the names of the shops from the executable. That's the easiest way to get them all correct. Do you know where the names are? I found them once and I could probably help you find them too. That even contains things like responses like "You have too many" or "not enough gil" and the like. It'd round-off this nicely if you could do that.

2. Are you pulling the item names from a list in the KERNEL.BIN/kernel2.bin or just an internal list to whitechoco.cfg? I can help you with that too if you'd like.

You beat me to the punch on this one, but I'm glad it exists now. Way to go!! :D
1. I don't think the shops have [unique] names at all..past "Item Shop" or "Materia Shop"--the text that appears in the caption when the store is open. I could be wrong, though...I've yet to explore ff7.exe fully. The names are typed into WhiteChoco and saved into whitechoco.cfg.

2. I looked into pulling the names of items from kernel2.bin, but I decided that decrypting kernel2.bin was more than I wanted to have on my plate for the first release. I just compiled a list of all the default names and stuck them in whitechoco.cfg. I tried experimenting with passing it through ficedula's fftext program to save me some trouble, but that doesn't take file compression into account. This is definitely one of my top priorities for future releases, though

Haha thanks! To be honest, for the entirety of the time that I was programming this, I had a fear in the back of my head that you'd release something that did the exact same thing and then some before I could.

vareal

  • *
  • Posts: 24
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #8 on: 2010-03-05 03:38:20 »
I get an error that says: Invalid filesize.

Does this not work with a game that's already modded?

**EDIT**
Nvm, I fixed it. The exe was damaged from when i was trying to apply the 9,999 limit break patch thingy, replaced it and it worked.
« Last Edit: 2010-03-05 03:40:55 by vareal »

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #9 on: 2010-03-05 03:40:21 »
EDIT: okay. *phew*
« Last Edit: 2010-03-05 03:42:22 by titeguy3 »

vareal

  • *
  • Posts: 24
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #10 on: 2010-03-05 03:52:44 »
Hmm, the game won't run after I modify the shops contents. I'm in Wallmarket at the moment. It might be because of the mod, so I'm going to install an un-modded copy onto my laptop and see what happens.

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #11 on: 2010-03-05 04:00:54 »
Hmm, the game won't run after I modify the shops contents. I'm in Wallmarket at the moment. It might be because of the mod, so I'm going to install an un-modded copy onto my laptop and see what happens.

Did you give ff7.exe execution privileges as shown in the first post? Otherwise windows won't let you run it.

vareal

  • *
  • Posts: 24
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #12 on: 2010-03-05 04:05:50 »
I'm running Windows XP Home SP2; the only thing I can change is the compatibility.

nfitc1

  • *
  • Posts: 3010
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #13 on: 2010-03-05 04:18:02 »
1. I don't think the shops have [unique] names at all..past "Item Shop" or "Materia Shop"--the text that appears in the caption when the store is open. I could be wrong, though...I've yet to explore ff7.exe fully. The names are typed into WhiteChoco and saved into whitechoco.cfg.

Some do, some don't. They're indexed. You can go to most materia shops and they'll say "Materia Shop", but some say other things too like "General Store" or "Vegetable Store". There's an indexed list in the executable at....*dig, dig, dig* 0x005219C8 (5380552 if you're using a 0-based decimal array to keep track of these positions). All that text is in the standard FF7 font so it'll have to be deciphered to be displayed then ciphered to be saved at the same spot. Somewhere in the data at the beginning of each shop is a pointer to the name of the shop. Each name is 20 bytes long. Then the names are followed by responses like "Welcome", "What would you like to buy?" etc.

2. I looked into pulling the names of items from kernel2.bin, but I decided that decrypting kernel2.bin was more than I wanted to have on my plate for the first release. I just compiled a list of all the default names and stuck them in whitechoco.cfg. I tried experimenting with passing it through ficedula's fftext program to save me some trouble, but that doesn't take file compression into account. This is definitely one of my top priorities for future releases, though

This is something WM already does and can be easily converted into something your project uses. I assume you've written it in some form of Visual C++ since it requires cygwin1.dll. I might be wrong, but the code I'm using is still simple.

Haha thanks! To be honest, for the entirety of the time that I was programming this, I had a fear in the back of my head that you'd release something that did the exact same thing and then some before I could.

NP. I've been too busy with real life stuff and attempting to figure out how to get Tiny Bronco up and running. This actually takes a load off my shoulders because I know several people expected me to do this. :D

I did check out your program and I do have commits about it.

#1. I see now why you are giving shops the names you're giving them, but remember that some shops' inventories change after certain Disc changes. The names need to reflect that. Like "XXX Shop (Disc 1)". No, not an adult shop you perverts. :P

#2. Sometimes when I'm trying to load certain shops it'll always give me bad index values. This happens on arbitrary shops at different times. I'll go to a shop and it'll be fine, but when I leave and come back to it it sometimes does that.

Immortal Damyn

  • *
  • Posts: 432
  • Lord of the Twilight
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #14 on: 2010-03-05 04:20:00 »
Strange... I can't seem to get to the security tab on my ff7.exe properties... So I'm guessin' that would be why I cant open the new exe after I use WhtChoco...

Edit: Ok I've found a way for XP users to get the security tab on the FF7.exe. Stolen from another random forum on google.

Open an Explorer window. Click >Tools >Folder Options >Click the View TAB, and scroll to the bottom of the Advanced settings window, UNCHECK the box for Use simple file sharing [Recommended], click Apply, and you're golden.

However, I've run into a strange snag. I think it may be what NFITC1  was talking about. I'll post a pic to show soon... it had a rather funny description in one of the materia.... xD


Here's the image of what my shop now looks like after trying to edit Full-Cure (which isn't really Full Cure, its now a custom materia) into the shop at costa del sol. Currently I haven't checked any other shops yet, but I'll get to that if needed.



Maybe something else to note: When i opened the edited ff7 executable with WhtChoco, I tried to edit the shop i had already edited. and it said "invalid item in slot #, defaulting 0." for every slot, so i redid everything. Now it seems that it will not let me add materia, and if it does, it doesn't do it right. I set it up to add W-item, W-summon, W-magic, and some items like Megalixir, and random consumables. The only things that worked right are the normal items. The materia ended up being Pheonix, Neo Bahamut, and Alexander in game. And then I went to edit the file and got the same message of invalid items in the slots the materia were in... So I'm thinking maybe materia shop editing might have some problems for a bit.
« Last Edit: 2010-03-05 04:40:58 by Immortal Damyn »

vareal

  • *
  • Posts: 24
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #15 on: 2010-03-05 04:58:38 »
Strange... I can't seem to get to the security tab on my ff7.exe properties... So I'm guessin' that would be why I cant open the new exe after I use WhtChoco...

Edit: Ok I've found a way for XP users to get the security tab on the FF7.exe. Stolen from another random forum on google.

Open an Explorer window. Click >Tools >Folder Options >Click the View TAB, and scroll to the bottom of the Advanced settings window, UNCHECK the box for Use simple file sharing [Recommended], click Apply, and you're golden.

So I did this, but when I open the folder options and go to the view tab, I don't have the 'User Simple File Sharing [Recommended]' option. Is that an XP Pro option? Because I'm on Home.

Immortal Damyn

  • *
  • Posts: 432
  • Lord of the Twilight
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #16 on: 2010-03-05 05:02:40 »
So I did this, but when I open the folder options and go to the view tab, I don't have the 'User Simple File Sharing [Recommended]' option. Is that an XP Pro option? Because I'm on Home.
Only suggestion I can give is go download SP3. It is free from microsoft's site, and I think its part of auto-updates...

Else try this:?

First, your hard drive must be formatted NTFS for this tab to show up.

Second, if you're running XP Pro, you must open Windows Explorer, go to Tools, Folder Options, View and uncheck Use Simple File Sharing.

Third, if you're running XP Home, Simple File Sharing is enforced by default and cannot be disabled.  You must boot the computer into Safe Mode and log in with the Administrator account, in order to see the Security tab.  A work around for XP Home, so that you don't have to enter Safe Mode, can be found here.

WARNING:  Adjusting the permissions on a drive, file or folder can lock even the Administrator account out of that drive/file/folder.  Deny Permissions take precedence over Allow Permissions, regardless of your group membership.  Administrators are members of the User's group, by default.  Uncheck Allow, rather than using Deny.

The work around is actually here, not there
« Last Edit: 2010-03-05 05:06:24 by Immortal Damyn »

vareal

  • *
  • Posts: 24
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #17 on: 2010-03-05 05:15:19 »
I'm in safe mode under the administrator account, where is the security tab in question?

*edit*

wait a tic, perhaps I should check the here, and not there, lol...

**EDIT**
*sigh* I hate XP home sometimes... That and the links in that site you posted are broken, and I can't seem to find the download, but I'm still searching.
« Last Edit: 2010-03-05 05:23:13 by vareal »

Immortal Damyn

  • *
  • Posts: 432
  • Lord of the Twilight
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #18 on: 2010-03-05 05:27:37 »
Sorry, didn't check the DL links. Anyway, the security tab should be at the top of the properties window when you right-click>properties.

vareal

  • *
  • Posts: 24
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #19 on: 2010-03-05 05:32:38 »
yeah, just found and installed the download... now to check to see if I get the tab........... Got it! Now, this is different from the Vista or Win7, what do i change?

**EDIT**
oh wait, goddamnit... sorry I'm very tired at the moment. lol. I got it. I was thinking of the 'run as administrator' option in vista/win7.
« Last Edit: 2010-03-05 05:34:48 by vareal »

Immortal Damyn

  • *
  • Posts: 432
  • Lord of the Twilight
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #20 on: 2010-03-05 05:34:49 »
Just make it so you have full control over the .exe from whatever account you're using to play ff7.

how different? screen cap?

vareal

  • *
  • Posts: 24
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #21 on: 2010-03-05 05:39:52 »
Just make it so you have full control over the .exe from whatever account you're using to play ff7.

how different? screen cap?

It's not different, I was thinking of something else. Ok, so now I've done all this, and I've tried the program again and FF7 still won't start up after I modified it. I selected the weapon shop in Wallmarket, and selected a random weapon, which happened to be Ragnarok, selected 'Apply Changes' and tried to start it. No go. I'm at a loss here; I've got the Remix patch thing on it, does the program not work with a mod?

Immortal Damyn

  • *
  • Posts: 432
  • Lord of the Twilight
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #22 on: 2010-03-05 05:42:25 »
Hmm.. does it give you an error, or just refuse to load? Also, are you running it directly from the exe? or something like FF7Music? Also also, make sure it save the changes you made when you said to allow, and make sure it was the right account you told it to allow.

vareal

  • *
  • Posts: 24
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #23 on: 2010-03-05 05:43:22 »
WAIT!!!! I got it! After I modified the ff7.exe with the white choco shotp editor, I THEN applied the security changes to the .exe and ff7 booted up. Lets see if I can buy the sword now.

**EDIT**

Boom, it worked! Man, that was an ordeal! Thanks for your help and patients Damyn.

NOTE: You have to set the permissions EVERY TIME after you use the Choco Shop Editor and modify the ff7.exe.
« Last Edit: 2010-03-05 05:55:37 by vareal »

Immortal Damyn

  • *
  • Posts: 432
  • Lord of the Twilight
    • View Profile
[v0.2b] White Choco Shop Editor by titeguy3
« Reply #24 on: 2010-03-05 05:49:26 »
Not a problem at all. Just remember what I have taught you here, and you should be ok from now on. At least with this app. Also, keep in mind there seems to be some issues with materia shop editing. So idk if it was just bad luck on my part, or if its an app bug, but if materia doesn't work for you, that might be why.