Users browsing this thread: 1 Guest(s)
Event Hacking - What am I doing wrong?

#1
Posts: 614
Threads: 49
Thanks Received: 0
Thanks Given: 4
Joined: Feb 2017
Reputation: 25
Status
None
Program: Zone Doctor CE 2.2
Rom: Final Fantasy 3 US 1.0 Headered
Checksum: 0x81E7 (Fail)
Gamecode: F6


I've started into event editing for my hack using Zone Doctor CE. Most of the events that are edited are very simple; I just need to point the lines and actions of one actor to a different actor. No additional bytes; good to go.

The problem comes when I try to edit scenes where I have add or take away characters or actions. For example, in the banquet with Gesthal, I have Banon replace the generic soldier that seats you, then take the middle seat at the table, with the party characters sitting on either side of him. On the other side of the table are Gestahl, Cid, Celes, and 2 elite guards. Just by changing where Cid sits, I was able to remove exactly 32 bytes of "turn left, now turn right" character actions. The event plays out exactly how I want it to without error. The problem comes when I need to load the next event (make a toast). Even though I re-pointed those specific code branches, and Zone Doctor CE repointed all of the branches from those events, each of the 3 options crashes the game in a different way. Locke (party character 2) goes into spasms, and then the game crashes.

I've tried this for a few other scenes too (naming Leo as character $0D in the Military Base Camp, adding Banon to your party after the Banquet), and it almost always has the same effect. Zone Doctor CE seems to be auto-adjusting all pointers, but the rest of the game gets thrown off. NPCs don't say their correct lines, and the wrong events get triggered, and exits do not load new maps, often leading to the game locking.

I will be the first to admit I'm new to this, so what am I doing wrong? Do I need to edit these scenes so that I have the exact number of bytes as I started with in each one? In all, I will need to re-do around 15 events spread out over the entire game. If I have to manually re-point every NPC and exit tile in the entire game, I'm going to lose my bloody mind.
  Find
Quote  

#2
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
(05-02-2017, 11:10 PM)PowerPanda Wrote: using Zone Doctor CE. 
That. (unless Madsiur version fixed event issue somehow)


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  

#3
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
Using zone doctor for event edits is not recommended. The original version event editor was buggy and I did not fixed it in the CE version. I would use zone doctor for maps edits only and at that point you're better with FF6LE and use a hex editor for your event stuff.
  Find
Quote  

#4
Posts: 614
Threads: 49
Thanks Received: 0
Thanks Given: 4
Joined: Feb 2017
Reputation: 25
Status
None
So there is no event editor except for straight hex editing? How do you account for the different size of events? One of my events is expanded by about 45 bytes. Another is shrunk by about 8.
  Find
Quote  

#5
Posts: 2,548
Threads: 98
Thanks Received: 147
Thanks Given: 156
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
Yeah manually with a hex editor is still the way to go due to zone doctors event editing issues. There is this one made by Everything that seemingly has an event editor included, but nobody can use it because it's made for Mac users only ;( http://www.romhacking.net/utilities/1267/

To account for larger events you'll need to utilize and master the B2 jump to/call sub-routine command, to jump to free space such as the expanded F banks, then you can either end the event there or jump back (or simply return with FE) to the original event code, whatever the situation calls for. Smaller events wouldn't matter, just end it and have the extra bytes left over become free space then. There's no pointers or anything for event code that need updating, so no worries there.


We are born, live, die and then do the same thing over again.
Quote  

#6
Posts: 614
Threads: 49
Thanks Received: 0
Thanks Given: 4
Joined: Feb 2017
Reputation: 25
Status
None
Phew. Looks like I've got my work cut out for me then. I'll probably block the scenes in Zone Doctor, one rom per scene so I'll always know where the code begins, then use hex editor to copy/paste.
  Find
Quote  

#7
Posts: 32
Threads: 5
Thanks Received: 4
Thanks Given: 1
Joined: Feb 2012
Reputation: 4
Status
Sleep
I have used ZD alot so I'm more than happy to help you but I also agree that the hex approach is the safest way.

My personal approach is to use both, which is basically required if you want to try to use ZD effectively.  Any event data you delete has to be replaced with an equal amount of data or you will eventually(if not immediately) have issues.  The editor poorly deals with moving the data so you will end up having data that the editor won't be able to read anymore otherwise.

But what if you want to delete an unused event and replace it with one half the size?  One option is to just throw in pauses(you can throw in a 0 unit pause that takes up 2 bytes of data). You can also do some fancy hex data rearranging, but that is a bit more time consuming.

I haven't even mentioned a big bug where if you edit something inside an existing event string, it can change existing event branches within that event, usually changing your CC or CB to a CA. This is the main cause of a large amount of crashes in my experience. The only way to work around this is to manually change the branches back afterwards through hex.

However...the in-program hex editor is kind of hit or miss and so I suggest using HxD or whatever you use to manually go in afterwards. Of course that begs the question, why even use ZD in the first place?  Well for me, it is just alot easier to get a clear picture of what the event is going to do because it is all translated for me right there.  If you become fluent in the event code I guess you wouldn't need that but for me it's helpful.  

I hope this helped, let me know if you have any other questions.
Quote  
[-] The following 3 users say Thank You to Xontract for this post:
  • Gi Nattak (05-04-2017), madsiur (05-04-2017), PowerPanda (05-04-2017)

#8
Posts: 614
Threads: 49
Thanks Received: 0
Thanks Given: 4
Joined: Feb 2017
Reputation: 25
Status
None
(05-04-2017, 03:20 PM)auraplatonic Wrote: Of course that begs the question, why even use ZD in the first place?  Well for me, it is just alot easier to get a clear picture of what the event is going to do because it is all translated for me right there.  If you become fluent in the event code I guess you wouldn't need that but for me it's helpful.  

Thanks for the offers of help. I totally agree that it's just easier to see it in ZD. I'm going to stick with my current plan of editing a single event in the rom using ZD. Then I'll play through the game, using save states to switch to a different rom just before the event triggers. That will be the most dynamic way to make edits and get a feel for the overall flow of the hack. Then, when I've done my playtesting run, I'll take the data from the dozen or so rom files I have and start porting them over, event by event. I'm keeping very close track of how much space my changes take, so I'll have a good idea of where to Frankenstein things together from.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite