Author Topic: [PSX] Dialogue/Events editor - Hack7 (v3 BETA 3)  (Read 70145 times)

lasyan3

  • *
  • Posts: 76
    • View Profile
Re: Hack7 - yet another FF7 dialog editor [v2.1.2]
« Reply #25 on: 2011-04-28 06:23:10 »
Hi,

First question, do you try to open the Field folder from the iso, or do you first make a copy of it on your hard disk drive ?

lasyan3

  • *
  • Posts: 76
    • View Profile
Re: Hack7 - yet another FF7 dialog editor [v3 BETA]
« Reply #26 on: 2011-06-07 21:35:38 »
Time for an upate, finally I release a new version of Hack7 with the event interpreter back !

hotdog963al

  • *
  • Posts: 236
  • Horse
    • View Profile
    • Horse HQ
Re: Hack7 - yet another FF7 dialog editor [v3 BETA]
« Reply #27 on: 2011-06-11 10:33:57 »
Time for an upate, finally I release a new version of Hack7 with the event interpreter back !
Wha-hey, don't need to keep the old version now. :D
You are a hero!

Armorvil

  • *
  • Posts: 621
  • Working on : FFVII Total Grudge
    • View Profile
Amazing, I've been eagerly waiting for this :D

I tried it for a bit, and I have a couple questions. I'm interested in triggering new battles, and making some random NPCs give gil, items and materia to the party. So I've been looking at how those things are handled inside of Hack7. I found these :

- To initiate a battle :

Code: [Select]
BattleStart( XXX );
*XXX is the Formation ID in decimals. With Proud Clod, it's easy to trigger any battle you like, since you can easily convert the right Formation ID in decimals, and add this line.

First question :
Code: [Select]
/*AKAO [0xF2]( 0x00, 0x00, 0x00, 0x29, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 )*/;What are these lines of code for ? Are they important to add, when initiating a battle ?

- To add materia to the inventory :

Code: [Select]
MateriaAdd( Materia.Restore, 0, 0, 0 );
The three 0s are for the materia's amount of AP.
Here is my second question : is Hack7 clever enough to add a Bahamut materia to the inventory, if I type "MateriaAdd( Materia.Bahamut, 0, 0, 0 );" instead ? If yes, I don't know how you managed to make your program turn real words into bytes, but you rock.

- To add gil to the inventory :

Code: [Select]
AddGils( XXX );
This one is easy enough. One only has to type the amount of gil instead of my XXX.

- To add an item to the inventory :

Code: [Select]
ItemAdd( Item.ItemPotion, X );
X being the amount of items.
This one is confusing. Do one always has to attach "Item" to the item name ? Like :

ItemAdd( Item.ItemTurbo Ether, 1 ); ?

Also, since spaces seem to be important, with names that have a space like Turbo Ether, won't there be any problem ?

Final question, regarding the sounds played. In Hack7, whether you hear the materia or the item sound, the code line is always the same :

Code: [Select]
PlaySound( 360, 64 );
But we know that when you obtain a materia, the sound you hear is different from the one that plays when you obtain an item. In Meteor or Makou Reactor (Field editors for the PC version), the play sound calls a different byte to reflect this. So, what gives ?

...I'll eventually answer my own questions through testing if you don't have time to reply, though. But needless to say, it would save your compatriot a lot of time ^^

EDIT:

Just answered one of my questions : there are no spaces inside item names. For example, when you dig the Bahamut ZERO materia in Bone village, the code is :

Code: [Select]
MateriaAdd( Materia.BahamutZERO, 0, 0, 0 );
I also checked the sleeping man's code, and I understand the need to add the "item" particle in front of the names, now. When he hands you the Bolt Ring, the script is :

Code: [Select]
ItemAdd( Item.AccessorieBoltRing, 1 );
So, I guess that Item.AccessoryBoltRing wouldn't work - I bet one would have to add the typo for the line of code to work :P
For armors and weapons, is it Item.ArmorMystile and Item.WeaponWizerStaff ?
« Last Edit: 2011-06-11 23:20:07 by Armorvil »

