Users browsing this thread: 1 Guest(s)
Event editing in Zone Doctor(WIP)

#1
Posts: 32
Threads: 5
Thanks Received: 4
Thanks Given: 1
Joined: Feb 2012
Reputation: 4
Status
Sleep
I have been working with the program a lot and thus I wanted to give some insights that I have recently discovered with the program. I will break down here what I know about how editor reads and moves the event data and also provide some tips and tricks that I have used to get the most out of the program.
I am going to assume you have some knowledge of event editing and have at least read the intro to event editing thread because some limited knowledge is key to having success in whatever way you edit events.


Part 1: Understanding how the event editor works

First of you have to understand that if you are looking to do some extensive editing I would not just go in there and start editing away, deleting events you don't want, etc. because that can mess things up pretty easily.

The way that the editor works is that if you add data or delete data it will actually shift all of the data and then change the needed branch and subroutine addresses accordingly. If you delve into the hex editor in the program you will see that at the end of the event data there are several FF commands which signify the free space that you see at the bottom of the editor while it is open.

If you were to try to free up space and delete an event(lets use for example one of the Narshe security system events 2D9C4(CCD9C4)or event number 3491 on the list, you would see you get some decent free space available. You could then just add in what you wanted and then save and quit right? Well not exactly...you would have to add exactly the amount of data removed to not expect some type of error(and even then I cannot promise that you would not get an error) upon saving and reloading the ROM in the event editor. This is because when the editor shifts the data back it still leaves the old event data behind which is useless to you and also can cause errors because the only way the editor reads data as being free is if it is an FF in the code. Since there is basically garbage event data present at the end this will cause an error that can make alot of your event data uneditable. This is why that some who already have established events may be having trouble using the editor on their ROM...the editor has to see the data a certain way(I.E. all intact until the end with no half written events, and then with only FF commands until the end of the event data allocation.


Part 2: Making the most of the editor to write your events

With all that being said, it using the editor even feasible? I say YES, with a little bit of prework on your part. Now I know the previous way that we did event editing was to just branch to items further down on the ROM to have "free space" which is a nice way to do it however the editor cannot read that data, so you would still have to rely on hex. You could in essence still branch to the address way down there in the editor and then hex edit, but to be honest if you were to do that you might as well just hex edit everything.

To effectively use this editor as a dedicated way to change alot of things in your hack you have to build around the editor. First you need to establish what kind of free space you want. You can always reestablish it but at least for me I want to think about what kind of events I want to build before I start to do the majority of my editing. If you need alot of space the best way to do it with this editor is to eliminate events that will not impact the game if gone. The best case is in the previously mentioned section in Narshe but there are alot of areas and it all depends on what you are trying to do with your hack. There are hundreds, possibly thousands of free bytes of space for events by eliminating events in this section of the game and it will not really effect the actual game experience at all(Unless you consider the security light essential to your experience).

After going into the editor and deleting everything out of the desired events(besides the FE command which you want to keep), you then have to save your data. While still in the editor go to the last numered event (3517) and then open up your hex editor. Wherever that event ends, you want to highlight everything all the way down to where the FF commands start at the end of the event allocation(the address for that is CCE5EF or 2E5EF). Using the highlight feature in the top right corner of the hex editor, type FF and then hit enter while in the box and then it will fill everything with FF commands. Keep in mind with a lot of data you might have to do this in sections. NOW you have freed up event data AND kept all of the previous events intact! You can now freely edit and add events within your free space HOWEVER keep in mind if you subtract and save with less than you started with you run the risk of errors as previously mentioned. The good thing is with some hex editing you should be able to fix most little things.


Part 3: What if I want more events than what are listed?

The good thing about the editor is although your addresses will change while allocating data, the actual event number in the editor will not, so that is a great reference point to go by when wanting to find your free events. If you want to add additional events, you want to go back the end of the last event. After the FE command of that event(where your line of FF commands start), just add in another FE. You can add as many as you want. The editor will see the FE as another blank event, so when you save, close, and reopen you will be able to go to 3518 and beyond to make new events within your allowed space.


Part 4: Closing

This is a work in progress as I get input and work more with the event editor. I gladly welcome any comments or thoughts about what information I have uncovered and written so far. Thanks for reading!
Quote  
[-] The following 2 users say Thank You to Xontract for this post:
  • GrayShadows (08-31-2013), SSJ Rick (08-30-2013)



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite