Here are some pices of information about it:
You have to modify the the advance.txt in your ..\ctp2_data\default\gamedata\ to add more advances compare this file with the craddle or MedPack2 versions craddle version can be found in the ..\scenarios\cradle of civilization 1.1\scen0000\default\gamedata\ folder and the MedPack version is called MM2_advance.txt.
If you want to add a picture for your new advance you have to modify the uniticon.txt in the same folder as the advance.txt.
To add the name for your advance you you have to modify the gl_str.txt in your ..\ctp2_data\english\gamedata\ folder.
To add Great Library entries you have to modify the Great_Library.txt in the same folder as gl_str.txt.
For the units you start with the unit.txt. The unit graphics that you see on the map are stored in sprite files. A unit sprite file for CTP2 looks like gu000.spr. You find the sprites in the ..\ctp2_data\default\grapics\sprites\ folder. The unit sprites for CTP1 can also be found in this folder they are called like gu00.spr. To add the sprites for your units you have to modify the file newsprites.txt in your ..\ctp2_data\default\gamedata\ folder. To add the stuff for the Great Library follow the steps for the advances (uniticon.txt, gl_str.txt, Great_Library)
I tryed to make the explanation short therefore I left out examples. But I think it is no problem to copy, paste and modify the code of existing advances and units. So if you need more information about it please ask.