lasyan3

  • *
  • Posts: 76
    • View Profile
First question :
Code: [Select]
/*AKAO [0xF2]( 0x00, 0x00, 0x00, 0x29, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 )*/;What are these lines of code for ? Are they important to add, when initiating a battle ?

When you find a line of the form /*NAME [HEX_VALUE] (HEX_VALUE, HEX_VALUE, ...)*/;, it means that the command is not yet fully decrypted (either in the qhimm wiki, either I didn't understand it :-[). But one can still change the HEX_VALUE to make some test, it will be saved.
So I can't tell you if there is some connection between this command "AKAO" and the battles... I think AKAO is linked with sounds, but I'm not sure of anything...

Here is my second question : is Hack7 clever enough to add a Bahamut materia to the inventory, if I type "MateriaAdd( Materia.Bahamut, 0, 0, 0 );" instead ? If yes, I don't know how you managed to make your program turn real words into bytes, but you rock.
I think you probably noticed that when you write "Materia" followed by the dot, a kind of autolist will popup, letting you choose the materia you want.
To fully understand how it works, you should read this short article about C# enums. One of my main goal when working on the new field events interpreter, was to make editing as simple as possible, which means to avoid byte values when possible. So I used this "enums technique" which make the selection of items, materias, field maps and so on much easier. Glad that you like it :D.

Code: [Select]
ItemAdd( Item.ItemPotion, X );This one is confusing. Do one always has to attach "Item" to the item name ? Like :
ItemAdd( Item.ItemTurbo Ether, 1 ); ?
So, I guess that Item.AccessoryBoltRing wouldn't work - I bet one would have to add the typo for the line of code to work :P
For armors and weapons, is it Item.ArmorMystile and Item.WeaponWizerStaff ?
Yes, it's because "Item." is the type of the parameter of the command "ItemAdd", and ItemTurboEther is the value selected for this parameter.
The case of items is special, because there are many many items : basic items (potions, ethers...), armors, accessories and weapons for cloud, aerith, etc. So I added equivalent "subtype" names to clearly separate all kind of items. But you don't need to "guess" the name of the item/materia/etc. you want to add. Just write the type ("Materia", "Item", etc.) followed by the dot, and the autolist will show you all the possible values you can use.
Note: in the current version, the autolist doesn't filter the values with what you write, it only select the value based on the first caracters you write. So if you write for example "Materia.Baha", it will positions itself on the "Bahamut" value. The next version of Hack7 will introduce a better mechanism : when you will write "Materia.Baha", it will show you the 3 materias (bahamut, neobahamut and zero). It will also be case insensitive.

But we know that when you obtain a materia, the sound you hear is different from the one that plays when you obtain an item. In Meteor or Makou Reactor (Field editors for the PC version), the play sound calls a different byte to reflect this. So, what gives ?
This is strange, because in the PSX version the parameters of the sound command for the potions in the first screen of the game, and the materia restore in the reactor, are the same. Maybe the sounds are stored in the field files in the PSX version, while they are in a common place for the PC version...

Armorvil

  • *
  • Posts: 621
  • Working on : FFVII Total Grudge
    • View Profile
When you find a line of the form /*NAME [HEX_VALUE] (HEX_VALUE, HEX_VALUE, ...)*/;, it means that the command is not yet fully decrypted (either in the qhimm wiki, either I didn't understand it :-[). But one can still change the HEX_VALUE to make some test, it will be saved.
So I can't tell you if there is some connection between this command "AKAO" and the battles... I think AKAO is linked with sounds, but I'm not sure of anything...

I see, thanks. Yeah, Akao was the sound programmer IIRC.

Quote
I think you probably noticed that when you write "Materia" followed by the dot, a kind of autolist will popup, letting you choose the materia you want.
To fully understand how it works, you should read this short article about C# enums. One of my main goal when working on the new field events interpreter, was to make editing as simple as possible, which means to avoid byte values when possible. So I used this "enums technique" which make the selection of items, materias, field maps and so on much easier. Glad that you like it .

This is awesome. I just tried it, and yes, the list of items/materias display :) I'd just have a small request though : would it be possible to add the blank spots following the Guide Book in the item list, and the various blank spots in the materia list ? Since one can use WallMarket to create new materias/items, it would allow the modder to insert these in the field script.

Since you organised the materias alphabetically, I could see Materia#22, #38, #45, #46, #47, #63, #66, #67, #91, #92, #93, #94, and #95 being all either at the top of the list, or at the bottom.

Quote
This is strange, because in the PSX version the parameters of the sound command for the potions in the first screen of the game, and the materia restore in the reactor, are the same. Maybe the sounds are stored in the field files in the PSX version, while they are in a common place for the PC version...

Ah yes, that would explain it. Thanks for the reply :D

EDIT:

For those who would want NPCs to hand items/gils/initiate a battle/trigger a shop/trigger a save screen/whatever : instead of taking the risk to use variables that might be used for something else, there is this code :

Code: [Select]
TalkSet( false );
Inserting it after the message / ItemAdd code will ensure that you won't be able to talk to the NPC again and thus, get the item again :)

And to trigger a shop/the PHS/the save screen, the code is :

Code: [Select]
ShowMenu( MenuType.Shop, X );
X being the shop ID in decimals. You can use Titeguy3's WhiteChoco and count the shops to get the right ID (first one is 0). After typing the dot, a list will come up allowing you to choose what kind of menu will pop up.

Really brilliant. Lasyan3, do you have plans to make Hack7 compatible with FFVII PC ?... ...Also, it would be great if clicking on the message ID (in the message tab) would instantly point you to the Event script that calls said message. For example, if you wanted to edit the event regarding the bald guy in Sector7 who whines that Johnny's gone, you could click on its message (or its ID, which is 073), and the program would directly lead you to E28: oyaji1 S1 "OnTalk" in the Events tab. Right now, it's sometimes a pain to find the event you're looking for.
« Last Edit: 2011-06-12 13:21:18 by Armorvil »

lasyan3

  • *
  • Posts: 76
    • View Profile
Also, it would be great if clicking on the message ID (in the message tab) would instantly point you to the Event script that calls said message. For example, if you wanted to edit the event regarding the bald guy in Sector7 who whines that Johnny's gone, you could click on its message (or its ID, which is 073), and the program would directly lead you to E28: oyaji1 S1 "OnTalk" in the Events tab. Right now, it's sometimes a pain to find the event you're looking for.
I will see what I can do ;). You're right, the tool is missing a search feature.

Armorvil

  • *
  • Posts: 621
  • Working on : FFVII Total Grudge
    • View Profile
I have a problem, but it looks like it's not related to Hack7, as I have the same problem with Makou Reactor. I made a few changes, and decided to make the save screen appear in the GI cave, just after Bugen says "We're almost there". Problem is, Hack7 won't let me save. It displays this error message :

http://imageshack.us/f/845/image2zl.jpg/

As for Makou Reactor, it just crashes. The thing is, I could save this same change in the PC version without any problem. Is it because it calculated that the Field folder grew in size and wouldn't fit into the ISO anymore ? I'm also aware that my code might be faulty inside Hack7 (I'm not sure about the "1" as a value after MenuType.SaveScreen), but it also crashes when I write it some other way.

EDIT:

Never mind, it saves now. Apparently, the correct line was :
Code: [Select]
ShowMenu( MenuType.SaveScreen, 0 );
« Last Edit: 2011-06-12 18:38:04 by Armorvil »

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
lasyan
If you are change the commands names from the wiki to something else, it would be cool to make a table or something so we can convert from one command to another (Or, update the wiki)

lasyan3

  • *
  • Posts: 76
    • View Profile
Halkun,

Do you mean something like this :
Code: [Select]
02 - REQSW - CallEntityStartWait
49 - MENU - ShowMenu
?

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
That will work

Armorvil

  • *
  • Posts: 621
  • Working on : FFVII Total Grudge
    • View Profile
Code: [Select]
TalkSet( false );
Inserting it after the message / ItemAdd code will ensure that you won't be able to talk to the NPC again and thus, get the item again :)

Just as a heads-up, this doesn't work :( Or rather, it works, but if you leave the area and come back, you'll be able to talk to the guy again and get the item again >_<
Any idea how to make NPC's prizes one time only ?

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Save in a progress variable and the check on entry to the field.

crushilista

  • *
  • Posts: 25
    • View Profile
Running in administrator mode, yet I still get Access to the path 'd:\dat_ini.dec' is denied.

lasyan3

  • *
  • Posts: 76
    • View Profile
Running in administrator mode, yet I still get Access to the path 'd:\dat_ini.dec' is denied.

OOps, I did it again (dat_ini.dec is a file generated for my tests, I forgot to disable it :-[). Should be ok now.

demeterf

  • *
  • Posts: 18
    • View Profile
Sorry my english:-) 1000Thanks. I can the Hungary pc dialogo copy to the psx:-) This program not support the full Hungary character.: Ő,ő, Ű,ű, Í,. And the TAB key. Can you make when, this character support in this program?

