Posted: Tue Jul 21, 2020 2:41 pm Post subject:
I figured out how to add new overalys to the game
In light of the attempts by Oofjay to get new overlays working in-game I decided to start from scratch and do my own attempt at getting new overlays working.
Attached is my TD mod plus the source changes I have.
If you have a TD map that references the overlay bti1, it will make that tile (wherever its placed) turn into "blue tiberium". This will look like an upside-down version of regular tiberium in the remaster graphics mode and like regular tiberium in the classic graphics mode. When harvested it will give 2x the value of regular tiberium.
What I changed in the source code:
1.Update CellClass::Tiberium_Adjust in cell.cpp to correctly choose blue tiberium instead of regular tiberium.
2.Add new blue tiberium defines to OverlayType in defines.h
3.Update DLLExportClass::Cell_Class_Draw_It in dllinterface.cpp so it classifies blue tiberium as a resource
4.Update DLLExportClass::Debug_Heal_Unit in dllinterface.cpp to correctly choose blue tiberium instead of regular tiberium.
5.Update MapClass::Logic in map.cpp to correctly choose blue tiberium instead of regular tiberium.
6.Add new overlay data to ODATA.CPP
7.Add code to init.cpp to load a mod.mix file
8.Change UnitClass::Harvesting so that it will give 2x the amount of tiberium when harvesting blue tiberium.
Other changes in the mod:
1.Create mod.mix containing the necessary classic-mode shp files.
2.Add the necessary entries to TD_TERRAIN_DESERT.XML, TD_TERRAIN_TEMPERATE.XML and TD_TERRAIN_WINTER.XML.
and 3.Create the remaster-mode graphics by taking the existing tiberium artwork, renaming it and flipping it upside-down.
It seems that new overlay types need classic shp files or they wont draw any graphics (even in remaster mode) and those shp files have to live in a .mix file and not loose.
Sorry to bother again, but I still cannot get the art to show up
I haven't implemented the tiberium logic yet, so I've classed the BTIB tiles as walls for now. No matter what I do, they're invisible. Perhaps also a good idea to look into this if I ever want to make new wall tiles or something.
I've included my code files below. Odd thing is, when I stick your tiberiandawn.dll in my mod file, it works perfectly, so it's not the art that's wrong. However, I just cannot replicate adding a new overlay.
Got it - the walls were not theater specific, and all the art was sorted by specific theaters. I set "theater specific" to true and the damn thing finally shows up!
Now I'll work on all the logic and aesthetics for the blue tiberium. Thanks a lot for all the help! QUICK_EDIT
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum