Z64

Please login or register.

Login with username, password and session length
Advanced search  

News:

Check out and improve the wiki!

Author Topic: ZAO-ADD Automated Actor and Object Adder  (Read 12006 times)

Jason777

  • Wiki Contributor
  • Full Member
  • ***
  • Posts: 116
    • View Profile
ZAO-ADD Automated Actor and Object Adder
« on: February 26, 2013, 03:56:17 AM »

Currently only for OoT Debug ROM
Tested using Nemu64

Okay, I tried to make this tool as noob-friendly as possible! Let me give you a run down of what this program does...

I think it's safe to assume that every has needed to add a few more actors of objects to a map file but just couldn't get the hang of any tutorials. Well, this tool completely obliterates the need to learn those tutorials and even the need to know how to inject the map file into the ROM. Basically, it does everything for you without you even needing to know anything about the format of the map file, how to fix pointers for the actor list, or where free space in the ROM is. Everything is done for you.

List of features:
  • The ability to add actors or objects to a map file
  • The ability to automatically search for free space in the ROM
  • If you don't trust the automated space-finder, you can manually define the injection offset
  • The ability to automatically inject and fix all pointers pertaining to the map file
  • The ability to choose between verbose and non-verbose "modes".
  • Writes important data concerning the modified map file to a DAT document

Possible Bugs:
  • If the map doesn't contain a 0x01 or 0x0B header command I haven't added any code to insert a new command; the program just closes.
  • The automatic free space finder isn't terribly thorough or advanced. It looks for the highest offset found after searching through the scene table, actor table, object table, and general file table; it doesn't try to "squeeze" the map file between other files if there is enough space.
  • Even though the though ROM doesn't need it, it updates the file table with a new pointer to the map file. I can see that this may lead to issues if someone tries to compress the ROM since I seriously doubt that the "virtual offsets" and the "physical offsets" should be the same.
  • I wouldn't recommend choosing the automated injection offset finder if you happen to have ASM hacks laying around in the ROM after 0x35CE040.

NOOBS: If you don't like a bunch of information spewing on your computer screen, I would recommend running the program in non-verbose mode. You would do this by typing 'n' when the program asks you "Do you want program's output to be detailed? (y / n) : ".

I included a verbose mode for people who want to see if the program is grabbing information correctly or to learn just exactly what is going while we modify the map file. It's useful for finding errors/debugging.

Also, the program creates a DAT file after it's done making changes to the ROM to let you know where the map file is in the ROM and what space is now free for general use.

The only thing that the user is required to do besides input in the program is to go fix the CRC of the ROM afterwards if you want to use it in an emulator like PJ64 and to specify the actor number, variable, XYZ position, and XYZ rotation using a program like SayakaGL or Utility of Time.


Video: http://youtube.com/watch?v=WwNztO4i04s

Anyways, here we go! Downloads!
v1.0 EXECUTEABLE: http://www.mediafire.com/?p6f2ei616bz11me
v1.0 C++ SOURCE (Developed with Code::Blocks): http://www.mediafire.com/?ghd5jyrgfmeiffy
ZAO-ADD (v1.1) Download: http://www.mediafire.com/?8c3umdr9ptqbs1y
^^ Use WinRAR or 7-Zip to extract

Possible Future Updates:
  • Add in code to add 0x01 or 0x0B commands if they aren't present in the map file.
  • The ability to navigate into 0x18 alternate headers
  • Automatic CRC recalculation.
  • Possible removal of the file table pointer fixing if it causes people too much trouble.
  • Possibly make this a JAVA GUI program and have detailed data be displayed on a seperate console window.

March 03, 2013 - V1.1 Release
Quote
I believe I've taken out most of the bugs present in the initial release.
  • You're able to specify whether or not you would like to update the file table pointer if possible (since that can lead to bugs).
  • It automatically updates the ROM CRC if you choose to update the file table pointer.
  • You can specify what object values to add.
  • It gives all default added actors the value of "Magenta Flame".

Things that are going to be present in the next release:
  • The ability to navigate and add actors/objects to alternate map headers.
  • Addition of 0x01 or 0x0B commands if they aren't present in the map header.

Once I'm finished implementing everything that I had hoped to have in this program, I'll turn it into a JAVA GUI to make it look cleaner and less intimidating. Oh yeah, I've decided that I won't be releasing the updated source code until the final release.
« Last Edit: March 26, 2013, 03:11:02 AM by Jason777 »
Logged