Gemini

  • *
  • Posts: 260
  • Not learner's Guru
    • View Profile
    • Devil Hackers
Edit TableAscii.xml and include those characters.

lasyan3

  • *
  • Posts: 76
    • View Profile
Yes, and you will also have to edit the graphical font of the game (in window.bin).

demeterf

  • *
  • Posts: 18
    • View Profile
Can you write how can I make this? I do not understand it programming.

Gemini

  • *
  • Posts: 260
  • Not learner's Guru
    • View Profile
    • Devil Hackers
It's just a simple text file... ???

Vgr

  • Global moderator
  • *
  • Posts: 2163
  • If it quacks like a duck, it must be a duck
    • View Profile
I think he meant the window.bin...

demeterf

  • *
  • Posts: 18
    • View Profile
Yes, window.bin

Gemini

  • *
  • Posts: 260
  • Not learner's Guru
    • View Profile
    • Devil Hackers
http://wiki.qhimm.com/FF7/Kernel/Low_level_libraries#BIN-GZIP_Type_Archives
Next time, please use the search bar here or the one in wiki.

No idea how that works in Hack7, but there's an option just for it. I'm guessing it's for de/compressing WINDOW.BIN directly.
« Last Edit: 2011-07-28 23:05:58 by Gemini »

DSieg

  • *
  • Posts: 6
    • View Profile
Hi and thanks for this tool.

I've got a problem, for the PSX version :
-Editing the game is ok, it runs very well on emulator (only to test, I own the CDs).
-When I mount the iso on a virtual disk reader (Alcohol) to extract some files, Windows can't open it ("damaged disk").
I tested with the other tools I use, it comes from Hack7, v2 and v3. Once I save the dialogs in the iso, it isn't possible to open it again (for example, I can't access the FIELD repertory on the disk).

I don't know if it really comes from Hack7, if it's not my CD which is dead, or something else...

Thanks.

lasyan3

  • *
  • Posts: 76
    • View Profile
Hi DSieg,

It's because sectors in the cd have a kind of CRC to check the data inside, and I don't recalculate it :P. So yes, it comes from Hack7.
But you can easily rebuild those sectors and recalculate thoses CRC by using CDMage.
With this tool, you can use the "Scan for corruption" function in the "Action" menu, so it will check your iso and tell you which sectors are incorrect. Then, use the "Rebuild sector fields" from the same menu. Should be ok (it worked for me right now, my iso was indeed damaged).