Author Topic: Drop tables  (Read 4409 times)

IHBP

  • Architect of Kajar
  • Chronopolitan (+300)
  • *
  • Posts: 379
    • View Profile
Drop tables
« on: November 30, 2018, 10:00:38 pm »
Been trying to edit the drop tables, but I only know how to use a hex editor and the damn drop tables are compressed, can anyone help me with editing them?

Grobycftw

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 85
  • Chilling in the Bend of Time
    • View Profile
Re: Drop tables
« Reply #1 on: April 30, 2019, 12:56:51 am »
hi there
using this
https://drive.google.com/open?id=1I_8oyBJSudQtxXZ-o-kPqGPH0bgkj05T
you should be able to easily edit any enemy drop/steal treasure :)

IHBP

  • Architect of Kajar
  • Chronopolitan (+300)
  • *
  • Posts: 379
    • View Profile
Re: Drop tables
« Reply #2 on: April 30, 2019, 07:46:18 am »
Thanks I'll play with this a bit, it doesn't seem to let us edit what's in the drop tables though from what I can see from a quick glance.

Grobycftw

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 85
  • Chilling in the Bend of Time
    • View Profile
Re: Drop tables
« Reply #3 on: April 30, 2019, 02:38:15 pm »
What you are looking for is
byte# 0xA0 Treasure drop ID as defined in file 0008

Each enemy definition is 176 (0xb0) bytes long.

I simply took this page
https://www.chronocompendium.com/Term/Chrono_Cross_Enemy_Stats.html
and added a couple a things on my notes.

*I couldn't find the list of all the item/element value , but if you look in the ccenemyedit , there is one, I'll probably make one anyhow it would be useful
« Last Edit: April 30, 2019, 02:49:18 pm by Grobycftw »

IHBP

  • Architect of Kajar
  • Chronopolitan (+300)
  • *
  • Posts: 379
    • View Profile
Re: Drop tables
« Reply #4 on: April 30, 2019, 02:54:20 pm »
If I'm not mistaken byte 0xA0 determines what treasure table the enemy has so it would allow me to say... Give Beach But the the Fire Dragon's treasure set, but unless I'm missing something I wouldn't be able to create a drop of say... Floral Rod common/*Salamander rare.

Ccenemy edit does indeed have the item and element listing. As for why I don't use that I wanted something more permanent.

Grobycftw

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 85
  • Chilling in the Bend of Time
    • View Profile
Re: Drop tables
« Reply #5 on: April 30, 2019, 03:44:38 pm »
Oh no it's not a enemy treasure's set its the value itself that define the drop,
for example : 5A = Earth Charm
you can make a drop/rare drop  or steal/rare steal for any enemy => Earth Charm
you could put OmegaBlack as drop for beach bum if you want, isn't that what you are trying to do?
Or you want to make a new Drop Table? Like completely different? If so I can't help anymore than that xP

*Oh And Yes you could do what you just ask :)  Floral rod/salamander for sure

** I know i've had few issues with ccenemyedit too, but it helped me figured out a couple a things testing/using it !


***Hey I just check out the list in ccenemyedit and it is not the same list at all, earth charm is 0E9 , I'm a.. I'm a have a look into this later today , gonna do some test hehe, been a while since I've done CC edit :P
« Last Edit: April 30, 2019, 04:50:46 pm by Grobycftw »

IHBP

  • Architect of Kajar
  • Chronopolitan (+300)
  • *
  • Posts: 379
    • View Profile
Re: Drop tables
« Reply #6 on: April 30, 2019, 06:19:36 pm »
 I'd like to have a look at that "file 0008" mention in your link, that probably tells you how the drop tables are laid out.

Grobycftw

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 85
  • Chilling in the Bend of Time
    • View Profile
Re: Drop tables
« Reply #7 on: April 30, 2019, 07:26:57 pm »
This
https://www.chronocompendium.com/Term/0008.html
you can find it here
https://www.chronocompendium.com/Term/Modification.html


*I think you're right, it seems it does call a drop table huh gotta find that table/list

**Also here's the bitmask enemy's innate color is using , I'll update it in my notes.
Byte Element Color bitmask:

0x00 Unknown/irrelevant?
0x04 Green
0x08 White(/physical? used for Pip's techs too)
0x10 Black
0x20 Red
0x40 Yellow
0x80 Blue
0xFC Chrono Cross





***Ok so after a few test , in the 0008 files it says it contains 7 lzss-compressed files.
one of them might be the table loot, I'm like 99.99% sure its the
#3 => 16A922 - 16B099 (779) cut from 16AD60 - 16AE8F
after making test using ccenemyedit this Lzss file is always modified, you're right it is compressed and I'm trying to understand how it works


**** Hey I just found out that changing this offset
16A93D = Komodo Pop normal drop
it's the Komodo Pop (home) normal drop :o but you can only change it for items, i'll try making it an element!
« Last Edit: May 01, 2019, 03:51:01 am by Grobycftw »

IHBP

  • Architect of Kajar
  • Chronopolitan (+300)
  • *
  • Posts: 379
    • View Profile
Re: Drop tables
« Reply #8 on: May 08, 2019, 05:27:17 pm »
Cool, too bad it's compressed though, that makes it a little harder to edit.

F-man

  • Iokan (+1)
  • *
  • Posts: 12
    • View Profile
Re: Drop tables
« Reply #9 on: January 03, 2023, 05:08:55 pm »
Sorry for replaying to this years old topic, but I am very interested to know if anyone knows now how to do this, as I am personally having some trouble. I have used purplecattools to dump files from the cd. The droptable seems defintely to be in file 0008 and I can quite easily extract the right data, decompress it to editable format and then edit it as I like. I am using the tool from utunnels_utils for decompression and compression btw. The problem is likely with the compressionv as the compressed file is very different in size from the original and I just cannot dump the recompressed data back to 0008 without game crashing after battle. I have no idea how enemyedit makes this work.

EDIT: As the samplefile in the compression process I am using the original compressed data. There was no documention what I should use so that seemed to be most sensible choice. I finally got it to read the table without crash but now all text in the after battlescreen is seriously messed up.

EDIT2: OK, I solved this myself finally. I just hadn't changed index values at the beginning of the 0008 file. Now everything works perfectly.
« Last Edit: January 07, 2023, 10:06:05 am by F-man »

F-man

  • Iokan (+1)
  • *
  • Posts: 12
    • View Profile
Re: Drop tables
« Reply #10 on: January 07, 2023, 12:14:43 pm »
In case anyone needs this information, I will write here how I edited drop table.
1) Take file 0008 from cd by using PurpleCatTools.
2) By using a hex editor, make new file from the data starting from offset 3B4. The first hex values are 73 73 and the last ones 77 77.
3) Use lzss.exe from utunnels_utils to decompress the drop table from the data you just got.
4) The decompressed table in 8 bytes wide: Normal drop, rare drop, normal steal, rare steal. Each one is 2 bytes. 80 in the second byte makes the drop an element, otherwise it is an item.
5) When your drop table is ready, compress it again with lzss.exe while using the original compressed table as the sample file.
6) Remove the old compressed table from the file 0008 and replace it with your new one. They are of different size so you cannot just overwrite the old one.
7) At the start of 0008 file are the locations of each table in the file. Because the new table is larger than the original one, you have to increase these values so that they match the new offsets (starting from the table AFTER the table you just edited).
8) Now just insert 0008 back to the cd.

glennxserge

  • Earthbound (+15)
  • *
  • Posts: 34
  • Sacred lickaroo.... Not!
    • View Profile
    • Chrono Cross FateTerminal
Re: Drop tables
« Reply #11 on: January 08, 2023, 03:22:46 am »
Thanks F-man for reviving this thread.  Believe it or not, it's rather timely  :lol:
I'm finishing up work on my own tool for editing parts of the game, but it only changes discreet, fixed size blocks of data (no compressed files since I'm poking values directly into the bin).  So I can only edit things like enemies, characters, shops, and elements.  Just yesterday I was thinking I should give the purple cat tools a check to see if I could incorporate battlescript, drop tables, and eins files into my application, but wasn't sure if it would work.  Thanks for confirming!  I'm going to give this a try too.

F-man

  • Iokan (+1)
  • *
  • Posts: 12
    • View Profile
Re: Drop tables
« Reply #12 on: January 08, 2023, 05:14:53 am »
You are welcome! I am very happy to be of use. Hopefully you release your tools too.
It is good to remember that compression either works or it doesn't. I have noticed that compression of some fieldscripts breaks them but most of them tend to work. So, the program I am using is likely the best one so far but not a perfect one either. If you are implementing compression to your tools, it is best to use it separately when finishing the editing. I am quite sure the enemy edit tool sometimes corrupts the data by constantly comperssing it and then eventually failing at it.
Battlescripts are fun to edit, if you can make it even simpler that would be great too :)
Though, I don't think you need lzss tool for editing them... fieldscripts are a different thing, of course.
« Last Edit: January 08, 2023, 05:22:34 am by F-man »

Grobycftw

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 85
  • Chilling in the Bend of Time
    • View Profile
Re: Drop tables
« Reply #13 on: March 31, 2023, 11:26:31 pm »
Woaw this looks incredible! I must totally try it out as soon as I can
Very nice breakthrough here F-man! One more step towards a fully editable CC game!

You also found how the values for Selling Prices works, that is neat  8)

F-man

  • Iokan (+1)
  • *
  • Posts: 12
    • View Profile
Re: Drop tables
« Reply #14 on: April 05, 2023, 01:31:26 pm »
I have done lots of research so I know several things so feel free to ask me too if you have problems. I am pretty good with battlescripts if I am allowed to say that. I check these forums now and then.