originaLink

  • Wiki Contributor
  • Full Member
  • ***
  • Posts: 141
    • MSN Messenger - censored@msn.com
    • AOL Instant Messenger - censored
    • Yahoo Instant Messenger - censored
    • View Profile
    • censored
Re: ZAO-ADD Automated Actor and Object Adder
« Reply #1 on: March 22, 2013, 01:06:53 AM »

I've always wanted some type of program that does this. Thank you!
Logged
"This account is active only for nostalgic purposes. I am off to bigger things but i may pop in once in a blue moon. I have no ill feelings but I'm just one individual."

Jason777

  • Wiki Contributor
  • Full Member
  • ***
  • Posts: 116
    • View Profile
Re: ZAO-ADD Automated Actor and Object Adder
« Reply #2 on: March 26, 2013, 02:49:39 AM »

Thanks! I've actually updated the program but I had forgotten to update the post on this site.

http://youtube.com/watch?v=WwNztO4i04s
 
ZAO-ADD (v1.1) Download: http://www.mediafire.com/?8c3umdr9ptqbs1y
^^ Use WinRAR or 7-Zip to extract
 
I believe I've taken out most of the bugs present in the initial release.
  • You're able to specify whether or not you would like to update the file table pointer if possible (since that can lead to bugs).
  • It automatically updates the ROM CRC if you choose to update the file table pointer.
  • You can specify what object values to add.
  • It gives all default added actors the value of "Magenta Flame".

Things that are going to be present in the next release:
  • The ability to navigate and add actors/objects to alternate map headers.
  • Addition of 0x01 or 0x0B commands if they aren't present in the map header.

Once I'm finished implementing everything that I had hoped to have in this program, I'll turn it into a JAVA GUI to make it look cleaner and less intimidating. Oh yeah, I've decided that I won't be releasing the updated source code until the final release.
« Last Edit: March 26, 2013, 02:59:13 AM by Jason777 »
Logged

Jason777

  • Wiki Contributor
  • Full Member
  • ***
  • Posts: 116
    • View Profile
Re: ZAO-ADD Automated Actor and Object Adder
« Reply #3 on: July 20, 2013, 03:31:41 AM »

Alrighty, time for a new release.

July 19, 2013 : Version 1.3 Release

Updates:
  • Added in the ability to add actors and objects to alternate headers
  • Even more space is able to be freed from the ROM. Yay for free space!
  • This is probably the final version of the console application form of this program
  • Source code released
Here are the current command-line arguments:
Code: [Select]
ZAO-ADD.exe [ARGUMENTS]
-r [ROM FILE] : Specify a ROM to modify and doesn't return anything if it is the only argument
-s [SCENE NUMBER] : Specify a scene number and returns the number of maps as an integer
-m [MAP NUMBER] : Specify a map number and returns the number of alternate headers as an integer 
-h [HEADER INDEX] : Specify an alternate header to use and doesn't return anything
-a : Returns the amount of actors in the specified map as an integer
-o : Returns the amount of objects in the specified map as an integer
-A [ACTOR ADD] : Specify the amount of actors to add
-O [OBJECT ADD] : Specify the amount of objects to add
-i [OFFSET] : Manually specify an offset to inject at
-f : Try to fix file table offsets if possible

Future Updates:
  • Java GUI
  • Add code to be able to add 0x01 and 0x0B commands if they don't exist
  • Random bug fixes
  • Random optimzations
And here we are...
ZAO-ADD v1.3 Download: http://www.mediafire.com/download/xew8rgxrcjcdbzp/ZAO-ADD_(v1.3).zip
ZAO-ADD v1.3 Source: http://www.mediafire.com/download/bd43ybd41dnk11d/ZAO-ADD_(v1.3)_Source.zip
Logged

Despair

  • Newbie
  • *
  • Posts: 8
  • Hey it's that guy
    • View Profile
    • Email
Re: ZAO-ADD Automated Actor and Object Adder
« Reply #4 on: July 21, 2013, 06:20:07 PM »

My god.....this is stupendous
Logged

Jason777

  • Wiki Contributor
  • Full Member
  • ***
  • Posts: 116
    • View Profile
Re: ZAO-ADD Automated Actor and Object Adder
« Reply #5 on: July 23, 2013, 03:26:07 PM »

Thanks, I was tired of seeing topics made by people asking how to add actors.
Logged